From 29e522ce7f8950cbb702043b9e83d9ae9cdc038d Mon Sep 17 00:00:00 2001 From: Vaishnav Nair Date: Wed, 22 Jun 2022 21:27:02 +0530 Subject: [PATCH] [docs] Update minified file #132 closes #132 --- README.md | 48 ++++++++++++++++++++-------------------- dist/netjsongraph.min.js | 10 ++++----- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 1ae3ec5e..543dfa20 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ socket.on("disconnect", function() { socket.on("netjsonChange", graph.utils.JSONDataUpdate.bind(graph)); ``` -Demo is [here](https://openwisp.io/netjsongraph.js/examples/netjson-updateData.html). +Demo is [here](https://openwisp.github.io/netjsongraph.js/examples/netjson-updateData.html). I use [socket.io](https://socket.io/) to monitor data changes, which supports WebSocket or polling. And I build a simple local server using the express framework and nodeJS. Before testing, you need to open it. @@ -240,7 +240,7 @@ const graph = new NetJSONGraph("./data/netjsonmap.json", { graph.render(); ``` -Demo is [here](https://openwisp.io/netjsongraph.js/examples/netjson-searchElements.html). +Demo is [here](https://openwisp.github.io/netjsongraph.js/examples/netjson-searchElements.html). You can input `test`(overrideData) or `appendData`(appendData) and click the `search` button. The view will change if the value is `valid`, and you can also click the back button of browser to `go back`. @@ -263,7 +263,7 @@ You can deal with the data asynchronously by `dealDataByWorker`. */ ``` -Demo is [here](https://openwisp.io/netjsongraph.js/examples/netjson-multipleInterfaces.html). +Demo is [here](https://openwisp.github.io/netjsongraph.js/examples/netjson-multipleInterfaces.html). You can simply set the `dealDataByWorker` param in config to process the data asynchronously before rendering. Of course you can also call the function directly. @@ -291,7 +291,7 @@ We mainly use it to parse the time into the browser's current time zone based on If you provide `time` field in node or link's properties, it'll display the parse date in the detail info defaultly. -Demo is [here](https://openwisp.io/netjsongraph.js/examples/netjson-dateParse.html). +Demo is [here](https://openwisp.github.io/netjsongraph.js/examples/netjson-dateParse.html). #### Render @@ -342,31 +342,31 @@ Demo is [here](https://openwisp.io/netjsongraph.js/examples/netjson-dateParse.ht ### Different Demos The demo shows default `graph` render. -[NetJSON graph base Demo](https://openwisp.io/netjsongraph.js/examples/netjsongraph.html) +[NetJSON graph base Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsongraph.html) The demo shows `map` render. -[NetJSON map base Demo](https://openwisp.io/netjsongraph.js//examples/netjsonmap.html) +[NetJSON map base Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap.html) The demo shows how to use `graphGL` to render big data. -[NetJSON graphGL(bigData) Demo](https://kutugu.github.io/NetJSONDemo/examples/netjsongraph-graphGL.html) +[NetJSON graphGL(bigData) Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsongraph-graphGL.html) The demo shows how to set colorful elements. -[NetJSON graph elements legend Demo](https://openwisp.io/netjsongraph.js/examples/netjsongraph-elementsLegend.html) +[NetJSON graph elements legend Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsongraph-elementsLegend.html) The demo shows the multiple links render. Currently only supports up to two links. -[NetJSON graph multiple links Demo](https://openwisp.io/netjsongraph.js/examples/netjsongraph-multipleLinks.html) +[NetJSON graph multiple links Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsongraph-multipleLinks.html) The demo is used to show how to deal with the `multiple interfaces` in the NetJSON data. We provide a work file to process the data before rendering. This file provides functions to remove dirty data, deduplicate, handle multiple interfaces, add node links, add flatNodes and so on. You can also define related files yourself. -[NetJSON multiple interfaces Demo](https://openwisp.io/netjsongraph.js/examples/netjson-multipleInterfaces.html) +[NetJSON multiple interfaces Demo](https://openwisp.github.io/netjsongraph.js/examples/netjson-multipleInterfaces.html) The demo is used to show the use of the `dataParse` function. You can set the node or link property value `time`, we will call this function to parse the string in the element details defaultly. Of course you can also call directly. -[NetJSON dataParse Demo](https://openwisp.io/netjsongraph.js/examples/netjson-dateParse.html) +[NetJSON dataParse Demo](https://openwisp.github.io/netjsongraph.js/examples/netjson-dateParse.html) The demo is used to show how to use the `JSONDataUpdate` function to update data. In this example we use socket.io to listen for server messages. @@ -375,55 +375,55 @@ overrride old data and deal with the new data with the processing function set i See other examples: netjsonmap-appendData.html: It chooses append data. netjsonmap-nodeTiles.html: override data by different zoom value. -[NetJSON updateData realtime Demo](https://openwisp.io/netjsongraph.js/examples/netjson-updateData.html) +[NetJSON updateData realtime Demo](https://openwisp.github.io/netjsongraph.js/examples/netjson-updateData.html) The demo shows how to switch the netjsongraph render mode -- `svg` or `canvas`. -[NetJSON switch render mode Demo](https://openwisp.io/netjsongraph.js/examples/netjson-switchRenderMode.html) +[NetJSON switch render mode Demo](https://openwisp.github.io/netjsongraph.js/examples/netjson-switchRenderMode.html) The demo shows how to switch the netjsongraph render mode -- `graph` or `map`. -[NetJSON switch graph mode Demo](https://openwisp.io/netjsongraph.js/examples/netjson-switchGraphMode.html) +[NetJSON switch graph mode Demo](https://openwisp.github.io/netjsongraph.js/examples/netjson-switchGraphMode.html) The demo is used to show the use of the `searchElements` function. For test, you can input `test` or `appendData` and click the `search` button. -[NetJSON search elements Demo](https://openwisp.io/netjsongraph.js/examples/netjson-searchElements.html) +[NetJSON search elements Demo](https://openwisp.github.io/netjsongraph.js/examples/netjson-searchElements.html) The demo shows hwo to interact with elements. -[NetJSON nodes expand or fold Demo](https://openwisp.io/netjsongraph.js/examples/netjsongraph-nodeExpand.html) +[NetJSON nodes expand or fold Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsongraph-nodeExpand.html) The demo is used to show how to use the `JSONDataUpdate` function to update data. See other examples: netjson-updateData.html: It chooses override data. netjsonmap-appendData.html: It chooses append data. -[NetJSON map nodes zoom tiles Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-nodeTiles.html) +[NetJSON map nodes zoom tiles Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-nodeTiles.html) The demo shows hwo to set path animation. -[NetJSON map animation lines Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-animation.html) +[NetJSON map animation lines Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-animation.html) The demo is used to show how to set indoor map. Mainly the operation of leaflet. -[NetJSON indoormap Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-indoormap.html) +[NetJSON indoormap Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-indoormap.html) The demo is used to show how to set indoor map. Similiar to the first method, the difference is the setting of image's position. -[NetJSON indoormap 2 Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-indoormap2.html) +[NetJSON indoormap 2 Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-indoormap2.html) The demo is used to show how to use the leaflet plugins. Mainly the operation of leaflet. -[NetJSON map plugins Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-plugins.html) +[NetJSON map plugins Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-plugins.html) The demo shows the multiple tiles render. -[NetJSON map multiple tiles Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-multipleTiles.html) +[NetJSON map multiple tiles Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-multipleTiles.html) The demo is used to show how to use the `JSONDataUpdate` function to update data. Here we choose to append data by modify the default parameter. See other examples: netjson-updateData.html: It chooses override data. netjsonmap-nodeTiles.html: override data by different zoom value. -[NetJSON map append data Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-appendData.html) +[NetJSON map append data Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-appendData.html) Using array files to append data step by step at start. Similiar to the first method, but easier. -[NetJSON map append data 2 Demo](https://openwisp.io/netjsongraph.js/examples/netjsonmap-appendData2.html) +[NetJSON map append data 2 Demo](https://openwisp.github.io/netjsongraph.js/examples/netjsonmap-appendData2.html) ### Contributing diff --git a/dist/netjsongraph.min.js b/dist/netjsongraph.min.js index ca0d27b4..d934dd9c 100644 --- a/dist/netjsongraph.min.js +++ b/dist/netjsongraph.min.js @@ -1,9 +1,9 @@ !function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=514)}([function(t,e){var i={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},n={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},r=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,u=a.map,h=a.reduce,c={};function d(t){if(null==t||"object"!=typeof t)return t;var e=t,a=r.call(t);if("[object Array]"===a){if(!T(t)){e=[];for(var o=0,s=t.length;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},V.getDom=function(){return this._dom},V.getZr=function(){return this._zr},V.setOption=function(t,e,i){if(this._disposed)this.id;else{var n;if(D(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[N]=!0,!this._model||e){var r=new d(this._api),a=this._theme,o=this._model=new u;o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,ot),i?(this.__optionUpdated={silent:n},this[N]=!1):(U(this),H.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[N]=!1,X.call(this,n),Y.call(this,n))}},V.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},V.getModel=function(){return this._model},V.getOption=function(){return this._model&&this._model.getOption()},V.getWidth=function(){return this._zr.getWidth()},V.getHeight=function(){return this._zr.getHeight()},V.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},V.getRenderedCanvas=function(t){if(o.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},V.getSvgDataURL=function(){if(o.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return r.each(e,(function(t){t.stopAnimation(!0)})),t.painter.toDataURL()}},V.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],r=this;E(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return E(n,(function(t){t.group.ignore=!1})),a}this.id},V.getConnectedDataURL=function(t){if(this._disposed)this.id;else if(o.canvasSupported){var e="svg"===t.type,i=this.group,a=Math.min,s=Math.max;if(dt[i]){var l=1/0,u=1/0,h=-1/0,c=-1/0,d=[],f=t&&t.pixelRatio||1;r.each(ct,(function(n,o){if(n.group===i){var f=e?n.getZr().painter.getSvgDom().innerHTML:n.getRenderedCanvas(r.clone(t)),p=n.getDom().getBoundingClientRect();l=a(p.left,l),u=a(p.top,u),h=s(p.right,h),c=s(p.bottom,c),d.push({dom:f,left:p.left,top:p.top})}}));var p=(h*=f)-(l*=f),g=(c*=f)-(u*=f),m=r.createCanvas(),v=n.init(m,{renderer:e?"svg":"canvas"});if(v.resize({width:p,height:g}),e){var _="";return E(d,(function(t){var e=t.left-l,i=t.top-u;_+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=_,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new y.Rect({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),E(d,(function(t){var e=new y.Image({style:{x:t.left*f-l,y:t.top*f-u,image:t.dom}});v.add(e)})),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},V.convertToPixel=r.curry(G,"convertToPixel"),V.convertFromPixel=r.curry(G,"convertFromPixel"),V.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=x.parseFinder(n,t),r.each(t,(function(t,n){n.indexOf("Models")>=0&&r.each(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}}),this)}),this),!!i}this.id},V.getVisual=function(t,e){var i=this._model,n=(t=x.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=r?n.getItemVisual(r,e):n.getVisual(e)},V.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},V.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var H={prepareAndUpdate:function(t){U(this),H.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,s=this._scheduler;if(e){s.restoreData(e,t),s.performSeriesTasks(e),r.create(e,i),s.performDataProcessorTasks(e,t),j(this,e),r.update(e,i),K(e),s.performVisualTasks(e,t),J(this,e,i,t);var l=e.get("backgroundColor")||"transparent";if(o.canvasSupported)n.setBackgroundColor(l);else{var u=a.parse(l);l=a.stringify(u,"rgb"),0===u[3]&&(l="transparent")}Q(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var a=[];e.eachComponent((function(r,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,n,t);l&&l.update&&a.push(s)}else a.push(s)}));var o=r.createHashMap();e.eachSeries((function(r){var a=i._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,n,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)})),K(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),$(i,e,n,t,o),Q(e,this._api)}},updateView:function(t){var e=this._model;e&&(_.markUpdateMethod(t,"updateView"),K(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),J(this,this._model,this._api,t),Q(e,this._api))},updateVisual:function(t){H.update.call(this,t)},updateLayout:function(t){H.update.call(this,t)}};function U(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),q(t,"component",e,i),q(t,"chart",e,i),i.plan()}function W(t,e,i,n,a){var o=t._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};a&&(l.subType=a);var u=i.excludeSeriesId;null!=u&&(u=r.createHashMap(x.normalizeToArray(u))),o&&o.eachComponent(l,(function(e){u&&null!=u.get(e.id)||h(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else E(t._componentsViews.concat(t._chartsViews),h);function h(n){n&&n.__alive&&n[e]&&n[e](n.__model,o,t._api,i)}}function j(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries((function(t){n.updateStreamModes(t,i[t.__viewId])}))}function Z(t,e){var i=t.type,n=t.escapeConnect,a=nt[i],o=a.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&O(s[0]),this[N]=!0;var u=[t],h=!1;t.batch&&(h=!0,u=r.map(t.batch,(function(e){return(e=r.defaults(r.extend({},e),t)).batch=null,e})));var c,d=[],f="highlight"===i||"downplay"===i;E(u,(function(t){(c=(c=a.action(t,this._model,this._api))||r.extend({},t)).type=o.event||c.type,d.push(c),f?W(this,l,t,"series"):s&&W(this,l,t,s.main,s.sub)}),this),"none"===l||f||s||(this.__optionUpdated?(U(this),H.update.call(this,t),this.__optionUpdated=!1):H[l].call(this,t)),c=h?{type:o.event||i,escapeConnect:n,batch:d}:d[0],this[N]=!1,!e&&this._messageCenter.trigger(c.type,c)}function X(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Z.call(this,i,t)}}function Y(t){!t&&this.trigger("updated")}function q(t,e,i,n){for(var r="component"===e,a=r?t._componentsViews:t._chartsViews,o=r?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;ue.get("hoverLayerThreshold")&&!o.node&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse((function(t){t.useHoverLayer=!0}))}}))}(t,e),T(t._zr.dom,e)}function Q(t,e){E(st,(function(i){i(t,e)}))}V.resize=function(t){if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[N]=!0,i&&U(this),H.update.call(this),this[N]=!1,X.call(this,n),Y.call(this,n)}}},V.showLoading=function(t,e){if(this._disposed)this.id;else if(D(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ht[t]){var i=ht[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},V.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},V.makeActionFromEvent=function(t){var e=r.extend({},t);return e.type=rt[t.type],e},V.dispatchAction=function(t,e){this._disposed?this.id:(D(e)||(e={silent:!!e}),nt[t.type]&&this._model&&(this[N]?this._pendingActions.push(t):(Z.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&o.browser.weChat&&this._throttledZrFlush(),X.call(this,e.silent),Y.call(this,e.silent))))},V.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},V.on=z("on",!1),V.off=z("off",!1),V.one=z("one",!1);var tt=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function et(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))}))}function it(){this.eventInfo}V._initEvents=function(){E(tt,(function(t){var e=function(e){var i,n=this.getModel(),a=e.target;if("globalout"===t)i={};else if(a&&null!=a.dataIndex){var o=a.dataModel||n.getSeriesByIndex(a.seriesIndex);i=o&&o.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=r.extend({},a.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&n.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:u,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),E(rt,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},V.isDisposed=function(){return this._disposed},V.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},V.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,x.setAttribute(this.getDom(),gt,"");var t=this._api,e=this._model;E(this._componentsViews,(function(i){i.dispose(e,t)})),E(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete ct[this.id]}},r.mixin(F,l),it.prototype={constructor:it,normalizeQuery:function(t){var e={},i={},n={};if(r.isString(t)){var a=O(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};r.each(t,(function(t,r){for(var a=!1,l=0;l0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,a=!0)}}s.hasOwnProperty(r)&&(i[r]=t,a=!0),a||(n[r]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var nt={},rt={},at=[],ot=[],st=[],lt=[],ut={},ht={},ct={},dt={},ft=new Date-0,pt=new Date-0,gt="_echarts_instance_";function mt(t){dt[t]=!1}var vt=mt;function _t(t){return ct[x.getAttribute(t,gt)]}function yt(t,e){ut[t]=e}function xt(t){ot.push(t)}function bt(t,e){St(at,t,e,1e3)}function wt(t,e,i){"function"==typeof e&&(i=e,e="");var n=D(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,L(k.test(n)&&k.test(e)),nt[n]||(nt[n]={action:i,actionInfo:t}),rt[e]=n}function Tt(t,e){St(lt,t,e,3e3,"visual")}function St(t,e,i,n,r){(P(e)||D(e))&&(i=e,e=n);var a=M.wrapStageHandler(i,r);return a.__prio=e,a.__raw=i,t.push(a),a}function Mt(t,e){ht[t]=e}Tt(2e3,w),xt(f),bt(900,p),Mt("default",S),wt({type:"highlight",event:"highlight",update:"highlight"},r.noop),wt({type:"downplay",event:"downplay",update:"downplay"},r.noop),yt("light",A),yt("dark",C);e.version="4.9.0",e.dependencies={zrender:"4.3.2"},e.PRIORITY=R,e.init=function(t,e,i){var n=_t(t);if(n)return n;var r=new F(t,e,i);return r.id="ec_"+ft++,ct[r.id]=r,x.setAttribute(t,gt,r.id),function(t){var e="__connectUpdateStatus";function i(t,i){for(var n=0;n=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function at(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ot(t,e,i,n,r,a){if("function"==typeof r&&(a=r,r=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),u=n.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function st(t,e,i,n,r){ot(!0,t,e,i,n,r)}function lt(t,e,i){return e&&!n.isArrayLike(e)&&(e=u.getLocalTransform(e)),i&&(e=o.invert([],e)),s.applyTransform([],t,e)}function ut(t,e,i,n,r,a,o,s){var l,u=i-t,h=n-e,c=o-r,d=s-a,f=ht(c,d,u,h);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=t-r,g=e-a,m=ht(p,g,u,h)/f;if(m<0||m>1)return!1;var v=ht(p,g,c,d)/f;return!(v<0||v>1)}function ht(t,e,i,n){return t*n-i*e}R("circle",f),R("sector",p),R("ring",g),R("polygon",m),R("polyline",v),R("rect",_),R("line",y),R("bezierCurve",x),R("arc",b),e.Z2_EMPHASIS_LIFT=1,e.CACHED_LABEL_STYLE_PROPERTIES={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},e.extendShape=function(t){return l.extend(t)},e.extendPath=function(t,e){return r.extendFromString(t,e)},e.registerShape=R,e.getShapeClass=function(t){if(O.hasOwnProperty(t))return O[t]},e.makePath=N,e.makeImage=function(t,e,i){var n=new h({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(k(e,r))}}});return n},e.mergePath=z,e.resizePath=B,e.subPixelOptimizeLine=function(t){return C.subPixelOptimizeLine(t.shape,t.shape,t.style),t},e.subPixelOptimizeRect=function(t){return C.subPixelOptimizeRect(t.shape,t.shape,t.style),t},e.subPixelOptimize=F,e.setElementHoverStyle=X,e.setHoverStyle=function(t,e){Q(t,!0),Z(t,X,e)},e.setAsHighDownDispatcher=Q,e.isHighDownDispatcher=function(t){return!(!t||!t.__highDownDispatcher)},e.getHighlightDigit=function(t){var e=D[t];return null==e&&P<=32&&(e=D[t]=P++),e},e.setLabelStyle=function(t,e,i,r,a,o,s){var l,u=(a=a||E).labelFetcher,h=a.labelDataIndex,c=a.labelDimIndex,d=a.labelProp,f=i.getShallow("show"),p=r.getShallow("show");(f||p)&&(u&&(l=u.getFormattedLabel(h,"normal",null,c,d)),null==l&&(l=n.isFunction(a.defaultText)?a.defaultText(h,a):a.defaultText));var g=f?l:null,m=p?n.retrieve2(u?u.getFormattedLabel(h,"emphasis",null,c,d):null,l):null;null==g&&null==m||(tt(t,i,o,a),tt(e,r,s,a,!0)),t.text=g,e.text=m},e.modifyLabelStyle=function(t,e,i){var r=t.style;e&&(at(r),t.setStyle(e),rt(r)),r=t.__hoverStl,i&&r&&(at(r),n.extend(r,i),rt(r))},e.setTextStyle=tt,e.setText=function(t,e,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,et(t,e,r,n)},e.getFont=function(t,e){var i=e&&e.getModel("textStyle");return n.trim([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},e.updateProps=st,e.initProps=function(t,e,i,n,r){ot(!1,t,e,i,n,r)},e.getTransform=function(t,e){for(var i=o.identity([]);t&&t!==e;)o.mul(i,t.getLocalTransform(),i),t=t.parent;return i},e.applyTransform=lt,e.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=lt(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},e.groupTransition=function(t,e,i,r){if(t&&e){var a,o=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=l(t);t.attr(l(e)),st(t,n,i,t.dataIndex)}}}))}function l(t){var e={position:s.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=n.extend({},t.shape)),e}},e.clipPointsByRect=function(t,e){return n.map(t,(function(t){var i=t[0];i=I(i,e.x),i=L(i,e.x+e.width);var n=t[1];return n=I(n,e.y),[i,n=L(n,e.y+e.height)]}))},e.clipRectByRect=function(t,e){var i=I(t.x,e.x),n=L(t.x+t.width,e.x+e.width),r=I(t.y,e.y),a=L(t.y+t.height,e.y+e.height);if(n>=i&&a>=r)return{x:i,y:r,width:n-i,height:a-r}},e.createIcon=function(t,e,i){var r=(e=n.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),n.defaults(r,i),new h(e)):N(t.replace("path://",""),e,i,"center")},e.linePolygonIntersect=function(t,e,i,n,r){for(var a=0,o=r[r.length-1];a=10&&e++,e}e.linearMap=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},e.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},e.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},e.asc=function(t){return t.sort((function(t,e){return t-e})),t},e.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},e.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},e.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},e.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var r=n.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var a=Math.pow(10,i),o=n.map(t,(function(t){return(isNaN(t)?0:t)/r*a*100})),s=100*a,l=n.map(o,(function(t){return Math.floor(t)})),u=n.reduce(l,(function(t,e){return t+e}),0),h=n.map(o,(function(t,e){return t-l[e]}));uc&&(c=h[f],d=f);++l[d],h[d]=0,++u}return l[e]/a},e.MAX_SAFE_INTEGER=9007199254740991,e.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},e.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},e.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=r.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},e.quantity=function(t){return Math.pow(10,a(t))},e.quantityExponent=a,e.nice=function(t,e){var i=a(t),n=Math.pow(10,i),r=t/n;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},e.quantile=function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),r=+t[n-1],a=i-n;return a?r+a*(t[n]-r):r},e.reformIntervals=function(t){t.sort((function(t,e){return function t(e,i,n){return e.interval[n]=0}},function(t,e,i){var n=i(0),r=i(14),a=n.each,o=n.isObject,s=n.isArray;function l(t){return t instanceof Array?t:null==t?[]:[t]}function u(t){return o(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var h=0;function c(t,e){return t&&t.hasOwnProperty(e)}e.normalizeToArray=l,e.defaultEmphasis=function(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;n=i.length&&i.push({option:t})}})),i},e.makeIdAndName=function(t){var e=n.createHashMap();a(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),a(t,(function(t,i){var r=t.option;n.assert(!r||null==r.id||!e.get(r.id)||e.get(r.id)===t,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&e.set(r.id,t),!t.keyInfo&&(t.keyInfo={})})),a(t,(function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(o(r)){if(a.name=null!=r.name?r.name+"":n?n.name:"series\0"+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var s=0;do{a.id="\0"+a.name+"\0"+s++}while(e.get(a.id))}e.set(a.id,t)}}))},e.isNameSpecified=function(t){var e=t.name;return!(!e||!e.indexOf("series\0"))},e.isIdInner=u,e.compressBatches=function(t,e){var i={},n={};return r(t||[],i),r(e||[],n,i),[a(i),a(n)];function r(t,e,i){for(var n=0,r=t.length;n-1){var i=Object(r.parse)(t);i&&(t="rgb("+i[0]+","+i[1]+","+i[2]+")",e=i[3])}}else t="none";return{color:t,opacity:null==e?1:e}}function l(t){return t<1e-4&&t>-1e-4}function u(t){return o(1e3*t)/1e3}function h(t){return o(1e4*t)/1e4}function c(t){return"matrix("+u(t[0])+","+u(t[1])+","+u(t[2])+","+u(t[3])+","+h(t[4])+","+h(t[5])+")"}var d={left:"start",right:"end",center:"middle",middle:"middle"};function f(t,e,i){return"top"===i?t+=e/2:"bottom"===i&&(t-=e/2),t}function p(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function g(t){var e=t.style,i=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(",")}function m(t){return t&&!!t.image}function v(t){return m(t)||function(t){return t&&!!t.svgElement}(t)}function _(t){return"linear"===t.type}function y(t){return"radial"===t.type}function x(t){return t&&("linear"===t.type||"radial"===t.type)}function b(t){return"url(#"+t+")"}function w(t){var e=t.getGlobalScale(),i=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(i)/Math.log(10)),1)}function T(t){var e=t.x||0,i=t.y||0,r=(t.rotation||0)*n.RADIAN_TO_DEGREE,a=Object(n.retrieve2)(t.scaleX,1),s=Object(n.retrieve2)(t.scaleY,1),l=t.skewX||0,u=t.skewY||0,h=[];return(e||i)&&h.push("translate("+e+"px,"+i+"px)"),r&&h.push("rotate("+r+")"),1===a&&1===s||h.push("scale("+a+","+s+")"),(l||u)&&h.push("skew("+o(l*n.RADIAN_TO_DEGREE)+"deg, "+o(u*n.RADIAN_TO_DEGREE)+"deg)"),h.join(" ")}var S=a.default.hasGlobalWindow&&Object(n.isFunction)(window.btoa)?function(t){return window.btoa(unescape(t))}:void 0!==t?function(e){return t.from(e).toString("base64")}:function(t){return null}}).call(this,i(308).Buffer)},function(t,e,i){(function(t){var i;"undefined"!=typeof window?i=window.__DEV__:void 0!==t&&(i=t.__DEV__),void 0===i&&(i=!0);var n=i;e.__DEV__=n}).call(this,i(128))},function(t,e,i){var n=i(0),r=i(11),a=i(4).parsePercent,o=i(9),s=n.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=o+v)>r||l.newline?(a+=s+i,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+i:o=c+i)}))}var c=h,d=n.curry(h,"vertical"),f=n.curry(h,"horizontal");function p(t,e,i){i=o.normalizeCssArray(i||0);var n=e.width,s=e.height,l=a(t.left,n),u=a(t.top,s),h=a(t.right,n),c=a(t.bottom,s),d=a(t.width,n),f=a(t.height,s),p=i[2]+i[0],g=i[1]+i[3],m=t.aspect;switch(isNaN(d)&&(d=n-h-g-l),isNaN(f)&&(f=s-c-p-u),null!=m&&(isNaN(d)&&isNaN(f)&&(m>n/s?d=.8*n:f=.8*s),isNaN(d)&&(d=m*f),isNaN(f)&&(f=d/m)),isNaN(l)&&(l=n-h-d-g),isNaN(u)&&(u=s-c-f-p),t.left||t.right){case"center":l=n/2-d/2-i[3];break;case"right":l=n-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-f/2-i[0];break;case"bottom":u=s-f-p}l=l||0,u=u||0,isNaN(d)&&(d=n-g-l-(h||0)),isNaN(f)&&(f=s-p-u-(c||0));var v=new r(l+i[3],u+i[0],d,f);return v.margin=i,v}function g(t,e){return e&&t&&s(l,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}e.LOCATION_PARAMS=l,e.HV_NAMES=u,e.box=c,e.vbox=d,e.hbox=f,e.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,s=a(t.x,n),l=a(t.y,r),u=a(t.x2,n),h=a(t.y2,r);return(isNaN(s)||isNaN(parseFloat(t.x)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=n),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.y2)))&&(h=r),i=o.normalizeCssArray(i||0),{width:Math.max(u-s-i[1]-i[3],0),height:Math.max(h-l-i[0]-i[2],0)}},e.getLayoutRect=p,e.positionElement=function(t,e,i,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if(s||l){var h;if("raw"===u)h="group"===t.type?new r(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(h=h.clone()).applyTransform(c)}e=p(n.defaults({width:h.width,height:h.height},e),i,a);var d=t.position,f=s?e.x-h.x:0,g=l?e.y-h.y:0;t.attr("position","raw"===u?[f,g]:[d[0]+f,d[1]+g])}},e.sizeCalculable=function(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]},e.mergeLayoutParam=function(t,e,i){!n.isObject(i)&&(i={});var r=i.ignoreSize;!n.isArray(r)&&(r=[r,r]);var a=l(u[0],0),o=l(u[1],1);function l(i,n){var a={},o=0,l={},u=0;if(s(i,(function(e){l[e]=t[e]})),s(i,(function(t){h(e,t)&&(a[t]=l[t]=e[t]),c(a,t)&&o++,c(l,t)&&u++})),r[n])return c(e,i[1])?l[i[2]]=null:c(e,i[2])&&(l[i[1]]=null),l;if(2!==u&&o){if(o>=2)return a;for(var d=0;d"'])/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"};function u(t){return null==t?"":(t+"").replace(s,(function(t,e){return l[e]}))}var h=["a","b","c","d","e","f","g"],c=function(t,e){return"{"+t+(null==e?"":e)+"}"};function d(t,e){return"0000".substr(0,e-(t+="").length)+t}var f=r.truncateText;e.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},e.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},e.normalizeCssArray=o,e.encodeHTML=u,e.formatTpl=function(t,e,i){n.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var a=e[0].$vars||[],o=0;o':'':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""},e.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=a.parseDate(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),s=n["get"+r+"Month"]()+1,l=n["get"+r+"Date"](),u=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),c=n["get"+r+"Seconds"](),f=n["get"+r+"Milliseconds"]();return t=t.replace("MM",d(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",d(l,2)).replace("d",l).replace("hh",d(u,2)).replace("h",u).replace("mm",d(h,2)).replace("m",h).replace("ss",d(c,2)).replace("s",c).replace("SSS",d(f,3))},e.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},e.truncateText=f,e.getTextBoundingRect=function(t){return r.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},e.getTextRect=function(t,e,i,n,a,o,s,l){return r.getBoundingRect(t,e,i,n,a,l,o,s)},e.windowOpen=function(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array;function n(t){return Math.sqrt(a(t))}var r=n;function a(t){return t[0]*t[0]+t[1]*t[1]}var o=a;function s(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var l=s;function u(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var h=u;e.create=function(t,e){var n=new i(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,i){return t[0]=e,t[1]=i,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},e.sub=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},e.len=n,e.length=r,e.lenSquare=a,e.lengthSquare=o,e.mul=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},e.div=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},e.normalize=function(t,e){var i=n(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},e.distance=s,e.dist=l,e.distanceSquare=u,e.distSquare=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},e.applyTransform=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}},function(t,e,i){var n,r,a,o,s=i(10),l=i(20),u=s.applyTransform,h=Math.min,c=Math.max;function d(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}d.prototype={constructor:d,union:function(t){var e=h(t.x,this.x),i=h(t.y,this.y);this.width=c(t.x+t.width,this.x+this.width)-e,this.height=c(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(n=[],r=[],a=[],o=[],function(t){if(t){n[0]=a[0]=this.x,n[1]=o[1]=this.y,r[0]=o[0]=this.x+this.width,r[1]=a[1]=this.y+this.height,u(n,n,t),u(r,r,t),u(a,a,t),u(o,o,t),this.x=h(n[0],r[0],a[0],o[0]),this.y=h(n[1],r[1],a[1],o[1]);var e=c(n[0],r[0],a[0],o[0]),i=c(n[1],r[1],a[1],o[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=l.create();return l.translate(r,r,[-e.x,-e.y]),l.scale(r,r,[i,n]),l.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof d||(t=d.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(t){return new d(t.x,t.y,t.width,t.height)};var f=d;t.exports=f},function(t,e,i){var n=i(60),r=i(0),a=i(50),o=i(236),s=i(135).prototype.getCanvasPattern,l=Math.abs,u=new a(!0);function h(t){n.call(this,t),this.path=null}h.prototype={constructor:h,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,r=this.path||u,a=n.hasStroke(),o=n.hasFill(),l=n.fill,h=n.stroke,c=o&&!!l.colorStops,d=a&&!!h.colorStops,f=o&&!!l.image,p=a&&!!h.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(c&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,l,i)),d&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,h,i)));c?t.fillStyle=this._fillGradient:f&&(t.fillStyle=s.call(l,t)),d?t.strokeStyle=this._strokeGradient:p&&(t.strokeStyle=s.call(h,t));var g=n.lineDash,m=n.lineDashOffset,v=!!t.setLineDash,_=this.getGlobalScale();if(r.setScale(_[0],_[1],this.segmentIgnoreThreshold),this.__dirtyPath||g&&!v&&a?(r.beginPath(t),g&&!v&&(r.setLineDash(g),r.setLineDashOffset(m)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=n.fillOpacity){var y=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,r.fill(t),t.globalAlpha=y}else r.fill(t);if(g&&v&&(t.setLineDash(g),t.lineDashOffset=m),a)if(null!=n.strokeOpacity){y=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,r.stroke(t),t.globalAlpha=y}else r.stroke(t);g&&v&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new a),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,s=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),s>1e-10&&(r.width+=o/s,r.height+=o/s,r.x-=o/s/2,r.y-=o/s/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var s=r.lineWidth,l=r.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(r.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,t,e)))return!0}if(r.hasFill())return o.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):n.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(r.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&l(t[0]-1)>1e-10&&l(t[3]-1)>1e-10?Math.sqrt(l(t[0]*t[3]-t[2]*t[1])):1}},h.extend=function(t){var e=function(e){h.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};for(var i in r.inherits(e,h),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},r.inherits(h,n);var c=h;t.exports=c},function(t,e,i){"use strict";i.r(e);var n=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new n,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgSupported=!0):function(t,e){var i=e.browser,n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]);r&&(i.ie=!0,i.version=r[1]);a&&(i.edge=!0,i.version=a[1],i.newEdge=+a[1].split(".")[0]>18);o&&(i.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,e.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&+i.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(i.ie&&"transition"in s||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||i.ie&&+i.version>=9}(navigator.userAgent,r),e.default=r},function(t,e){var i="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);r&&(e.edge=!0,e.version=r[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&e.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);t.exports=i},function(t,e,i){var n=i(0),r=i(14),a=i(5).makeInner,o=i(30),s=o.enableClassExtend,l=o.enableClassCheck,u=i(233),h=i(234),c=i(235),d=i(248),f=n.mixin,p=a();function g(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function m(t,e,i){for(var n=0;n=0;o--)a=n.merge(a,e[o],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});s(f,{registerWhenExtend:!0}),a.enableSubTypeDefaulter(f),a.enableTopologicalTravel(f,(function(t){var e=[];n.each(f.getClassesByMainType(t),(function(t){e=e.concat(t.prototype.dependencies||[])})),e=n.map(e,(function(t){return l(t).main})),"dataset"!==t&&n.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e})),n.mixin(f,c);var p=f;t.exports=p},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(14),a=i(9),o=a.formatTime,s=a.encodeHTML,l=a.addCommas,u=a.getTooltipMarker,h=i(5),c=i(16),d=i(151),f=i(100),p=i(8),g=p.getLayoutParams,m=p.mergeLayoutParam,v=i(101).createTask,_=i(31),y=_.prepareSource,x=_.getSource,b=i(42).retrieveRawValue,w=h.makeInner(),T=c.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=v({count:M,reset:A}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),y(this);var r=this.getInitialData(t,i);I(r,this),this.dataTask.context.data=r,w(this).dataBeforeProcessed=r,S(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,r=i?g(t):{},a=this.subType;c.hasClass(a)&&(a+="Series"),n.merge(t,e.getTheme().get(this.subType)),n.merge(t,this.getDefaultOption()),h.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&m(t,r,i)},mergeOption:function(t,e){t=n.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&m(this.option,t,i),y(this);var r=this.getInitialData(t,e);I(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,w(this).dataBeforeProcessed=r,S(this)},fillDataTextStyle:function(t){if(t&&!n.isTypedArray(t))for(var e=["show"],i=0;i":"\n",d="richText"===r,f={},p=0;function g(t){return{renderMode:r,content:s(l(t)),style:f}}var m=this.getData(),v=m.mapDimension("defaultedTooltip",!0),_=v.length,y=this.getRawValue(t),x=n.isArray(y),w=m.getItemVisual(t,"color");n.isObject(w)&&w.colorStops&&(w=(w.colorStops[0]||{}).color),w=w||"transparent";var T=(_>1||x&&!_?function(i){var h=n.reduce(i,(function(t,e,i){var n=m.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)}),0),c=[];function g(t,i){var n=m.getDimensionInfo(i);if(n&&!1!==n.otherDims.tooltip){var g=n.type,v="sub"+a.seriesIndex+"at"+p,_=u({color:w,type:"subItem",renderMode:r,markerId:v}),y="string"==typeof _?_:_.content,x=(h?y+s(n.displayName||"-")+": ":"")+s("ordinal"===g?t+"":"time"===g?e?"":o("yyyy/MM/dd hh:mm:ss",t):l(t));x&&c.push(x),d&&(f[v]=w,++p)}}v.length?n.each(v,(function(e){g(b(m,t,e),e)})):n.each(i,g);var _=h?d?"\n":"
":"",y=_+c.join(_||", ");return{renderMode:r,content:y,style:f}}(y):g(_?b(m,t,v[0]):x?y[0]:y)).content,S=a.seriesIndex+"at"+p,M=u({color:w,type:"item",renderMode:r,markerId:S});f[S]=w,++p;var A=m.getName(t),C=this.name;h.isNameSpecified(this)||(C=""),C=C?s(C)+(e?": ":c):"";var I="string"==typeof M?M:M.content;return{html:e?I+C+T:C+I+(A?s(A)+": "+T:T),markers:f}},isAnimationEnabled:function(){if(r.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=d.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function S(t){var e=t.name;h.isNameSpecified(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),r=[];return n.each(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&r.push(i.displayName)})),r.join(" ")}(t)||e)}function M(t){return t.model.getRawData().count()}function A(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),C}function C(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function I(t,e){n.each(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,n.curry(L,e))}))}function L(t){var e=E(t);e&&e.setOutputEnd(this.count())}function E(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}n.mixin(T,f),n.mixin(T,d);var P=T;t.exports=P},function(t,e,i){"use strict";i.d(e,"c",(function(){return n})),i.d(e,"b",(function(){return r})),i.d(e,"a",(function(){return a})),i.d(e,"d",(function(){return u}));var n=12,r="sans-serif",a=n+"px "+r;var o,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var i=0;i=0)c=h*t.length;else for(var d=0;d255?255:t}function o(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function u(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function h(t,e,i){return t+(e-t)*i}function c(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var f=new n.a(20),p=null;function g(t,e){p&&d(p,e),p=f.put(t,p||e.slice())}function m(t,e){if(t){e=e||[];var i=f.get(t);if(i)return d(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in r)return d(e,r[n]),g(t,e),e;var a,o=n.length;if("#"===n.charAt(0))return 4===o||5===o?(a=parseInt(n.slice(1,4),16))>=0&&a<=4095?(c(e,(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,5===o?parseInt(n.slice(4),16)/15:1),g(t,e),e):void c(e,0,0,0,1):7===o||9===o?(a=parseInt(n.slice(1,7),16))>=0&&a<=16777215?(c(e,(16711680&a)>>16,(65280&a)>>8,255&a,9===o?parseInt(n.slice(7),16)/255:1),g(t,e),e):void c(e,0,0,0,1):void 0;var u=n.indexOf("("),h=n.indexOf(")");if(-1!==u&&h+1===o){var p=n.substr(0,u),m=n.substr(u+1,h-(u+1)).split(","),_=1;switch(p){case"rgba":if(4!==m.length)return 3===m.length?c(e,+m[0],+m[1],+m[2],1):c(e,0,0,0,1);_=l(m.pop());case"rgb":return 3!==m.length?void c(e,0,0,0,1):(c(e,s(m[0]),s(m[1]),s(m[2]),_),g(t,e),e);case"hsla":return 4!==m.length?void c(e,0,0,0,1):(m[3]=l(m[3]),v(m,e),g(t,e),e);case"hsl":return 3!==m.length?void c(e,0,0,0,1):(v(m,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=l(t[1]),r=l(t[2]),o=r<=.5?r*(n+1):r+n-r*n,s=2*r-o;return c(e=e||[],a(255*u(s,o,i+1/3)),a(255*u(s,o,i)),a(255*u(s,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function _(t,e){var i=m(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:i[n]<0&&(i[n]=0);return A(i,4===i.length?"rgba":"rgb")}}function y(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function x(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=e[r],u=e[s],c=n-r;return i[0]=a(h(l[0],u[0],c)),i[1]=a(h(l[1],u[1],c)),i[2]=a(h(l[2],u[2],c)),i[3]=o(h(l[3],u[3],c)),i}}var b=x;function w(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=m(e[r]),u=m(e[s]),c=n-r,d=A([a(h(l[0],u[0],c)),a(h(l[1],u[1],c)),a(h(l[2],u[2],c)),o(h(l[3],u[3],c))],"rgba");return i?{color:d,leftIndex:r,rightIndex:s,value:n}:d}}var T=w;function S(t,e,i,n){var r,a=m(t);if(t)return a=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(a),null!=e&&(a[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(a[1]=l(i)),null!=n&&(a[2]=l(n)),A(v(a),"rgba")}function M(t,e){var i=m(t);if(i&&null!=e)return i[3]=o(e),A(i,"rgba")}function A(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function C(t,e){var i=m(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*e:0}function I(){return A([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array;function n(){var t=new i(6);return r(t),t}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}e.create=n,e.identity=r,e.copy=a,e.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},e.translate=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},e.rotate=function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t},e.scale=function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},e.invert=function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null},e.clone=function(t){var e=n();return a(e,t),e}},function(t,e,i){var n=i(11),r=i(95),a=i(0),o=a.getContext,s=a.extend,l=a.retrieve2,u=a.retrieve3,h=a.trim,c={},d=0,f=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function g(t,e){var i=t+":"+(e=e||"12px sans-serif");if(c[i])return c[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a5e3&&(d=0,c={}),d++,c[i]=r,r}function m(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function v(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function _(t,e,i){var n=e.textPosition,r=e.textDistance,a=i.x,o=i.y;r=r||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return(t=t||{}).x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function y(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=x(e,i,n,r);for(var o=0,s=a.length;o=a;u++)o-=a;var h=g(i,e);return h>o&&(i="",h=0),o=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=o,n.containerWidth=t,n}function b(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=g(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?w(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=g(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function w(t,e,i,n){for(var r=0,a=0,o=t.length;ac)t="",o=[];else if(null!=d)for(var f=x(d-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),p=0,g=o.length;pa&&C(i,t.substring(a,o)),C(i,n[2],n[1]),a=f.lastIndex}a_)return{lines:[],width:0,height:0};z.textWidth=g(z.text,L);var P=A.textWidth,D=null==P||"auto"===P;if("string"==typeof P&&"%"===P.charAt(P.length-1))z.percentWidth=P,d.push(z),P=0;else{if(D){P=z.textWidth;var O=A.textBackgroundColor,R=O&&O.image;R&&(R=r.findExistImage(R),r.isImageReady(R)&&(P=Math.max(P,R.width*E/R.height)))}var N=I?I[1]+I[3]:0;P+=N;var k=null!=v?v-S:null;null!=k&&k65535?p:m}var _=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],y=["_extent","_approximateExtent","_rawExtent"];function x(t,e){n.each(_.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,n.each(y,(function(i){t[i]=n.clone(e[i])})),t._calculationInfo=n.extend(e._calculationInfo)}var b=function(t,e){t=t||["x","y"];for(var i={},r=[],a={},o=0;o=0?this._indices[t]:-1}function I(t,e){var i=t._idList[e];return null==i&&(i=M(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function L(t){return n.isArray(t)||(t=[t]),t}function E(t,e){var i=t.dimensions,r=new b(n.map(i,t.getDimensionInfo,t),t.hostModel);x(r,t);for(var a=r._storage={},o=t._storage,s=0;s=0?(a[l]=P(o[l]),r._rawExtent[l]=D(),r._extent[l]=null):a[l]=o[l])}return r}function P(t){for(var e,i,n=new Array(t.length),r=0;ry[1]&&(y[1]=_)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},S(this)},w._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pA[1]&&(A[1]=M)}if(!r.pure){var C=u[v];if(m&&null==C)if(null!=m.name)u[v]=C=m.name;else if(null!=i){var I=o[i],L=a[I][_];if(L){C=L[y];var E=l[I].ordinalMeta;E&&E.categories.length&&(C=E.categories[C])}}var P=null==m?null:m.id;null==P&&null!=C&&(d[C]=d[C]||0,P=C,d[C]>0&&(P+="__ec__"+d[C]),d[C]++),null!=P&&(h[v]=P)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},S(this)}},w.count=function(){return this._count},w.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){r=new e(i);for(var n=0;n=0&&e=0&&eo&&(o=l)}return n=[a,o],this._extent[t]=n,n},w.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},w.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},w.getCalculationInfo=function(t){return this._calculationInfo[t]},w.setCalculationInfo=function(t,e){d(t)?n.extend(this._calculationInfo,t):this._calculationInfo[t]=e},w.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return a;r=a-1}}return-1},w.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();s=0&&a<0)&&(r=h,a=u,o=0),u===a&&(n[o++]=s))}return n.length=o,n},w.getRawIndex=A,w.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i=l&&w<=u||isNaN(w))&&(a[o++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var _=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f=l&&w<=u||isNaN(w))&&(T>=y&&T<=x||isNaN(T))&&(a[o++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m=l&&w<=u||isNaN(w))&&(a[o++]=S)}else for(m=0;mt[I][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(m))}return ow[1]&&(w[1]=b)}}}return a},w.downSample=function(t,e,i,n){for(var r=E(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(v(this))(u),f=0,p=0;pu-p&&(s=u-p,o.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=b}return r._count=f,r._indices=d,r.getRawIndex=C,r},w.getItemModel=function(t){var e=this.hostModel;return new r(this.getRawDataItem(t),e,e&&e.ecModel)},w.diff=function(t){var e=this;return new a(t?t.getIndices():[],this.getIndices(),(function(e){return I(t,e)}),(function(t){return I(e,t)}))},w.getVisual=function(t){var e=this._visual;return e&&e[t]},w.setVisual=function(t,e){if(d(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},w.setLayout=function(t,e){if(d(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},w.getLayout=function(t){return this._layout[t]},w.getItemLayout=function(t){return this._itemLayouts[t]},w.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?n.extend(this._itemLayouts[t]||{},e):e},w.clearItemLayouts=function(){this._itemLayouts.length=0},w.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},w.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,d(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},w.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var O=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};w.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(O,e)),this._graphicEls[t]=e},w.getItemGraphicEl=function(t){return this._graphicEls[t]},w.eachItemGraphicEl=function(t,e){n.each(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},w.cloneShallow=function(t){if(!t){var e=n.map(this.dimensions,this.getDimensionInfo,this);t=new b(e,this.hostModel)}if(t._storage=this._storage,x(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?C:A,t},w.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(n.slice(arguments)))})},w.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],w.CHANGABLE_METHODS=["filterSelf","selectRange"];var R=b;t.exports=R},function(t,e,i){var n=i(0),r=i(3),a=i(11),o=i(21).calculateTextPosition,s=r.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),l=r.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),u=r.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;t.moveTo(i-h,l+s),t.arc(i,l,o,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),h=r.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),c={line:r.Line,rect:r.Rect,roundRect:r.Rect,square:r.Rect,circle:r.Circle,diamond:l,pin:u,arrow:h,triangle:s},d={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},f={};n.each(c,(function(t,e){f[e]=new t}));var p=r.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=o(t,e,i),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var r=f[n];r||(r=f[n="rect"]),d[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i)}}});function g(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}e.createSymbol=function(t,e,i,n,o,s,l){var u,h=0===t.indexOf("empty");return h&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(u=0===t.indexOf("image://")?r.makeImage(t.slice(8),new a(e,i,n,o),l?"center":"cover"):0===t.indexOf("path://")?r.makePath(t.slice(7),{},new a(e,i,n,o),l?"center":"cover"):new p({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=h,u.setColor=g,u.setColor(s),u}},function(t,e,i){var n=i(0),r={};function a(){this._coordinateSystems=[]}a.prototype={constructor:a,create:function(t,e){var i=[];n.each(r,(function(n,r){var a=n.create(t,e);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(t,e){n.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},a.register=function(t,e){r[t]=e},a.get=function(t){return r[t]};var o=a;t.exports=o},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(263),a=i(82),o=i(81),s=i(4),l=i(83),u=l.prepareLayoutBarSeries,h=l.makeColumnLayout,c=l.retrieveColumnLayout,d=i(11);function f(t,e){var i,r,a,o=t.type,l=e.getMin(),d=e.getMax(),f=t.getExtent();"ordinal"===o?i=e.getCategories().length:(r=e.get("boundaryGap"),n.isArray(r)||(r=[r||0,r||0]),"boolean"==typeof r[0]&&(r=[0,0]),r[0]=s.parsePercent(r[0],1),r[1]=s.parsePercent(r[1],1),a=f[1]-f[0]||Math.abs(f[0])),"dataMin"===l?l=f[0]:"function"==typeof l&&(l=l({min:f[0],max:f[1]})),"dataMax"===d?d=f[1]:"function"==typeof d&&(d=d({min:f[0],max:f[1]}));var p=null!=l,g=null!=d;null==l&&(l="ordinal"===o?i?0:NaN:f[0]-r[0]*a),null==d&&(d="ordinal"===o?i?i-1:NaN:f[1]+r[1]*a),(null==l||!isFinite(l))&&(l=NaN),(null==d||!isFinite(d))&&(d=NaN),t.setBlank(n.eqNaN(l)||n.eqNaN(d)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(l>0&&d>0&&!p&&(l=0),l<0&&d<0&&!g&&(d=0));var m=e.ecModel;if(m&&"time"===o){var v,_=u("bar",m);if(n.each(_,(function(t){v|=t.getBaseAxis()===e.axis})),v){var y=h(_),x=function(t,e,i,r){var a=i.axis.getExtent(),o=a[1]-a[0],s=c(r,i.axis);if(void 0===s)return{min:t,max:e};var l=1/0;n.each(s,(function(t){l=Math.min(t.offset,l)}));var u=-1/0;n.each(s,(function(t){u=Math.max(t.offset+t.width,u)})),l=Math.abs(l),u=Math.abs(u);var h=l+u,d=e-t,f=d/(1-(l+u)/o)-d;return{min:t-=f*(l/h),max:e+=f*(u/h)}}(l,d,e,y);l=x.min,d=x.max}}return{extent:[l,d],fixMin:p,fixMax:g}}function p(t){var e,i=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(e,r){return null!=n&&(r=e-n),i(g(t,e),r)}:function(e){return t.scale.getLabel(e)}}function g(t,e){return"category"===t.type?t.scale.getLabel(e):e}function m(t){var e=t.get("interval");return null==e?"auto":e}i(264),i(161),e.getScaleExtent=f,e.niceScaleExtent=function(t,e){var i=f(t,e),n=i.extent,r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var o=e.get("interval");null!=o&&t.setInterval&&t.setInterval(o)},e.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new r(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new a;default:return(o.getClass(e)||a).create(t)}},e.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},e.makeLabelFormatter=p,e.getAxisRawValue=g,e.estimateLabelUnionRect=function(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,r,a="category"===t.type,o=i.getExtent();r=a?i.count():(n=i.getTicks()).length;var s,l,u,h,c,f,g,m,v,_=t.getLabelModel(),y=p(t),x=1;r>40&&(x=Math.ceil(r/40));for(var b=0;b=0){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&c(t,r,e,i)}else c(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&u.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},e.addEventListener=function(t,e,i,n){l?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,n){l?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)},e.stop=p,e.isMiddleOrRightButtonOnMouseUpDown=function(t){return 2===t.which||3===t.which},e.notLeftMouse=function(t){return t.which>1}},function(t,e,i){var n=i(133),r={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 a(t){return(t=Math.round(t))<0?0:t>255?255:t}function o(t){return t<0?0:t>1?1:t}function s(t){return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function l(t){return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100):o(parseFloat(t))}function u(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function h(t,e,i){return t+(e-t)*i}function c(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var f=new n(20),p=null;function g(t,e){p&&d(p,e),p=f.put(t,p||e.slice())}function m(t,e){if(t){e=e||[];var i=f.get(t);if(i)return d(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in r)return d(e,r[a]),g(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(c(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),g(t,e),e):void c(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(c(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),g(t,e),e):void c(e,0,0,0,1):void 0;var o=a.indexOf("("),u=a.indexOf(")");if(-1!==o&&u+1===a.length){var h=a.substr(0,o),p=a.substr(o+1,u-(o+1)).split(","),m=1;switch(h){case"rgba":if(4!==p.length)return void c(e,0,0,0,1);m=l(p.pop());case"rgb":return 3!==p.length?void c(e,0,0,0,1):(c(e,s(p[0]),s(p[1]),s(p[2]),m),g(t,e),e);case"hsla":return 4!==p.length?void c(e,0,0,0,1):(p[3]=l(p[3]),v(p,e),g(t,e),e);case"hsl":return 3!==p.length?void c(e,0,0,0,1):(v(p,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=l(t[1]),r=l(t[2]),o=r<=.5?r*(n+1):r+n-r*n,s=2*r-o;return c(e=e||[],a(255*u(s,o,i+1/3)),a(255*u(s,o,i)),a(255*u(s,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function _(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=e[r],u=e[s],c=n-r;return i[0]=a(h(l[0],u[0],c)),i[1]=a(h(l[1],u[1],c)),i[2]=a(h(l[2],u[2],c)),i[3]=o(h(l[3],u[3],c)),i}}var y=_;function x(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=m(e[r]),u=m(e[s]),c=n-r,d=w([a(h(l[0],u[0],c)),a(h(l[1],u[1],c)),a(h(l[2],u[2],c)),o(h(l[3],u[3],c))],"rgba");return i?{color:d,leftIndex:r,rightIndex:s,value:n}:d}}var b=x;function w(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}e.parse=m,e.lift=function(t,e){var i=m(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return w(i,4===i.length?"rgba":"rgb")}},e.toHex=function(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},e.fastLerp=_,e.fastMapToColor=y,e.lerp=x,e.mapToColor=b,e.modifyHSL=function(t,e,i,n){if(t=m(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(t[1]=l(i)),null!=n&&(t[2]=l(n)),w(v(t),"rgba");var r},e.modifyAlpha=function(t,e){if((t=m(t))&&null!=e)return t[3]=o(e),w(t,"rgba")},e.stringify=w},function(t,e,i){var n=i(0).each,r=i(40),a=i(62),o=i(30),s=i(5),l=i(3),u=i(101).createTask,h=i(51),c=s.makeInner(),d=h();function f(){this.group=new r,this.uid=a.getUID("viewChart"),this.renderTask=u({plan:v,reset:_}),this.renderTask.context={view:this}}f.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){m(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){m(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var p=f.prototype;function g(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!l.isHighDownDispatcher(t)))for(var n=0,r=t.childCount();n-1e-8&&t<1e-8}function f(t){return t>1e-8||t<-1e-8}function p(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function g(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}e.cubicAt=p,e.cubicDerivativeAt=function(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)},e.cubicRootAt=function(t,e,i,n,r,a){var u=n+3*(e-i)-t,h=3*(i-2*e+t),c=3*(e-t),f=t-r,p=h*h-3*u*c,g=h*c-9*u*f,m=c*c-3*h*f,v=0;if(d(p)&&d(g)){if(d(h))a[0]=0;else(I=-c/h)>=0&&I<=1&&(a[v++]=I)}else{var _=g*g-4*p*m;if(d(_)){var y=g/p,x=-y/2;(I=-h/u+y)>=0&&I<=1&&(a[v++]=I),x>=0&&x<=1&&(a[v++]=x)}else if(_>0){var b=s(_),w=p*h+1.5*u*(-g+b),T=p*h+1.5*u*(-g-b);(I=(-h-((w=w<0?-o(-w,1/3):o(w,1/3))+(T=T<0?-o(-T,1/3):o(T,1/3))))/(3*u))>=0&&I<=1&&(a[v++]=I)}else{var S=(2*p*h-3*u*g)/(2*s(p*p*p)),M=Math.acos(S)/3,A=s(p),C=Math.cos(M),I=(-h-2*A*C)/(3*u),L=(x=(-h+A*(C+l*Math.sin(M)))/(3*u),(-h+A*(C-l*Math.sin(M)))/(3*u));I>=0&&I<=1&&(a[v++]=I),x>=0&&x<=1&&(a[v++]=x),L>=0&&L<=1&&(a[v++]=L)}}return v},e.cubicExtrema=function(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,l=3*e-3*t,u=0;if(d(o)){if(f(a))(c=-l/a)>=0&&c<=1&&(r[u++]=c)}else{var h=a*a-4*o*l;if(d(h))r[0]=-a/(2*o);else if(h>0){var c,p=s(h),g=(-a-p)/(2*o);(c=(-a+p)/(2*o))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u},e.cubicSubdivide=function(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n},e.cubicProjectPoint=function(t,e,i,n,r,o,l,d,f,g,m){var v,_,y,x,b,w=.005,T=1/0;u[0]=f,u[1]=g;for(var S=0;S<1;S+=.05)h[0]=p(t,i,r,l,S),h[1]=p(e,n,o,d,S),(x=a(u,h))=0&&x=0&&c<=1&&(r[u++]=c)}else{var h=o*o-4*a*l;if(d(h))(c=-o/(2*a))>=0&&c<=1&&(r[u++]=c);else if(h>0){var c,p=s(h),g=(-o-p)/(2*a);(c=(-o+p)/(2*a))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u},e.quadraticExtremum=function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},e.quadraticSubdivide=function(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i},e.quadraticProjectPoint=function(t,e,i,n,r,o,l,d,f){var p,m=.005,v=1/0;u[0]=l,u[1]=d;for(var _=0;_<1;_+=.05){h[0]=g(t,i,r,_),h[1]=g(e,n,o,_),(w=a(u,h))=0&&w=0?c():h=setTimeout(c,-r),l=n};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}e.throttle=r,e.createOrUpdate=function(t,e,a,o){var s=t[e];if(s){var l=s[i]||s,u=s["\0__throttleType"];if(s[n]!==a||u!==o){if(null==a||!o)return t[e]=l;(s=t[e]=r(l,a,"debounce"===o))[i]=l,s["\0__throttleType"]=o,s[n]=a}return s}},e.clear=function(t,e){var n=t[e];n&&n[i]&&(t[e]=n[i])}},function(t,e){t.exports={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}}},function(t,e,i){var n=i(0),r=n.each,a=n.map,o=i(4),s=o.linearMap,l=o.getPixelPrecision,u=o.round,h=i(265),c=h.createAxisTicks,d=h.createAxisLabels,f=h.calculateCategoryInterval,p=[0,1],g=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function m(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}g.prototype={constructor:g,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return l(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&m(i=i.slice(),n.count()),s(t,p,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&m(i=i.slice(),n.count());var r=s(t,i,p,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=c(this,e).ticks,n=a(i,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this);return function(t,e,i,n){var a=e.length;if(!t.onBand||i||!a)return;var o,s,l=t.getExtent();if(1===a)e[0].coord=l[0],o=e[1]={coord:l[0]};else{var h=e[a-1].tickValue-e[0].tickValue,c=(e[a-1].coord-e[0].coord)/h;r(e,(function(t){t.coord-=c/2}));var d=t.scale.getExtent();s=1+d[1]-e[a-1].tickValue,o={coord:e[a-1].coord+c*s},e.push(o)}var f=l[0]>l[1];p(e[0].coord,l[0])&&(n?e[0].coord=l[0]:e.shift());n&&p(l[0],e[0].coord)&&e.unshift({coord:l[0]});p(l[1],o.coord)&&(n?o.coord=l[1]:e.pop());n&&p(o.coord,l[1])&&e.push({coord:l[1]});function p(t,e){return t=u(t),e=u(e),f?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return a(e,(function(t){return a(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},getViewLabels:function(){return d(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return f(this)}};var v=g;t.exports=v},function(t,e,i){var n=i(0),r=n.retrieve,a=n.defaults,o=n.extend,s=n.each,l=i(9),u=i(3),h=i(15),c=i(4),d=c.isRadianAroundZero,f=c.remRadian,p=i(23).createSymbol,g=i(20),m=i(10).applyTransform,v=i(25).shouldShowAllLabels,_=Math.PI,y=function(t,e){this.opt=e,this.axisModel=t,a(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new u.Group;var i=new u.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};y.prototype={constructor:y,hasBuilder:function(t){return!!x[t]},add:function(t){x[t].call(this)},getGroup:function(){return this.group}};var x={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(m(r,r,n),m(a,a,n));var l=o({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new u.Line({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:l,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var h=e.get("axisLine.symbol"),c=e.get("axisLine.symbolSize"),d=e.get("axisLine.symbolOffset")||0;if("number"==typeof d&&(d=[d,d]),null!=h){"string"==typeof h&&(h=[h,h]),"string"!=typeof c&&"number"!=typeof c||(c=[c,c]);var f=c[0],g=c[1];s([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],(function(e,i){if("none"!==h[i]&&null!=h[i]){var n=p(h[i],-f/2,-g/2,f,g,l.stroke,!0),a=e.r+e.offset,o=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:o,silent:!0,z2:11}),this.group.add(n)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,r=e.getModel("axisTick");if(!r.get("show")||n.scale.isBlank())return;for(var o=r.getModel("lineStyle"),s=i.tickDirection*r.get("length"),l=C(n.getTicksCoords(),t._transform,s,a(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),u=0;ug[1]?-1:1,v=["start"===s?g[0]-m*p:"end"===s?g[1]+m*p:(g[0]+g[1])/2,A(s)?t.labelOffset+h*p:0],y=e.get("nameRotate");null!=y&&(y=y*_/180),A(s)?n=w(t.rotation,null!=y?y:t.rotation,h):(n=function(t,e,i,n){var r,a,o=f(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;d(o-_/2)?(a=l?"bottom":"top",r="center"):d(o-1.5*_)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*_&&o>_/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:r,textVerticalAlign:a}}(t,s,y||0,g),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(n.rotation)),!isFinite(a)&&(a=null)));var x=c.getFont(),S=e.get("nameTruncate",!0)||{},M=S.ellipsis,C=r(t.nameTruncateMaxWidth,S.maxWidth,a),I=null!=M&&null!=C?l.truncateText(i,C,x,M,{minChar:2,placeholder:S.placeholder}):i,L=e.get("tooltip",!0),E=e.mainType,P={componentType:E,name:i,$vars:["name"]};P[E+"Index"]=e.componentIndex;var D=new u.Text({anid:"name",__fullText:i,__truncatedText:I,position:v,rotation:n.rotation,silent:T(e),z2:1,tooltip:L&&L.show?o({content:i,formatter:function(){return i},formatterParams:P},L):null});u.setTextStyle(D.style,c,{text:I,textFont:x,textFill:c.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:c.get("align")||n.textAlign,textVerticalAlign:c.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(D.eventData=b(e),D.eventData.targetType="axisName",D.eventData.name=i),this._dumbGroup.add(D),D.updateTransform(),this.group.add(D),D.decomposeTransform()}}},b=y.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},w=y.innerTextLayout=function(t,e,i){var n,r,a=f(e-t);return d(a)?(r=i>0?"top":"bottom",n="center"):d(a-_)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&a<_?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}};var T=y.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function S(t){t&&(t.ignore=!0)}function M(t,e,i){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var a=g.identity([]);return g.rotate(a,a,-t.rotation),n.applyTransform(g.mul([],a,t.getLocalTransform())),r.applyTransform(g.mul([],a,e.getLocalTransform())),n.intersect(r)}}function A(t){return"middle"===t||"center"===t}function C(t,e,i,n,r){for(var a=[],o=[],s=[],l=0;l3&&(r=i.call(r,1));for(var o=e.length,s=0;s4&&(r=i.call(r,1,r.length-1));for(var o=r[r.length-1],s=e.length,l=0;l=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof o&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,a=n.indexOf(r,t);return a<0||(r.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0){var r=i.getData().tree.root,a=t.targetNode;if("string"==typeof a&&(a=r.getNodeById(a)),a&&r.contains(a))return{node:a};var o=t.targetNodeId;if(null!=o&&(a=r.getNodeById(o)))return{node:a}}},e.getPathToRoot=r,e.aboveViewRoot=function(t,e){var i=r(t);return n.indexOf(i,e)>=0},e.wrapTreePathInfo=function(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}},function(t,e,i){var n=i(0),r=i(27),a=i(4).linearMap,o=n.each,s=n.isObject,l=function(t){var e=t.mappingMethod,i=t.type,r=this.option=n.clone(t);this.type=i,this.mappingMethod=e,this._normalizeData=y[e];var a=u[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(h(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,n.each(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===e?r.categories?function(t){var e=t.categories,i=t.visual,r=t.categoryMap={};if(o(e,(function(t,e){r[t]=e})),!n.isArray(i)){var a=[];n.isObject(i)?o(i,(function(t,e){var i=r[e];a[null!=i?i:-1]=t})):a[-1]=i,i=_(t,a)}for(var s=e.length-1;s>=0;s--)null==i[s]&&(delete r[e[s]],e.pop())}(r):h(r,!0):(n.assert("linear"!==e||r.dataExtent),h(r))};l.prototype={constructor:l,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return n.bind(this._normalizeData,this)}};var u=l.visualHandlers={color:{applyVisual:f("color"),getColorMapper:function(){var t=this.option;return n.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),p.call(this,t)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=r.fastLerp(e,t.parsedVisual,n),a?n:r.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return r.stringify(r.fastLerp(t,this.option.parsedVisual),"rgba")},category:p,piecewise:function(t,e){var i=v.call(this,e);return null==i&&(i=r.stringify(r.fastLerp(t,this.option.parsedVisual),"rgba")),i},fixed:g}},colorHue:c((function(t,e){return r.modifyHSL(t,e)})),colorSaturation:c((function(t,e){return r.modifyHSL(t,null,e)})),colorLightness:c((function(t,e){return r.modifyHSL(t,null,null,e)})),colorAlpha:c((function(t,e){return r.modifyAlpha(t,e)})),opacity:{applyVisual:f("opacity"),_doMap:m([0,1])},liftZ:{applyVisual:f("liftZ"),_doMap:{linear:g,category:g,piecewise:g,fixed:g}},symbol:{applyVisual:function(t,e,i){var r=this.mapValueToVisual(t);if(n.isString(r))i("symbol",r);else if(s(r))for(var a in r)r.hasOwnProperty(a)&&i(a,r[a])},_doMap:{linear:d,category:p,piecewise:function(t,e){var i=v.call(this,e);return null==i&&(i=d.call(this,t)),i},fixed:g}},symbolSize:{applyVisual:f("symbolSize"),_doMap:m([0,1])}};function h(t,e){var i=t.visual,r=[];n.isObject(i)?o(i,(function(t){r.push(t)})):null!=i&&r.push(i);e||1!==r.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(r[1]=r[0]),_(t,r)}function c(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:m([0,1])}}function d(t){var e=this.option.visual;return e[Math.round(a(t,[0,1],[0,e.length-1],!0))]||{}}function f(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function p(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function g(){return this.option.visual[0]}function m(t){return{linear:function(e){return a(e,t,this.option.visual,!0)},category:p,piecewise:function(e,i){var n=v.call(this,i);return null==n&&(n=a(e,t,this.option.visual,!0)),n},fixed:g}}function v(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[l.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function _(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=n.map(e,(function(t){return r.parse(t)}))),e}var y={linear:function(t){return a(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=l.findPieceIndex(t,e,!0);if(null!=i)return a(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:n.noop};function x(t,e,i){return t?e<=i:e=0||r&&n.indexOf(r,s)<0)){var l=e.getShallow(s);null!=l&&(a[t[o][0]]=l)}}return a}}},function(t,e,i){var n=i(33),r=i(10),a=i(61),o=i(11),s=i(76).devicePixelRatio,l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],h=[],c=[],d=[],f=Math.min,p=Math.max,g=Math.cos,m=Math.sin,v=Math.sqrt,_=Math.abs,y="undefined"!=typeof Float32Array,x=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};x.prototype={constructor:x,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=_(i/s/t)||0,this._uy=_(i/s/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=_(t-this._xi)>this._ux||_(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(l.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(l.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(l.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=g(r)*i+t,this._yi=m(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(l.R,t,e,i,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&g<=t||h<0&&g>=t||0===h&&(c>0&&m<=e||c<0&&m>=e);)g+=h*(i=o[n=this._dashIdx]),m+=c*i,this._dashIdx=(n+1)%_,h>0&&gl||c>0&&mu||s[n%2?"moveTo":"lineTo"](h>=0?f(g,t):p(g,t),c>=0?f(m,e):p(m,e));h=g-t,c=m-e,this._dashOffset=-v(h*h+c*c)},_dashedBezierTo:function(t,e,i,r,a,o){var s,l,u,h,c,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._ctx,m=this._xi,_=this._yi,y=n.cubicAt,x=0,b=this._dashIdx,w=p.length,T=0;for(f<0&&(f=d+f),f%=d,s=0;s<1;s+=.1)l=y(m,t,i,a,s+.1)-y(m,t,i,a,s),u=y(_,e,r,o,s+.1)-y(_,e,r,o,s),x+=v(l*l+u*u);for(;bf);b++);for(s=(T-f)/x;s<=1;)h=y(m,t,i,a,s),c=y(_,e,r,o,s),b%2?g.moveTo(h,c):g.lineTo(h,c),s+=p[b]/x,b=(b+1)%w;b%2!=0&&g.lineTo(a,o),l=a-h,u=o-c,this._dashOffset=-v(l*l+u*u)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,y&&(this.data=new Float32Array(t)))},getBoundingRect:function(){u[0]=u[1]=c[0]=c[1]=Number.MAX_VALUE,h[0]=h[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,s=0,f=0;fu||_(o-r)>h||d===c-1)&&(t.lineTo(a,o),n=a,r=o);break;case l.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),n=s[d-2],r=s[d-1];break;case l.A:var p=s[d++],v=s[d++],y=s[d++],x=s[d++],b=s[d++],w=s[d++],T=s[d++],S=s[d++],M=y>x?y:x,A=y>x?1:y/x,C=y>x?x/y:1,I=b+w;Math.abs(y-x)>.001?(t.translate(p,v),t.rotate(T),t.scale(A,C),t.arc(0,0,M,b,I,1-S),t.scale(1/A,1/C),t.rotate(-T),t.translate(-p,-v)):t.arc(p,v,M,b,I,1-S),1===d&&(e=g(b)*y+p,i=m(b)*x+v),n=g(I)*y+p,r=m(I)*x+v;break;case l.R:e=n=s[d],i=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case l.Z:t.closePath(),n=e,r=i}}}},x.CMD=l;var b=x;t.exports=b},function(t,e,i){var n=i(5).makeInner;t.exports=function(){var t=n();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,a=i.progressiveRender,o=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(r^o||a^s)&&"reset"}}},function(t,e,i){var n=i(158);t.exports=function(t,e){return n((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}},function(t,e,i){var n=i(0),r={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!n.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!n.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:n.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}};t.exports=r},function(t,e){function i(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function n(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}t.exports=function(t,e,r,a,o,s){t=t||0;var l=r[1]-r[0];if(null!=o&&(o=n(o,[0,l])),null!=s&&(s=Math.max(s,null!=o?o:0)),"all"===a){var u=Math.abs(e[1]-e[0]);u=n(u,[0,l]),o=s=n(u,[o,s]),a=0}e[0]=n(e[0],r),e[1]=n(e[1],r);var h=i(e,a);e[a]+=t;var c=o||0,d=r.slice();h.sign<0?d[0]+=c:d[1]-=c,e[a]=n(e[a],d);var f=i(e,a);return null!=o&&(f.sign!==h.sign||f.spans&&(e[1-a]=e[a]+f.sign*s),e}},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(0),a=i(14),o=i(5),s=i(113),l=i(302),u=r.each,h=s.eachAxisDim;function c(t){var e={};return u(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}function d(t,e){var i=t._rangePropMode,n=t.get("rangeMode");u([["start","startValue"],["end","endValue"]],(function(t,r){var a=null!=e[t[0]],o=null!=e[t[1]];a&&!o?i[r]="percent":!a&&o?i[r]="value":n?i[r]=n[r]:a&&(i[r]="percent")}))}var f=n.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=c(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=c(t);r.merge(this.option,t,!0),r.merge(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;a.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),d(this,t);var i=this.settledOption;u([["start","startValue"],["end","endValue"]],(function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis((function(e,i,n,r){var a=this.dependentModels[e.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new l(e.name,i,this,r));t[e.name+"_"+i]=o}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();h((function(e){var i=e.axisIndex;t[i]=o.normalizeToArray(t[i])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;h((function(i){null!=t[i.axisIndex]&&(e=!0)}),this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):u(n.singleAxis,(function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)}))}t&&h((function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var a=0,o=r.length;a0?100:20}},getFirstTargetAxisModel:function(){var t;return h((function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}}),this),t},eachTargetAxis:function(t,e){var i=this.ecModel;h((function(n){u(this.get(n.axisIndex),(function(r){t.call(e,n,r,this,i)}),this)}),this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t){var e=this.option,i=this.settledOption;u([["start","startValue"],["end","endValue"]],(function(n){null==t[n[0]]&&null==t[n[1]]||(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])}),this),d(this,t)},setCalculatedRange:function(t){var e=this.option;u(["start","startValue","end","endValue"],(function(i){e[i]=t[i]}))},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});t.exports=f},function(t,e,i){var n=i(80).extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis((function(t,n){var r=e.getComponent(t.axis,n);if(r){var a=r.getCoordSysModel();a&&function(t,e,i,n){for(var r,a=0;a=this._maxSize&&o>0){var l=i.head;i.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new n(e),s.key=t,i.insertEntry(s),r[t]=s}return a},t.prototype.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();e.a=a},function(t,e,i){var n=function(){};1===i(76).debugMode&&(n=console.error);var r=n;t.exports=r},function(t,e,i){var n=i(0),r=i(94),a=i(131),o=i(137);function s(t){for(var e in t=t||{},a.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new r(t.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?a.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new r(t,this),this.dirty(!1),this},calculateTextPosition:null},n.inherits(s,a),n.mixin(s,o);var l=s;t.exports=l},function(t,e,i){var n=i(10),r=i(33),a=Math.min,o=Math.max,s=Math.sin,l=Math.cos,u=2*Math.PI,h=n.create(),c=n.create(),d=n.create();var f=[],p=[];e.fromPoints=function(t,e,i){if(0!==t.length){var n,r=t[0],s=r[0],l=r[0],u=r[1],h=r[1];for(n=1;n1e-4)return p[0]=t-i,p[1]=e-r,g[0]=t+i,void(g[1]=e+r);if(h[0]=l(a)*i+t,h[1]=s(a)*r+e,c[0]=l(o)*i+t,c[1]=s(o)*r+e,m(p,h,c),v(g,h,c),(a%=u)<0&&(a+=u),(o%=u)<0&&(o+=u),a>o&&!f?o+=u:aa&&(d[0]=l(x)*i+t,d[1]=s(x)*r+e,m(p,d,p),v(g,d,g))}},function(t,e,i){var n=i(0),r=i(30).parseClassType,a=0;e.getUID=function(t){return[t||"",a++,Math.random().toFixed(5)].join("_")},e.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=r(t),e[t.main]=i},t.determineSubType=function(i,n){var a=n.type;if(!a){var o=r(i).main;t.hasSubTypes(i)&&e[o]&&(a=e[o](n))}return a},t},e.enableTopologicalTravel=function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,a,o){if(t.length){var s=function(t){var r={},a=[];return n.each(t,(function(o){var s=i(r,o),l=function(t,e){var i=[];return n.each(t,(function(t){n.indexOf(e,t)>=0&&i.push(t)})),i}(s.originalDeps=e(o),t);s.entryCount=l.length,0===s.entryCount&&a.push(o),n.each(l,(function(t){n.indexOf(s.predecessor,t)<0&&s.predecessor.push(t);var e=i(r,t);n.indexOf(e.successor,t)<0&&e.successor.push(o)}))})),{graph:r,noEntryList:a}}(r),l=s.graph,u=s.noEntryList,h={};for(n.each(t,(function(t){h[t]=!0}));u.length;){var c=u.pop(),d=l[c],f=!!h[c];f&&(a.call(o,c,d.originalDeps.slice()),delete h[c]),n.each(d.successor,f?g:p)}n.each(h,(function(){throw new Error("Circle dependency may exists")}))}function p(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,p(t)}}}},function(t,e,i){var n=i(0),r=n.createHashMap,a=n.isTypedArray,o=i(30).enableClassCheck,s=i(64),l=s.SOURCE_FORMAT_ORIGINAL,u=s.SERIES_LAYOUT_BY_COLUMN,h=s.SOURCE_FORMAT_UNKNOWN,c=s.SOURCE_FORMAT_TYPED_ARRAY,d=s.SOURCE_FORMAT_KEYED_COLUMNS;function f(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===d?{}:[]),this.sourceFormat=t.sourceFormat||h,this.seriesLayoutBy=t.seriesLayoutBy||u,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&r(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}f.seriesDataToSource=function(t){return new f({data:t,sourceFormat:a(t)?c:l,fromDataset:!1})},o(f);var p=f;t.exports=p},function(t,e){e.SOURCE_FORMAT_ORIGINAL="original",e.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",e.SOURCE_FORMAT_OBJECT_ROWS="objectRows",e.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",e.SOURCE_FORMAT_UNKNOWN="unknown",e.SOURCE_FORMAT_TYPED_ARRAY="typedArray",e.SERIES_LAYOUT_BY_COLUMN="column",e.SERIES_LAYOUT_BY_ROW="row"},function(t,e,i){var n=i(0),r=n.each,a=n.createHashMap,o=(n.assert,i(7).__DEV__,a(["tooltip","label","itemName","itemId","seriesName"]));function s(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}e.OTHER_DIMENSIONS=o,e.summarizeDimensions=function(t){var e={},i=e.encode={},n=a(),l=[],u=[],h=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};r(t.dimensions,(function(e){var r,a=t.getDimensionInfo(e),c=a.coordDim;if(c){var d=a.coordDimIndex;s(i,c)[d]=e,a.isExtraCoord||(n.set(c,1),"ordinal"!==(r=a.type)&&"time"!==r&&(l[0]=e),s(h.encode,c)[d]=a.index),a.defaultTooltip&&u.push(e)}o.each((function(t,e){var n=s(i,e),r=a.otherDims[e];null!=r&&!1!==r&&(n[r]=a.name)}))}));var c=[],d={};n.each((function(t,e){var n=i[e];d[e]=n[0],c=c.concat(n)})),e.dataDimsOnCoord=c,e.encodeFirstDimNotExtra=d;var f=i.label;f&&f.length&&(l=f.slice());var p=i.tooltip;return p&&p.length?u=p.slice():u.length||(u=l.slice()),i.defaultedLabel=l,i.defaultedTooltip=u,e},e.getDimensionTypeByAxis=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}},function(t,e){var i=function(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return e().indexOfName(t)>=0},this.indexOfName=function(e){return t().indexOfName(e)},this.getItemVisual=function(e,i){return t().getItemVisual(e,i)}};t.exports=i},function(t,e,i){var n=i(3),r=i(85),a=i(0).isObject;function o(t){this.group=new n.Group,this._symbolCtor=t||r}var s=o.prototype;function l(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function u(t){return null==t||a(t)||(t={isIgnore:t}),t||{}}function h(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}s.updateData=function(t,e){e=u(e);var i=this.group,r=t.hostModel,a=this._data,o=this._symbolCtor,s=h(t);a||i.removeAll(),t.diff(a).add((function(n){var r=t.getItemLayout(n);if(l(t,r,n,e)){var a=new o(t,n,s);a.attr("position",r),t.setItemGraphicEl(n,a),i.add(a)}})).update((function(u,h){var c=a.getItemGraphicEl(h),d=t.getItemLayout(u);l(t,d,u,e)?(c?(c.updateData(t,u,s),n.updateProps(c,{position:d},r)):(c=new o(t,u)).attr("position",d),i.add(c),t.setItemGraphicEl(u,c)):i.remove(c)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}))})).execute(),this._data=t},s.isPersistent=function(){return!0},s.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},s.incrementalPrepareUpdate=function(t){this._seriesScope=h(t),this._data=null,this.group.removeAll()},s.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=u(i);for(var r=t.start;r3?1.4:r>1?1.2:1.1;f(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:o})}if(i){var l=Math.abs(n);f(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o})}}}function d(t){o.isTaken(this._zr,"globalPan")||f(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function f(t,e,i,n,r){t.pointerChecker&&t.pointerChecker(n,r.originX,r.originY)&&(a.stop(n.event),p(t,e,i,n,r))}function p(t,e,i,r,a){a.isAvailableBehavior=n.bind(g,null,i,r),t.trigger(e,a)}function g(t,e,i){var r=i[t];return!t||r&&(!n.isString(r)||e.event[r+"Key"])}n.mixin(s,r);var m=s;t.exports=m},function(t,e,i){var n=i(0).map,r=i(51),a=i(29).isDimensionStacked;t.exports=function(t){return{seriesType:t,plan:r(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,r=t.pipelineContext.large;if(i){var o=n(i.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),s=o.length,l=e.getCalculationInfo("stackResultDimension");return a(e,o[0])&&(o[0]=l),a(e,o[1])&&(o[1]=l),s&&{progress:function(t,e){for(var n=t.end-t.start,a=r&&new Float32Array(n*s),l=t.start,u=0,h=[],c=[];l5e-5||t<-5e-5}var s=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var u=[];l.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;if(i||e){r=r||n.create(),i?this.getLocalTransform(r):a(r),e&&(i?n.mul(r,t.transform,r):n.copy(r,t.transform)),this.transform=r;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(u);var s=u[0]<0?-1:1,l=u[1]<0?-1:1,h=((u[0]-s)*o+s)/u[0]||0,c=((u[1]-l)*o+l)/u[1]||0;r[0]*=h,r[1]*=h,r[2]*=c,r[3]*=c}this.invTransform=this.invTransform||n.create(),n.invert(this.invTransform,r)}else r&&a(r)},l.getLocalTransform=function(t){return s.getLocalTransform(this,t)},l.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},l.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var h=[],c=n.create();l.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,r=this.scale;o(e-1)&&(e=Math.sqrt(e)),o(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],r[0]=e,r[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},l.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(n.mul(h,t.invTransform,e),e=h);var i=this.origin;i&&(i[0]||i[1])&&(c[4]=i[0],c[5]=i[1],n.mul(h,e,c),h[4]-=i[0],h[5]-=i[1],e=h),this.setLocalTransform(e)}},l.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},l.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&r.applyTransform(i,i,n),i},l.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&r.applyTransform(i,i,n),i},s.getLocalTransform=function(t,e){a(e=e||[]);var i=t.origin,r=t.scale||[1,1],o=t.rotation||0,s=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),n.scale(e,e,r),o&&n.rotate(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=s[0],e[5]+=s[1],e};var d=s;t.exports=d},function(t,e){var i=1;"undefined"!=typeof window&&(i=Math.max(window.devicePixelRatio||1,1));var n=i;e.debugMode=0,e.devicePixelRatio=n},function(t,e){e.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},e.WILL_BE_RESTORED=9},function(t,e,i){var n=i(0),r=n.retrieve2,a=n.retrieve3,o=n.each,s=n.normalizeCssArray,l=n.isString,u=n.isObject,h=i(21),c=i(138),d=i(95),f=i(134),p=i(77),g=p.ContextCachedBy,m=p.WILL_BE_RESTORED,v=h.DEFAULT_FONT,_={left:1,right:1,center:1},y={top:1,bottom:1,middle:1},x=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],b={},w={};function T(t){if(t){t.font=h.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||_[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||y[i]?i:"top",t.textPadding&&(t.textPadding=s(t.textPadding))}}function S(t,e,i,n,r){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function M(t,e,i,n,o,s,l,u){var h=n.rich[i.styleName]||{};h.text=i.text;var c=i.textVerticalAlign,d=s+o/2;"top"===c?d=s+i.height/2:"bottom"===c&&(d=s+o-i.height/2),!i.isLineHolder&&A(h)&&C(t,e,h,"right"===u?l-i.width:"center"===u?l-i.width/2:l,d-i.height/2,i.width,i.height);var f=i.textPadding;f&&(l=R(l,u,f),d-=i.height/2-f[2]-i.textHeight/2),E(e,"shadowBlur",a(h.textShadowBlur,n.textShadowBlur,0)),E(e,"shadowColor",h.textShadowColor||n.textShadowColor||"transparent"),E(e,"shadowOffsetX",a(h.textShadowOffsetX,n.textShadowOffsetX,0)),E(e,"shadowOffsetY",a(h.textShadowOffsetY,n.textShadowOffsetY,0)),E(e,"textAlign",u),E(e,"textBaseline","middle"),E(e,"font",i.font||v);var p=P(h.textStroke||n.textStroke,m),g=D(h.textFill||n.textFill),m=r(h.textStrokeWidth,n.textStrokeWidth);p&&(E(e,"lineWidth",m),E(e,"strokeStyle",p),e.strokeText(i.text,l,d)),g&&(E(e,"fillStyle",g),e.fillText(i.text,l,d))}function A(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function C(t,e,i,n,r,a,o){var s=i.textBackgroundColor,h=i.textBorderWidth,f=i.textBorderColor,p=l(s);if(E(e,"shadowBlur",i.textBoxShadowBlur||0),E(e,"shadowColor",i.textBoxShadowColor||"transparent"),E(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),E(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),p||h&&f){e.beginPath();var g=i.textBorderRadius;g?c.buildPath(e,{x:n,y:r,width:a,height:o,r:g}):e.rect(n,r,a,o),e.closePath()}if(p)if(E(e,"fillStyle",s),null!=i.fillOpacity){var m=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=m}else e.fill();else if(u(s)){var v=s.image;(v=d.createOrUpdateImage(v,null,t,I,s))&&d.isImageReady(v)&&e.drawImage(v,n,r,a,o)}if(h&&f)if(E(e,"lineWidth",h),E(e,"strokeStyle",f),null!=i.strokeOpacity){m=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=m}else e.stroke()}function I(t,e){e.image=t}function L(t,e,i,n){var r=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+O(l[0],n.width),a=n.y+O(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(b,i,n):h.calculateTextPosition(b,i,n);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=i.textOffset;c&&(r+=c[0],a+=c[1])}return(t=t||{}).baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function E(t,e,i){return t[e]=f(t,e,i),t[e]}function P(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function D(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function O(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function R(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}e.normalizeTextStyle=function(t){return T(t),o(t.rich,T),t},e.renderText=function(t,e,i,n,r,a){n.rich?function(t,e,i,n,r,a){a!==m&&(e.__attrCachedBy=g.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=h.parseRichText(i,n));!function(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=L(w,t,n,r),c=u.baseX,d=u.baseY,f=u.textAlign,p=u.textVerticalAlign;S(e,n,r,c,d);var g=h.adjustTextX(c,o,f),m=h.adjustTextY(d,s,p),v=g,_=m;l&&(v+=l[3],_+=l[0]);var y=v+a;A(n)&&C(t,e,n,g,m,o,s);for(var x=0;x=0&&"right"===(b=I[k]).textAlign;)M(t,e,b,n,P,_,N,"right"),D-=b.width,N-=b.width,k--;for(R+=(a-(R-v)-(y-N)-D)/2;O<=k;)b=I[O],M(t,e,b,n,P,_,R+b.width/2,"center"),R+=b.width,O++;_+=P}}(t,e,o,n,r)}(t,e,i,n,r,a):function(t,e,i,n,r,a){"use strict";var o,s=A(n),l=!1,u=e.__attrCachedBy===g.PLAIN_TEXT;a!==m?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?g.NONE:g.PLAIN_TEXT):u&&(e.__attrCachedBy=g.NONE);var c=n.font||v;l&&c===(o.font||v)||(e.font=c);var d=t.__computedFont;t.__styleFont!==c&&(t.__styleFont=c,d=t.__computedFont=e.font);var p=n.textPadding,_=n.textLineHeight,y=t.__textCotentBlock;y&&!t.__dirtyText||(y=t.__textCotentBlock=h.parsePlainText(i,d,p,_,n.truncate));var b=y.outerHeight,T=y.lines,M=y.lineHeight,I=L(w,t,n,r),E=I.baseX,O=I.baseY,N=I.textAlign||"left",k=I.textVerticalAlign;S(e,n,r,E,O);var z=h.adjustTextY(O,b,k),B=E,F=z;if(s||p){var V=h.getWidth(i,d);p&&(V+=p[1]+p[3]);var G=h.adjustTextX(E,V,N);s&&C(t,e,n,G,z,V,b),p&&(B=R(E,N,p),F+=p[0])}e.textAlign=N,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var H=0;H=e[0]&&t<=e[1]},r.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},r.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r.prototype.getLabel=null,n.enableClassExtend(r),n.enableClassManagement(r,{registerWhenExtend:!0});var a=r;t.exports=a},function(t,e,i){var n=i(4),r=i(9),a=i(81),o=i(160),s=n.round,l=a.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=o.getIntervalPrecision(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;i[0]1e4)return[];var l=a.length?a[a.length-1]:n[1];return i[1]>l&&(t?a.push(s(l+e,r)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],r=this.getExtent(),a=1;ar[0]&&c0&&(o=null===o?l:Math.min(o,l))}i[r]=o}}return i}(t),i=[];return n.each(t,(function(t){var n,a=t.coordinateSystem.getBaseAxis(),o=a.getExtent();if("category"===a.type)n=a.getBandWidth();else if("value"===a.type||"time"===a.type){var s=a.dim+"_"+a.index,h=e[s],c=Math.abs(o[1]-o[0]),d=a.scale.getExtent(),f=Math.abs(d[1]-d[0]);n=h?c/f*h:c}else{var p=t.getData();n=Math.abs(o[1]-o[0])/p.count()}var g=r(t.get("barWidth"),n),m=r(t.get("barMaxWidth"),n),v=r(t.get("barMinWidth")||1,n),_=t.get("barGap"),y=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:g,barMaxWidth:m,barMinWidth:v,barGap:_,barCategoryGap:y,axisKey:u(a),stackId:l(t)})})),d(i)}function d(t){var e={};n.each(t,(function(t,i){var n=t.axisKey,r=t.bandWidth,a=e[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[n]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=t.barMaxWidth;u&&(o[s].maxWidth=u);var h=t.barMinWidth;h&&(o[s].minWidth=h);var c=t.barGap;null!=c&&(a.gap=c);var d=t.barCategoryGap;null!=d&&(a.categoryGap=d)}));var i={};return n.each(e,(function(t,e){i[e]={};var a=t.stacks,o=t.bandWidth,s=r(t.categoryGap,o),l=r(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),n.each(a,(function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,u-=n+l*n,h--}else{var n=c;e&&en&&(n=i),n!==c&&(t.width=n,u-=n+l*n,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var d,f=0;n.each(a,(function(t,e){t.width||(t.width=c),d=t,f+=t.width*(1+l)})),d&&(f-=d.width*l);var p=-f/2;n.each(a,(function(t,n){i[e][n]=i[e][n]||{bandWidth:o,offset:p,width:t.width},p+=t.width*(1+l)}))})),i}function f(t,e,i){if(t&&e){var n=t[u(e)];return null!=n&&null!=i&&(n=n[l(i)]),n}}var p={seriesType:"bar",plan:o(),reset:function(t){if(g(t)&&m(t)){var e=t.getData(),i=t.coordinateSystem,n=i.grid.getRect(),r=i.getBaseAxis(),a=i.getOtherAxis(r),o=e.mapDimension(a.dim),l=e.mapDimension(r.dim),u=a.isHorizontal(),h=u?0:1,d=f(c([t]),r,t).width;return d>.5||(d=.5),{progress:function(t,e){var c,f=t.count,p=new s(2*f),g=new s(2*f),m=new s(f),_=[],y=[],x=0,b=0;for(;null!=(c=t.next());)y[h]=e.get(o,c),y[1-h]=e.get(l,c),_=i.dataToPoint(y,null,_),g[x]=u?n.x+n.width:_[0],p[x++]=_[0],g[x]=u?_[1]:n.y+n.height,p[x++]=_[1],m[b++]=c;e.setLayout({largePoints:p,largeDataIndices:m,largeBackgroundPoints:g,barWidth:d,valueAxisStart:v(r,a,!1),backgroundStart:u?n.x:n.y,valueAxisHorizontal:u})}}}}};function g(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function m(t){return t.pipelineContext&&t.pipelineContext.large}function v(t,e,i){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}e.getLayoutOnAxis=function(t){var e=[],i=t.axis;if("category"===i.type){for(var r=i.getBandWidth(),a=0;a=0?"p":"n",D=b;if(y&&(o[h][E]||(o[h][E]={p:b,n:b}),D=o[h][E][P]),x)S=D,M=(I=i.dataToPoint([L,E]))[1]+d,A=I[0]-b,C=f,Math.abs(A)a&&(a=e);var s=a%2?a+2:a+3;o=[];for(var l=0;l=0||t===e}function l(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[h(t)]}function u(t){return!!t.get("handle.show")}function h(t){return t.type+"||"+t.id}e.collect=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var l=e.getComponent("tooltip"),c=e.getComponent("axisPointer"),d=c.get("link",!0)||[],f=[];a(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var p=h(i.model),g=t.coordSysAxesInfo[p]={};t.coordSysMap[p]=i;var m=i.model.getModel("tooltip",l);if(a(i.getAxes(),o(x,!1,null)),i.getTooltipAxes&&l&&m.get("show")){var v="axis"===m.get("trigger"),_="cross"===m.get("axisPointer.type"),y=i.getTooltipAxes(m.get("axisPointer.axis"));(v||_)&&a(y.baseAxes,o(x,!_||"cross",v)),_&&a(y.otherAxes,o(x,"cross",!1))}}function x(o,l,p){var v=p.model.getModel("axisPointer",c),_=v.get("show");if(_&&("auto"!==_||o||u(v))){null==l&&(l=v.get("triggerTooltip"));var y=(v=o?function(t,e,i,o,s,l){var u=e.getModel("axisPointer"),h={};a(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){h[t]=n.clone(u.get(t))})),h.snap="category"!==t.type&&!!l,"cross"===u.get("type")&&(h.type="line");var c=h.label||(h.label={});if(null==c.show&&(c.show=!1),"cross"===s){var d=u.get("label.show");if(c.show=null==d||d,!l){var f=h.lineStyle=u.get("crossStyle");f&&n.defaults(c,f.textStyle)}}return t.model.getModel("axisPointer",new r(h,i,o))}(p,m,c,e,o,l):v).get("snap"),x=h(p.model),b=l||y||"category"===p.type,w=t.axesInfo[x]={key:x,axis:p,coordSys:i,axisPointerModel:v,triggerTooltip:l,involveSeries:b,snap:y,useHandle:u(v),seriesModels:[]};g[x]=w,t.seriesInvolved|=b;var T=function(t,e){for(var i=e.model,n=e.dim,r=0;rh[1]&&h.reverse(),(null==o||o>h[1])&&(o=h[1]),o=0;)r++;return r-e}function n(t,e,i,n,r){for(n===e&&n++;n>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function r(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o>>1);a(t,e[i+h])>0?o=h+1:l=h}return l}function a(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o>>1);a(t,e[i+h])<0?l=h:o=h+1}return l}function o(t,e){var i,n,o,s=7,l=0;i=t.length;var u=[];function h(i){var h=n[i],c=o[i],d=n[i+1],f=o[i+1];o[i]=c+f,i===l-3&&(n[i+1]=n[i+2],o[i+1]=o[i+2]),l--;var p=a(t[d],t,h,c,0,e);h+=p,0!==(c-=p)&&0!==(f=r(t[h+c-1],t,d,f,f-1,e))&&(c<=f?function(i,n,o,l){var h=0;for(h=0;h=7||g>=7);if(m)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===n){for(h=0;h=0;h--)t[g+h]=t[p+h];return void(t[f]=u[d])}var m=s;for(;;){var v=0,_=0,y=!1;do{if(e(u[d],t[c])<0){if(t[f--]=t[c--],v++,_=0,0==--n){y=!0;break}}else if(t[f--]=u[d--],_++,v=0,1==--l){y=!0;break}}while((v|_)=0;h--)t[g+h]=t[p+h];if(0===n){y=!0;break}}if(t[f--]=u[d--],1==--l){y=!0;break}if(0!==(_=l-r(t[c],u,0,l,l-1,e))){for(l-=_,g=(f-=_)+1,p=(d-=_)+1,h=0;h<_;h++)t[g+h]=u[p+h];if(l<=1){y=!0;break}}if(t[f--]=t[c--],0==--n){y=!0;break}m--}while(v>=7||_>=7);if(y)break;m<0&&(m=0),m+=2}(s=m)<1&&(s=1);if(1===l){for(g=(f-=n)+1,p=(c-=n)+1,h=n-1;h>=0;h--)t[g+h]=t[p+h];t[f]=u[d]}else{if(0===l)throw new Error;for(p=f-(l-1),h=0;h1;){var t=l-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;h(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&o[t-1]=32;)e|=1&t,t>>=1;return t+e}(s);do{if((l=i(t,r,a,e))h&&(c=h),n(t,r,r+c,r+l,e),l=c}u.pushRun(r,l),u.mergeRuns(),s-=l,r+=l}while(0!==s);u.forceMergeRuns()}}}},function(t,e,i){var n=i(134),r=i(77).ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(t){this.extendFrom(t,!1)};function s(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(n,a,r,o)}function l(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*n+i.x,s=s*r+i.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}for(var u=o.prototype={constructor:o,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var o=i&&i.style,s=!o||t.__attrCachedBy!==r.STYLE_BIND;t.__attrCachedBy=r.STYLE_BIND;for(var l=0;l0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?l:s)(t,e,i),r=e.colorStops,a=0;a=1)&&(t=1),t}s===h&&u===c||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),r(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var a=t._downstream;return a&&a.dirty(),n}(this,n)),this._modBy=h,this._modDataCount=c;var f=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,g=Math.min(null!=f?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(o||p1&&n>0?s:o}};return a;function o(){return e=t?null:a0}(t)||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n0&&(b[0]=-b[0],b[1]=-b[1]);var T,S=c[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var M=-Math.atan2(c[1],c[0]);u[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":f=[-h[0]*_+l[0],-h[1]*y+l[1]],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":f=[_*S+l[0],l[1]+T],p=c[0]<0?"right":"left",m=[-_*S,-T];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":f=[w[0],w[1]+T],p="center",m=[0,-T];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":f=[-_*S+u[0],u[1]+T],p=c[0]>=0?"right":"left",m=[_*S,-T]}i.attr({style:{textVerticalAlign:i.__verticalAlign||g,textAlign:i.__textAlign||p},position:f,scale:[n,n],origin:m})}}}},p._createLine=function(t,e,i){var r=t.hostModel,a=function(t){var e=new o({name:"line",subPixelOptimize:!0});return d(e.shape,t),e}(t.getItemLayout(e));a.shape.percent=0,s.initProps(a,{shape:{percent:1}},r,e),this.add(a);var l=new s.Text({name:"label",lineLabelOriginalOpacity:1});this.add(l),n.each(u,(function(i){var n=c(i,t,e);this.add(n),this[h(i)]=t.getItemVisual(e,i)}),this),this._updateCommonStl(t,e,i)},p.updateData=function(t,e,i){var r=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),l={shape:{}};d(l.shape,o),s.updateProps(a,l,r,e),n.each(u,(function(i){var n=t.getItemVisual(e,i),r=h(i);if(this[r]!==n){this.remove(this.childOfName(i));var a=c(i,t,e);this.add(a)}this[r]=n}),this),this._updateCommonStl(t,e,i)},p._updateCommonStl=function(t,e,i){var r=t.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,h=i&&i.hoverLineStyle,c=i&&i.labelModel,d=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var f=t.getItemModel(e);o=f.getModel("lineStyle").getLineStyle(),h=f.getModel("emphasis.lineStyle").getLineStyle(),c=f.getModel("label"),d=f.getModel("emphasis.label")}var p=t.getItemVisual(e,"color"),g=n.retrieve3(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(n.defaults({strokeNoScale:!0,fill:"none",stroke:p,opacity:g},o)),a.hoverStyle=h,n.each(u,(function(t){var e=this.childOfName(t);e&&(e.setColor(p),e.setStyle({opacity:g}))}),this);var m,v,_=c.getShallow("show"),y=d.getShallow("show"),x=this.childOfName("label");if((_||y)&&(m=p||"#000",null==(v=r.getFormattedLabel(e,"normal",t.dataType)))){var b=r.getRawValue(e);v=null==b?t.getName(e):isFinite(b)?l(b):b}var w=_?v:null,T=y?n.retrieve2(r.getFormattedLabel(e,"emphasis",t.dataType),v):null,S=x.style;if(null!=w||null!=T){s.setTextStyle(x.style,c,{text:w},{autoColor:m}),x.__textAlign=S.textAlign,x.__verticalAlign=S.textVerticalAlign,x.__position=c.get("position")||"middle";var M=c.get("distance");n.isArray(M)||(M=[M,M]),x.__labelDistance=M}x.hoverStyle=null!=T?{text:T,textFill:d.getTextColor(!0),fontStyle:d.getShallow("fontStyle"),fontWeight:d.getShallow("fontWeight"),fontSize:d.getShallow("fontSize"),fontFamily:d.getShallow("fontFamily")}:{text:null},x.ignore=!_&&!y,s.setHoverStyle(this)},p.highlight=function(){this.trigger("emphasis")},p.downplay=function(){this.trigger("normal")},p.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},p.setLinePoints=function(t){var e=this.childOfName("line");d(e.shape,t),e.dirty()},n.inherits(f,s.Group);var g=f;t.exports=g},function(t,e){e.updateViewOnPan=function(t,e,i){var n=t.target,r=n.position;r[0]+=e,r[1]+=i,n.dirty()},e.updateViewOnZoom=function(t,e,i,n){var r=t.target,a=t.zoomLimit,o=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,o[0]-=(i-o[0])*(c-1),o[1]-=(n-o[1])*(c-1),s[0]*=c,s[1]*=c,r.dirty()}},function(t,e){e.getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,r=n&&n[0]||1;return((e.getZoom()-1)*i+1)/r},e.getSymbolSize=function(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}},function(t,e){e.updateCenterAndZoom=function(t,e,i){var n=t.getZoom(),r=t.getCenter(),a=e.zoom,o=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy){o[0]-=e.dx,o[1]-=e.dy;r=t.pointToData(o);t.setCenter(r)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();r=t.pointToData(o);t.setCenter(r),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}},function(t,e,i){var n=i(0),r=i(10),a=i(20),o=i(11),s=i(75),l=r.applyTransform;function u(){s.call(this)}function h(t){this.name=t,this.zoomLimit,s.call(this),this._roamTransformable=new u,this._rawTransformable=new u,this._center,this._zoom}function c(t,e,i,n){var r=i.seriesModel,a=r?r.coordinateSystem:null;return a===this?a[t](n):null}n.mixin(u,s),h.prototype={constructor:h,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new o(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new o(t,e,i,n)},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=this._rawTransformable;a.transform=r.calculateTransform(new o(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=r.applyTransform([],n,t),i=r.applyTransform([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),a.copy(this.transform||(this.transform=[]),e.transform||a.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?n.slice(t):a.create(),rawScale:n.slice(e.scale),rawPosition:n.slice(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?l(i,t,n):r.copy(i,t)},pointToData:function(t){var e=this.invTransform;return e?l([],t,e):[t[0],t[1]]},convertToPixel:n.curry(c,"dataToPoint"),convertFromPixel:n.curry(c,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},n.mixin(h,s);var d=h;t.exports=d},function(t,e,i){var n=i(0),r=i(30),a=i(3),o=i(87),s=i(26),l=i(34),u=(0,i(5).makeInner)(),h=n.clone,c=n.bind;function d(){}function f(t,e,i,r){(function t(e,i){if(n.isObject(e)&&n.isObject(i)){var r=!0;return n.each(i,(function(i,n){r=r&&t(e[n],i)})),!!r}return e===i})(u(i).lastProp,r)||(u(i).lastProp=r,e?a.updateProps(i,r,t):(i.stopAnimation(),i.attr(r)))}function p(t,e){t[e.get("label.show")?"show":"hide"]()}function g(t){return{position:t.position.slice(),rotation:t.rotation||0}}function m(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)}))}d.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,r){var o=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,r||this._lastValue!==o||this._lastStatus!==s){this._lastValue=o,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var h={};this.makeElOption(h,o,t,e,i);var c=h.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var p=n.curry(f,e,d);this.updatePointerEl(l,h,p,e),this.updateLabelEl(l,h,p,e)}else l=this._group=new a.Group,this.createPointerEl(l,h,t,e),this.createLabelEl(l,h,t,e),i.getZr().add(l);m(l,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===i||null==i){var s=this.animationThreshold;if(r&&n.getBandWidth()>s)return!0;if(a){var l=o.getAxisInfo(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return!0===i},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var o=u(t).pointerEl=new a[r.type](h(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var r=u(t).labelEl=new a.Rect(h(e.label));t.add(r),p(r,n)}},updatePointerEl:function(t,e,i){var n=u(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=u(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),p(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,r=this._api.getZr(),o=this._handle,u=i.getModel("handle"),h=i.get("status");if(!u.get("show")||!h||"hide"===h)return o&&r.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=a.createIcon(u.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){s.stop(t.event)},onmousedown:c(this._onHandleDragMove,this,0,0),drift:c(this._onHandleDragMove,this),ondragend:c(this._onHandleDragEnd,this)}),r.add(o)),m(o,i,!1);o.setStyle(u.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var d=u.get("size");n.isArray(d)||(d=[d,d]),o.attr("scale",[d[0]/2,d[1]/2]),l.createOrUpdate(this,"_doDispatchAxisPointer",u.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){f(this._axisPointerModel,!e&&this._moveAnimation,this._handle,g(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(g(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(g(n)),u(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},d.prototype.constructor=d,r.enableClassExtend(d);var v=d;t.exports=v},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(39),a=i(3),o=i(168),s=i(43),l=n.curry,u=n.each,h=n.map,c=Math.min,d=Math.max,f=Math.pow,p={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},g={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},m={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},v=0;function _(t){r.call(this),this._zr=t,this.group=new a.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+v++,this._handlers={},u(W,(function(t,e){this._handlers[e]=n.bind(t,this)}),this)}function y(t,e){var i=Z[e.brushType].createCover(t,e);return i.__brushOption=e,w(i,e),t.group.add(i),i}function x(t,e){var i=S(e);return i.endCreating&&(i.endCreating(t,e),w(e,e.__brushOption)),e}function b(t,e){var i=e.__brushOption;S(e).updateCoverShape(t,e,i.range,i)}function w(t,e){var i=e.z;null==i&&(i=1e4),t.traverse((function(t){t.z=i,t.z2=i}))}function T(t,e){S(e).updateCommon(t,e),b(t,e)}function S(t){return Z[t.__brushOption.brushType]}function M(t,e,i){var n,r=t._panels;if(!r)return!0;var a=t._transform;return u(r,(function(t){t.isTargetByCursor(e,i,a)&&(n=t)})),n}function A(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function C(t){var e=t._covers,i=e.length;return u(e,(function(e){t.group.remove(e)}),t),e.length=0,!!i}function I(t,e){var i=h(t._covers,(function(t){var e=t.__brushOption,i=n.clone(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}}));t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function L(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function E(t,e,i,n){var r=new a.Group;return r.add(new a.Rect({name:"main",style:R(i),silent:!0,draggable:!0,cursor:"move",drift:l(t,e,r,"nswe"),ondragend:l(I,e,{isEnd:!0})})),u(n,(function(i){r.add(new a.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:l(t,e,r,i),ondragend:l(I,e,{isEnd:!0})}))})),r}function P(t,e,i,n){var r=n.brushStyle.lineWidth||0,a=d(r,6),o=i[0][0],s=i[1][0],l=o-r/2,u=s-r/2,h=i[0][1],c=i[1][1],f=h-a+r/2,p=c-a+r/2,g=h-o,m=c-s,v=g+r,_=m+r;O(t,e,"main",o,s,g,m),n.transformable&&(O(t,e,"w",l,u,a,_),O(t,e,"e",f,u,a,_),O(t,e,"n",l,u,v,a),O(t,e,"s",l,p,v,a),O(t,e,"nw",l,u,a,a),O(t,e,"ne",f,u,a,a),O(t,e,"sw",l,p,a,a),O(t,e,"se",f,p,a,a))}function D(t,e){var i=e.__brushOption,n=i.transformable,r=e.childAt(0);r.useStyle(R(i)),r.attr({silent:!n,cursor:n?"move":"default"}),u(["w","e","n","s","se","sw","ne","nw"],(function(i){var r=e.childOfName(i),o=function t(e,i){if(i.length>1)return i=i.split(""),("e"===(n=[t(e,i[0]),t(e,i[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n;return{left:"w",right:"e",top:"n",bottom:"s"}[n=a.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[i],function(t){return a.getTransform(t.group)}(e))]}(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?g[o]+"-resize":null})}))}function O(t,e,i,n,r,a,o){var s,l,u,h,f,p=e.childOfName(i);p&&p.setShape((s=F(t,e,[[n,r],[n+a,r+o]]),l=c(s[0][0],s[1][0]),u=c(s[0][1],s[1][1]),h=d(s[0][0],s[1][0]),f=d(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:f-u}))}function R(t){return n.defaults({strokeNoScale:!0},t.brushStyle)}function N(t,e,i,n){var r=[c(t,i),c(e,n)],a=[d(t,i),d(e,n)];return[[r[0],a[0]],[r[1],a[1]]]}function k(t,e,i,n,r,a,o,s){var l=n.__brushOption,h=t(l.range),c=B(i,a,o);u(r.split(""),(function(t){var e=p[t];h[e[0]][e[1]]+=c[e[0]]})),l.range=e(N(h[0][0],h[1][0],h[0][1],h[1][1])),T(i,n),I(i,{isEnd:!1})}function z(t,e,i,n,r){var a=e.__brushOption.range,o=B(t,i,n);u(a,(function(t){t[0]+=o[0],t[1]+=o[1]})),T(t,e),I(t,{isEnd:!1})}function B(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function F(t,e,i){var r=A(t,e);return r&&!0!==r?r.clipPath(i,t._transform):n.clone(i)}function V(t){var e=t.event;e.preventDefault&&e.preventDefault()}function G(t,e,i){return t.childOfName("main").contain(e,i)}function H(t,e,i,r){var a,o=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],a=i[1]-n[1];return f(r*r+a*a,.5)>6}(t)||o){if(s&&!o){"single"===l.brushMode&&C(t);var u=n.clone(l);u.brushType=U(u.brushType,s),u.panelId=!0===s?null:s.panelId,o=t._creatingCover=y(t,u),t._covers.push(o)}if(o){var h=Z[U(t._brushType,s)];o.__brushOption.range=h.getCreatingRange(F(t,o,t._track)),r&&(x(t,o),h.updateCommon(t,o)),b(t,o),a={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&M(t,e,i)&&C(t)&&(a={isEnd:r,removeOnClick:!0});return a}function U(t,e){return"auto"===t?e.defaultBrushType:t}_.prototype={constructor:_,enableBrush:function(t){var e,i;return this._brushType&&(i=(e=this)._zr,o.release(i,"globalPan",e._uid),function(t,e){u(e,(function(e,i){t.off(i,e)}))}(i,e._handlers),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||o.take(i,"globalPan",t._uid);(function(t,e){u(e,(function(e,i){t.on(i,e)}))})(i,t._handlers),t._brushType=e.brushType,t._brushOption=n.merge(n.clone(m),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};n.each(t,(function(t){e[t.panelId]=n.clone(t)}))}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){u(this._covers,t,e)},updateCovers:function(t){t=n.map(t,(function(t){return n.merge(n.clone(m),t,!0)}));var e=this._covers,i=this._covers=[],r=this,a=this._creatingCover;return new s(e,t,(function(t,e){return o(t.__brushOption,e)}),o).add(l).update(l).remove((function(t){e[t]!==a&&r.group.remove(e[t])})).execute(),this;function o(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function l(n,o){var s=t[n];if(null!=o&&e[o]===a)i[n]=e[o];else{var l=i[n]=null!=o?(e[o].__brushOption=s,e[o]):x(r,y(r,s));T(r,l)}}},unmount:function(){return this.enableBrush(!1),C(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},n.mixin(_,r);var W={mousedown:function(t){if(this._dragging)j(this,t);else if(!t.target||!t.target.draggable){V(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=M(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(function(t,e,i){if(t._brushType&&!function(t,e,i){var n=t._zr;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,r=t._covers,a=M(t,e,i);if(!t._dragging)for(var o=0;o=0},e.createNameEach=o,e.eachAxisDim=s,e.createLinkedNodesFinder=function(t,e,i){return function(a){var o,s={nodes:[],records:{}};if(e((function(t){s.records[t.name]={}})),!a)return s;r(a,s);do{o=!1,t(l)}while(o);function l(t){!function(t,e){return n.indexOf(e.nodes,t)>=0}(t,s)&&function(t,r){var a=!1;return e((function(e){n.each(i(t,e)||[],(function(t){r.records[e.name][t]&&(a=!0)}))})),a}(t,s)&&(r(t,s),o=!0)}return s};function r(t,r){r.nodes.push(t),e((function(e){n.each(i(t,e)||[],(function(t){r.records[e.name][t]=!0}))}))}}},function(t,e,i){var n=i(2),r=i(0),a=r.createHashMap,o=r.each;n.registerProcessor({getTargetSeries:function(t){var e=a();return t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(t,i,n){var r=n.getAxisProxy(t.name,i);o(r.getTargetSeriesModels(),(function(t){e.set(t.uid,t)}))}))})),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)})),t.eachTargetAxis((function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}))}})},function(t,e,i){var n=i(2),r=i(0),a=i(113);n.registerAction("dataZoom",(function(t,e){var i=a.createLinkedNodesFinder(r.bind(e.eachComponent,e,"dataZoom"),a.eachAxisDim,(function(t,e){return t.get(e.axisIndex)})),n=[];e.eachComponent({mainType:"dataZoom",query:t},(function(t,e){n.push.apply(n,i(t).nodes)})),r.each(n,(function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))},function(t,e,i){var n=i(2);i(188),i(306),i(189);var r=i(307),a=i(16);n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,r),a.registerSubTypeDefaulter("legend",(function(){return"plain"}))},function(t,e,i){i(7).__DEV__;var n=i(0),r=n.isObject,a=n.each,o=n.map,s=n.indexOf,l=(n.retrieve,i(8).getLayoutRect),u=i(25),h=u.createScaleByModel,c=u.ifAxisCrossZero,d=u.niceScaleExtent,f=u.estimateLabelUnionRect,p=i(319),g=i(321),m=i(24),v=i(29).getStackedDimension;function _(t,e,i){return t.getCoordSysModel()===e}function y(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}i(322);var x=y.prototype;function b(t,e,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=t[e],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)w(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&w(a[u])&&!n[h(a[u])]){r=a[u];break}r&&(n[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function w(t){return t&&"category"!==t.type&&"time"!==t.type&&c(t)}x.type="grid",x.axisPointerEnabled=!0,x.getRect=function(){return this._rect},x.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),a(i.x,(function(t){d(t.scale,t.model)})),a(i.y,(function(t){d(t.scale,t.model)}));var n={};a(i.x,(function(t){b(i,"y",t,n)})),a(i.y,(function(t){b(i,"x",t,n)})),this.resize(this.model,e)},x.resize=function(t,e,i){var n=l(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var r=this._axesList;function o(){a(r,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}o(),!i&&t.get("containLabel")&&(a(r,(function(t){if(!t.model.get("axisLabel.inside")){var e=f(t);if(e){var i=t.isHorizontal()?"height":"width",r=t.model.get("axisLabel.margin");n[i]-=e[i]+r,"top"===t.position?n.y+=e.height+r:"left"===t.position&&(n.x+=e.width+r)}}})),o())},x.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},x.getAxes=function(){return this._axesList.slice()},x.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}r(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n1?(g.width=h,g.height=h/f):(g.height=h,g.width=h*f),g.y=u[1]-g.height/2,g.x=u[0]-g.width/2}else(a=t.getBoxLayoutParams()).aspect=f,g=o.getLayoutRect(a,{width:c,height:d});this.setViewRect(g.x,g.y,g.width,g.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function c(t,e){r.each(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}var d={dimensions:a.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",(function(t,n){var r=t.get("map"),o=t.get("aspectScale"),s=!0,l=u.retrieveMap(r);l&&l[0]&&"svg"===l[0].type?(null==o&&(o=1),s=!1):null==o&&(o=.75);var d=new a(r+n,r,t.get("nameMap"),s);d.aspectScale=o,d.zoomLimit=t.get("scaleLimit"),i.push(d),c(d,t),t.coordinateSystem=d,d.model=t,d.resize=h,d.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var n={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}})),r.each(n,(function(t,n){var o=r.map(t,(function(t){return t.get("nameMap")})),s=new a(n,n,r.mergeAll(o));s.zoomLimit=r.retrieve.apply(null,r.map(t,(function(t){return t.get("scaleLimit")}))),i.push(s),s.resize=h,s.aspectScale=t[0].get("aspectScale"),s.resize(t[0],e),r.each(t,(function(t){t.coordinateSystem=s,c(s,t)}))})),i},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),a=r.createHashMap(),o=0;oe&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},l.prototype={constructor:l,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i":"\n"),l&&(c+=h(l),null!=o&&(c+=" : ")),null!=o&&(c+=h(s)),c},getData:function(){return this._data},setData:function(t){this._data=t}});r.mixin(d,l);var f=d;t.exports=f},function(t,e,i){var n=i(0),r=i(4),a=i(29).isDimensionStacked,o=n.indexOf;function s(t,e,i,n,o,s){var l=[],u=a(e,n)?e.getCalculationInfo("stackResultDimension"):n,h=c(e,u,t),d=e.indicesOfNearest(u,h)[0];l[o]=e.get(i,d),l[s]=e.get(u,d);var f=e.get(n,d),p=r.getPrecision(e.get(n,d));return(p=Math.min(p,20))>=0&&(l[s]=+l[s].toFixed(p)),[l,f]}var l=n.curry,u={min:l(s,"min"),max:l(s,"max"),average:l(s,"average")};function h(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;r-1e-4}function x(t,e){e&&b(t,"transform","matrix("+c.call(e,",")+")")}function b(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function w(t,e,i,n){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&"none"!==i}(e,i)){var r=i?e.textFill:e.fill;b(t,"fill",r="transparent"===r?"none":r),b(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else b(t,"fill","none");if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&"none"!==i}(e,i)){var a=i?e.textStroke:e.stroke;b(t,"stroke",a="transparent"===a?"none":a),b(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),b(t,"paint-order",i?"stroke":"fill"),b(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(b(t,"stroke-dasharray",e.lineDash.join(",")),b(t,"stroke-dashoffset",d(e.lineDashOffset||0))):b(t,"stroke-dasharray",""),e.lineCap&&b(t,"stroke-linecap",e.lineCap),e.lineJoin&&b(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&b(t,"stroke-miterlimit",e.miterLimit)}else b(t,"stroke","none")}var T={};T.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=n("path"),t.__svgEl=i),t.path||t.createPathProxy();var r=t.path;if(t.__dirtyPath){r.beginPath(),r.subPixelOptimize=!1,t.buildPath(r,t.shape),t.__dirtyPath=!1;var a=function(t){for(var e=[],i=t.data,n=t.len(),r=0;r=m:-b>=m),A=b>0?b%m:b%m+m,C=!1;C=!!M||!y(S)&&A>=g==!!T;var I=_(s+u*p(x)),L=_(l+c*f(x));M&&(b=T?m-1e-4:1e-4-m,C=!0,9===r&&e.push("M",I,L));var E=_(s+u*p(x+b)),P=_(l+c*f(x+b));e.push("A",_(u),_(c),d(w*v),+C,+T,E,P);break;case h.Z:a="Z";break;case h.R:E=_(i[r++]),P=_(i[r++]);var D=_(i[r++]),O=_(i[r++]);e.push("M",E,P,"L",E+D,P,"L",E+D,P+O,"L",E,P+O,"L",E,P)}a&&e.push(a);for(var R=0;Rz){for(;N=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},d.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},d.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},d.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},d.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return r.each(this._tagNames,(function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))})),e},d.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;r.each(t,(function(t){t[e._markLabel]="0"}))},d.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},d.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;r.each(e,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},d.prototype.getSvgProxy=function(t){return t instanceof a?u:t instanceof o?h:t instanceof s?c:u},d.prototype.getTextSvgElement=function(t){return t.__textSvgEl},d.prototype.getSvgElement=function(t){return t.__svgEl};var f=d;t.exports=f},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){var i=2311;t.exports=function(){return i++}},function(t,e,i){var n=i(14),r=i(223).buildTransformer,a=[];function o(t,e,i,a,o){if(e.getBoundingClientRect&&n.domSupported&&!s(e)){var l=e.___zrEVENTSAVED||(e.___zrEVENTSAVED={}),u=function(t,e,i){for(var n=i?"invTrans":"trans",a=e[n],o=e.srcCoords,s=!0,l=[],u=[],h=0;h<4;h++){var c=t[h].getBoundingClientRect(),d=2*h,f=c.left,p=c.top;l.push(f,p),s=s&&o&&f===o[d]&&p===o[d+1],u.push(t[h].offsetLeft,t[h].offsetTop)}return s&&a?a:(e.srcCoords=l,e[n]=i?r(u,l):r(l,u))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],r=["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",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(e,l),l,o);if(u)return u(t,i,a),!0}return!1}function s(t){return"CANVAS"===t.nodeName.toUpperCase()}e.transformLocalCoord=function(t,e,i,n,r){return o(a,e,n,r,!0)&&o(t,i,a[0],a[1])},e.transformCoordWithViewport=o,e.isCanvasEl=s},function(t,e,i){var n=i(129),r=i(39),a=i(75),o=i(226),s=i(0),l=function(t){a.call(this,t),r.call(this,t),o.call(this,t),this.id=t.id||n()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(s.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i.5?e:t}function c(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;or)t.length=r;else for(var a=n;a=0&&!(C[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=V;ie);i++);i=Math.min(i-1,x-2)}V=i,G=e;var n=C[i+1]-C[i];if(0!==n)if(N=(e-C[i])/n,y)if(z=I[i],k=I[0===i?i:i-1],B=I[i>x-2?x-1:i+1],F=I[i>x-3?x-1:i+2],T)p(k,z,B,F,N,N*N,N*N*N,m(t,s),A);else{if(S)r=p(k,z,B,F,N,N*N,N*N*N,H,1),r=v(H);else{if(M)return h(z,B,N);r=g(k,z,B,F,N,N*N,N*N*N)}_(t,s,r)}else if(T)c(I[i],I[i+1],N,m(t,s),A);else{var r;if(S)c(I[i],I[i+1],N,H,1),r=v(H);else{if(M)return h(I[i],I[i+1],N);r=u(I[i],I[i+1],N)}_(t,s,r)}},ondestroy:i});return e&&"spline"!==e&&(U.easing=e),U}}}var y=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||s,this._setter=n||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};y.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:m(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t=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 r(e),s.key=t,i.insertEntry(s),n[t]=s}return a},o.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;t.exports=s},function(t,e){var i={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};t.exports=function(t,e,n){return i.hasOwnProperty(e)?n*t.dpr:n}},function(t,e){var i=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};i.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var n=i;t.exports=n},function(t,e){var i="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)};t.exports=i},function(t,e,i){var n=i(78),r=i(11),a=i(77).WILL_BE_RESTORED,o=new r,s=function(){};s.prototype={constructor:s,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&n.normalizeTextStyle(i,!0);var r=i.text;if(null!=r&&(r+=""),n.needDrawText(r,i)){t.save();var s=this.transform;i.transformText?this.setTransform(t):s&&(o.copy(e),o.applyTransform(s),e=o),n.renderText(this,t,r,i,e,a),t.restore()}}};var l=s;t.exports=l},function(t,e){e.buildPath=function(t,e){var i,n,r,a,o,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=r=a=c:c instanceof Array?1===c.length?i=n=r=a=c[0]:2===c.length?(i=r=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],a=c[3]):i=n=r=a=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),n+r>h&&(n*=h/(o=n+r),r*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},function(t,e,i){i(7).__DEV__;var n=i(0),r=n.each,a=n.filter,o=n.map,s=n.isArray,l=n.indexOf,u=n.isObject,h=n.isString,c=n.createHashMap,d=n.assert,f=n.clone,p=n.merge,g=n.extend,m=n.mixin,v=i(5),_=i(15),y=i(16),x=i(250),b=i(151),w=i(31).resetSourceDefaulter,T=_.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new _(i),this._optionManager=n},setOption:function(t,e){d(!("\0_ec_inner"in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):S.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&r(o,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];w(this),r(t,(function(t,i){null!=t&&(y.hasClass(i)?i&&n.push(i):e[i]=null==e[i]?f(t):p(e[i],t,!0))})),y.topologicalTravel(n,y.getAllClassMainTypes(),(function(n,a){var o=v.normalizeToArray(t[n]),l=v.mappingToExists(i.get(n),o);v.makeIdAndName(l),r(l,(function(t,e){var i=t.option;u(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:y.determineSubType(t,e)}(n,i,t.exist))}));var h=function(t,e){s(e)||(e=e?[e]:[]);var i={};return r(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,a);e[n]=[],i.set(n,[]),r(l,(function(t,r){var a=t.exist,o=t.option;if(d(u(o)||a,"Empty component definition"),o){var s=y.getClass(n,t.keyInfo.subType,!0);if(a&&a.constructor===s)a.name=t.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var l=g({dependentModels:h,componentIndex:r},t.keyInfo);a=new s(o,this,this,l),g(a,l),a.init(o,this,this,l),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[r]=a,e[n][r]=a.option}),this),"series"===n&&M(this,i.get("series"))}),this),this._seriesIndicesMap=c(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=f(this.option);return r(t,(function(e,i){if(y.hasClass(i)){for(var n=(e=v.normalizeToArray(e)).length-1;n>=0;n--)v.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t["\0_ec_inner"],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,r=t.id,u=t.name,h=this._componentsMap.get(e);if(!h||!h.length)return[];if(null!=n)s(n)||(n=[n]),i=a(o(n,(function(t){return h[t]})),(function(t){return!!t}));else if(null!=r){var c=s(r);i=a(h,(function(t){return c&&l(r,t.id)>=0||!c&&t.id===r}))}else if(null!=u){var d=s(u);i=a(h,(function(t){return d&&l(u,t.name)>=0||!d&&t.name===u}))}else i=h.slice();return A(i,t)},findComponents:function(t){var e,i,n,r,o,s=t.query,l=t.mainType,u=(i=l+"Index",n=l+"Id",r=l+"Name",!(e=s)||null==e[i]&&null==e[n]&&null==e[r]?null:{mainType:l,index:e[i],id:e[n],name:e[r]}),h=u?this.queryComponents(u):this._componentsMap.get(l);return o=A(h,t),t.filter?a(o,t.filter):o},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){r(t,(function(t,r){e.call(i,n,t,r)}))}));else if(h(t))r(n.get(t),e,i);else if(u(t)){var a=this.findComponents(t);r(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return a(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return a(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){r(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){r(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){r(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)}),this)},eachRawSeriesByType:function(t,e,i){return r(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){M(this,a(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;M(this,e.get("series"));var i=[];e.each((function(t,e){i.push(e)})),y.topologicalTravel(i,y.getAllClassMainTypes(),(function(i,n){r(e.get(i),(function(e){("series"!==i||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}(e,t))&&e.restoreData()}))}))}});function S(t){var e,i,n;t=t,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=c({series:[]}),this._seriesIndices,this._seriesIndicesMap,e=t,i=this._theme.option,n=e.color&&!e.colorLayer,r(i,(function(t,i){"colorLayer"===i&&n||y.hasClass(i)||("object"==typeof t?e[i]=e[i]?p(e[i],t,!1):f(t):null==e[i]&&(e[i]=t))})),p(t,x,!1),this.mergeOption(t)}function M(t,e){t._seriesIndicesMap=c(t._seriesIndices=o(e,(function(t){return t.componentIndex}))||[])}function A(t,e){return e.hasOwnProperty("subType")?a(t,(function(t){return t.subType===e.subType})):t}m(T,b);var C=T;t.exports=C},function(t,e,i){var n=i(12),r=i(50),a=i(239),o=Math.sqrt,s=Math.sin,l=Math.cos,u=Math.PI,h=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},c=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(h(t)*h(e))},d=function(t,e){return(t[0]*e[1]1&&(h*=o(x),f*=o(x));var b=(r===a?-1:1)*o((h*h*(f*f)-h*h*(y*y)-f*f*(_*_))/(h*h*(y*y)+f*f*(_*_)))||0,w=b*h*y/f,T=b*-f*_/h,S=(t+i)/2+l(v)*w-s(v)*T,M=(e+n)/2+s(v)*w+l(v)*T,A=d([1,0],[(_-w)/h,(y-T)/f]),C=[(_-w)/h,(y-T)/f],I=[(-1*_-w)/h,(-1*y-T)/f],L=d(C,I);c(C,I)<=-1&&(L=u),c(C,I)>=1&&(L=0),0===a&&L>0&&(L-=2*u),1===a&&L<0&&(L+=2*u),m.addData(g,S,M,h,f,A,L,v,a)}var p=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,g=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function m(t,e){var i=function(t){if(!t)return new r;for(var e,i=0,n=0,a=i,o=n,s=new r,l=r.CMD,u=t.match(p),h=0;he+s&&o>n+s||ot+s&&a>i+s||ae+h&&u>r+h&&u>o+h||ut+h&&l>i+h&&l>a+h||le&&a>n||ar?o:0}},function(t,e,i){var n=i(12).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}});t.exports=n},function(t,e,i){var n=i(14),r=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];t.exports=function(t){return n.browser.ie&&n.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;a=2){if(o&&"spline"!==o){var s=r(a,o,i,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,u=0;u<(i?l:l-1);u++){var h=s[2*u],c=s[2*u+1],d=a[(u+1)%l];t.bezierCurveTo(h[0],h[1],c[0],c[1],d[0],d[1])}}else{"spline"===o&&(a=n(a,i)),t.moveTo(a[0][0],a[0][1]);u=1;for(var f=a.length;ue)return t[n];return t[i-1]}(u,i):l;if((h=h||l)&&h.length){var c=h[r];return t&&(s[t]=c),n.colorIdx=(r+1)%h.length,c}}};t.exports=s},function(t,e,i){var n=i(0),r=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var a=function(t){n.each(r,(function(e){this[e]=n.bind(t[e],t)}),this)};t.exports=a},function(t,e,i){var n=i(0),r=i(35),a=i(42).retrieveRawValue;t.exports=function(t,e){var i=e.getModel("aria");if(i.get("show"))if(i.get("description"))t.setAttribute("aria-label",i.get("description"));else{var o=0;e.eachSeries((function(t,e){++o}),this);var s,l=i.get("data.maxCount")||10,u=i.get("series.maxCount")||10,h=Math.min(o,u);if(!(o<1)){var c=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();s=c?f(p("general.withTitle"),{title:c}):p("general.withoutTitle");var d=[];s+=f(p(o>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:o}),e.eachSeries((function(t,e){if(e1?"multiple":"single")+".";i=f(i=p(n?s+"withName":s+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(_=t.subType,r.series.typeNames[_]||"自定义图")});var u=t.getData();window.data=u,u.count()>l?i+=f(p("data.partialData"),{displayCnt:l}):i+=p("data.allData");for(var c=[],g=0;g=4&&(u={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(u&&null!=o&&null!=l&&(h=k(u,o,l),!e.ignoreViewBox)){var f=r;(r=new n).add(f),f.scale=h.scale.slice(),f.position=h.position.slice()}return e.ignoreRootClip||null==o||null==l||r.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:r,width:o,height:l,viewBoxRect:u,viewBoxTransform:h}},M.prototype._parseNode=function(t,e){var i,n,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(n=C[r]){var a=n.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(n=A[r])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},M.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new a({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});I(e,r),P(t,r,this._defs);var o=r.style.fontSize;o&&o<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=o/9,r.scale[1]*=o/9);var s=r.getBoundingRect();return this._textX+=s.width,e.add(r),r};var A={g:function(t,e){var i=new n;return I(e,i),P(t,i,this._defs),i},rect:function(t,e){var i=new s;return I(e,i),P(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new o;return I(e,i),P(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new u;return I(e,i),P(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new l;return I(e,i),P(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=L(i));var n=new c({shape:{points:i||[]}});return I(e,n),P(t,n,this._defs),n},polyline:function(t,e){var i=new h;I(e,i),P(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=L(n)),new d({shape:{points:n||[]}})},image:function(t,e){var i=new r;return I(e,i),P(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,r=t.getAttribute("y")||0,a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(r)+parseFloat(o);var s=new n;return I(e,s),P(t,s,this._defs),s},tspan:function(t,e){var i=t.getAttribute("x"),r=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=r&&(this._textY=parseFloat(r));var a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,s=new n;return I(e,s),P(t,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(t,e){var i=t.getAttribute("d")||"",n=m(i);return I(e,n),P(t,n,this._defs),n}},C={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new f(e,i,n,r);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,r)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function I(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),x(e.__inheritedStyle,t.__inheritedStyle))}function L(t){for(var e=b(t).split(T),i=[],n=0;n0;a-=2){var o=r[a],s=r[a-1];switch(n=n||g.create(),s){case"translate":o=b(o).split(T),g.translate(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=b(o).split(T),g.scale(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=b(o).split(T),g.rotate(n,n,parseFloat(o[0]));break;case"skew":o=b(o).split(T),console.warn("Skew transform is not supported yet");break;case"matrix":o=b(o).split(T);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}e.setLocalTransform(n)}}(t,e),y(r,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,r={};N.lastIndex=0;for(;null!=(n=N.exec(e));)r[n[1]]=n[2];for(var a in E)E.hasOwnProperty(a)&&null!=r[a]&&(i[E[a]]=r[a]);return i}(t)),!n))for(var o in E)if(E.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[E[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new p;var h=e.style;null!=r.fill&&h.set(l,O(r.fill,i)),null!=r.stroke&&h.set(u,O(r.stroke,i)),w(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&h.set(e,parseFloat(r[t]))})),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),w(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=r[t]&&h.set(t,r[t])})),r.lineDash&&(e.style.lineDash=b(r.lineDash).split(T)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=r}var D=/url\(\s*#(.*?)\)/;function O(t,e){var i=e&&t&&t.match(D);return i?e[b(i[1])]:t}var R=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var N=/([^\s:;]+)\s*:\s*([^:;]+)/g;function k(t,e,i){var n=e/t.width,r=i/t.height,a=Math.min(n,r);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}e.parseXML=S,e.makeViewBoxTransform=k,e.parseSVG=function(t,e){return(new M).parse(t,e)}},function(t,e,i){var n=i(74);e.zrender=n;var r=i(20);e.matrix=r;var a=i(10);e.vector=a;var o=i(0),s=i(27);e.color=s;var l=i(3),u=i(4);e.number=u;var h=i(9);e.format=h;var c=i(34);c.throttle;e.throttle=c.throttle;var d=i(261);e.helper=d;var f=i(162);e.parseGeoJSON=f;var p=i(22);e.List=p;var g=i(15);e.Model=g;var m=i(36);e.Axis=m;var v=i(14);e.env=v;var _=f,y={};o.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){y[t]=o[t]}));var x={};o.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(t){x[t]=l[t]})),e.parseGeoJson=_,e.util=y,e.graphic=x},function(t,e,i){var n=i(0);var r=function(t){null!=t&&n.extend(this,t),this.otherDims={}};t.exports=r},function(t,e,i){var n=i(0),r=n.createHashMap,a=n.each,o=n.isString,s=n.defaults,l=n.extend,u=n.isObject,h=n.clone,c=i(5).normalizeToArray,d=i(31),f=d.guessOrdinal,p=d.BE_ORDINAL,g=i(63),m=i(65).OTHER_DIMENSIONS,v=i(157);function _(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}var y=function(t,e,i){g.isInstance(e)||(e=g.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),d=r(),y=r(),x=[],b=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return a(e,(function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))})),r}(e,t,n,i.dimCount),w=0;wt[1]&&(t[0]=t[1])}e.intervalScaleNiceTicks=function(t,e,i,o){var l={},u=t[1]-t[0],h=l.interval=n.nice(u/e,!0);null!=i&&ho&&(h=l.interval=o);var c=l.intervalPrecision=a(h);return s(l.niceTickExtent=[r(Math.ceil(t[0]/h)*h,c),r(Math.floor(t[1]/h)*h,c)],t),l},e.getIntervalPrecision=a,e.fixExtent=s},function(t,e,i){var n=i(0),r=i(81),a=i(4),o=i(82),s=r.prototype,l=o.prototype,u=a.getPrecisionSafe,h=a.round,c=Math.floor,d=Math.ceil,f=Math.pow,p=Math.log,g=r.extend({type:"log",base:10,$constructor:function(){r.apply(this,arguments),this._originalScale=new o},getTicks:function(t){var e=this._originalScale,i=this._extent,r=e.getExtent();return n.map(l.getTicks.call(this,t),(function(t){var n=a.round(f(this.base,t));return n=t===i[0]&&e.__fixMin?m(n,r[0]):n,n=t===i[1]&&e.__fixMax?m(n,r[1]):n}),this)},getMinorTicks:l.getMinorTicks,getLabel:l.getLabel,scale:function(t){return t=s.scale.call(this,t),f(this.base,t)},setExtent:function(t,e){var i=this.base;t=p(t)/p(i),e=p(e)/p(i),l.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=s.getExtent.call(this);e[0]=f(t,e[0]),e[1]=f(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=m(e[0],n[0])),i.__fixMax&&(e[1]=m(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=p(t[0])/p(e),t[1]=p(t[1])/p(e),s.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=a.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[a.round(d(e[0]/n)*n),a.round(c(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){l.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function m(t,e){return h(t,u(e))}n.each(["contain","normalize"],(function(t){g.prototype[t]=function(e){return e=p(e)/p(this.base),s[t].call(this,e)}})),g.create=function(){return new g};var v=g;t.exports=v},function(t,e,i){var n=i(0),r=i(163);function a(t,e,i){for(var n=[],r=e[0],a=e[1],o=0;o>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,n.push([s/i,l/i])}return n}t.exports=function(t,e){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n0})),(function(t){var i=t.properties,a=t.geometry,o=a.coordinates,s=[];"Polygon"===a.type&&s.push({type:"polygon",exterior:o[0],interiors:o.slice(1)}),"MultiPolygon"===a.type&&n.each(o,(function(t){t[0]&&s.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var l=new r(i[e||"name"],s,i.cp);return l.properties=i,l}))}},function(t,e,i){var n=i(11),r=i(61),a=i(10),o=i(164);function s(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}s.prototype={constructor:s,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],o=[-e,-e],s=[],l=[],u=this.geometries,h=0;h "+y)),m++)}var x,b=i.get("coordinateSystem");if("cartesian2d"===b||"polar"===b)x=u(t,i);else{var w=l.get(b),T=w&&"view"!==w.type&&w.dimensions||[];n.indexOf(T,"value")<0&&T.concat(["value"]);var S=s(t,{coordDimensions:T});(x=new r(S,i)).initData(t)}var M=new r(["value"],i);return M.initData(g,p),c&&c(x,M),o({mainData:x,struct:d,structAttr:"graph",datas:{node:x,edge:M},datasAttr:{node:"data",edge:"edgeData"}}),d.update(),d}},function(t,e,i){var n=i(0),r=n.each,a="\0__link_datas",o="\0__link_mainData";function s(t,e){if((r=this)[o]===r){var i=n.extend({},this[a]);i[this.dataType]=e,c(e,i,t)}else d(e,this.dataType,this[o],t);var r;return e}function l(t,e){return t.struct&&t.struct.update(this),e}function u(t,e){return r(e[a],(function(i,n){i!==e&&d(i.cloneShallow(),n,e,t)})),e}function h(t){var e=this[o];return null==t||null==e?e:e[a][t]}function c(t,e,i){t[a]={},r(e,(function(e,n){d(e,n,t,i)}))}function d(t,e,i,n){i[a][e]=t,t[o]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=h}var f=function(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,c(e,i,t),r(i,(function(i){r(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,n.curry(s,t))}))})),e.wrapMethod("cloneShallow",n.curry(u,t)),r(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,n.curry(l,t))})),n.assert(i[e.dataType]===e)};t.exports=f},function(t,e,i){var n=i(2),r="\0_ec_interaction_mutex";function a(t){return t[r]||(t[r]={})}n.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),e.take=function(t,e,i){a(t)[e]=i},e.release=function(t,e,i){var n=a(t);n[e]===i&&(n[e]=null)},e.isTaken=function(t,e){return!!a(t)[e]}},function(t,e,i){var n=i(2);n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}))},function(t,e,i){var n=i(10),r=i(0),a=i(84).getCurvenessForEdge;function o(t,e){t.eachEdge((function(t,i){var o=r.retrieve3(t.getModel().get("lineStyle.curveness"),-a(t,e,i,!0),0),s=n.clone(t.node1.getLayout()),l=n.clone(t.node2.getLayout()),u=[s,l];+o&&u.push([(s[0]+l[0])/2-(s[1]-l[1])*o,(s[1]+l[1])/2-(l[0]-s[0])*o]),t.setLayout(u)}))}e.simpleLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),o(i,t)}},e.simpleLayoutEdge=o},function(t,e,i){var n=i(10),r=i(107),a=r.getSymbolSize,o=r.getNodeGlobalScale,s=i(0),l=i(84).getCurvenessForEdge,u=Math.PI,h=[];var c={value:function(t,e,i,n,r,a,o,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode((function(t){var e=t.getValue("value"),i=h*(u?e:1)/2;l+=i,t.setLayout([r*Math.cos(l)+a,r*Math.sin(l)+o]),l+=i}))},symbolSize:function(t,e,i,n,r,s,l,c){var d=0;h.length=c;var f=o(t);i.eachNode((function(t){var e=a(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=f;var i=Math.asin(e/2/r);isNaN(i)&&(i=u/2),h[t.dataIndex]=i,d+=2*i}));var p=(2*u-d)/c/2,g=0;i.eachNode((function(t){var e=p+h[t.dataIndex];g+=e,t.setLayout([r*Math.cos(g)+s,r*Math.sin(g)+l]),g+=e}))}};e.circularLayout=function(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var r=i.getBoundingRect(),a=t.getData(),o=a.graph,u=r.width/2+r.x,h=r.height/2+r.y,d=Math.min(r.width,r.height)/2,f=a.count();a.setLayout({cx:u,cy:h}),f&&(c[e](t,i,o,a,d,u,h,f),o.eachEdge((function(e,i){var r,a=s.retrieve3(e.getModel().get("lineStyle.curveness"),l(e,t,i),0),o=n.clone(e.node1.getLayout()),c=n.clone(e.node2.getLayout()),d=(o[0]+c[0])/2,f=(o[1]+c[1])/2;+a&&(r=[u*(a*=3)+d*(1-a),h*a+f*(1-a)]),e.setLayout([o,c,r])})))}}},function(t,e,i){var n=i(2);i(280),i(281);var r=i(44),a=i(69);n.registerVisual(r("effectScatter","circle")),n.registerLayout(a("effectScatter"))},function(t,e,i){var n=i(2);i(283),i(284);var r=i(176),a=i(287);n.registerLayout(r),n.registerVisual(a)},function(t,e,i){var n=i(3),r=i(105),a=i(0),o=i(23).createSymbol,s=i(10),l=i(33);function u(t,e,i){n.Group.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var h=u.prototype;h.createLine=function(t,e,i){return new r(t,e,i)},h._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),r=i.get("symbol");a.isArray(n)||(n=[n,n]);var s=i.get("color")||t.getItemVisual(e,"color"),l=this.childAt(1);this._symbolType!==r&&(this.remove(l),(l=o(r,-.5,-.5,1,1,s)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",s),l.setStyle(i.getItemStyle(["color"])),l.attr("scale",n),l.setColor(s),l.attr("scale",n),this._symbolType=r,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},h._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var r=this,o=t.getItemLayout(i),s=1e3*e.get("period"),l=e.get("loop"),u=e.get("constantSpeed"),h=a.retrieve(e.get("delay"),(function(e){return e/t.count()*s/3})),c="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,o),u>0&&(s=this.getLineLength(n)/u*1e3),s!==this._period||l!==this._loop){n.stopAnimation();var d=h;c&&(d=h(i)),n.__t>0&&(d=-s*n.__t),n.__t=0;var f=n.animate("",l).when(s,{__t:1}).delay(d).during((function(){r.updateSymbolPosition(n)}));l||f.done((function(){r.remove(n)})),f.start()}this._period=s,this._loop=l}},h.getLineLength=function(t){return s.dist(t.__p1,t.__cp1)+s.dist(t.__cp1,t.__p2)},h.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},h.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},h.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,r=t.__t,a=t.position,o=[a[0],a[1]],u=l.quadraticAt,h=l.quadraticDerivativeAt;a[0]=u(e[0],n[0],i[0],r),a[1]=u(e[1],n[1],i[1],r);var c=h(e[0],n[0],i[0],r),d=h(e[1],n[1],i[1],r);if(t.rotation=-Math.atan2(d,c)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT=0)&&t(a,n,r)}))}var f=d.prototype;function p(t){return t[0]>t[1]&&t.reverse(),t}function g(t,e){return a.parseFinder(t,e,{includeMainTypes:c})}f.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,(function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=y[t.brushType](0,i,e);t.__rangeOffset={offset:b[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}}))},f.matchOutputRanges=function(t,e,i){s(t,(function(t){var r=this.findTargetInfo(t,e);r&&!0!==r&&n.each(r.coordSyses,(function(n){var r=y[t.brushType](1,n,t.range);i(t,r.values,n,e)}))}),this)},f.setInputRanges=function(t,e){s(t,(function(t){var i,n,r,a,o,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=y[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?b[t.brushType](l.values,u.offset,(i=l.xyMinMax,n=u.xyMinMax,r=T(i),a=T(n),o=[r[0]/a[0],r[1]/a[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},f.makePanelOpts=function(t,e){return n.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:o.makeRectPanelClipPath(n),isTargetByCursor:o.makeRectIsTargetByCursor(n,t,i.coordSysModel),getLinearBrushOtherExtent:o.makeLinearBrushOtherExtent(n)}}))},f.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&l(n.coordSyses,e.coordinateSystem)>=0},f.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=g(e,t),r=0;r=0||l(r,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:_.grid,xAxisDeclared:u[t.id],yAxisDeclared:h[t.id]})})))},geo:function(t,e){s(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:_.geo})}))}},v=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,r=t.gridModel;return!r&&i&&(r=i.axis.grid.model),!r&&n&&(r=n.axis.grid.model),r&&r===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],_={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(r.getTransform(t)),e}},y={lineX:u(x,0),lineY:u(x,1),rect:function(t,e,i){var n=e[h[t]]([i[0][0],i[1][0]]),r=e[h[t]]([i[0][1],i[1][1]]),a=[p([n[0],r[0]]),p([n[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:n.map(i,(function(i){var n=e[h[t]](i);return r[0][0]=Math.min(r[0][0],n[0]),r[1][0]=Math.min(r[1][0],n[1]),r[0][1]=Math.max(r[0][1],n[0]),r[1][1]=Math.max(r[1][1],n[1]),n})),xyMinMax:r}}};function x(t,e,i,r){var a=i.getAxis(["x","y"][t]),o=p(n.map([0,1],(function(t){return e?a.coordToData(a.toLocalCoord(r[t])):a.toGlobalCoord(a.dataToCoord(r[t]))}))),s=[];return s[t]=o,s[1-t]=[NaN,NaN],{values:o,xyMinMax:s}}var b={lineX:u(w,0),lineY:u(w,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return n.map(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function w(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function T(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var S=d;t.exports=S},function(t,e,i){var n=i(11),r=i(86).onIrrelevantElement,a=i(3);function o(t){return n.create(t)}e.makeRectPanelClipPath=function(t){return t=o(t),function(e,i){return a.clipPointsByRect(e,t)}},e.makeLinearBrushOtherExtent=function(t,e){return t=o(t),function(i){var n=null!=e?e:i,r=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(r||0)]}},e.makeRectIsTargetByCursor=function(t,e,i){return t=o(t),function(n,a,o){return t.contain(a[0],a[1])&&!r(n,e,i)}}},function(t,e,i){var n=i(0).each,r="\0_ec_hist_store";function a(t){var e=t[r];return e||(e=t[r]=[{}]),e}e.push=function(t,e){var i=a(t);n(e,(function(e,n){for(var r=i.length-1;r>=0;r--){if(i[r][n])break}if(r<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var o=a.getPercentRange();i[0][n]={dataZoomId:n,start:o[0],end:o[1]}}}})),i.push(e)},e.pop=function(t){var e=a(t),i=e[e.length-1];e.length>1&&e.pop();var r={};return n(i,(function(t,i){for(var n=e.length-1;n>=0;n--){if(t=e[n][i]){r[i]=t;break}}})),r},e.clear=function(t){t[r]=null},e.count=function(t){return a(t).length}},function(t,e,i){var n=i(2),r=i(0),a=i(15),o=i(5).isNameSpecified,s=i(35).legend.selector,l={all:{type:"all",title:r.clone(s.all)},inverse:{type:"inverse",title:r.clone(s.inverse)}},u=n.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){u.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;!0===e&&(e=t.selector=["all","inverse"]),r.isArray(e)&&r.each(e,(function(t,i){r.isString(t)&&(t={type:t}),e[i]=r.merge(t,l[t.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}}),h=u;t.exports=h},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(0),a=i(23).createSymbol,o=i(3),s=i(184).makeBackground,l=i(8),u=r.curry,h=r.each,c=o.Group,d=n.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new c),this._backgroundEl,this.group.add(this._selectorGroup=new c),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var a=t.get("align"),o=t.get("orient");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===o?"right":"left");var u=t.get("selector",!0),h=t.get("selectorPosition",!0);!u||h&&"auto"!==h||(h="horizontal"===o?"end":"start"),this.renderInner(a,t,e,i,u,o,h);var c=t.getBoxLayoutParams(),d={width:i.getWidth(),height:i.getHeight()},f=t.get("padding"),p=l.getLayoutRect(c,d,f),g=this.layoutInner(t,a,p,n,u,h),m=l.getLayoutRect(r.defaults({width:g.width,height:g.height},c),d,f);this.group.attr("position",[m.x-g.x,m.y-g.y]),this.group.add(this._backgroundEl=s(g,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,a,o,s){var l=this.getContentGroup(),d=r.createHashMap(),f=e.get("selectedMode"),v=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&v.push(t.id)})),h(e.getData(),(function(r,a){var o=r.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var s=i.getSeriesByName(o)[0];if(!d.get(o))if(s){var h=s.getData(),_=h.getVisual("color"),y=h.getVisual("borderColor");"function"==typeof _&&(_=_(s.getDataParams(0))),"function"==typeof y&&(y=y(s.getDataParams(0)));var x=h.getVisual("legendSymbol")||"roundRect",b=h.getVisual("symbol");this._createItem(o,a,r,e,x,b,t,_,y,f).on("click",u(p,o,null,n,v)).on("mouseover",u(g,s.name,null,n,v)).on("mouseout",u(m,s.name,null,n,v)),d.set(o,!0)}else i.eachRawSeries((function(i){if(!d.get(o)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(o))return;var l=s.indexOfName(o),h=s.getItemVisual(l,"color"),c=s.getItemVisual(l,"borderColor");this._createItem(o,a,r,e,"roundRect",null,t,h,c,f).on("click",u(p,null,o,n,v)).on("mouseover",u(g,null,o,n,v)).on("mouseout",u(m,null,o,n,v)),d.set(o,!0)}}),this)}else l.add(new c({newline:!0}))}),this),a&&this._createSelector(a,e,n,o,s)},_createSelector:function(t,e,i,n,r){var a=this.getSelectorGroup();h(t,(function(t){!function(t){var n=t.type,r=new o.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});a.add(r);var s=e.getModel("selectorLabel"),l=e.getModel("emphasis.selectorLabel");o.setLabelStyle(r.style,r.hoverStyle={},s,l,{defaultText:t.title,isRectText:!1}),o.setHoverStyle(r)}(t)}))},_createItem:function(t,e,i,n,s,l,u,h,d,p){var g=n.get("itemWidth"),m=n.get("itemHeight"),v=n.get("inactiveColor"),_=n.get("inactiveBorderColor"),y=n.get("symbolKeepAspect"),x=n.getModel("itemStyle"),b=n.isSelected(t),w=new c,T=i.getModel("textStyle"),S=i.get("icon"),M=i.getModel("tooltip"),A=M.parentModel,C=a(s=S||s,0,0,g,m,b?h:v,null==y||y);if(w.add(f(C,s,x,d,_,b)),!S&&l&&(l!==s||"none"===l)){var I=.8*m;"none"===l&&(l="circle");var L=a(l,(g-I)/2,(m-I)/2,I,I,b?h:v,null==y||y);w.add(f(L,l,x,d,_,b))}var E="left"===u?g+5:-5,P=u,D=n.get("formatter"),O=t;"string"==typeof D&&D?O=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(O=D(t)),w.add(new o.Text({style:o.setTextStyle({},T,{text:O,x:E,y:m/2,textFill:b?T.getTextColor():v,textAlign:P,textVerticalAlign:"middle"})}));var R=new o.Rect({shape:w.getBoundingRect(),invisible:!0,tooltip:M.get("show")?r.extend({content:t,formatter:A.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},M.option):null});return w.add(R),w.eachChild((function(t){t.silent=!0})),R.silent=!p,this.getContentGroup().add(w),o.setHoverStyle(w),w.__legendDataIndex=e,w},layoutInner:function(t,e,i,n,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();l.box(t.get("orient"),o,t.get("itemGap"),i.width,i.height);var u=o.getBoundingRect(),h=[-u.x,-u.y];if(r){l.box("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],f=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=0===p?"width":"height",m=0===p?"height":"width",v=0===p?"y":"x";"end"===a?d[p]+=u[g]+f:h[p]+=c[g]+f,d[1-p]+=u[m]/2-c[m]/2,s.attr("position",d),o.attr("position",h);var _={x:0,y:0};return _[g]=u[g]+f+c[g],_[m]=Math.max(u[m],c[m]),_[v]=Math.min(0,c[v]+d[1-p]),_}return o.attr("position",h),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function f(t,e,i,n,r,a){var o;return"line"!==e&&e.indexOf("empty")<0?(o=i.getItemStyle(),t.style.stroke=n,a||(o.stroke=r)):o=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function p(t,e,i,n){m(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),g(t,e,i,n)}function g(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function m(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}t.exports=d},function(t,e,i){var n=i(29).isDimensionStacked,r=i(0).map;e.prepareDataCoordInfo=function(t,e,i){var a,o=t.getBaseAxis(),s=t.getOtherAxis(o),l=function(t,e){var i=0,n=t.scale.getExtent();"start"===e?i=n[0]:"end"===e?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]);return i}(s,i),u=o.dim,h=s.dim,c=e.mapDimension(h),d=e.mapDimension(u),f="x"===h||"radius"===h?1:0,p=r(t.dimensions,(function(t){return e.mapDimension(t)})),g=e.getCalculationInfo("stackResultDimension");return(a|=n(e,p[0]))&&(p[0]=g),(a|=n(e,p[1]))&&(p[1]=g),{dataDimsForPoint:p,valueStart:l,valueAxisDim:h,baseAxisDim:u,stacked:!!a,valueDim:c,baseDim:d,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}},e.getStackedOnPoint=function(t,e,i,n){var r=NaN;t.stacked&&(r=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=i.get(t.baseDim,n),o[1-a]=r,e.dataToPoint(o)}},function(t,e,i){var n=i(12),r=i(10),a=i(146),o=r.min,s=r.max,l=r.scaleAndAdd,u=r.copy,h=[],c=[],d=[];function f(t){return isNaN(t[0])||isNaN(t[1])}function p(t,e,i,n,r,a,o,s,l,u,h){return"none"!==u&&u?g.apply(this,arguments):m.apply(this,arguments)}function g(t,e,i,n,r,a,o,s,l,h,p){for(var g=0,m=i,v=0;v=r||m<0)break;if(f(_)){if(p){m+=a;continue}break}if(m===i)t[a>0?"moveTo":"lineTo"](_[0],_[1]);else if(l>0){var y=e[g],x="y"===h?1:0,b=(_[x]-y[x])*l;u(c,y),c[x]=y[x]+b,u(d,_),d[x]=_[x]-b,t.bezierCurveTo(c[0],c[1],d[0],d[1],_[0],_[1])}else t.lineTo(_[0],_[1]);g=m,m+=a}return v}function m(t,e,i,n,a,p,g,m,v,_,y){for(var x=0,b=i,w=0;w=a||b<0)break;if(f(T)){if(y){b+=p;continue}break}if(b===i)t[p>0?"moveTo":"lineTo"](T[0],T[1]),u(c,T);else if(v>0){var S=b+p,M=e[S];if(y)for(;M&&f(e[S]);)M=e[S+=p];var A=.5,C=e[x];if(!(M=e[S])||f(M))u(d,T);else{var I,L;if(f(M)&&!y&&(M=T),r.sub(h,M,C),"x"===_||"y"===_){var E="x"===_?0:1;I=Math.abs(T[E]-C[E]),L=Math.abs(T[E]-M[E])}else I=r.dist(T,C),L=r.dist(T,M);l(d,T,h,-v*(1-(A=L/(L+I))))}o(c,c,m),s(c,c,g),o(d,d,m),s(d,d,g),t.bezierCurveTo(c[0],c[1],d[0],d[1],T[0],T[1]),l(c,T,h,v*A)}else t.lineTo(T[0],T[1]);x=b,b+=p}return w}function v(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var r=0;rn[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var _=n.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:a(n.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,r=i.length,a=v(i,e.smoothConstraint);if(e.connectNulls){for(;r>0&&f(i[r-1]);r--);for(;n0&&f(i[a-1]);a--);for(;r=0)&&(O=t);var N=new s.Text({position:I(e.center.slice()),scale:[1/g.scale[0],1/g.scale[1]],z2:10,silent:!0});if(s.setLabelStyle(N.style,N.hoverStyle={},_,y,{labelFetcher:O,labelDataIndex:R,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!v){var k=[1/f[0],1/f[1]];s.updateProps(N,{scale:k},t)}i.add(N)}if(l)l.setItemGraphicEl(a,i);else{var z=t.getRegionModel(e.name);r.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:z&&z.option||{}}}(i.__regions||(i.__regions=[])).push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),s.setHoverStyle(i,m),p.add(i)})),this._updateController(t,e,i),function(t,e,i,r,a){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",(function(){t._mouseDownFlag=!0})),i.on("click",(function(o){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var s=o.target;!s.__regions;)s=s.parent;if(s){var l={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:n.map(s.__regions,(function(t){return{name:t.name,from:a.uid}}))};l[e.mainType+"Id"]=e.id,r.dispatchAction(l),d(e,i)}}})))}(this,t,p,i,r),d(t,p)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&l.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&n.each(l.makeGraphic(e,this.uid),(function(t){this._backgroundGroup.add(t)}),this),this._mapName=e},_updateController:function(t,e,i){var r=t.coordinateSystem,s=this._controller,l=this._controllerHost;l.zoomLimit=t.get("scaleLimit"),l.zoom=r.getZoom(),s.enable(t.get("roam")||!1);var u=t.mainType;function h(){var e={type:"geoRoam",componentType:u};return e[u+"Id"]=t.id,e}s.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,a.updateViewOnPan(l,t.dx,t.dy),i.dispatchAction(n.extend(h(),{dx:t.dx,dy:t.dy}))}),this),s.off("zoom").on("zoom",(function(t){if(this._mouseDownFlag=!1,a.updateViewOnZoom(l,t.scale,t.originX,t.originY),i.dispatchAction(n.extend(h(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse((function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))}}),this),s.setPointerChecker((function(e,n,a){return r.getViewRectAfterRoam().contain(n,a)&&!o(e,i,t)}))}};var p=f;t.exports=p},function(t,e,i){var n=i(2),r=i(0),a=i(108).updateCenterAndZoom;n.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},(function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=a(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&r.each(e.seriesGroup,(function(t){t.setCenter(o.center),t.setZoom(o.zoom)}))}}))}))},function(t,e,i){var n=i(8);function r(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function a(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function o(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function s(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function l(t,e){return t.parentNode===e.parentNode?1:2}e.init=function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var r=i.length-1;r>=0;r--){var a=i[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},n.push(a)}},e.firstWalk=function(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,l=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,r=0;for(;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,r+=a.hierNode.change,n+=a.hierNode.shift+r}}(t);var u=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;l?(t.hierNode.prelim=l.hierNode.prelim+e(t,l),t.hierNode.modifier=t.hierNode.prelim-u):t.hierNode.prelim=u}else l&&(t.hierNode.prelim=l.hierNode.prelim+e(t,l));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var l=t,u=t,h=u.parentNode.children[0],c=e,d=l.hierNode.modifier,f=u.hierNode.modifier,p=h.hierNode.modifier,g=c.hierNode.modifier;c=r(c),u=a(u),c&&u;){l=r(l),h=a(h),l.hierNode.ancestor=t;var m=c.hierNode.prelim+g-u.hierNode.prelim-f+n(c,u);m>0&&(s(o(c,t,i),t,m),f+=m,d+=m),g+=c.hierNode.modifier,f+=u.hierNode.modifier,d+=l.hierNode.modifier,p+=h.hierNode.modifier}c&&!r(l)&&(l.hierNode.thread=c,l.hierNode.modifier+=g-d),u&&!a(h)&&(h.hierNode.thread=u,h.hierNode.modifier+=f-p,i=t)}return i}(t,l,t.parentNode.hierNode.defaultAncestor||n[0],e)},e.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},e.separation=function(t){return arguments.length?t:l},e.radialCoordinate=function(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i},e.getViewRect=function(t,e){return n.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}},function(t,e,i){var n=i(2),r=i(0),a=i(34),o=i(386);i(202),i(389),i(391);n.extendComponentView({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},r.each(s,(function(t,e){i.getZr().on(e,this._handlers[e]=r.bind(t,this))}),this)),a.createOrUpdate(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){r.each(this._handlers,(function(t,i){e.getZr().off(i,t)})),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(r.extend({type:"parallelAxisExpand"},t))}});var s={mousedown:function(t){l(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(l(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&l(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function l(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}n.registerPreprocessor(o)},function(t,e,i){var n=i(387);i(24).register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",(function(r,a){var o=new n(r,t,e);o.name="parallel_"+a,o.resize(r,e),r.coordinateSystem=o,o.model=r,i.push(o)})),t.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}})},function(t,e,i){var n=i(57),r=i(0),a=i(65).getDimensionTypeByAxis,o=i(31).makeSeriesEncodeForAxisCoordSys,s={_baseAxisDim:null,getInitialData:function(t,e){var i,s,l=e.getComponent("xAxis",this.get("xAxisIndex")),u=e.getComponent("yAxis",this.get("yAxisIndex")),h=l.get("type"),c=u.get("type");"category"===h?(t.layout="horizontal",i=l.getOrdinalMeta(),s=!0):"category"===c?(t.layout="vertical",i=u.getOrdinalMeta(),s=!0):t.layout=t.layout||"horizontal";var d=["x","y"],f="horizontal"===t.layout?0:1,p=this._baseAxisDim=d[f],g=d[1-f],m=[l,u],v=m[f].get("type"),_=m[1-f].get("type"),y=t.data;if(y&&s){var x=[];r.each(y,(function(t,e){var i;t.value&&r.isArray(t.value)?(i=t.value.slice(),t.value.unshift(e)):r.isArray(t)?(i=t.slice(),t.unshift(e)):i=t,x.push(i)})),t.data=x}var b=this.defaultValueDimensions,w=[{name:p,type:a(v),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:g,type:a(_),dimsDef:b.slice()}];return n(this,{coordDimensions:w,dimensionsCount:b.length+1,encodeDefaulter:r.curry(o,w,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};e.seriesModelMixin=s},function(t,e,i){var n=i(2);i(422),i(425),i(426),i(71),i(427),n.extendComponentView({type:"single"})},function(t,e,i){var n=i(0);e.layout=function(t,e){e=e||{};var i=t.coordinateSystem,r=t.axis,a={},o=r.position,s=r.orient,l=i.getRect(),u=[l.x,l.x+l.width,l.y,l.y+l.height],h={horizontal:{top:u[2],bottom:u[3]},vertical:{left:u[0],right:u[1]}};a.position=["vertical"===s?h.vertical[o]:u[0],"horizontal"===s?h.horizontal[o]:u[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[s],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),n.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var c=e.rotate;return null==c&&(c=t.get("axisLabel.rotate")),a.labelRotation="top"===o?-c:c,a.z2=1,a}},function(t,e,i){var n=i(2),r=i(0),a=i(11),o=i(92),s=i(467),l=i(34),u=i(185),h=["inBrush","outOfBrush"],c=n.PRIORITY.VISUAL.BRUSH;function d(t){t.eachComponent({mainType:"brush"},(function(e){(e.brushTargetManager=new u(e.option,t)).setInputRanges(e.areas,t)}))}function f(t,e){if(!t.isDisposed()){var i=t.getZr();i.__ecInBrushSelectEvent=!0,t.dispatchAction({type:"brushSelect",batch:e}),i.__ecInBrushSelectEvent=!1}}function p(t,e,i,n){for(var r=0,a=e.length;re[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&v(e)}};function v(t){return new a(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}e.layoutCovers=d},function(t,e,i){i(112),i(55),i(56),i(495),i(496),i(114),i(115)},function(t,e,i){i(112),i(55),i(56),i(497),i(498),i(114),i(115)},function(t,e,i){var n=i(2),r=i(210);i(211),i(212),i(501),i(502),i(217),n.registerPreprocessor(r)},function(t,e,i){var n=i(0),r=n.each;function a(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}t.exports=function(t){var e=t&&t.visualMap;n.isArray(e)||(e=e?[e]:[]),r(e,(function(t){if(t){a(t,"splitList")&&!a(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&n.isArray(e)&&r(e,(function(t){n.isObject(t)&&(a(t,"start")&&!a(t,"min")&&(t.min=t.start),a(t,"end")&&!a(t,"max")&&(t.max=t.end))}))}}))}},function(t,e,i){i(16).registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}))},function(t,e,i){var n=i(2),r=i(0),a=i(92),o=i(47),s=n.PRIORITY.VISUAL.COMPONENT;function l(t,e,i,n){for(var r=e.targetVisuals[n],a=o.prepareVisualTypes(r),s={color:t.getData().getVisual("color")},l=0,u=a.length;l"],r.isArray(t)&&(t=t.slice(),n=!0),a=e?t:n?[h(t[0]),h(t[1])]:h(t),r.isString(u)?u.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):r.isFunction(u)?n?u(t[0],t[1]):u(t):n?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function h(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}},resetExtent:function(){var t=this.option,e=g([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,r=n.length-1;r>=0;r--){var a=n[r];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),a=e.controller||(e.controller={});r.merge(n,i),r.merge(a,i);var l=this.isCategory();function u(i){f(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},p(this.stateList,(function(t){var e=i[t];if(r.isString(e)){var n=o.get(e,"active",l);n?(i[t]={},i[t][e]=n):delete i[t]}}),this)}u.call(this,n),u.call(this,a),function(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},p(n,(function(t,e){if(s.isValidType(e)){var i=o.get(e,"inactive",l);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");p(this.stateList,(function(a){var o=this.itemSize,s=t[a];s||(s=t[a]={color:l?n:[n]}),null==s.symbol&&(s.symbol=e&&r.clone(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&r.clone(i)||(l?o[0]:[o[0],o[0]])),s.symbol=c(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var u=s.symbolSize;if(null!=u){var h=-1/0;d(u,(function(t){t>h&&(h=t)})),s.symbolSize=c(u,(function(t){return m(t,[0,h],[0,o[0]],!0)}))}}),this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:v,getValueState:v,getVisualMeta:v});t.exports=_},function(t,e,i){var n=i(0),r={get:function(t,e,i){var r=n.clone((a[t]||{})[e]);return i&&n.isArray(r)?r[r.length-1]:r}},a={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},o=r;t.exports=o},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(9),s=i(8),l=i(47),u=n.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=o.normalizeCssArray(e.get("padding")||0),n=t.getBoundingRect();t.add(new a.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){var n=(i=i||{}).forceState,a=this.visualMapModel,o={};if("symbol"===e&&(o.symbol=a.get("itemSymbol")),"color"===e){var s=a.get("contentColor");o.color=s}function u(t){return o[t]}function h(t,e){o[t]=e}var c=a.controllerVisuals[n||a.getValueState(t)],d=l.prepareVisualTypes(c);return r.each(d,(function(n){var r=c[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",r=c.__alphaForOpacity),l.dependsOn(n,e)&&r&&r.applyVisual(t,u,h)})),o[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;s.positionElement(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:r.noop});t.exports=u},function(t,e,i){var n=i(0),r=i(8).getLayoutRect;e.getItemAlign=function(t,e,i){var n=t.option,a=n.align;if(null!=a&&"auto"!==a)return a;for(var o={width:e.getWidth(),height:e.getHeight()},s="horizontal"===n.orient?1:0,l=[["left","right","width"],["top","bottom","height"]],u=l[s],h=[0,null,10],c={},d=0;d<3;d++)c[l[1-s][d]]=h[d],c[u[d]]=2===d?i[0]:n[u[d]];var f=[["x","width",3],["y","height",0]][s],p=r(c,o,n.padding);return u[(p.margin[f[2]]||0)+p[f[0]]+.5*p[f[1]]<.5*o[f[1]]?0:1]},e.makeHighDownBatch=function(t,e){return n.each(t||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")})),t}},function(t,e,i){i(2).registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))}))},function(t,e,i){var n=i(2),r=i(210);i(211),i(212),i(503),i(504),i(217),n.registerPreprocessor(r)},function(t,e,i){var n,r=i(14),a="urn:schemas-microsoft-com:vml",o="undefined"==typeof window?null:window,s=!1,l=o&&o.document;if(l&&!r.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),n=function(t){return l.createElement("')}}catch(t){n=function(t){return l.createElement("<"+t+' xmlns="'+a+'" class="zrvml">')}}e.doc=l,e.createNode=function(t){return n(t)},e.initVML=function(){if(!s&&l){s=!0;var t=l.styleSheets;t.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}},function(t,e,i){ /* @preserve - * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade + * Leaflet 1.5.1+build.2e3e0ff, a JS library for interactive maps. http://leafletjs.com + * (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -!function(t){"use strict";function e(t){for(var e,i,n=1,r=arguments.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,r=(t=t.max).x>=e.x&&n.x<=i.x;return t=t.y>=e.y&&n.y<=i.y,r&&t},overlaps:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,r=(t=t.max).x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=r.lat&&e.lng>=n.lng&&i.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=(t=t.getNorthEast()).lat>=e.lat&&n.lat<=i.lat;return t=t.lng>=e.lng&&n.lng<=i.lng,r&&t},overlaps:function(t){t=B(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=(t=t.getNorthEast()).lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(At.firstChild&&At.firstChild.namespaceURI));function Ct(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var It={ie:J,ielt9:$,edge:Q,webkit:tt,android:et,android23:it,androidStock:nt,opera:rt,chrome:at,gecko:ot,safari:st,phantom:lt,opera12:ut,win:ht,ie3d:ct,webkit3d:dt,gecko3d:K,any3d:ft,mobile:Hi,mobileWebkit:pt,mobileWebkit3d:gt,msPointer:mt,pointer:vt,touch:yt,touchNative:_t,mobileOpera:xt,mobileGecko:bt,retina:wt,passiveEvents:Tt,canvas:St,svg:Mt,vml:!Mt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:At},Lt=It.msPointer?"MSPointerDown":"pointerdown",Et=It.msPointer?"MSPointerMove":"pointermove",Pt=It.msPointer?"MSPointerUp":"pointerup",Dt=It.msPointer?"MSPointerCancel":"pointercancel",Ot={touchstart:Lt,touchmove:Et,touchend:Pt,touchcancel:Dt},Rt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Le(e),Vt(t,e)},touchmove:Vt,touchend:Vt,touchcancel:Vt},Nt={},kt=!1;function zt(t){Nt[t.pointerId]=t}function Bt(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Vt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Nt)e.touches.push(Nt[i]);e.changedTouches=[e],t(e)}}var Gt,Ht,Ut,Wt,jt,Zt,Xt=ue(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=ue(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),qt="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function Kt(t){return"string"==typeof t?document.getElementById(t):t}function Jt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function $t(t,e,i){return(t=document.createElement(t)).className=e||"",i&&i.appendChild(t),t}function Qt(t){var e=t.parentNode;e&&e.removeChild(t)}function te(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ee(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ie(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ne(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=se(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function re(t,e){var i;if(void 0!==t.classList)for(var n=d(e),r=0,a=n.length;rthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter();return t=this._limitCenter(i,this._zoom,B(t)),i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=R((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=R(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),a=(t=this.project(t),(i=k([(a=this.getPixelBounds()).min.add(i),a.max.subtract(n)])).getSize());return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(a),r.x+=n.x<0?-i.x:i.x,r.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize(),n=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),a=i.divideBy(2).round(),o=n.divideBy(2).round();return(a=a.subtract(o)).x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=r(this._handleGeolocationResponse,this),n=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new F(t.coords.latitude,t.coords.longitude),r=n.toBounds(2*t.coords.accuracy),a=this._locateOptions,o=(a.setView&&(e=this.getBoundsZoom(r),this.setView(n,a.maxZoom?Math.min(e,a.maxZoom):e)),{latlng:n,bounds:r,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(o[i]=t.coords[i]);this.fire("locationfound",o)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),Qt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(A(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)Qt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=$t("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=B(t),i=R(i||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),a=this.getMaxZoom(),o=t.getNorthWest(),s=(t=t.getSouthEast(),i=this.getSize().subtract(i),t=k(this.project(t,n),this.project(o,n)).getSize(),o=It.any3d?this.options.zoomSnap:1,i.x/t.x);return i=i.y/t.y,t=e?Math.max(s,i):Math.min(s,i),n=this.getScaleZoom(t,n),o&&(n=Math.round(n/(o/100))*(o/100),n=e?Math.ceil(n/o)*o:Math.floor(n/o)*o),Math.max(r,Math.min(a,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new D(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new N(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,t=i.zoom(t*i.scale(e)),isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(V(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(R(t),e)},layerPointToLatLng:function(t){return t=R(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(V(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(V(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(V(t),V(e))},containerPointToLayerPoint:function(t){return R(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return R(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(R(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(V(t)))},mouseEventToContainerPoint:function(t){return Pe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=Kt(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");ye(t,"scroll",this._onScroll,this),this._containerId=o(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&It.any3d,re(t,"leaflet-container"+(It.touch?" leaflet-touch":"")+(It.retina?" leaflet-retina":"")+(It.ielt9?" leaflet-oldie":"")+(It.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),Jt(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ce(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(re(t.markerPane,"leaflet-zoom-hide"),re(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ce(this._mapPane,new D(0,0));var i=!this._loaded,n=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((r||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return A(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ce(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?be:ye;e((this._targets[o(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),It.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){A(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],r="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((i=this._targets[o(a)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)){if(r&&!Re(a,t))break;if(n.push(i),r)break}if(a===this._container)break;a=a.parentNode}return n.length||s||r||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&ge(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){"click"===t.type&&((l=e({},t)).type="preclick",this._fireDOMEvent(l,l.type,n));var r=this._findEventTargets(t,i);if(n){for(var a=[],o=0;othis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e);return n=this._getCenterOffset(t)._divideBy(1-1/n),!(!0!==i.animate&&!this.getSize().contains(n)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,re(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ae(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ze(t){return new Fe(t)}var Be,Fe=I.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition();return t=t._controlCorners[i],re(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(Qt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),r=((t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(e),e.layerId=o(t.layer),ye(e,"click",this._onInputClick,this),n=document.createElement("span")).innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(r),r.appendChild(e),r.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var a=i.length-1;0<=a;a--)t=i[a],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||r.push(e);for(a=0;ae.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ge=Fe.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=$t("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,r){return(i=$t("a",i,n)).innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),ye(i,"click",Ee),ye(i,"click",r,this),ye(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ae(this._zoomInButton,e),ae(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(re(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(re(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),He=(ke.mergeOptions({zoomControl:!0}),ke.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ge,this.addControl(this.zoomControl))})),Fe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=$t("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=$t("div",e,i)),t.imperial&&(this._iScale=$t("div",e,i))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i;5280<(t*=3.2808399)?(i=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,i+" mi",i/e)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+" ft",i/t))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t/=e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),Ue=Fe.extend({options:{position:"bottomright",prefix:''+(It.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=$t("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),We=((ke.mergeOptions({attributionControl:!0}),ke.addInitHook((function(){this.options.attributionControl&&(new Ue).addTo(this)})),Fe.Layers=Ve,Fe.Zoom=Ge,Fe.Scale=He,Fe.Attribution=Ue,ze.layers=function(t,e,i){return new Ve(t,e,i)},ze.zoom=function(t){return new Ge(t)},ze.scale=function(t){return new He(t)},ze.attribution=function(t){return new Ue(t)},Q=I.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})).addTo=function(t,e){return t.addHandler(e,this),this},tt={Events:E},It.touch?"touchstart mousedown":"mousedown"),je=P.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){f(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ye(this._dragStartTarget,We,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(je._dragging===this&&this.finishDrag(!0),be(this._dragStartTarget,We,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ne(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?je._dragging===this&&this.finishDrag():je._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((je._dragging=this)._preventOutline&&ge(this._element),fe(),Ut(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=ve(this._element),this._startPoint=new D(i.clientX,i.clientY),this._startPos=de(this._element),this._parentScale=_e(e),i="mousedown"===t.type,ye(document,i?"mousemove":"touchmove",this._onMove,this),ye(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),r=n);return re.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function Je(t,e,i,n){var r=e.x,a=(e=e.y,i.x-r),o=i.y-e,s=a*a+o*o;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||ci.prototype._containsPoint.call(this,t,!0)}}),fi=ni.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,r=v(t)?t:t.features;if(r){for(e=0,i=r.length;eo.x&&(s=n.x+l-o.x+a.x),n.x-s-r.x<(l=0)&&(s=n.x-r.x),n.y+i+a.y>o.y&&(l=n.y+i-o.y+a.y),n.y-l-r.y<0&&(l=n.y-r.y),(s||l)&&e.fire("autopanstart").panBy([s,l],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(ke.mergeOptions({closePopupOnClick:!0}),ke.include({openPopup:function(t,e,i){return this._initOverlay(Ci,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ut.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ci,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Ee(t),e=t.layer||t.target,this._popup._source!==e||e instanceof li?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=$t("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,r=i.latLngToContainerPoint(i.getCenter()),a=(i=i.layerPointToContainerPoint(t),this.options.direction),o=n.offsetWidth,s=n.offsetHeight,l=R(this.options.offset),u=this._getAnchor();i="top"===a?(e=o/2,s):"bottom"===a?(e=o/2,0):(e="center"===a?o/2:"right"===a?0:"left"===a?o:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&ri.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),B(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i);return i=n.add(i),[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){return t=new z((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new D(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(Qt(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){re(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,It.ielt9&&this.options.opacity<1&&le(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),a=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(a),this.createTile.length<2&&M(r(this._tileReady,this,t,null,a)),ce(a,i),this._tiles[n]={el:a,coords:t,current:!0},e.appendChild(a),this.fire("tileloadstart",{tile:a,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(le(i.el,0),A(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(re(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),It.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new D(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new N(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Pi=Ei.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&It.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Bi=(dt={_initContainer:function(){this._container=$t("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ri.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=zi("shape");re(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=zi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;Qt(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(e=e||(t._stroke=zi("stroke")),r.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=v(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(r.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=zi("fill")),r.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ee(t._container)},_bringToBack:function(t){ie(t._container)}},It.vml?zi:Y),Fi=Ri.extend({_initContainer:function(){this._container=Bi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Bi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Qt(this._container),be(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Ri.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ce(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Bi("path");t.options.className&&re(e,t.options.className),t.options.interactive&&re(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Qt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options,e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ",this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ee(t._path)},_bringToBack:function(t){ie(t._path)}});function Vi(t){return It.svg||It.vml?new Fi(t):null}It.vml&&Fi.include(dt),ke.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ki(t)||Vi(t)}});var Gi=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Fi.create=Bi,Fi.pointsToPath=q,fi.geometryToLayer=pi,fi.coordsToLatLng=mi,fi.coordsToLatLngs=vi,fi.latLngToCoords=_i,fi.latLngsToCoords=yi,fi.getFeature=xi,fi.asFeature=bi,ke.mergeOptions({boxZoom:!0}),K=Q.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ye(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){be(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Qt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Ut(),fe(),this._startPoint=this._map.mouseEventToContainerPoint(t),ye(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=$t("div","leaflet-zoom-box",this._container),re(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new N(this._point,this._startPoint)).getSize();ce(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(Qt(this._box),ae(this._container,"leaflet-crosshair")),Wt(),pe(),be(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),ke.addInitHook("addHandler","boxZoom",K),ke.mergeOptions({doubleClickZoom:!0}),ft=Q.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta;i=t.originalEvent.shiftKey?i-n:i+n,"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});var Hi=(ke.addInitHook("addHandler","doubleClickZoom",ft),ke.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),Q.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new je(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),re(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ae(this._map._container,"leaflet-grab"),ae(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=B(this._map.options.maxBounds),this._offsetLimit=k(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=((r=this._draggable._newPos.x)-e+i)%t+e-i,r=(r+e+i)%t-e-i;t=Math.abs(n+i)e.getMaxZoom()&&1n.getWidth()||i<0||i>n.getHeight()}d.prototype={constructor:d,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(n.each(c,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=p(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:u}}(e,t,i);n&&(n[r]&&(a.cancelBubble=n[r].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=f(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),"silent"!==o)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new l);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},n.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){d.prototype[t]=function(e){var i,n,a=e.zrX,o=e.zrY,s=p(this,a,o);if("mouseup"===t&&s||(n=(i=this.findHover(a,o)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||r.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),n.mixin(d,o),n.mixin(d,a);var g=d;t.exports=g},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function n(t,e){return{target:t,topTarget:e&&e.topTarget}}i.prototype={constructor:i,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(n(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,r=t.offsetY,a=i-this._x,o=r-this._y;this._x=i,this._y=r,e.drift(a,o,t),this.dispatchToElement(n(e,t),"drag",t.event);var s=this.findHover(i,r,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.dispatchToElement(n(l,t),"dragleave",t.event),s&&s!==l&&this.dispatchToElement(n(s,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(n(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(n(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var r=i;t.exports=r},function(t,e){var i=Math.log(2);function n(t,e,r,a,o,s){var l=a+"-"+o,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var h=Math.round(Math.log((1<1&&r&&r.length>1){var s=a(r)/a(o);!isFinite(s)&&(s=1),e.pinchScale=s;var l=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}},s=r;t.exports=s},function(t,e,i){var n=i(0),r=i(14),a=i(40),o=i(93);function s(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var l=function(){this._roots=[],this._displayList=[],this._displayListLen=0};l.prototype={constructor:l,traverse:function(t,e){for(var i=0;i=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof a&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var u=l;t.exports=u},function(t,e,i){var n=i(132),r=i(59),a=i(0),o=a.isString,s=a.isFunction,l=a.isObject,u=a.isArrayLike,h=a.indexOf,c=function(){this.animators=[]};function d(t,e,i,n,r,a,h,c){o(n)?(a=r,r=n,n=0):s(r)?(a=r,r="linear",n=0):s(n)?(a=n,n=0):s(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),function t(e,i,n,r,a,o,s){var h={},c=0;for(var d in r)r.hasOwnProperty(d)&&(null!=n[d]?l(r[d])&&!u(r[d])?t(e,i?i+"."+d:d,n[d],r[d],a,o,s):(s?(h[d]=n[d],f(e,i,d,r[d])):h[d]=r[d],c++):null==r[d]||s||f(e,i,d,r[d]));c>0&&e.animate(i,!1).when(null==a?500:a,h).delay(o||0)}(t,"",t,e,i,n,c);var d=t.animators.slice(),p=d.length;function g(){--p||a&&a()}p||a&&a();for(var m=0;m=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}l.__drawIndex=v,l.__drawIndex0&&t>n[0]){for(s=0;st);s++);o=i[n[s]]}if(n.splice(s+1,0,t),i[t]=e,!e.virtual)if(o){var u=o.dom;u.nextSibling?l.insertBefore(e.dom,u.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else a("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+u+" has been used by unkown layer "+l.id),l!==r&&(l.__used=!0,l.__startIndex!==i&&(l.__dirty=!0),l.__startIndex=i,l.incremental?l.__drawIndex=-1:l.__drawIndex=i,e(i),r=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?r.merge(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ie&&h>n&&h>a&&h>s||h1&&(c=void 0,c=p[0],p[0]=p[1],p[1]=c),g=u.cubicAt(e,n,a,s,p[0]),_>1&&(m=u.cubicAt(e,n,a,s,p[1]))),2===_?xe&&s>n&&s>a||s=0&&h<=1){for(var c=0,d=u.quadraticAt(e,n,a,h),p=0;pi||s<-i)return 0;var u=Math.sqrt(i*i-s*s);f[0]=-u,f[1]=u;var h=Math.abs(n-r);if(h<1e-4)return 0;if(h%d<1e-4){n=0,r=d;var c=a?1:-1;return o>=f[0]+t&&o<=f[1]+t?c:0}if(a){u=n;n=l(r),r=l(u)}else n=l(n),r=l(r);n>r&&(r+=d);for(var p=0,g=0;g<2;g++){var m=f[g];if(m+t>o){var v=Math.atan2(s,m);c=a?1:-1;v<0&&(v=d+v),(v>=n&&v<=r||v+d>=n&&v+d<=r)&&(v>Math.PI/2&&v<1.5*Math.PI&&(c=-c),p+=c)}}return p}function _(t,e,i,n,l){for(var u,d,f=0,p=0,_=0,y=0,x=0,b=0;b1&&(i||(f+=h(p,_,y,x,n,l))),1===b&&(y=p=t[b],x=_=t[b+1]),w){case c.M:p=y=t[b++],_=x=t[b++];break;case c.L:if(i){if(r.containStroke(p,_,t[b],t[b+1],e,n,l))return!0}else f+=h(p,_,t[b],t[b+1],n,l)||0;p=t[b++],_=t[b++];break;case c.C:if(i){if(a.containStroke(p,_,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],e,n,l))return!0}else f+=g(p,_,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],n,l)||0;p=t[b++],_=t[b++];break;case c.Q:if(i){if(o.containStroke(p,_,t[b++],t[b++],t[b],t[b+1],e,n,l))return!0}else f+=m(p,_,t[b++],t[b++],t[b],t[b+1],n,l)||0;p=t[b++],_=t[b++];break;case c.A:var T=t[b++],S=t[b++],M=t[b++],A=t[b++],C=t[b++],I=t[b++];b+=1;var L=1-t[b++],E=Math.cos(C)*M+T,P=Math.sin(C)*A+S;b>1?f+=h(p,_,E,P,n,l):(y=E,x=P);var D=(n-T)*A/M+T;if(i){if(s.containStroke(T,S,A,C,C+I,L,e,D,l))return!0}else f+=v(T,S,A,C,C+I,L,D,l);p=Math.cos(C+I)*M+T,_=Math.sin(C+I)*A+S;break;case c.R:y=p=t[b++],x=_=t[b++];E=y+t[b++],P=x+t[b++];if(i){if(r.containStroke(y,x,E,x,e,n,l)||r.containStroke(E,x,E,P,e,n,l)||r.containStroke(E,P,y,P,e,n,l)||r.containStroke(y,P,y,x,e,n,l))return!0}else f+=h(E,x,E,P,n,l),f+=h(y,P,y,x,n,l);break;case c.Z:if(i){if(r.containStroke(p,_,y,x,e,n,l))return!0}else f+=h(p,_,y,x,n,l);p=y,_=x}}return i||(u=_,d=x,Math.abs(u-d)<1e-4)||(f+=h(p,_,y,x,n,l)||0),0!==f}e.contain=function(t,e,i){return _(t,0,!1,e,i)},e.containStroke=function(t,e,i,n){return _(t,e,!0,i,n)}},function(t,e,i){var n=i(33);e.containStroke=function(t,e,i,r,a,o,s,l,u,h,c){if(0===u)return!1;var d=u;return!(c>e+d&&c>r+d&&c>o+d&&c>l+d||ct+d&&h>i+d&&h>a+d&&h>s+d||hi||d+co&&(o+=r);var p=Math.atan2(h,u);return p<0&&(p+=r),p>=a&&p<=o||p+r>=a&&p+r<=o}},function(t,e,i){var n=i(50),r=i(10).applyTransform,a=n.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;t.exports=function(t,e){var i,n,u,h,c,d=t.data,f=a.M,p=a.C,g=a.L,m=a.R,v=a.A,_=a.Q;for(u=0,h=0;ui-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var m=p*p,v=p*m;a.push([r(u[0],g[0],h[0],c[0],p,m,v),r(u[1],g[1],h[1],c[1],p,m,v)])}return a}},function(t,e,i){var n=i(10),r=n.min,a=n.max,o=n.scale,s=n.distance,l=n.add,u=n.clone,h=n.sub;t.exports=function(t,e,i,n){var c,d,f,p,g=[],m=[],v=[],_=[];if(n){f=[1/0,1/0],p=[-1/0,-1/0];for(var y=0,x=t.length;y=e:"max"===i?t<=e:t===e})(r[o],t,n)||(a=!1)}})),a}c.prototype={constructor:c,setOption:function(t,e){t&&n.each(r.normalizeToArray(t.series),(function(t){t&&t.data&&n.isTypedArray(t.data)&&n.setAsPrimitive(t.data)})),t=s(t);var i,h,c=this._optionBackup,f=d.call(this,t,e,!c);this._newBaseOption=f.baseOption,c?(i=c.baseOption,h=f.baseOption,o(h=h||{},(function(t,e){if(null!=t){var n=i[e];if(a.hasClass(e)){t=r.normalizeToArray(t),n=r.normalizeToArray(n);var o=r.mappingToExists(n,t);i[e]=l(o,(function(t){return t.option&&t.exist?u(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=u(n,t,!0)}})),f.timelineOptions.length&&(c.timelineOptions=f.timelineOptions),f.mediaList.length&&(c.mediaList=f.mediaList),f.mediaDefault&&(c.mediaDefault=f.mediaDefault)):this._optionBackup=f},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=l(e.timelineOptions,s),this._mediaList=l(e.mediaList,s),this._mediaDefault=s(e.mediaDefault),this._currentMediaIndices=[],s(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=s(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,u=[],h=[];if(!a.length&&!o)return h;for(var c=0,d=a.length;c=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n}));o.hostModel.setData(l),e.data=l}))}t.exports=function(t){var e=r();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),e.each(o)}},function(t,e,i){var n=i(79),r=i(0).isFunction,a={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),a=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(a),s=!r(o)||o instanceof n?null:o;o&&!s||(o=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",o);var l=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),u=t.get(l);if(i.setVisual("borderColor",u),!e.isSeriesFiltered(t)){s&&i.each((function(e){i.setItemVisual(e,"color",s(t.getDataParams(e)))}));return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),n=i.get(a,!0),r=i.get(l,!0);null!=n&&t.setItemVisual(e,"color",n),null!=r&&t.setItemVisual(e,"borderColor",r)}:null}}}};t.exports=a},function(t,e,i){var n=i(0),r=i(3),a=i(21),o=Math.PI;t.exports=function(t,e){e=e||{},n.defaults(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new r.Group,s=new r.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(s);var l=e.fontSize+" sans-serif",u=new r.Rect({style:{fill:"none",text:e.text,font:l,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(u),e.showSpinner){var h=new r.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});h.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),h.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut"),i.add(h)}return i.resize=function(){var i=a.getWidth(e.text,l),n=e.showSpinner?e.spinnerRadius:0,r=(t.getWidth()-2*n-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),o=t.getHeight()/2;e.showSpinner&&h.setShape({cx:r,cy:o}),u.setShape({x:r-n,y:o-n,width:2*n,height:2*n}),s.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i}},function(t,e,i){var n=i(0),r=n.each,a=n.map,o=n.isFunction,s=n.createHashMap,l=n.noop,u=i(101).createTask,h=i(62).getUID,c=i(139),d=i(152),f=i(5).normalizeToArray;function p(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=s()}var g=p.prototype;function m(t,e,i,n,a){var o;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}a=a||{},r(e,(function(e,r){if(!a.visualType||a.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){s(a,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),v(h,n);var f=t.getPerformArgs(h,a.block);d.each((function(t){t.perform(f)})),o|=h.perform(f)}else u&&u.each((function(r,l){s(a,r)&&r.dirty();var u=t.getPerformArgs(r,a.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(r.context.model),v(r,n),o|=r.perform(u)}))}})),t.unfinished|=o}g.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},g.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},g.getPipeline=function(t){return this._pipelineMap.get(t)},g.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},g.restorePipelines=function(t){var e=this,i=e._pipelineMap=s();t.eachSeries((function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),C(e,t,t.dataTask)}))},g.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;r(this._allHandlers,(function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){var a=i.seriesTaskMap||(i.seriesTaskMap=s()),o=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(h):o?n.eachRawSeriesByType(o,h):l&&l(n,r).each(h);function h(i){var o=i.uid,s=a.get(o)||a.set(o,u({plan:w,reset:T,count:A}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},C(t,i,s)}var c=t._pipelineMap;a.each((function(t,e){c.get(e)||(t.dispose(),a.removeKey(e))}))}(this,n,a,e,i),n.overallReset&&function(t,e,i,n,a){var o=i.overallTask=i.overallTask||u({reset:_});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:t};var l=o.agentStubMap=o.agentStubMap||s(),h=e.seriesType,c=e.getTargetSeries,d=!0,f=e.modifyOutputEnd;h?n.eachRawSeriesByType(h,p):c?c(n,a).each(p):(d=!1,r(n.getSeries(),p));function p(e){var i=e.uid,n=l.get(i);n||(n=l.set(i,u({reset:y,onDirty:b})),o.dirty()),n.context={model:e,overallProgress:d,modifyOutputEnd:f},n.agent=o,n.__block=d,C(t,e,n)}var g=t._pipelineMap;l.each((function(t,e){g.get(e)||(t.dispose(),o.dirty(),l.removeKey(e))}))}(this,n,a,e,i)}),this)},g.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,C(this,e,r)},g.performDataProcessorTasks=function(t,e){m(this,this._dataProcessorHandlers,t,e,{block:!0})},g.performVisualTasks=function(t,e,i){m(this,this._visualHandlers,t,e,i)},g.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},g.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var v=g.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function _(t){t.overallReset(t.ecModel,t.api,t.payload)}function y(t,e){return t.overallProgress&&x}function x(){this.agent.dirty(),this.getDownstream().dirty()}function b(){this.agent&&this.agent.dirty()}function w(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function T(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=f(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?a(e,(function(t,e){return M(e)})):S}var S=M(0);function M(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;ai&&(s=i);var l=f.length,c=function(t,e,i,n){for(;i>>1;t[r][1]1&&d/h>2&&(c=Math.round(Math.ceil(c/h)*h));var f=u(t),p=o.get("showMinLabel")||f,g=o.get("showMaxLabel")||f;p&&c!==a[0]&&v(a[0]);for(var m=c;m<=a[1];m+=h)v(m);function v(t){l.push(i?t:{formattedLabel:n(t),rawLabel:r.getLabel(t),tickValue:t})}return g&&m-h!==a[1]&&v(a[1]),l}function m(t,e,i){var r=t.scale,a=s(t),o=[];return n.each(r.getTicks(),(function(t){var n=r.getLabel(t);e(t,n)&&o.push(i?t:{formattedLabel:a(t),rawLabel:n,tickValue:t})})),o}e.createAxisLabels=function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=c(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=s(t);return{labels:n.map(e,(function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}}))}}(t)},e.createAxisTicks=function(t,e){return"category"===t.type?function(t,e){var i,r,a=d(t,"ticks"),o=l(e),s=f(a,o);if(s)return s;e.get("show")&&!t.scale.isBlank()||(i=[]);if(n.isFunction(o))i=m(t,o,!0);else if("auto"===o){var u=c(t,t.getLabelModel());r=u.labelCategoryInterval,i=n.map(u.labels,(function(t){return t.tickValue}))}else i=g(t,r=o,!0);return p(a,o,{ticks:i,tickCategoryInterval:r})}(t,e):{ticks:t.scale.getTicks()}},e.calculateCategoryInterval=function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=s(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=t.scale,o=a.getExtent(),l=a.count();if(o[1]-o[0]<1)return 0;var u=1;l>40&&(u=Math.max(1,Math.floor(l/40)));for(var c=o[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),f=Math.abs(d*Math.cos(n)),p=Math.abs(d*Math.sin(n)),g=0,m=0;c<=o[1];c+=u){var v,_,y=r.getBoundingRect(i(c),e.font,"center","top");v=1.3*y.width,_=1.3*y.height,g=Math.max(g,v,7),m=Math.max(m,_,7)}var x=g/f,b=m/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),T=h(t.model),S=t.getExtent(),M=T.lastAutoInterval,A=T.lastTickCount;return null!=M&&null!=A&&Math.abs(M-w)<=1&&Math.abs(A-l)<=1&&M>w&&T.axisExtend0===S[0]&&T.axisExtend1===S[1]?w=M:(T.lastTickCount=l,T.lastAutoInterval=w,T.axisExtend0=S[0],T.axisExtend1=S[1]),w}},function(t,e,i){var n=i(2),r=i(22),a=i(0),o=i(5).defaultEmphasis,s=i(15),l=i(9).encodeHTML,u=i(166),h=i(66),c=i(84),d=c.initCurvenessList,f=c.createEdgeMapForCurveness,p=n.extendSeriesModel({type:"series.graph",init:function(t){p.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new h(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){p.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){p.superApply(this,"mergeDefaultAndTheme",arguments),o(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],r=this;if(n&&i){d(this);var o=u(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=r.getModel("edgeLabel"),a=new s({label:n.option},n.parentModel,e),o=r.getModel("emphasis.edgeLabel"),l=new s({emphasis:{label:o.option}},o.parentModel,e);function u(t){return(t=this.parsePath(t))&&"label"===t[0]?a:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}i.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(u),t}))}));return a.each(o.edges,(function(t){f(t.node1,t.node2,this,t.dataIndex)}),this),o.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),r=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),o=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),u=[];return null!=o&&u.push(o),null!=s&&u.push(s),u=l(u.join(" > ")),r.value&&(u+=" : "+l(r.value)),u}return p.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=a.map(this.option.categories||[],(function(t){return null!=t.value?t:a.extend({value:0},t)})),e=new r(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return p.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),g=p;t.exports=g},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(30).enableClassCheck;function a(t){return"_EC_"+t}var o=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function u(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[a(t)]){var n=new l(t,e);return n.hostGraph=this,this.nodes.push(n),i[a(t)]=n,n}},s.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},s.getNodeById=function(t){return this._nodesMap[a(t)]},s.addEdge=function(t,e,i){var n=this._nodesMap,r=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),l.isInstance(t)||(t=n[a(t)]),l.isInstance(e)||(e=n[a(e)]),t&&e){var o=t.id+"-"+e.id,s=new u(t,e,i);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),r[o]=s,s}},s.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},s.getEdge=function(t,e){l.isInstance(t)&&(t=t.id),l.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},s.eachNode=function(t,e){for(var i=this.nodes,n=i.length,r=0;r=0&&t.call(e,i[r],r)},s.eachEdge=function(t,e){for(var i=this.edges,n=i.length,r=0;r=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&t.call(e,i[r],r)},s.breadthFirstTraverse=function(t,e,i,n){if(l.isInstance(e)||(e=this._nodesMap[a(e)]),e){for(var r="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o=0&&i.node2.dataIndex>=0}));for(r=0,a=n.length;r=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};n.mixin(l,h("hostGraph","data")),n.mixin(u,h("hostGraph","edgeData")),o.Node=l,o.Edge=u,r(l),r(u);var c=o;t.exports=c},function(t,e,i){var n=i(2),r=i(0),a=i(67),o=i(104),s=i(68),l=i(106),u=i(86).onIrrelevantElement,h=i(3),c=i(270),d=i(107).getNodeGlobalScale,f="__focusNodeAdjacency",p=["itemStyle","opacity"],g=["lineStyle","opacity"];function m(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function v(t,e,i){var n=t.getGraphicEl(),r=m(t,e);null!=i&&(null==r&&(r=1),r*=i),n.downplay&&n.downplay(),n.traverse((function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=r),t.setStyle("opacity",e)}}))}function _(t,e){var i=m(t,e),n=t.getGraphicEl();n.traverse((function(t){!t.isGroup&&t.setStyle("opacity",i)})),n.highlight&&n.highlight()}var y=n.extendChartView({type:"graph",init:function(t,e){var i=new a,n=new o,r=this.group;this._controller=new s(e.getZr()),this._controllerHost={target:r},r.add(i.group),r.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,r=t.coordinateSystem;this._model=t;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===r.type){var l={position:r.position,scale:r.scale};this._firstRender?s.attr(l):h.updateProps(s,l,t)}c(t.getGraph(),d(t));var u=t.getData();a.updateData(u);var p=t.getEdgeData();o.updateData(p),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var g=t.forceLayout,m=t.get("force.layoutAnimation");g&&this._startForceLayoutIteration(g,m),u.eachItemGraphicEl((function(e,r){var a=u.getItemModel(r);e.off("drag").off("dragend");var o=a.get("draggable");o&&e.on("drag",(function(){g&&(g.warmUp(),!this._layouting&&this._startForceLayoutIteration(g,m),g.setFixed(r),u.setItemLayout(r,e.position))}),this).on("dragend",(function(){g&&g.setUnfixed(r)}),this),e.setDraggable(o&&g),e[f]&&e.off("mouseover",e[f]),e.__unfocusNodeAdjacency&&e.off("mouseout",e.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(e.on("mouseover",e[f]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}),this),u.graph.eachEdge((function(e){var r=e.getGraphicEl();r[f]&&r.off("mouseover",r[f]),r.__unfocusNodeAdjacency&&r.off("mouseout",r.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(r.on("mouseover",r[f]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),r.on("mouseout",r.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}));var v="circular"===t.get("layout")&&t.get("circular.rotateLabel"),_=u.getLayout("cx"),y=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var i=u.getItemModel(e).get("label.rotate")||0,n=t.getSymbolPath();if(v){var r=u.getItemLayout(e),a=Math.atan2(r[1]-y,r[0]-_);a<0&&(a=2*Math.PI+a);var o=r[0]<_;o&&(a-=Math.PI);var s=o?"left":"right";h.modifyLabelStyle(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else h.modifyLabelStyle(n,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var a=t.getData().graph,o=n.dataIndex,s=n.edgeDataIndex,l=a.getNodeByIndex(o),u=a.getEdgeByIndex(s);(l||u)&&(a.eachNode((function(t){v(t,p,.1)})),a.eachEdge((function(t){v(t,g,.1)})),l&&(_(l,p),r.each(l.edges,(function(t){t.dataIndex<0||(_(t,g),_(t.node1,p),_(t.node2,p))}))),u&&(_(u,g),_(u.node1,p),_(u.node2,p)))},unfocusNodeAdjacency:function(t,e,i,n){var r=t.getData().graph;r.eachNode((function(t){v(t,p)})),r.eachEdge((function(t){v(t,g)}))},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(t,e,i){var n=this._controller,r=this._controllerHost,a=this.group;n.setPointerChecker((function(e,n,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(n,r)&&!u(e,i,t)})),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(e){l.updateViewOnPan(r,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){l.updateViewOnZoom(r,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),c(t.getGraph(),d(t)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=d(t),n=[i,i];e.eachItemGraphicEl((function(t,e){t.attr("scale",n)}))},updateLayout:function(t){c(t.getGraph(),d(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});t.exports=y},function(t,e,i){var n=i(3),r=i(10),a=n.Line.prototype,o=n.BezierCurve.prototype;function s(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var l=n.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[s(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:a.buildPath,_buildPathCurve:o.buildPath,pointAt:function(t){return this[s(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:a.pointAt,_pointAtCurve:o.pointAt,tangentAt:function(t){var e=this.shape,i=s(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return r.normalize(i,i)},_tangentAtCurve:o.tangentAt});t.exports=l},function(t,e,i){var n=i(33),r=i(10),a=i(107).getSymbolSize,o=[],s=[],l=[],u=n.quadraticAt,h=r.distSquare,c=Math.abs;function d(t,e,i){for(var n,r=t[0],a=t[1],d=t[2],f=1/0,p=i*i,g=.1,m=.1;m<=.9;m+=.1){o[0]=u(r[0],a[0],d[0],m),o[1]=u(r[1],a[1],d[1],m),(y=c(h(o,e)-p))=0?n+=g:n-=g:x>=0?n-=g:n+=g}return n}t.exports=function(t,e){var i=[],o=n.quadraticSubdivide,s=[[],[],[]],l=[[],[]],u=[];e/=2,t.eachEdge((function(t,n){var h=t.getLayout(),c=t.getVisual("fromSymbol"),f=t.getVisual("toSymbol");h.__original||(h.__original=[r.clone(h[0]),r.clone(h[1])],h[2]&&h.__original.push(r.clone(h[2])));var p=h.__original;if(null!=h[2]){if(r.copy(s[0],p[0]),r.copy(s[1],p[2]),r.copy(s[2],p[1]),c&&"none"!==c){var g=a(t.node1),m=d(s,p[0],g*e);o(s[0][0],s[1][0],s[2][0],m,i),s[0][0]=i[3],s[1][0]=i[4],o(s[0][1],s[1][1],s[2][1],m,i),s[0][1]=i[3],s[1][1]=i[4]}if(f&&"none"!==f){g=a(t.node2),m=d(s,p[1],g*e);o(s[0][0],s[1][0],s[2][0],m,i),s[1][0]=i[1],s[2][0]=i[2],o(s[0][1],s[1][1],s[2][1],m,i),s[1][1]=i[1],s[2][1]=i[2]}r.copy(h[0],s[0]),r.copy(h[1],s[2]),r.copy(h[2],s[1])}else{if(r.copy(l[0],p[0]),r.copy(l[1],p[1]),r.sub(u,l[1],l[0]),r.normalize(u,u),c&&"none"!==c){g=a(t.node1);r.scaleAndAdd(l[0],l[0],u,g*e)}if(f&&"none"!==f){g=a(t.node2);r.scaleAndAdd(l[1],l[1],u,-g*e)}r.copy(h[0],l[0]),r.copy(h[1],l[1])}}))}},function(t,e,i){var n=i(2),r=i(108).updateCenterAndZoom;i(169);n.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,n=r(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))}))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,r=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=r[i]);for(var a=0;a "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),p=f;t.exports=p},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(104),a=i(174),o=i(105),s=i(175),l=i(285),u=i(286),h=i(176),c=i(70).createClipPath,d=n.extendChartView({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),r=this._updateLineDraw(n,t),a=t.get("zlevel"),o=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&o&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),r.updateData(n);var u=t.get("clip",!0)&&c(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var a=h.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),h=!!e.get("polyline"),c=e.pipelineContext.large;return i&&n===this._hasEffet&&h===this._isPolyline&&c===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=c?new u:new r(h?n?l:s:n?a:o),this._hasEffet=n,this._isPolyline=h,this._isLargeDraw=c,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});t.exports=d},function(t,e,i){var n=i(175),r=i(0),a=i(174),o=i(10);function s(t,e,i){a.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var l=s.prototype;l.createLine=function(t,e,i){return new n(t,e,i)},l.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,r=1;r=0&&!(n[s]<=e);s--);s=Math.min(s,r-2)}else{for(var s=a;se);s++);s=Math.min(s-1,r-2)}o.lerp(t.position,i[s],i[s+1],(e-n[s])/(n[s+1]-n[s]));var l=i[s+1][0]-i[s][0],u=i[s+1][1]-i[s][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=e,t.ignore=!1}},r.inherits(s,a);var u=s;t.exports=u},function(t,e,i){var n=i(3),r=i(99),a=i(141),o=i(142),s=n.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(i[r++],i[r++]);for(var o=1;o0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,r=i.curveness;if(i.polyline)for(var s=0,l=0;l0)for(var h=n[l++],c=n[l++],d=1;d0){var g=(h+f)/2-(c-p)*r,m=(c+p)/2-(f-h)*r;if(o.containStroke(h,c,g,m,f,p))return s}else if(a.containStroke(h,c,f,p))return s;s++}return-1}});function l(){this.group=new n.Group}var u=l.prototype;u.isPersistent=function(){return!this._incremental},u.updateData=function(t){this.group.removeAll();var e=new s({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},u.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new r({silent:!0})),this.group.add(this._incremental)):this._incremental=null},u.incrementalUpdate=function(t,e){var i=new s;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},u.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},u._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("color");r&&t.setStyle("stroke",r),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)})))},u._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var h=l;t.exports=h},function(t,e){function i(t){return t instanceof Array||(t=[t,t]),t}var n="lineStyle.opacity".split("."),r={seriesType:"lines",reset:function(t,e,r){var a=i(t.get("symbol")),o=i(t.get("symbolSize")),s=t.getData();return s.setVisual("fromSymbol",a&&a[0]),s.setVisual("toSymbol",a&&a[1]),s.setVisual("fromSymbolSize",o&&o[0]),s.setVisual("toSymbolSize",o&&o[1]),s.setVisual("opacity",t.get(n)),{dataEach:s.hasItemOption?function(t,e){var r=t.getItemModel(e),a=i(r.getShallow("symbol",!0)),o=i(r.getShallow("symbolSize",!0)),s=r.get(n);a[0]&&t.setItemVisual(e,"fromSymbol",a[0]),a[1]&&t.setItemVisual(e,"toSymbol",a[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",s)}:null}}};t.exports=r},function(t,e,i){var n=i(0),r=i(5).makeInner,a=i(87),o=i(178),s=n.each,l=n.curry,u=r();function h(t,e,i,r,a){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var l=function(t,e){var i=e.axis,n=i.dim,r=t,a=[],o=Number.MAX_VALUE,l=-1;return s(e.seriesModels,(function(e,u){var h,c,d=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var f=e.getAxisTooltipData(d,t,i);c=f.dataIndices,h=f.nestestValue}else{if(!(c=e.getData().indicesOfNearest(d[0],t,"category"===i.type?.5:null)).length)return;h=e.getData().get(d[0],c[0])}if(null!=h&&isFinite(h)){var p=t-h,g=Math.abs(p);g<=o&&((g=0&&l<0)&&(o=g,l=p,r=h,a.length=0),s(c,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:r}}(e,t),u=l.payloadBatch,h=l.snapToValue;u[0]&&null==a.seriesIndex&&n.extend(a,u[0]),!r&&t.snap&&o.containData(h)&&null!=h&&(e=h),i.showPointer(t,e,u,a),i.showTooltip(t,l,h)}else i.showPointer(t,e)}function c(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function d(t,e,i,n){var r=i.payloadBatch,o=e.axis,s=o.model,l=e.axisPointerModel;if(e.triggerTooltip&&r.length){var u=e.coordSys.model,h=a.makeKey(u),c=t.map[h];c||(c=t.map[h]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:n,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:r.slice()})}}function f(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function p(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}t.exports=function(t,e,i){var r=t.currTrigger,a=[t.x,t.y],g=t,m=t.dispatchAction||n.bind(i.dispatchAction,i),v=e.getComponent("axisPointer").coordSysAxesInfo;if(v){p(a)&&(a=o({seriesIndex:g.seriesIndex,dataIndex:g.dataIndex},e).point);var _=p(a),y=g.axesInfo,x=v.axesInfo,b="leave"===r||p(a),w={},T={},S={list:[],map:{}},M={showPointer:l(c,T),showTooltip:l(d,S)};s(v.coordSysMap,(function(t,e){var i=_||t.containPoint(a);s(v.coordSysAxesInfo[e],(function(t,e){var n=t.axis,r=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(y,t);if(!b&&i&&(!y||r)){var o=r&&r.value;null!=o||_||(o=n.pointToData(a)),null!=o&&h(t,o,M,!1,w)}}))}));var A={};return s(x,(function(t,e){var i=t.linkGroup;i&&!T[e]&&s(i.axesInfo,(function(e,n){var r=T[n];if(e!==t&&r){var a=r.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,f(e),f(t)))),A[t.key]=a}}))})),s(A,(function(t,e){h(x[e],t,M,!0,w)})),function(t,e,i){var n=i.axesInfo=[];s(e,(function(e,i){var r=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(T,x,w),function(t,e,i,n){if(p(e)||!t.list.length)return void n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(S,a,t,m),function(t,e,i){var r=i.getZr(),a=u(r).axisPointerLastHighlights||{},o=u(r).axisPointerLastHighlights={};s(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&s(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var l=[],h=[];n.each(a,(function(t,e){!o[e]&&h.push(t)})),n.each(o,(function(t,e){!a[e]&&l.push(t)})),h.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:h}),l.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:l})}(x,0,i),w}}},function(t,e,i){var n=i(2).extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});t.exports=n},function(t,e,i){var n=i(2),r=i(179),a=n.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";r.register("axisPointer",i,(function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){r.unregister(e.getZr(),"axisPointer"),a.superApply(this._model,"remove",arguments)},dispose:function(t,e){r.unregister("axisPointer",e),a.superApply(this._model,"dispose",arguments)}}),o=a;t.exports=o},function(t,e,i){var n=i(2).extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});t.exports=n},function(t,e,i){var n=i(2),r=i(0),a=i(14),o=i(293),s=i(294),l=i(9),u=i(4),h=i(3),c=i(178),d=i(8),f=i(15),p=i(179),g=i(25),m=i(88),v=i(5).getTooltipRenderMode,_=r.bind,y=r.each,x=u.parsePercent,b=new h.Rect({shape:{x:-1,y:-1,width:2,height:2}}),w=n.extendComponentView({type:"tooltip",init:function(t,e){if(!a.node){var i,n=t.getComponent("tooltip"),r=n.get("renderMode");this._renderMode=v(r),"html"===this._renderMode?(i=new o(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="
"):(i=new s(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!a.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");p.register("itemTooltip",this._api,_((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!a.node){var r=S(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var s=b;s.position=[n.x,n.y],s.update(),s.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:s},r)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var l=c(n,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:n.position,target:l.el},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(S(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=T([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=r.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],s=[],u=T([e.tooltipOption,n]),h=this._renderMode,c=this._newLine,d={};y(t,(function(t){y(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var u=m.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);r.each(t.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),c=o.dataIndexInside,f=l&&l.getDataParams(c);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=g.getAxisRawValue(e.axis,n),f.axisValueLabel=u,f){s.push(f);var p,m=l.formatTooltip(c,!0,null,h);if(r.isObject(m)){p=m.html;var v=m.markers;r.merge(d,v)}else p=m;a.push(p)}}));var f=u;"html"!==h?o.push(a.join(c)):o.push((f?l.encodeHTML(f)+c:"")+a.join(c))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(u,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(u,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(u,o,s,Math.random(),a[0],a[1],f,void 0,d)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),s=e.dataModel||o,l=e.dataIndex,u=e.dataType,h=s.getData(u),c=T([h.getItemModel(l),s,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),d=c.get("trigger");if(null==d||"item"===d){var f,p,g=s.getDataParams(l,u),m=s.formatTooltip(l,!1,u,this._renderMode);r.isObject(m)?(f=m.html,p=m.markers):(f=m,p=null);var v="item_"+s.name+"_"+l;this._showOrMove(c,(function(){this._showTooltipContent(c,f,g,v,t.offsetX,t.offsetY,t.position,t.target,p)})),i({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new f(n,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,a,o,s,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent,c=t.get("formatter");o=o||t.get("position");var d=e;if(c&&"string"==typeof c)d=l.formatTpl(c,i,!0);else if("function"==typeof c){var f=_((function(e,n){e===this._ticket&&(h.setContent(n,u,t),this._updatePosition(t,o,r,a,h,i,s))}),this);this._ticket=n,d=c(i,n,f)}h.setContent(d,u,t),h.show(t),this._updatePosition(t,o,r,a,h,i,s)}},_updatePosition:function(t,e,i,n,a,o,s){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var h=a.getSize(),c=t.get("align"),f=t.get("verticalAlign"),p=s&&s.getBoundingRect().clone();if(s&&p.applyTransform(s.transform),"function"==typeof e&&(e=e([i,n],o,a.el,p,{viewSize:[l,u],contentSize:h.slice()})),r.isArray(e))i=x(e[0],l),n=x(e[1],u);else if(r.isObject(e)){e.width=h[0],e.height=h[1];var g=d.getLayoutRect(e,{width:l,height:u});i=g.x,n=g.y,c=null,f=null}else if("string"==typeof e&&s){var m=function(t,e,i){var n=i[0],r=i[1],a=0,o=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,o=e.y+l/2-r/2;break;case"top":a=e.x+s/2-n/2,o=e.y-r-5;break;case"bottom":a=e.x+s/2-n/2,o=e.y+l+5;break;case"left":a=e.x-n-5,o=e.y+l/2-r/2;break;case"right":a=e.x+s+5,o=e.y+l/2-r/2}return[a,o]}(e,p,h);i=m[0],n=m[1]}else{m=function(t,e,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(t+l+a>n?t-=l+a:t+=a);null!=o&&(e+u+o>r?e-=u+o:e+=o);return[t,e]}(i,n,a,l,u,c?null:20,f?null:20);i=m[0],n=m[1]}if(c&&(i-=M(c)?h[0]/2:"right"===c?h[0]:0),f&&(n-=M(f)?h[1]/2:"bottom"===f?h[1]:0),t.get("confine")){m=function(t,e,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,a,l,u);i=m[0],n=m[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&y(e,(function(e,n){var r=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&y(r,(function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length)&&y(r,(function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){a.node||(this._tooltipContent.dispose(),p.unregister("itemTooltip",e))}});function T(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(f.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new f(i,e,e.ecModel))}return e}function S(t,e){return t.dispatchAction||r.bind(e.dispatchAction,e)}function M(t){return"center"===t||"middle"===t}t.exports=w},function(t,e,i){var n=i(0),r=i(27),a=i(26),o=i(130),s=i(14),l=i(9),u=n.each,h=l.toCamelCase,c=["","-webkit-","-moz-","-o-"];function d(t){var e,i,a=[],o=t.get("transitionDuration"),d=t.get("backgroundColor"),f=t.getModel("textStyle"),p=t.get("padding");return o&&a.push((i="left "+(e=o)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+e+"s cubic-bezier(0.23, 1, 0.32, 1)",n.map(c,(function(t){return t+"transition:"+i})).join(";"))),d&&(s.canvasSupported?a.push("background-Color:"+d):(a.push("background-Color:#"+r.toHex(d)),a.push("filter:alpha(opacity=70)"))),u(["width","color","radius"],(function(e){var i="border-"+e,n=h(i),r=t.get(n);null!=r&&a.push(i+":"+r+("color"===e?"":"px"))})),a.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var r=t.get("lineHeight");null==r&&(r=Math.round(3*i/2)),i&&e.push("line-height:"+r+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),u(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(f)),null!=p&&a.push("padding:"+l.normalizeCssArray(p).join("px ")+"px"),a.join(";")+";"}function f(t,e,i,n,r){var a=e&&e.painter;if(i){var s=a&&a.getViewportRoot();s&&o.transformLocalCoord(t,s,document.body,n,r)}else{t[0]=n,t[1]=r;var l=a&&a.getViewportRootOffset();l&&(t[0]+=l.offsetLeft,t[1]+=l.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function p(t,e,i){if(s.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],f(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var l=this;n.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!l._enterable){var e=r.handler,i=r.painter.getViewportRoot();a.normalizeEvent(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}}p.prototype={constructor:p,_enterable:!0,update:function(t){var e=this._container,i=e.currentStyle||document.defaultView.getComputedStyle(e),n=e.style;"absolute"!==n.position&&"absolute"!==i.position&&(n.position="relative"),t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],i=t*this._zr.getWidth(),n=e*this._zr.getHeight();this.moveTo(i,n)},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+d(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;f(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(n.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}};var g=p;t.exports=g},function(t,e,i){var n=i(0),r=i(41),a=i(3);function o(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function s(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],o(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}s.prototype={constructor:s,_enterable:!0,update:function(t){t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],i=t*this._zr.getWidth(),n=e*this._zr.getHeight();this.moveTo(i,n)},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,s=o.indexOf("{marker");s>=0;){var l=o.indexOf("|}"),u=o.substr(s+"{marker".length,l-s-"{marker".length);u.indexOf("sub")>-1?n["marker"+u]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:n["marker"+u]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},s=(o=o.substr(l+1)).indexOf("{marker")}var h=i.getModel("textStyle"),c=h.get("fontSize"),d=i.get("textLineHeight");null==d&&(d=Math.round(3*c/2)),this.el=new r({style:a.setTextStyle({},h,{rich:n,text:t,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:d}),z:i.get("z")}),this._zr.add(this.el);var f=this;this.el.on("mouseover",(function(){f._enterable&&(clearTimeout(f._hideTimeout),f._show=!0),f._inContent=!0})),this.el.on("mouseout",(function(){f._enterable&&f._show&&f.hideLater(f._hideDelay),f._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){if(this.el){var i=this._styleCoord;o(i,this._zr,t,e),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(n.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var l=s;t.exports=l},function(t,e,i){var n=i(2),r=i(0),a=i(38),o=n.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){o.superApply(this,"optionUpdated",arguments),r.each(this.option.feature,(function(t,e){var i=a.get(e);i&&r.merge(t,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),s=o;t.exports=s},function(t,e,i){var n=i(2),r=i(0),a=i(21),o=i(38),s=i(3),l=i(15),u=i(43),h=i(184),c=n.extendComponentView({type:"toolbox",render:function(t,e,i,n){var c=this.group;if(c.removeAll(),t.get("show")){var d=+t.get("itemSize"),f=t.get("feature")||{},p=this._features||(this._features={}),g=[];r.each(f,(function(t,e){g.push(e)})),new u(this._featureNames||[],g).add(m).update(m).remove(r.curry(m,null)).execute(),this._featureNames=g,h.layout(c,t,i),c.add(h.makeBackground(c.getBoundingRect(),t)),c.eachChild((function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=a.getBoundingRect(e,a.makeFont(n)),o=t.position[0]+c.position[0],s=!1;t.position[1]+c.position[1]+d+r.height>i.getHeight()&&(n.textPosition="top",s=!0);var l=s?-5-r.height:d+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",l],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,l],n.textAlign="left")}}))}function m(a,u){var h,m=g[a],v=g[u],_=f[m],y=new l(_,t,t.ecModel);if(n&&null!=n.newTitle&&n.featureName===m&&(_.title=n.newTitle),m&&!v){if(function(t){return 0===t.indexOf("my")}(m))h={model:y,onclick:y.option.onclick,featureName:m};else{var x=o.get(m);if(!x)return;h=new x(y,e,i)}p[m]=h}else{if(!(h=p[v]))return;h.model=y,h.ecModel=e,h.api=i}m||!v?y.get("show")&&!h.unusable?(!function(n,a,o){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),h=a.getIcons?a.getIcons():n.get("icon"),f=n.get("title")||{};if("string"==typeof h){var p=h,g=f;f={},(h={})[o]=p,f[o]=g}var m=n.iconPaths={};r.each(h,(function(o,h){var p=s.createIcon(o,{},{x:-d/2,y:-d/2,width:d,height:d});p.setStyle(l.getItemStyle()),p.hoverStyle=u.getItemStyle(),p.setStyle({text:f[h],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var g=t.getModel("tooltip");g&&g.get("show")&&p.attr("tooltip",r.extend({content:f[h],formatter:g.get("formatter",!0)||function(){return f[h]},formatterParams:{componentType:"toolbox",name:h,title:f[h],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),s.setHoverStyle(p),t.get("showTitle")&&(p.__title=f[h],p.on("mouseover",(function(){var e=u.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";p.setStyle({textFill:u.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||i})})).on("mouseout",(function(){p.setStyle({textFill:null,textBackgroundColor:null})}))),p.trigger(n.get("iconStatus."+h)||"normal"),c.add(p),p.on("click",r.bind(a.onclick,a,e,i,h)),m[h]=p}))}(y,h,m),y.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},h.render&&h.render(y,e,i,n)):h.remove&&h.remove(e,i):h.dispose&&h.dispose(e,i)}},updateView:function(t,e,i,n){r.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},remove:function(t,e){r.each(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){r.each(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});t.exports=c},function(t,e,i){var n=i(14),r=i(35),a=i(38),o=r.toolbox.saveAsImage;function s(t){this.model=t}s.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:o.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:o.lang.slice()},s.prototype.unusable=!n.canvasSupported,s.prototype.onclick=function(t,e){var i=this.model,r=i.get("name")||t.get("title.0.text")||"echarts",a="svg"===e.getZr().painter.getType()?"svg":i.get("type",!0)||"png",o=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||n.browser.ie||n.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,r+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=document.createElement("a");f.download=r+"."+a,f.target="_blank",f.href=o;var p=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},a.register("saveAsImage",s);var l=s;t.exports=l},function(t,e,i){var n=i(2),r=i(0),a=i(35),o=i(38),s=a.toolbox.magicType;function l(t){this.model=t}l.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.clone(s.title),option:{},seriesIndex:{}};var u=l.prototype;u.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return r.each(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var h={line:function(t,e,i,n){if("bar"===t)return r.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return r.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var a="__ec_magicType_stack__"===i.get("stack");if("line"===t||"bar"===t)return n.setIconStatus("stack",a?"normal":"emphasis"),r.merge({id:e,stack:a?"":"__ec_magicType_stack__"},n.get("option.stack")||{},!0)}},c=[["line","bar"],["stack"]];u.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(h[i]){var o,l={series:[]};if(r.each(c,(function(t){r.indexOf(t,i)>=0&&r.each(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(e){var a=e.subType,o=e.id,s=h[i](a,o,e,n);s&&(r.defaults(s,e.option),l.series.push(s));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var c=u.getAxesByScale("ordinal")[0];if(c){var d=c.dim+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;l[d]=l[d]||[];for(var p=0;p<=f;p++)l[d][f]=l[d][f]||{};l[d][f].boundaryGap="bar"===i}}})),"stack"===i)o=l.series&&l.series[0]&&"__ec_magicType_stack__"===l.series[0].stack?r.merge({stack:s.title.tiled},s.title):r.clone(s.title);e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:o,featureName:"magicType"})}},n.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),o.register("magicType",l);var d=l;t.exports=d},function(t,e,i){var n=i(2),r=i(0),a=i(26),o=i(35),s=i(38),l=o.toolbox.dataView,u=new Array(60).join("-");function h(t){return r.map(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,r=arguments[t-1],a=e.getName(r),o=0;o=0)return!0}(t)){var a=function(t){for(var e=t.split(/\n+/g),i=c(e.shift()).split(d),n=[],a=r.map(i,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}(t,e)},p.onclick=function(t,e,i){g[i].call(this)},p.remove=function(t,e){this._brushController.unmount()},p.dispose=function(t,e){this._brushController.dispose()};var g={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(s.pop(this.ecModel))}};function m(t){var e={};return r.each(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])})),e}p._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new o(m(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(r("x",i,e[0]),r("y",i,e[1])):r({lineX:"x",lineY:"y"}[n],i,e)}})),s.push(n,i),this._dispatchZoomAction(i)}function r(t,e,r){var a=e.getAxis(t),o=a.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,o,n),u=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(r=l(0,r.slice(),a.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},p._dispatchZoomAction=function(t){var e=[];d(t,(function(t,i){e.push(r.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},h.register("dataZoom",f),n.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);r.isArray(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(r.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",o=n[a];null==o||"all"===o||r.isArray(o)||(o=!1===o||"none"===o?[]:[o]),function(e,i){var n=t[e];r.isArray(n)||(n=n?[n]:[]);d(n,i)}(i,(function(t,s){if(null==o||"all"===o||-1!==r.indexOf(o,s)){var l={type:"select",$fromToolbox:!0,filterMode:n.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+s};l[a]=s,e.push(l)}}))}}}));var v=f;t.exports=v},function(t,e,i){i(112),i(55),i(56),i(303),i(304),i(114),i(115)},function(t,e,i){var n=i(0),r=i(4),a=i(113),o=i(54),s=n.each,l=r.asc,u=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function h(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=r.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var s=e||0===n[0]&&100===n[1];i.setRange(s?null:+a[0].toFixed(o),s?null:+a[1].toFixed(o))}}u.prototype={constructor:u,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(a.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,r=this.ecModel,a=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),r.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return n.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e,i=this._dataExtent,n=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];s(["start","end"],(function(o,s){var l=t[o],d=t[o+"Value"];"percent"===a[s]?(null==l&&(l=u[s]),d=n.parse(r.linearMap(l,u,i))):(e=!0,d=null==d?i[s]:n.parse(d),l=r.linearMap(d,i,u)),c[s]=d,h[s]=l})),l(c),l(h);var d=this._minMaxSpan;function f(t,e,i,a,s){var l=s?"Span":"ValueSpan";o(0,t,i,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)e[u]=r.linearMap(t[u],i,a,!0),s&&(e[u]=n.parse(e[u]))}return e?f(c,h,i,u,!1):f(h,c,u,i,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];s(i,(function(t){var i=t.getData();i&&s(i.mapDimension(e,!0),(function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])}))})),n[1]0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:r&&(e[1]=a>0?a-1:NaN);i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e),function(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;s(["min","max"],(function(a){var o=i.get(a+"Span"),s=i.get(a+"ValueSpan");null!=s&&(s=t.getAxisModel().axis.scale.parse(s)),null!=s?o=r.linearMap(n[0]+s,n,[0,100],!0):null!=o&&(s=r.linearMap(o,[0,100],n,!0)-n[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=s}))}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,h(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,h(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&s(n,(function(t){var e=t.getData(),n=e.mapDimension(i,!0);n.length&&("weakFilter"===r?e.filterSelf((function(t){for(var i,r,o,s=0;sa[1];if(u&&!h&&!c)return!0;u&&(o=!0),h&&(i=!0),c&&(r=!0)}return o&&i&&r})):s(n,(function(i){if("empty"===r)t.setData(e=e.map(i,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var n={};n[i]=a,e.selectRange(n)}})),s(n,(function(t){e.setApproximateExtent(a,t)})))}))}}};var c=u;t.exports=c},function(t,e,i){var n=i(55).extend({type:"dataZoom.select"});t.exports=n},function(t,e,i){var n=i(56).extend({type:"dataZoom.select"});t.exports=n},function(t,e,i){var n=i(2),r=i(187),a=i(35),o=i(38),s=a.toolbox.restore;function l(t){this.model=t}l.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:s.title},l.prototype.onclick=function(t,e,i){r.clear(t),e.dispatchAction({type:"restore",from:this.uid})},o.register("restore",l),n.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));var u=l;t.exports=u},function(t,e,i){var n=i(2),r=i(0);function a(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",(function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var s=i.getData();r.each(s,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&n:a[e]=n}}))})),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}n.registerAction("legendToggleSelect","legendselectchanged",r.curry(a,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",r.curry(a,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",r.curry(a,"inverseSelect")),n.registerAction("legendSelect","legendselected",r.curry(a,"select")),n.registerAction("legendUnSelect","legendunselected",r.curry(a,"unSelect"))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,r=t.max,a=r.x>=e.x&&n.x<=i.x,o=r.y>=e.y&&n.y<=i.y;return a&&o},overlaps:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,r=t.max,a=r.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=r.lat&&e.lng>=n.lng&&i.lng<=r.lng},intersects:function(t){t=F(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),a=r.lat>=e.lat&&n.lat<=i.lat,o=r.lng>=e.lng&&n.lng<=i.lng;return a&&o},overlaps:function(t){t=F(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),a=r.lat>e.lat&&n.late.lng&&n.lng';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Dt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Ot=(Object.freeze||Object)({ie:et,ielt9:it,edge:nt,webkit:rt,android:at,android23:ot,androidStock:lt,opera:ut,chrome:ht,gecko:ct,safari:dt,phantom:ft,opera12:pt,win:gt,ie3d:mt,webkit3d:vt,gecko3d:_t,any3d:yt,mobile:xt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:Tt,pointer:St,touch:Mt,mobileOpera:At,mobileGecko:Ct,retina:It,canvas:Lt,svg:Et,vml:Pt}),Rt=Tt?"MSPointerDown":"pointerdown",Nt=Tt?"MSPointerMove":"pointermove",kt=Tt?"MSPointerUp":"pointerup",zt=Tt?"MSPointerCancel":"pointercancel",Bt=["INPUT","SELECT","OPTION"],Ft={},Vt=!1,Gt=0;function Ht(t){Ft[t.pointerId]=t,Gt++}function Ut(t){Ft[t.pointerId]&&(Ft[t.pointerId]=t)}function Wt(t){delete Ft[t.pointerId],Gt--}function jt(t,e){for(var i in t.touches=[],Ft)t.touches.push(Ft[i]);t.changedTouches=[t],e(t)}var Zt,Xt,Yt,qt,Kt,Jt=Tt?"MSPointerDown":St?"pointerdown":"touchstart",$t=Tt?"MSPointerUp":St?"pointerup":"touchend",Qt="_leaflet_",te=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ie="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function re(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function ae(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function oe(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ue(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=pe(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,F(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=N((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=N(e.paddingBottomRight||e.padding||[0,0]),r=this.getCenter(),a=this.project(r),o=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),u=z([s.min.add(i),s.max.subtract(n)]);if(!u.contains(o)){this._enforcingBounds=!0;var h=a.subtract(o),c=N(o.x+h.x,o.y+h.y);(o.xu.max.x)&&(c.x=a.x-h.x,0u.max.y)&&(c.y=a.y-h.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],r="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,o=!1;a;){if((i=this._targets[s(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){o=!0;break}if(i&&i.listens(e,!0)){if(r&&!je(a,t))break;if(n.push(i),r)break}if(a===this._container)break;a=a.parentNode}return n.length||o||r||!je(a,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!We(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Te(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var r=i({},t);r.type="preclick",this._fireDOMEvent(r,r.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var a=n[0];"contextmenu"===e&&a.listens(e,!0)&&ke(t);var o={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=a.getLatLng&&(!a._radius||a._radius<=10);o.containerPoint=s?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),o.layerPoint=this.containerPointToLayerPoint(o.containerPoint),o.latlng=s?a.getLatLng():this.layerPointToLatLng(o.layerPoint)}for(var l=0;lthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(r)||(A((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&de(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),A((function(){this._moveEnd(!0)}),this))}});function qe(t){return new Ke(t)}var Ke=E.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(oe(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+s(this),n),this._layerControlInputs.push(e),e.layerId=s(t.layer),Ie(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var a=document.createElement("div");return i.appendChild(a),a.appendChild(e),a.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var a=i.length-1;0<=a;a--)t=i[a],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||r.push(e);for(a=0;ae.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$e=Ke.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ae("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,r){var a=ae("a",i,n);return a.innerHTML=t,a.href="#",a.title=e,a.setAttribute("role","button"),a.setAttribute("aria-label",e),Ne(a),Ie(a,"click",ze),Ie(a,"click",r,this),Ie(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";de(this._zoomInButton,e),de(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||ce(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||ce(this._zoomInButton,e)}});Ye.mergeOptions({zoomControl:!0}),Ye.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new $e,this.addControl(this.zoomControl))}));var Qe=Ke.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ae("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=ae("div",e,i)),t.imperial&&(this._iScale=ae("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,r=3.2808399*t;5280Leaflet'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ae("div","leaflet-control-attribution"),Ne(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});Ye.mergeOptions({attributionControl:!0}),Ye.addInitHook((function(){this.options.attributionControl&&(new ti).addTo(this)})),Ke.Layers=Je,Ke.Zoom=$e,Ke.Scale=Qe,Ke.Attribution=ti,qe.layers=function(t,e,i){return new Je(t,e,i)},qe.zoom=function(t){return new $e(t)},qe.scale=function(t){return new Qe(t)},qe.attribution=function(t){return new ti(t)};var ei=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ei.addTo=function(t,e){return t.addHandler(e,this),this};var ii,ni={Events:P},ri=Mt?"touchstart mousedown":"mousedown",ai={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},oi={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},si=D.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ie(this._dragStartTarget,ri,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(si._dragging===this&&this.finishDrag(),Ee(this._dragStartTarget,ri,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")&&!(si._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((si._dragging=this)._preventOutline&&Te(this._element),be(),Zt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Me(this._element);this._startPoint=new O(e.clientX,e.clientY),this._parentScale=Ae(i),Ie(document,oi[t.type],this._onMove,this),Ie(document,ai[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&1e.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function fi(t,e,i,n){var r,a=e.x,o=e.y,s=i.x-a,l=i.y-o,u=s*s+l*l;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||ki.prototype._containsPoint.call(this,t,!0)}}),Bi=Ii.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,r=_(t)?t:t.features;if(r){for(e=0,i=r.length;eu.x&&(h=a.x+n-u.x+l.x),a.x-h-s.x<0&&(h=a.x-s.x),a.y+i+l.y>u.y&&(c=a.y+i-u.y+l.y),a.y-c-s.y<0&&(c=a.y-s.y),(h||c)&&t.fire("autopanstart").panBy([h,c])}},_onCloseButtonClick:function(t){this._close(),ze(t)},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ye.mergeOptions({closePopupOnClick:!0}),Ye.include({openPopup:function(t,e,i){return t instanceof Qi||(t=new Qi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Ai.include({bindPopup:function(t,e){return t instanceof Qi?(p(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new Qi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(ze(t),e instanceof Oi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var tn=$i.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){$i.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){$i.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=$i.prototype.getEvents.call(this);return Mt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ae("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),r=e.layerPointToContainerPoint(t),a=this.options.direction,o=i.offsetWidth,s=i.offsetHeight,l=N(this.options.offset),u=this._getAnchor();t="top"===a?t.add(N(-o/2+l.x,-s+l.y+u.y,!0)):"bottom"===a?t.subtract(N(o/2-l.x,-l.y,!0)):"center"===a?t.subtract(N(o/2+l.x,s/2-u.y+l.y,!0)):"right"===a||"auto"===a&&r.xthis.options.maxZoom||ithis.options.maxZoom||void 0!==this.options.minZoom&&ri.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i);return[e.unproject(n,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new B(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new O(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(oe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,it&&this.options.opacity<1&&ge(t,this.options.opacity),at&&!ot&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&A(a(this._tileReady,this,t,null,r)),_e(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ge(i.el,0),C(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ce(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?A(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new k(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),rn=nn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&It&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),cn={_initContainer:function(){this._container=ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(sn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hn("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;oe(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(e||(e=t._stroke=hn("stroke")),r.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=_(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(r.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=hn("fill")),r.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){le(t._container)},_bringToBack:function(t){ue(t._container)}},dn=Pt?hn:$,fn=sn.extend({getEvents:function(){var t=sn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){oe(this._container),Ee(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){sn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),_e(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=dn("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){oe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){le(t._path)},_bringToBack:function(t){ue(t._path)}});function pn(t){return Et||Pt?new fn(t):null}Pt&&fn.include(cn),Ye.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&un(t)||pn(t)}});var gn=zi.extend({initialize:function(t,e){zi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=F(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fn.create=dn,fn.pointsToPath=Q,Bi.geometryToLayer=Fi,Bi.coordsToLatLng=Vi,Bi.coordsToLatLngs=Gi,Bi.latLngToCoords=Hi,Bi.latLngsToCoords=Ui,Bi.getFeature=Wi,Bi.asFeature=ji,Ye.mergeOptions({boxZoom:!0});var mn=ei.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ie(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ee(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){oe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Zt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ie(document,{contextmenu:ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ae("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new k(this._point,this._startPoint),i=e.getSize();_e(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(oe(this._box),de(this._container,"leaflet-crosshair")),Xt(),we(),Ee(document,{contextmenu:ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ye.addInitHook("addHandler","boxZoom",mn),Ye.mergeOptions({doubleClickZoom:!0});var vn=ei.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,r=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});Ye.addInitHook("addHandler","doubleClickZoom",vn),Ye.mergeOptions({dragging:!0,inertia:!ot,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var _n=ei.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new si(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){de(this._map._container,"leaflet-grab"),de(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=F(this._map.options.maxBounds);this._offsetLimit=z(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,r=(n-e+i)%t+e-i,a=(n+e+i)%t-e-i,o=Math.abs(r+i)e.getMaxZoom()&&1n.getWidth()||i<0||i>n.getHeight()}d.prototype={constructor:d,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(n.each(c,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=p(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:u}}(e,t,i);n&&(n[r]&&(a.cancelBubble=n[r].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=f(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),"silent"!==o)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new l);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},n.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){d.prototype[t]=function(e){var i,n,a=e.zrX,o=e.zrY,s=p(this,a,o);if("mouseup"===t&&s||(n=(i=this.findHover(a,o)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||r.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),n.mixin(d,o),n.mixin(d,a);var g=d;t.exports=g},function(t,e){function i(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function n(t,e){return{target:t,topTarget:e&&e.topTarget}}i.prototype={constructor:i,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(n(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,r=t.offsetY,a=i-this._x,o=r-this._y;this._x=i,this._y=r,e.drift(a,o,t),this.dispatchToElement(n(e,t),"drag",t.event);var s=this.findHover(i,r,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.dispatchToElement(n(l,t),"dragleave",t.event),s&&s!==l&&this.dispatchToElement(n(s,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(n(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(n(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var r=i;t.exports=r},function(t,e){var i=Math.log(2);function n(t,e,r,a,o,s){var l=a+"-"+o,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var h=Math.round(Math.log((1<1&&r&&r.length>1){var s=a(r)/a(o);!isFinite(s)&&(s=1),e.pinchScale=s;var l=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=l[0],e.pinchY=l[1],{type:"pinch",target:t[0].target,event:e}}}}},s=r;t.exports=s},function(t,e,i){var n=i(0),r=i(14),a=i(40),o=i(93);function s(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var l=function(){this._roots=[],this._displayList=[],this._displayListLen=0};l.prototype={constructor:l,traverse:function(t,e){for(var i=0;i=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof a&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var u=l;t.exports=u},function(t,e,i){var n=i(132),r=i(59),a=i(0),o=a.isString,s=a.isFunction,l=a.isObject,u=a.isArrayLike,h=a.indexOf,c=function(){this.animators=[]};function d(t,e,i,n,r,a,h,c){o(n)?(a=r,r=n,n=0):s(r)?(a=r,r="linear",n=0):s(n)?(a=n,n=0):s(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),function t(e,i,n,r,a,o,s){var h={},c=0;for(var d in r)r.hasOwnProperty(d)&&(null!=n[d]?l(r[d])&&!u(r[d])?t(e,i?i+"."+d:d,n[d],r[d],a,o,s):(s?(h[d]=n[d],f(e,i,d,r[d])):h[d]=r[d],c++):null==r[d]||s||f(e,i,d,r[d]));c>0&&e.animate(i,!1).when(null==a?500:a,h).delay(o||0)}(t,"",t,e,i,n,c);var d=t.animators.slice(),p=d.length;function g(){--p||a&&a()}p||a&&a();for(var m=0;m=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}l.__drawIndex=v,l.__drawIndex0&&t>n[0]){for(s=0;st);s++);o=i[n[s]]}if(n.splice(s+1,0,t),i[t]=e,!e.virtual)if(o){var u=o.dom;u.nextSibling?l.insertBefore(e.dom,u.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else a("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+u+" has been used by unkown layer "+l.id),l!==r&&(l.__used=!0,l.__startIndex!==i&&(l.__dirty=!0),l.__startIndex=i,l.incremental?l.__drawIndex=-1:l.__drawIndex=i,e(i),r=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?r.merge(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ie&&h>n&&h>a&&h>s||h1&&(c=void 0,c=p[0],p[0]=p[1],p[1]=c),g=u.cubicAt(e,n,a,s,p[0]),_>1&&(m=u.cubicAt(e,n,a,s,p[1]))),2===_?xe&&s>n&&s>a||s=0&&h<=1){for(var c=0,d=u.quadraticAt(e,n,a,h),p=0;pi||s<-i)return 0;var u=Math.sqrt(i*i-s*s);f[0]=-u,f[1]=u;var h=Math.abs(n-r);if(h<1e-4)return 0;if(h%d<1e-4){n=0,r=d;var c=a?1:-1;return o>=f[0]+t&&o<=f[1]+t?c:0}if(a){u=n;n=l(r),r=l(u)}else n=l(n),r=l(r);n>r&&(r+=d);for(var p=0,g=0;g<2;g++){var m=f[g];if(m+t>o){var v=Math.atan2(s,m);c=a?1:-1;v<0&&(v=d+v),(v>=n&&v<=r||v+d>=n&&v+d<=r)&&(v>Math.PI/2&&v<1.5*Math.PI&&(c=-c),p+=c)}}return p}function _(t,e,i,n,l){for(var u,d,f=0,p=0,_=0,y=0,x=0,b=0;b1&&(i||(f+=h(p,_,y,x,n,l))),1===b&&(y=p=t[b],x=_=t[b+1]),w){case c.M:p=y=t[b++],_=x=t[b++];break;case c.L:if(i){if(r.containStroke(p,_,t[b],t[b+1],e,n,l))return!0}else f+=h(p,_,t[b],t[b+1],n,l)||0;p=t[b++],_=t[b++];break;case c.C:if(i){if(a.containStroke(p,_,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],e,n,l))return!0}else f+=g(p,_,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],n,l)||0;p=t[b++],_=t[b++];break;case c.Q:if(i){if(o.containStroke(p,_,t[b++],t[b++],t[b],t[b+1],e,n,l))return!0}else f+=m(p,_,t[b++],t[b++],t[b],t[b+1],n,l)||0;p=t[b++],_=t[b++];break;case c.A:var T=t[b++],S=t[b++],M=t[b++],A=t[b++],C=t[b++],I=t[b++];b+=1;var L=1-t[b++],E=Math.cos(C)*M+T,P=Math.sin(C)*A+S;b>1?f+=h(p,_,E,P,n,l):(y=E,x=P);var D=(n-T)*A/M+T;if(i){if(s.containStroke(T,S,A,C,C+I,L,e,D,l))return!0}else f+=v(T,S,A,C,C+I,L,D,l);p=Math.cos(C+I)*M+T,_=Math.sin(C+I)*A+S;break;case c.R:y=p=t[b++],x=_=t[b++];E=y+t[b++],P=x+t[b++];if(i){if(r.containStroke(y,x,E,x,e,n,l)||r.containStroke(E,x,E,P,e,n,l)||r.containStroke(E,P,y,P,e,n,l)||r.containStroke(y,P,y,x,e,n,l))return!0}else f+=h(E,x,E,P,n,l),f+=h(y,P,y,x,n,l);break;case c.Z:if(i){if(r.containStroke(p,_,y,x,e,n,l))return!0}else f+=h(p,_,y,x,n,l);p=y,_=x}}return i||(u=_,d=x,Math.abs(u-d)<1e-4)||(f+=h(p,_,y,x,n,l)||0),0!==f}e.contain=function(t,e,i){return _(t,0,!1,e,i)},e.containStroke=function(t,e,i,n){return _(t,e,!0,i,n)}},function(t,e,i){var n=i(33);e.containStroke=function(t,e,i,r,a,o,s,l,u,h,c){if(0===u)return!1;var d=u;return!(c>e+d&&c>r+d&&c>o+d&&c>l+d||ct+d&&h>i+d&&h>a+d&&h>s+d||hi||d+co&&(o+=r);var p=Math.atan2(h,u);return p<0&&(p+=r),p>=a&&p<=o||p+r>=a&&p+r<=o}},function(t,e,i){var n=i(50),r=i(10).applyTransform,a=n.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;t.exports=function(t,e){var i,n,u,h,c,d=t.data,f=a.M,p=a.C,g=a.L,m=a.R,v=a.A,_=a.Q;for(u=0,h=0;ui-2?i-1:f+1],c=t[f>i-3?i-1:f+2]);var m=p*p,v=p*m;a.push([r(u[0],g[0],h[0],c[0],p,m,v),r(u[1],g[1],h[1],c[1],p,m,v)])}return a}},function(t,e,i){var n=i(10),r=n.min,a=n.max,o=n.scale,s=n.distance,l=n.add,u=n.clone,h=n.sub;t.exports=function(t,e,i,n){var c,d,f,p,g=[],m=[],v=[],_=[];if(n){f=[1/0,1/0],p=[-1/0,-1/0];for(var y=0,x=t.length;y=e:"max"===i?t<=e:t===e})(r[o],t,n)||(a=!1)}})),a}c.prototype={constructor:c,setOption:function(t,e){t&&n.each(r.normalizeToArray(t.series),(function(t){t&&t.data&&n.isTypedArray(t.data)&&n.setAsPrimitive(t.data)})),t=s(t);var i,h,c=this._optionBackup,f=d.call(this,t,e,!c);this._newBaseOption=f.baseOption,c?(i=c.baseOption,h=f.baseOption,o(h=h||{},(function(t,e){if(null!=t){var n=i[e];if(a.hasClass(e)){t=r.normalizeToArray(t),n=r.normalizeToArray(n);var o=r.mappingToExists(n,t);i[e]=l(o,(function(t){return t.option&&t.exist?u(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=u(n,t,!0)}})),f.timelineOptions.length&&(c.timelineOptions=f.timelineOptions),f.mediaList.length&&(c.mediaList=f.mediaList),f.mediaDefault&&(c.mediaDefault=f.mediaDefault)):this._optionBackup=f},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=l(e.timelineOptions,s),this._mediaList=l(e.mediaList,s),this._mediaDefault=s(e.mediaDefault),this._currentMediaIndices=[],s(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=s(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,u=[],h=[];if(!a.length&&!o)return h;for(var c=0,d=a.length;c=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n}));o.hostModel.setData(l),e.data=l}))}t.exports=function(t){var e=r();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),e.each(o)}},function(t,e,i){var n=i(79),r=i(0).isFunction,a={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),a=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(a),s=!r(o)||o instanceof n?null:o;o&&!s||(o=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",o);var l=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),u=t.get(l);if(i.setVisual("borderColor",u),!e.isSeriesFiltered(t)){s&&i.each((function(e){i.setItemVisual(e,"color",s(t.getDataParams(e)))}));return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),n=i.get(a,!0),r=i.get(l,!0);null!=n&&t.setItemVisual(e,"color",n),null!=r&&t.setItemVisual(e,"borderColor",r)}:null}}}};t.exports=a},function(t,e,i){var n=i(0),r=i(3),a=i(21),o=Math.PI;t.exports=function(t,e){e=e||{},n.defaults(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new r.Group,s=new r.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(s);var l=e.fontSize+" sans-serif",u=new r.Rect({style:{fill:"none",text:e.text,font:l,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(u),e.showSpinner){var h=new r.Arc({shape:{startAngle:-o/2,endAngle:-o/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});h.animateShape(!0).when(1e3,{endAngle:3*o/2}).start("circularInOut"),h.animateShape(!0).when(1e3,{startAngle:3*o/2}).delay(300).start("circularInOut"),i.add(h)}return i.resize=function(){var i=a.getWidth(e.text,l),n=e.showSpinner?e.spinnerRadius:0,r=(t.getWidth()-2*n-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),o=t.getHeight()/2;e.showSpinner&&h.setShape({cx:r,cy:o}),u.setShape({x:r-n,y:o-n,width:2*n,height:2*n}),s.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i}},function(t,e,i){var n=i(0),r=n.each,a=n.map,o=n.isFunction,s=n.createHashMap,l=n.noop,u=i(101).createTask,h=i(62).getUID,c=i(139),d=i(152),f=i(5).normalizeToArray;function p(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=s()}var g=p.prototype;function m(t,e,i,n,a){var o;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}a=a||{},r(e,(function(e,r){if(!a.visualType||a.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){s(a,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),v(h,n);var f=t.getPerformArgs(h,a.block);d.each((function(t){t.perform(f)})),o|=h.perform(f)}else u&&u.each((function(r,l){s(a,r)&&r.dirty();var u=t.getPerformArgs(r,a.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(r.context.model),v(r,n),o|=r.perform(u)}))}})),t.unfinished|=o}g.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},g.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},g.getPipeline=function(t){return this._pipelineMap.get(t)},g.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},g.restorePipelines=function(t){var e=this,i=e._pipelineMap=s();t.eachSeries((function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),C(e,t,t.dataTask)}))},g.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;r(this._allHandlers,(function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){var a=i.seriesTaskMap||(i.seriesTaskMap=s()),o=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(h):o?n.eachRawSeriesByType(o,h):l&&l(n,r).each(h);function h(i){var o=i.uid,s=a.get(o)||a.set(o,u({plan:w,reset:T,count:A}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},C(t,i,s)}var c=t._pipelineMap;a.each((function(t,e){c.get(e)||(t.dispose(),a.removeKey(e))}))}(this,n,a,e,i),n.overallReset&&function(t,e,i,n,a){var o=i.overallTask=i.overallTask||u({reset:_});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:t};var l=o.agentStubMap=o.agentStubMap||s(),h=e.seriesType,c=e.getTargetSeries,d=!0,f=e.modifyOutputEnd;h?n.eachRawSeriesByType(h,p):c?c(n,a).each(p):(d=!1,r(n.getSeries(),p));function p(e){var i=e.uid,n=l.get(i);n||(n=l.set(i,u({reset:y,onDirty:b})),o.dirty()),n.context={model:e,overallProgress:d,modifyOutputEnd:f},n.agent=o,n.__block=d,C(t,e,n)}var g=t._pipelineMap;l.each((function(t,e){g.get(e)||(t.dispose(),o.dirty(),l.removeKey(e))}))}(this,n,a,e,i)}),this)},g.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,C(this,e,r)},g.performDataProcessorTasks=function(t,e){m(this,this._dataProcessorHandlers,t,e,{block:!0})},g.performVisualTasks=function(t,e,i){m(this,this._visualHandlers,t,e,i)},g.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e|=t.dataTask.perform()})),this.unfinished|=e},g.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))};var v=g.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function _(t){t.overallReset(t.ecModel,t.api,t.payload)}function y(t,e){return t.overallProgress&&x}function x(){this.agent.dirty(),this.getDownstream().dirty()}function b(){this.agent&&this.agent.dirty()}function w(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function T(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=f(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?a(e,(function(t,e){return M(e)})):S}var S=M(0);function M(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;ai&&(s=i);var l=f.length,c=function(t,e,i,n){for(;i>>1;t[r][1]1&&d/h>2&&(c=Math.round(Math.ceil(c/h)*h));var f=u(t),p=o.get("showMinLabel")||f,g=o.get("showMaxLabel")||f;p&&c!==a[0]&&v(a[0]);for(var m=c;m<=a[1];m+=h)v(m);function v(t){l.push(i?t:{formattedLabel:n(t),rawLabel:r.getLabel(t),tickValue:t})}return g&&m-h!==a[1]&&v(a[1]),l}function m(t,e,i){var r=t.scale,a=s(t),o=[];return n.each(r.getTicks(),(function(t){var n=r.getLabel(t);e(t,n)&&o.push(i?t:{formattedLabel:a(t),rawLabel:n,tickValue:t})})),o}e.createAxisLabels=function(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=c(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=s(t);return{labels:n.map(e,(function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}}))}}(t)},e.createAxisTicks=function(t,e){return"category"===t.type?function(t,e){var i,r,a=d(t,"ticks"),o=l(e),s=f(a,o);if(s)return s;e.get("show")&&!t.scale.isBlank()||(i=[]);if(n.isFunction(o))i=m(t,o,!0);else if("auto"===o){var u=c(t,t.getLabelModel());r=u.labelCategoryInterval,i=n.map(u.labels,(function(t){return t.tickValue}))}else i=g(t,r=o,!0);return p(a,o,{ticks:i,tickCategoryInterval:r})}(t,e):{ticks:t.scale.getTicks()}},e.calculateCategoryInterval=function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=s(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=t.scale,o=a.getExtent(),l=a.count();if(o[1]-o[0]<1)return 0;var u=1;l>40&&(u=Math.max(1,Math.floor(l/40)));for(var c=o[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),f=Math.abs(d*Math.cos(n)),p=Math.abs(d*Math.sin(n)),g=0,m=0;c<=o[1];c+=u){var v,_,y=r.getBoundingRect(i(c),e.font,"center","top");v=1.3*y.width,_=1.3*y.height,g=Math.max(g,v,7),m=Math.max(m,_,7)}var x=g/f,b=m/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),T=h(t.model),S=t.getExtent(),M=T.lastAutoInterval,A=T.lastTickCount;return null!=M&&null!=A&&Math.abs(M-w)<=1&&Math.abs(A-l)<=1&&M>w&&T.axisExtend0===S[0]&&T.axisExtend1===S[1]?w=M:(T.lastTickCount=l,T.lastAutoInterval=w,T.axisExtend0=S[0],T.axisExtend1=S[1]),w}},function(t,e,i){var n=i(2),r=i(22),a=i(0),o=i(5).defaultEmphasis,s=i(15),l=i(9).encodeHTML,u=i(166),h=i(66),c=i(84),d=c.initCurvenessList,f=c.createEdgeMapForCurveness,p=n.extendSeriesModel({type:"series.graph",init:function(t){p.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new h(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){p.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){p.superApply(this,"mergeDefaultAndTheme",arguments),o(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],r=this;if(n&&i){d(this);var o=u(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=r.getModel("edgeLabel"),a=new s({label:n.option},n.parentModel,e),o=r.getModel("emphasis.edgeLabel"),l=new s({emphasis:{label:o.option}},o.parentModel,e);function u(t){return(t=this.parsePath(t))&&"label"===t[0]?a:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}i.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(u),t}))}));return a.each(o.edges,(function(t){f(t.node1,t.node2,this,t.dataIndex)}),this),o.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),r=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),o=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),u=[];return null!=o&&u.push(o),null!=s&&u.push(s),u=l(u.join(" > ")),r.value&&(u+=" : "+l(r.value)),u}return p.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=a.map(this.option.categories||[],(function(t){return null!=t.value?t:a.extend({value:0},t)})),e=new r(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return p.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),g=p;t.exports=g},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(30).enableClassCheck;function a(t){return"_EC_"+t}var o=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function u(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[a(t)]){var n=new l(t,e);return n.hostGraph=this,this.nodes.push(n),i[a(t)]=n,n}},s.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},s.getNodeById=function(t){return this._nodesMap[a(t)]},s.addEdge=function(t,e,i){var n=this._nodesMap,r=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),l.isInstance(t)||(t=n[a(t)]),l.isInstance(e)||(e=n[a(e)]),t&&e){var o=t.id+"-"+e.id,s=new u(t,e,i);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),r[o]=s,s}},s.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},s.getEdge=function(t,e){l.isInstance(t)&&(t=t.id),l.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},s.eachNode=function(t,e){for(var i=this.nodes,n=i.length,r=0;r=0&&t.call(e,i[r],r)},s.eachEdge=function(t,e){for(var i=this.edges,n=i.length,r=0;r=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&t.call(e,i[r],r)},s.breadthFirstTraverse=function(t,e,i,n){if(l.isInstance(e)||(e=this._nodesMap[a(e)]),e){for(var r="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o=0&&i.node2.dataIndex>=0}));for(r=0,a=n.length;r=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};n.mixin(l,h("hostGraph","data")),n.mixin(u,h("hostGraph","edgeData")),o.Node=l,o.Edge=u,r(l),r(u);var c=o;t.exports=c},function(t,e,i){var n=i(2),r=i(0),a=i(67),o=i(104),s=i(68),l=i(106),u=i(86).onIrrelevantElement,h=i(3),c=i(270),d=i(107).getNodeGlobalScale,f="__focusNodeAdjacency",p=["itemStyle","opacity"],g=["lineStyle","opacity"];function m(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function v(t,e,i){var n=t.getGraphicEl(),r=m(t,e);null!=i&&(null==r&&(r=1),r*=i),n.downplay&&n.downplay(),n.traverse((function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=r),t.setStyle("opacity",e)}}))}function _(t,e){var i=m(t,e),n=t.getGraphicEl();n.traverse((function(t){!t.isGroup&&t.setStyle("opacity",i)})),n.highlight&&n.highlight()}var y=n.extendChartView({type:"graph",init:function(t,e){var i=new a,n=new o,r=this.group;this._controller=new s(e.getZr()),this._controllerHost={target:r},r.add(i.group),r.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,r=t.coordinateSystem;this._model=t;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===r.type){var l={position:r.position,scale:r.scale};this._firstRender?s.attr(l):h.updateProps(s,l,t)}c(t.getGraph(),d(t));var u=t.getData();a.updateData(u);var p=t.getEdgeData();o.updateData(p),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var g=t.forceLayout,m=t.get("force.layoutAnimation");g&&this._startForceLayoutIteration(g,m),u.eachItemGraphicEl((function(e,r){var a=u.getItemModel(r);e.off("drag").off("dragend");var o=a.get("draggable");o&&e.on("drag",(function(){g&&(g.warmUp(),!this._layouting&&this._startForceLayoutIteration(g,m),g.setFixed(r),u.setItemLayout(r,e.position))}),this).on("dragend",(function(){g&&g.setUnfixed(r)}),this),e.setDraggable(o&&g),e[f]&&e.off("mouseover",e[f]),e.__unfocusNodeAdjacency&&e.off("mouseout",e.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(e.on("mouseover",e[f]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}),this),u.graph.eachEdge((function(e){var r=e.getGraphicEl();r[f]&&r.off("mouseover",r[f]),r.__unfocusNodeAdjacency&&r.off("mouseout",r.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(r.on("mouseover",r[f]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),r.on("mouseout",r.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}));var v="circular"===t.get("layout")&&t.get("circular.rotateLabel"),_=u.getLayout("cx"),y=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var i=u.getItemModel(e).get("label.rotate")||0,n=t.getSymbolPath();if(v){var r=u.getItemLayout(e),a=Math.atan2(r[1]-y,r[0]-_);a<0&&(a=2*Math.PI+a);var o=r[0]<_;o&&(a-=Math.PI);var s=o?"left":"right";h.modifyLabelStyle(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else h.modifyLabelStyle(n,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var a=t.getData().graph,o=n.dataIndex,s=n.edgeDataIndex,l=a.getNodeByIndex(o),u=a.getEdgeByIndex(s);(l||u)&&(a.eachNode((function(t){v(t,p,.1)})),a.eachEdge((function(t){v(t,g,.1)})),l&&(_(l,p),r.each(l.edges,(function(t){t.dataIndex<0||(_(t,g),_(t.node1,p),_(t.node2,p))}))),u&&(_(u,g),_(u.node1,p),_(u.node2,p)))},unfocusNodeAdjacency:function(t,e,i,n){var r=t.getData().graph;r.eachNode((function(t){v(t,p)})),r.eachEdge((function(t){v(t,g)}))},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(t,e,i){var n=this._controller,r=this._controllerHost,a=this.group;n.setPointerChecker((function(e,n,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(n,r)&&!u(e,i,t)})),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(e){l.updateViewOnPan(r,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){l.updateViewOnZoom(r,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),c(t.getGraph(),d(t)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=d(t),n=[i,i];e.eachItemGraphicEl((function(t,e){t.attr("scale",n)}))},updateLayout:function(t){c(t.getGraph(),d(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});t.exports=y},function(t,e,i){var n=i(3),r=i(10),a=n.Line.prototype,o=n.BezierCurve.prototype;function s(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var l=n.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[s(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:a.buildPath,_buildPathCurve:o.buildPath,pointAt:function(t){return this[s(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:a.pointAt,_pointAtCurve:o.pointAt,tangentAt:function(t){var e=this.shape,i=s(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return r.normalize(i,i)},_tangentAtCurve:o.tangentAt});t.exports=l},function(t,e,i){var n=i(33),r=i(10),a=i(107).getSymbolSize,o=[],s=[],l=[],u=n.quadraticAt,h=r.distSquare,c=Math.abs;function d(t,e,i){for(var n,r=t[0],a=t[1],d=t[2],f=1/0,p=i*i,g=.1,m=.1;m<=.9;m+=.1){o[0]=u(r[0],a[0],d[0],m),o[1]=u(r[1],a[1],d[1],m),(y=c(h(o,e)-p))=0?n+=g:n-=g:x>=0?n-=g:n+=g}return n}t.exports=function(t,e){var i=[],o=n.quadraticSubdivide,s=[[],[],[]],l=[[],[]],u=[];e/=2,t.eachEdge((function(t,n){var h=t.getLayout(),c=t.getVisual("fromSymbol"),f=t.getVisual("toSymbol");h.__original||(h.__original=[r.clone(h[0]),r.clone(h[1])],h[2]&&h.__original.push(r.clone(h[2])));var p=h.__original;if(null!=h[2]){if(r.copy(s[0],p[0]),r.copy(s[1],p[2]),r.copy(s[2],p[1]),c&&"none"!==c){var g=a(t.node1),m=d(s,p[0],g*e);o(s[0][0],s[1][0],s[2][0],m,i),s[0][0]=i[3],s[1][0]=i[4],o(s[0][1],s[1][1],s[2][1],m,i),s[0][1]=i[3],s[1][1]=i[4]}if(f&&"none"!==f){g=a(t.node2),m=d(s,p[1],g*e);o(s[0][0],s[1][0],s[2][0],m,i),s[1][0]=i[1],s[2][0]=i[2],o(s[0][1],s[1][1],s[2][1],m,i),s[1][1]=i[1],s[2][1]=i[2]}r.copy(h[0],s[0]),r.copy(h[1],s[2]),r.copy(h[2],s[1])}else{if(r.copy(l[0],p[0]),r.copy(l[1],p[1]),r.sub(u,l[1],l[0]),r.normalize(u,u),c&&"none"!==c){g=a(t.node1);r.scaleAndAdd(l[0],l[0],u,g*e)}if(f&&"none"!==f){g=a(t.node2);r.scaleAndAdd(l[1],l[1],u,-g*e)}r.copy(h[0],l[0]),r.copy(h[1],l[1])}}))}},function(t,e,i){var n=i(2),r=i(108).updateCenterAndZoom;i(169);n.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,n=r(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))}))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,r=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=r[i]);for(var a=0;a "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),p=f;t.exports=p},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(104),a=i(174),o=i(105),s=i(175),l=i(285),u=i(286),h=i(176),c=i(70).createClipPath,d=n.extendChartView({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),r=this._updateLineDraw(n,t),a=t.get("zlevel"),o=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&o&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),r.updateData(n);var u=t.get("clip",!0)&&c(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var a=h.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),h=!!e.get("polyline"),c=e.pipelineContext.large;return i&&n===this._hasEffet&&h===this._isPolyline&&c===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=c?new u:new r(h?n?l:s:n?a:o),this._hasEffet=n,this._isPolyline=h,this._isLargeDraw=c,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});t.exports=d},function(t,e,i){var n=i(175),r=i(0),a=i(174),o=i(10);function s(t,e,i){a.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var l=s.prototype;l.createLine=function(t,e,i){return new n(t,e,i)},l.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,r=1;r=0&&!(n[s]<=e);s--);s=Math.min(s,r-2)}else{for(var s=a;se);s++);s=Math.min(s-1,r-2)}o.lerp(t.position,i[s],i[s+1],(e-n[s])/(n[s+1]-n[s]));var l=i[s+1][0]-i[s][0],u=i[s+1][1]-i[s][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=e,t.ignore=!1}},r.inherits(s,a);var u=s;t.exports=u},function(t,e,i){var n=i(3),r=i(99),a=i(141),o=i(142),s=n.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(i[r++],i[r++]);for(var o=1;o0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,r=i.curveness;if(i.polyline)for(var s=0,l=0;l0)for(var h=n[l++],c=n[l++],d=1;d0){var g=(h+f)/2-(c-p)*r,m=(c+p)/2-(f-h)*r;if(o.containStroke(h,c,g,m,f,p))return s}else if(a.containStroke(h,c,f,p))return s;s++}return-1}});function l(){this.group=new n.Group}var u=l.prototype;u.isPersistent=function(){return!this._incremental},u.updateData=function(t){this.group.removeAll();var e=new s({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},u.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new r({silent:!0})),this.group.add(this._incremental)):this._incremental=null},u.incrementalUpdate=function(t,e){var i=new s;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},u.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},u._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("color");r&&t.setStyle("stroke",r),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)})))},u._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var h=l;t.exports=h},function(t,e){function i(t){return t instanceof Array||(t=[t,t]),t}var n="lineStyle.opacity".split("."),r={seriesType:"lines",reset:function(t,e,r){var a=i(t.get("symbol")),o=i(t.get("symbolSize")),s=t.getData();return s.setVisual("fromSymbol",a&&a[0]),s.setVisual("toSymbol",a&&a[1]),s.setVisual("fromSymbolSize",o&&o[0]),s.setVisual("toSymbolSize",o&&o[1]),s.setVisual("opacity",t.get(n)),{dataEach:s.hasItemOption?function(t,e){var r=t.getItemModel(e),a=i(r.getShallow("symbol",!0)),o=i(r.getShallow("symbolSize",!0)),s=r.get(n);a[0]&&t.setItemVisual(e,"fromSymbol",a[0]),a[1]&&t.setItemVisual(e,"toSymbol",a[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",s)}:null}}};t.exports=r},function(t,e,i){var n=i(0),r=i(5).makeInner,a=i(87),o=i(178),s=n.each,l=n.curry,u=r();function h(t,e,i,r,a){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var l=function(t,e){var i=e.axis,n=i.dim,r=t,a=[],o=Number.MAX_VALUE,l=-1;return s(e.seriesModels,(function(e,u){var h,c,d=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var f=e.getAxisTooltipData(d,t,i);c=f.dataIndices,h=f.nestestValue}else{if(!(c=e.getData().indicesOfNearest(d[0],t,"category"===i.type?.5:null)).length)return;h=e.getData().get(d[0],c[0])}if(null!=h&&isFinite(h)){var p=t-h,g=Math.abs(p);g<=o&&((g=0&&l<0)&&(o=g,l=p,r=h,a.length=0),s(c,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:r}}(e,t),u=l.payloadBatch,h=l.snapToValue;u[0]&&null==a.seriesIndex&&n.extend(a,u[0]),!r&&t.snap&&o.containData(h)&&null!=h&&(e=h),i.showPointer(t,e,u,a),i.showTooltip(t,l,h)}else i.showPointer(t,e)}function c(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function d(t,e,i,n){var r=i.payloadBatch,o=e.axis,s=o.model,l=e.axisPointerModel;if(e.triggerTooltip&&r.length){var u=e.coordSys.model,h=a.makeKey(u),c=t.map[h];c||(c=t.map[h]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:n,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:r.slice()})}}function f(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function p(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}t.exports=function(t,e,i){var r=t.currTrigger,a=[t.x,t.y],g=t,m=t.dispatchAction||n.bind(i.dispatchAction,i),v=e.getComponent("axisPointer").coordSysAxesInfo;if(v){p(a)&&(a=o({seriesIndex:g.seriesIndex,dataIndex:g.dataIndex},e).point);var _=p(a),y=g.axesInfo,x=v.axesInfo,b="leave"===r||p(a),w={},T={},S={list:[],map:{}},M={showPointer:l(c,T),showTooltip:l(d,S)};s(v.coordSysMap,(function(t,e){var i=_||t.containPoint(a);s(v.coordSysAxesInfo[e],(function(t,e){var n=t.axis,r=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(y,t);if(!b&&i&&(!y||r)){var o=r&&r.value;null!=o||_||(o=n.pointToData(a)),null!=o&&h(t,o,M,!1,w)}}))}));var A={};return s(x,(function(t,e){var i=t.linkGroup;i&&!T[e]&&s(i.axesInfo,(function(e,n){var r=T[n];if(e!==t&&r){var a=r.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,f(e),f(t)))),A[t.key]=a}}))})),s(A,(function(t,e){h(x[e],t,M,!0,w)})),function(t,e,i){var n=i.axesInfo=[];s(e,(function(e,i){var r=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(T,x,w),function(t,e,i,n){if(p(e)||!t.list.length)return void n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(S,a,t,m),function(t,e,i){var r=i.getZr(),a=u(r).axisPointerLastHighlights||{},o=u(r).axisPointerLastHighlights={};s(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&s(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var l=[],h=[];n.each(a,(function(t,e){!o[e]&&h.push(t)})),n.each(o,(function(t,e){!a[e]&&l.push(t)})),h.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:h}),l.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:l})}(x,0,i),w}}},function(t,e,i){var n=i(2).extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});t.exports=n},function(t,e,i){var n=i(2),r=i(179),a=n.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";r.register("axisPointer",i,(function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){r.unregister(e.getZr(),"axisPointer"),a.superApply(this._model,"remove",arguments)},dispose:function(t,e){r.unregister("axisPointer",e),a.superApply(this._model,"dispose",arguments)}}),o=a;t.exports=o},function(t,e,i){var n=i(2).extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});t.exports=n},function(t,e,i){var n=i(2),r=i(0),a=i(14),o=i(293),s=i(294),l=i(9),u=i(4),h=i(3),c=i(178),d=i(8),f=i(15),p=i(179),g=i(25),m=i(88),v=i(5).getTooltipRenderMode,_=r.bind,y=r.each,x=u.parsePercent,b=new h.Rect({shape:{x:-1,y:-1,width:2,height:2}}),w=n.extendComponentView({type:"tooltip",init:function(t,e){if(!a.node){var i,n=t.getComponent("tooltip"),r=n.get("renderMode");this._renderMode=v(r),"html"===this._renderMode?(i=new o(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="
"):(i=new s(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!a.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");p.register("itemTooltip",this._api,_((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!a.node){var r=S(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var s=b;s.position=[n.x,n.y],s.update(),s.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:s},r)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var l=c(n,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:n.position,target:l.el},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(S(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=T([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=r.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],s=[],u=T([e.tooltipOption,n]),h=this._renderMode,c=this._newLine,d={};y(t,(function(t){y(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var u=m.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);r.each(t.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),c=o.dataIndexInside,f=l&&l.getDataParams(c);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=g.getAxisRawValue(e.axis,n),f.axisValueLabel=u,f){s.push(f);var p,m=l.formatTooltip(c,!0,null,h);if(r.isObject(m)){p=m.html;var v=m.markers;r.merge(d,v)}else p=m;a.push(p)}}));var f=u;"html"!==h?o.push(a.join(c)):o.push((f?l.encodeHTML(f)+c:"")+a.join(c))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(u,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(u,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(u,o,s,Math.random(),a[0],a[1],f,void 0,d)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),s=e.dataModel||o,l=e.dataIndex,u=e.dataType,h=s.getData(u),c=T([h.getItemModel(l),s,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),d=c.get("trigger");if(null==d||"item"===d){var f,p,g=s.getDataParams(l,u),m=s.formatTooltip(l,!1,u,this._renderMode);r.isObject(m)?(f=m.html,p=m.markers):(f=m,p=null);var v="item_"+s.name+"_"+l;this._showOrMove(c,(function(){this._showTooltipContent(c,f,g,v,t.offsetX,t.offsetY,t.position,t.target,p)})),i({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new f(n,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,a,o,s,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent,c=t.get("formatter");o=o||t.get("position");var d=e;if(c&&"string"==typeof c)d=l.formatTpl(c,i,!0);else if("function"==typeof c){var f=_((function(e,n){e===this._ticket&&(h.setContent(n,u,t),this._updatePosition(t,o,r,a,h,i,s))}),this);this._ticket=n,d=c(i,n,f)}h.setContent(d,u,t),h.show(t),this._updatePosition(t,o,r,a,h,i,s)}},_updatePosition:function(t,e,i,n,a,o,s){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var h=a.getSize(),c=t.get("align"),f=t.get("verticalAlign"),p=s&&s.getBoundingRect().clone();if(s&&p.applyTransform(s.transform),"function"==typeof e&&(e=e([i,n],o,a.el,p,{viewSize:[l,u],contentSize:h.slice()})),r.isArray(e))i=x(e[0],l),n=x(e[1],u);else if(r.isObject(e)){e.width=h[0],e.height=h[1];var g=d.getLayoutRect(e,{width:l,height:u});i=g.x,n=g.y,c=null,f=null}else if("string"==typeof e&&s){var m=function(t,e,i){var n=i[0],r=i[1],a=0,o=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,o=e.y+l/2-r/2;break;case"top":a=e.x+s/2-n/2,o=e.y-r-5;break;case"bottom":a=e.x+s/2-n/2,o=e.y+l+5;break;case"left":a=e.x-n-5,o=e.y+l/2-r/2;break;case"right":a=e.x+s+5,o=e.y+l/2-r/2}return[a,o]}(e,p,h);i=m[0],n=m[1]}else{m=function(t,e,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(t+l+a>n?t-=l+a:t+=a);null!=o&&(e+u+o>r?e-=u+o:e+=o);return[t,e]}(i,n,a,l,u,c?null:20,f?null:20);i=m[0],n=m[1]}if(c&&(i-=M(c)?h[0]/2:"right"===c?h[0]:0),f&&(n-=M(f)?h[1]/2:"bottom"===f?h[1]:0),t.get("confine")){m=function(t,e,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,a,l,u);i=m[0],n=m[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&y(e,(function(e,n){var r=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&y(r,(function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length)&&y(r,(function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){a.node||(this._tooltipContent.dispose(),p.unregister("itemTooltip",e))}});function T(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(f.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new f(i,e,e.ecModel))}return e}function S(t,e){return t.dispatchAction||r.bind(e.dispatchAction,e)}function M(t){return"center"===t||"middle"===t}t.exports=w},function(t,e,i){var n=i(0),r=i(27),a=i(26),o=i(130),s=i(14),l=i(9),u=n.each,h=l.toCamelCase,c=["","-webkit-","-moz-","-o-"];function d(t){var e,i,a=[],o=t.get("transitionDuration"),d=t.get("backgroundColor"),f=t.getModel("textStyle"),p=t.get("padding");return o&&a.push((i="left "+(e=o)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+e+"s cubic-bezier(0.23, 1, 0.32, 1)",n.map(c,(function(t){return t+"transition:"+i})).join(";"))),d&&(s.canvasSupported?a.push("background-Color:"+d):(a.push("background-Color:#"+r.toHex(d)),a.push("filter:alpha(opacity=70)"))),u(["width","color","radius"],(function(e){var i="border-"+e,n=h(i),r=t.get(n);null!=r&&a.push(i+":"+r+("color"===e?"":"px"))})),a.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var r=t.get("lineHeight");null==r&&(r=Math.round(3*i/2)),i&&e.push("line-height:"+r+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),u(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(f)),null!=p&&a.push("padding:"+l.normalizeCssArray(p).join("px ")+"px"),a.join(";")+";"}function f(t,e,i,n,r){var a=e&&e.painter;if(i){var s=a&&a.getViewportRoot();s&&o.transformLocalCoord(t,s,document.body,n,r)}else{t[0]=n,t[1]=r;var l=a&&a.getViewportRootOffset();l&&(t[0]+=l.offsetLeft,t[1]+=l.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function p(t,e,i){if(s.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],f(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var l=this;n.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!l._enterable){var e=r.handler,i=r.painter.getViewportRoot();a.normalizeEvent(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}}p.prototype={constructor:p,_enterable:!0,update:function(t){var e=this._container,i=e.currentStyle||document.defaultView.getComputedStyle(e),n=e.style;"absolute"!==n.position&&"absolute"!==i.position&&(n.position="relative"),t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],i=t*this._zr.getWidth(),n=e*this._zr.getHeight();this.moveTo(i,n)},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+d(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;f(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(n.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}};var g=p;t.exports=g},function(t,e,i){var n=i(0),r=i(41),a=i(3);function o(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function s(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],o(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}s.prototype={constructor:s,_enterable:!0,update:function(t){t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],i=t*this._zr.getWidth(),n=e*this._zr.getHeight();this.moveTo(i,n)},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,s=o.indexOf("{marker");s>=0;){var l=o.indexOf("|}"),u=o.substr(s+"{marker".length,l-s-"{marker".length);u.indexOf("sub")>-1?n["marker"+u]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:n["marker"+u]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},s=(o=o.substr(l+1)).indexOf("{marker")}var h=i.getModel("textStyle"),c=h.get("fontSize"),d=i.get("textLineHeight");null==d&&(d=Math.round(3*c/2)),this.el=new r({style:a.setTextStyle({},h,{rich:n,text:t,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:d}),z:i.get("z")}),this._zr.add(this.el);var f=this;this.el.on("mouseover",(function(){f._enterable&&(clearTimeout(f._hideTimeout),f._show=!0),f._inContent=!0})),this.el.on("mouseout",(function(){f._enterable&&f._show&&f.hideLater(f._hideDelay),f._inContent=!1}))},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){if(this.el){var i=this._styleCoord;o(i,this._zr,t,e),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(n.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var l=s;t.exports=l},function(t,e,i){var n=i(2),r=i(0),a=i(38),o=n.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){o.superApply(this,"optionUpdated",arguments),r.each(this.option.feature,(function(t,e){var i=a.get(e);i&&r.merge(t,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),s=o;t.exports=s},function(t,e,i){var n=i(2),r=i(0),a=i(21),o=i(38),s=i(3),l=i(15),u=i(43),h=i(184),c=n.extendComponentView({type:"toolbox",render:function(t,e,i,n){var c=this.group;if(c.removeAll(),t.get("show")){var d=+t.get("itemSize"),f=t.get("feature")||{},p=this._features||(this._features={}),g=[];r.each(f,(function(t,e){g.push(e)})),new u(this._featureNames||[],g).add(m).update(m).remove(r.curry(m,null)).execute(),this._featureNames=g,h.layout(c,t,i),c.add(h.makeBackground(c.getBoundingRect(),t)),c.eachChild((function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=a.getBoundingRect(e,a.makeFont(n)),o=t.position[0]+c.position[0],s=!1;t.position[1]+c.position[1]+d+r.height>i.getHeight()&&(n.textPosition="top",s=!0);var l=s?-5-r.height:d+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",l],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,l],n.textAlign="left")}}))}function m(a,u){var h,m=g[a],v=g[u],_=f[m],y=new l(_,t,t.ecModel);if(n&&null!=n.newTitle&&n.featureName===m&&(_.title=n.newTitle),m&&!v){if(function(t){return 0===t.indexOf("my")}(m))h={model:y,onclick:y.option.onclick,featureName:m};else{var x=o.get(m);if(!x)return;h=new x(y,e,i)}p[m]=h}else{if(!(h=p[v]))return;h.model=y,h.ecModel=e,h.api=i}m||!v?y.get("show")&&!h.unusable?(!function(n,a,o){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),h=a.getIcons?a.getIcons():n.get("icon"),f=n.get("title")||{};if("string"==typeof h){var p=h,g=f;f={},(h={})[o]=p,f[o]=g}var m=n.iconPaths={};r.each(h,(function(o,h){var p=s.createIcon(o,{},{x:-d/2,y:-d/2,width:d,height:d});p.setStyle(l.getItemStyle()),p.hoverStyle=u.getItemStyle(),p.setStyle({text:f[h],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var g=t.getModel("tooltip");g&&g.get("show")&&p.attr("tooltip",r.extend({content:f[h],formatter:g.get("formatter",!0)||function(){return f[h]},formatterParams:{componentType:"toolbox",name:h,title:f[h],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),s.setHoverStyle(p),t.get("showTitle")&&(p.__title=f[h],p.on("mouseover",(function(){var e=u.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";p.setStyle({textFill:u.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||i})})).on("mouseout",(function(){p.setStyle({textFill:null,textBackgroundColor:null})}))),p.trigger(n.get("iconStatus."+h)||"normal"),c.add(p),p.on("click",r.bind(a.onclick,a,e,i,h)),m[h]=p}))}(y,h,m),y.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},h.render&&h.render(y,e,i,n)):h.remove&&h.remove(e,i):h.dispose&&h.dispose(e,i)}},updateView:function(t,e,i,n){r.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},remove:function(t,e){r.each(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){r.each(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});t.exports=c},function(t,e,i){var n=i(14),r=i(35),a=i(38),o=r.toolbox.saveAsImage;function s(t){this.model=t}s.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:o.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:o.lang.slice()},s.prototype.unusable=!n.canvasSupported,s.prototype.onclick=function(t,e){var i=this.model,r=i.get("name")||t.get("title.0.text")||"echarts",a="svg"===e.getZr().painter.getType()?"svg":i.get("type",!0)||"png",o=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||n.browser.ie||n.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,r+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=document.createElement("a");f.download=r+"."+a,f.target="_blank",f.href=o;var p=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},a.register("saveAsImage",s);var l=s;t.exports=l},function(t,e,i){var n=i(2),r=i(0),a=i(35),o=i(38),s=a.toolbox.magicType;function l(t){this.model=t}l.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.clone(s.title),option:{},seriesIndex:{}};var u=l.prototype;u.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return r.each(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var h={line:function(t,e,i,n){if("bar"===t)return r.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return r.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var a="__ec_magicType_stack__"===i.get("stack");if("line"===t||"bar"===t)return n.setIconStatus("stack",a?"normal":"emphasis"),r.merge({id:e,stack:a?"":"__ec_magicType_stack__"},n.get("option.stack")||{},!0)}},c=[["line","bar"],["stack"]];u.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(h[i]){var o,l={series:[]};if(r.each(c,(function(t){r.indexOf(t,i)>=0&&r.each(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(e){var a=e.subType,o=e.id,s=h[i](a,o,e,n);s&&(r.defaults(s,e.option),l.series.push(s));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var c=u.getAxesByScale("ordinal")[0];if(c){var d=c.dim+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;l[d]=l[d]||[];for(var p=0;p<=f;p++)l[d][f]=l[d][f]||{};l[d][f].boundaryGap="bar"===i}}})),"stack"===i)o=l.series&&l.series[0]&&"__ec_magicType_stack__"===l.series[0].stack?r.merge({stack:s.title.tiled},s.title):r.clone(s.title);e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:o,featureName:"magicType"})}},n.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),o.register("magicType",l);var d=l;t.exports=d},function(t,e,i){var n=i(2),r=i(0),a=i(26),o=i(35),s=i(38),l=o.toolbox.dataView,u=new Array(60).join("-");function h(t){return r.map(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,r=arguments[t-1],a=e.getName(r),o=0;o=0)return!0}(t)){var a=function(t){for(var e=t.split(/\n+/g),i=c(e.shift()).split(d),n=[],a=r.map(i,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}(t,e)},p.onclick=function(t,e,i){g[i].call(this)},p.remove=function(t,e){this._brushController.unmount()},p.dispose=function(t,e){this._brushController.dispose()};var g={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(s.pop(this.ecModel))}};function m(t){var e={};return r.each(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])})),e}p._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new o(m(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(r("x",i,e[0]),r("y",i,e[1])):r({lineX:"x",lineY:"y"}[n],i,e)}})),s.push(n,i),this._dispatchZoomAction(i)}function r(t,e,r){var a=e.getAxis(t),o=a.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,o,n),u=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(r=l(0,r.slice(),a.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},p._dispatchZoomAction=function(t){var e=[];d(t,(function(t,i){e.push(r.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},h.register("dataZoom",f),n.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);r.isArray(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(r.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",o=n[a];null==o||"all"===o||r.isArray(o)||(o=!1===o||"none"===o?[]:[o]),function(e,i){var n=t[e];r.isArray(n)||(n=n?[n]:[]);d(n,i)}(i,(function(t,s){if(null==o||"all"===o||-1!==r.indexOf(o,s)){var l={type:"select",$fromToolbox:!0,filterMode:n.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+s};l[a]=s,e.push(l)}}))}}}));var v=f;t.exports=v},function(t,e,i){i(112),i(55),i(56),i(303),i(304),i(114),i(115)},function(t,e,i){var n=i(0),r=i(4),a=i(113),o=i(54),s=n.each,l=r.asc,u=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function h(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=r.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var s=e||0===n[0]&&100===n[1];i.setRange(s?null:+a[0].toFixed(o),s?null:+a[1].toFixed(o))}}u.prototype={constructor:u,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(a.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,r=this.ecModel,a=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),r.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return n.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e,i=this._dataExtent,n=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];s(["start","end"],(function(o,s){var l=t[o],d=t[o+"Value"];"percent"===a[s]?(null==l&&(l=u[s]),d=n.parse(r.linearMap(l,u,i))):(e=!0,d=null==d?i[s]:n.parse(d),l=r.linearMap(d,i,u)),c[s]=d,h[s]=l})),l(c),l(h);var d=this._minMaxSpan;function f(t,e,i,a,s){var l=s?"Span":"ValueSpan";o(0,t,i,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)e[u]=r.linearMap(t[u],i,a,!0),s&&(e[u]=n.parse(e[u]))}return e?f(c,h,i,u,!1):f(h,c,u,i,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];s(i,(function(t){var i=t.getData();i&&s(i.mapDimension(e,!0),(function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])}))})),n[1]0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:r&&(e[1]=a>0?a-1:NaN);i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e),function(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;s(["min","max"],(function(a){var o=i.get(a+"Span"),s=i.get(a+"ValueSpan");null!=s&&(s=t.getAxisModel().axis.scale.parse(s)),null!=s?o=r.linearMap(n[0]+s,n,[0,100],!0):null!=o&&(s=r.linearMap(o,[0,100],n,!0)-n[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=s}))}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,h(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,h(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&s(n,(function(t){var e=t.getData(),n=e.mapDimension(i,!0);n.length&&("weakFilter"===r?e.filterSelf((function(t){for(var i,r,o,s=0;sa[1];if(u&&!h&&!c)return!0;u&&(o=!0),h&&(i=!0),c&&(r=!0)}return o&&i&&r})):s(n,(function(i){if("empty"===r)t.setData(e=e.map(i,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var n={};n[i]=a,e.selectRange(n)}})),s(n,(function(t){e.setApproximateExtent(a,t)})))}))}}};var c=u;t.exports=c},function(t,e,i){var n=i(55).extend({type:"dataZoom.select"});t.exports=n},function(t,e,i){var n=i(56).extend({type:"dataZoom.select"});t.exports=n},function(t,e,i){var n=i(2),r=i(187),a=i(35),o=i(38),s=a.toolbox.restore;function l(t){this.model=t}l.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:s.title},l.prototype.onclick=function(t,e,i){r.clear(t),e.dispatchAction({type:"restore",from:this.uid})},o.register("restore",l),n.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));var u=l;t.exports=u},function(t,e,i){var n=i(2),r=i(0);function a(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",(function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var s=i.getData();r.each(s,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&n:a[e]=n}}))})),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}n.registerAction("legendToggleSelect","legendselectchanged",r.curry(a,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",r.curry(a,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",r.curry(a,"inverseSelect")),n.registerAction("legendSelect","legendselected",r.curry(a,"select")),n.registerAction("legendUnSelect","legendunselected",r.curry(a,"unSelect"))},function(t,e){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return G(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,i){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,i);case"utf8":case"utf-8":return A(this,e,i);case"ascii":return C(this,e,i);case"latin1":case"binary":return I(this,e,i);case"base64":return M(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function v(t,e,i,n,r){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(r)return-1;i=t.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:_(t,e,i,n,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):_(t,[e],i,n,r);throw new TypeError("val must be string, number or Buffer")}function _(t,e,i,n,r){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,i/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var h=-1;for(a=i;as&&(i=s-l),a=i;a>=0;a--){for(var c=!0,d=0;dr&&(n=r):n=r;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,r=i%256,a.push(r),a.push(n);return a}(e,t.length-i),t,i,n)}function M(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function A(t,e,i){i=Math.min(t.length,i);for(var n=[],r=e;r239?4:u>223?3:u>191?2:1;if(r+c<=i)switch(c){case 1:u<128&&(h=u);break;case 2:128==(192&(a=t[r+1]))&&(l=(31&u)<<6|63&a)>127&&(h=l);break;case 3:a=t[r+1],o=t[r+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:a=t[r+1],o=t[r+2],s=t[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(h=l)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),r+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var i="",n=0;for(;n0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),""},l.prototype.compare=function(t,e,i,n,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),e<0||i>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&e>=i)return 0;if(n>=r)return-1;if(e>=i)return 1;if(this===t)return 0;for(var a=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(e>>>=0),s=Math.min(a,o),u=this.slice(n,r),h=t.slice(e,i),c=0;cr)&&(i=r),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return y(this,t,e,i);case"utf8":case"utf-8":return x(this,t,e,i);case"ascii":return b(this,t,e,i);case"latin1":case"binary":return w(this,t,e,i);case"base64":return T(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;rn)&&(i=n);for(var r="",a=e;ai)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,i,n,r,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function O(t,e,i,n){e<0&&(e=65535+e+1);for(var r=0,a=Math.min(t.length-i,2);r>>8*(n?r:1-r)}function R(t,e,i,n){e<0&&(e=4294967295+e+1);for(var r=0,a=Math.min(t.length-i,4);r>>8*(n?r:3-r)&255}function N(t,e,i,n,r,a){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function k(t,e,i,n,a){return a||N(t,0,i,4),r.write(t,e,i,n,23,4),i+4}function z(t,e,i,n,a){return a||N(t,0,i,8),r.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){var i,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(r*=256);)n+=this[t+--e]*r;return n},l.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||P(t,e,this.length);for(var n=this[t],r=1,a=0;++a=(r*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||P(t,e,this.length);for(var n=e,r=1,a=this[t+--n];n>0&&(r*=256);)a+=this[t+--n]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||D(this,t,e,i,Math.pow(2,8*i)-1,0);var r=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+r]=t/a&255;return e+i},l.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);D(this,t,e,i,r-1,-r)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+i},l.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);D(this,t,e,i,r-1,-r)}var a=i-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,i){return k(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return k(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return z(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return z(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--r)t[r+e]=this[r+i];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&i<57344){if(!r){if(i>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}r=i;continue}if(i<56320){(e-=3)>-1&&a.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(e-=3)>-1&&a.push(239,191,189);if(r=null,i<128){if((e-=1)<0)break;a.push(i)}else if(i<2048){if((e-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function G(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,i,n){for(var r=0;r=e.length||r>=t.length);++r)e[r+i]=t[r];return r}}).call(this,i(128))},function(t,e,i){"use strict";e.byteLength=function(t){var e=u(t),i=e[0],n=e[1];return 3*(i+n)/4-n},e.toByteArray=function(t){var e,i,n=u(t),o=n[0],s=n[1],l=new a(function(t,e,i){return 3*(e+i)/4-i}(0,o,s)),h=0,c=s>0?o-4:o;for(i=0;i>16&255,l[h++]=e>>8&255,l[h++]=255&e;2===s&&(e=r[t.charCodeAt(i)]<<2|r[t.charCodeAt(i+1)]>>4,l[h++]=255&e);1===s&&(e=r[t.charCodeAt(i)]<<10|r[t.charCodeAt(i+1)]<<4|r[t.charCodeAt(i+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e);return l},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,a=[],o=0,s=i-r;os?s:o+16383));1===r?(e=t[i-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[i-2]<<8)+t[i-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function h(t,e,i){for(var r,a,o=[],s=e;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -e.read=function(t,e,i,n,r){var a,o,s=8*r-n-1,l=(1<>1,h=-7,c=i?r-1:0,d=i?-1:1,f=t[e+c];for(c+=d,a=f&(1<<-h)-1,f>>=-h,h+=s;h>0;a=256*a+t[e+c],c+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+t[e+c],c+=d,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=u}return(f?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,i,n,r,a){var o,s,l,u=8*a-r-1,h=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=h?(s=0,o=h):o+c>=1?(s=(e*l-1)*Math.pow(2,r),o+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;t[i+f]=255&s,f+=p,s/=256,r-=8);for(o=o<0;t[i+f]=255&o,f+=p,o/=256,u-=8);t[i+f-p]|=128*g}},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){var n;n=function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=106)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(40),r=i(52),a=i(5),o=i(4),s=i(8),l=i(19),u=i(35),h=i(15),c=i(0),d=i.n(c),f=i(36),p=i(60),g=i.n(p),m=i(61),v=i(124),_=i(125),y=i(129),x=i(130),b=i(2),w=i(132),T=i(43),S=i(76),M=i(133),A=i(134),C=i(135),I=i(136),L=i(41),E=i(37),P=i(26),D=i(3),O=i(137),R=i(56),N=i(138),k=i(139),z=i(140),B=i(9),F=i(74),V=i(54),G=i(18),H=i(59),U=i(141),W=i(146),j=i(71),Z=i(147),X=i(148),Y=i(149),q=i(150),K=i(151),J=i(152);function $(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}d.a.util.extend(u.a.prototype,U.a),s.a.import(W.a),s.a.import(j.a),s.a.import(Z.a),s.a.import(X.a),s.a.import(Y.a),s.a.import(q.a),s.a.import(K.a),s.a.import(J.a);var Q=f.a.prototype.addToScene,tt=f.a.prototype.removeFromScene;f.a.prototype.addToScene=function(t){if(Q.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},f.a.prototype.removeFromScene=function(t){tt.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},l.a.prototype.setTextureImage=function(t,e,i,n){if(this.shader){var r,a,o=i.getZr(),s=this;return s.autoUpdateTextureStatus=!1,s.disableTexture(t),(a=e)&&"none"!==a&&(r=et.loadTexture(e,i,n,(function(e){s.enableTexture(t),o&&o.refresh()})),s.set(t,r)),r}};var et={};et.Renderer=r.a,et.Node=u.a,et.Mesh=n.a,et.Shader=s.a,et.Material=l.a,et.Texture=o.a,et.Texture2D=a.a,et.Geometry=h.a,et.SphereGeometry=w.a,et.PlaneGeometry=T.a,et.CubeGeometry=S.a,et.AmbientLight=M.a,et.DirectionalLight=A.a,et.PointLight=C.a,et.SpotLight=I.a,et.PerspectiveCamera=L.a,et.OrthographicCamera=E.a,et.Vector2=P.a,et.Vector3=D.a,et.Vector4=O.a,et.Quaternion=R.a,et.Matrix2=N.a,et.Matrix2d=k.a,et.Matrix3=z.a,et.Matrix4=B.a,et.Plane=F.a,et.Ray=V.a,et.BoundingBox=G.a,et.Frustum=H.a;var it=m.a.createBlank("rgba(255,255,255,0)").image;function nt(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function rt(t){if((t.wrapS===o.a.REPEAT||t.wrapT===o.a.REPEAT)&&t.image){var e=nt(t.width),i=nt(t.height);if(e!==t.width||i!==t.height){var n=document.createElement("canvas");n.width=e,n.height=i,n.getContext("2d").drawImage(t.image,0,0,e,i),t.image=n}}}et.loadTexture=function(t,e,i,n){"function"==typeof i&&(n=i,i={}),i=i||{};for(var r=Object.keys(i).sort(),a="",o=0;o3?e[3]=t[3]:e[3]=1,e):((e=d.a.color.parse(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},et.directionFromAlphaBeta=function(t,e){var i=t/180*Math.PI+Math.PI/2,n=-e/180*Math.PI+Math.PI/2,r=[],a=Math.sin(i);return r[0]=a*Math.cos(n),r[1]=-Math.cos(i),r[2]=a*Math.sin(n),r},et.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},et.COMMON_SHADERS=["lambert","color","realistic","hatching"],et.createShader=function(t){var e=s.a.source(t+".vertex"),i=s.a.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),i||console.error("Fragment shader of '%s' not exits",t);var n=new s.a(e,i);return n.name=t,n},et.createMaterial=function(t,e){e instanceof Array||(e=[e]);var i=et.createShader(t),n=new l.a({shader:i});return e.forEach((function(t){"string"==typeof t&&n.define(t)})),n},et.setMaterialFromModel=function(t,e,i,n){e.autoUpdateTextureStatus=!1;var r=i.getModel(t+"Material"),a=r.get("detailTexture"),o=b.a.firstNotNull(r.get("textureTiling"),1),s=b.a.firstNotNull(r.get("textureOffset"),0);"number"==typeof o&&(o=[o,o]),"number"==typeof s&&(s=[s,s]);var l=o[0]>1||o[1]>1?et.Texture.REPEAT:et.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var h=r.get("roughness"),c=r.get("metalness");null!=c?isNaN(c)&&(e.setTextureImage("metalnessMap",c,n,u),c=b.a.firstNotNull(r.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(e.setTextureImage("roughnessMap",h,n,u),h=b.a.firstNotNull(r.get("roughnessAdjust"),.5)):h=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",a,n,u),e.setTextureImage("normalMap",d,n,u),e.set({roughness:h,metalness:c,detailUvRepeat:o,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",a,n,u),e.set({detailUvRepeat:o,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",a,n,u),e.set({detailUvRepeat:o,detailUvOffset:s});else if("hatching"===t){var f=r.get("hatchingTextures")||[];f.length<6&&console.error("Invalid hatchingTextures.");for(var p=0;p<6;p++)e.setTextureImage("hatch"+(p+1),f[p],n,{anisotropic:8,wrapS:et.Texture.REPEAT,wrapT:et.Texture.REPEAT});e.set({detailUvRepeat:o,detailUvOffset:s})}},et.updateVertexAnimation=function(t,e,i,n){var r=n.get("animation"),a=n.get("animationDurationUpdate"),o=n.get("animationEasingUpdate"),s=i.shadowDepthMaterial;if(r&&e&&a>0&&e.geometry.vertexCount===i.geometry.vertexCount){i.material.define("vertex","VERTEX_ANIMATION"),i.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;li?i:t}r.add=function(t,e,i){return n.a.add(t.array,e.array,i.array),t._dirty=!0,t},r.set=function(t,e,i,r){n.a.set(t.array,e,i,r),t._dirty=!0},r.copy=function(t,e){return n.a.copy(t.array,e.array),t._dirty=!0,t},r.cross=function(t,e,i){return n.a.cross(t.array,e.array,i.array),t._dirty=!0,t},r.distance=r.dist=function(t,e){return n.a.distance(t.array,e.array)},r.divide=r.div=function(t,e,i){return n.a.divide(t.array,e.array,i.array),t._dirty=!0,t},r.dot=function(t,e){return n.a.dot(t.array,e.array)},r.len=function(t){return n.a.length(t.array)},r.lerp=function(t,e,i,r){return n.a.lerp(t.array,e.array,i.array,r),t._dirty=!0,t},r.min=function(t,e,i){return n.a.min(t.array,e.array,i.array),t._dirty=!0,t},r.max=function(t,e,i){return n.a.max(t.array,e.array,i.array),t._dirty=!0,t},r.multiply=r.mul=function(t,e,i){return n.a.multiply(t.array,e.array,i.array),t._dirty=!0,t},r.negate=function(t,e){return n.a.negate(t.array,e.array),t._dirty=!0,t},r.normalize=function(t,e){return n.a.normalize(t.array,e.array),t._dirty=!0,t},r.random=function(t,e){return n.a.random(t.array,e),t._dirty=!0,t},r.scale=function(t,e,i){return n.a.scale(t.array,e.array,i),t._dirty=!0,t},r.scaleAndAdd=function(t,e,i,r){return n.a.scaleAndAdd(t.array,e.array,i.array,r),t._dirty=!0,t},r.squaredDistance=r.sqrDist=function(t,e){return n.a.sqrDist(t.array,e.array)},r.squaredLength=r.sqrLen=function(t){return n.a.sqrLen(t.array)},r.subtract=r.sub=function(t,e,i){return n.a.subtract(t.array,e.array,i.array),t._dirty=!0,t},r.transformMat3=function(t,e,i){return n.a.transformMat3(t.array,e.array,i.array),t._dirty=!0,t},r.transformMat4=function(t,e,i){return n.a.transformMat4(t.array,e.array,i.array),t._dirty=!0,t},r.transformQuat=function(t,e,i){return n.a.transformQuat(t.array,e.array,i.array),t._dirty=!0,t};var l=Math.atan2,u=Math.asin,h=Math.abs;r.eulerFromQuat=function(t,e,i){t._dirty=!0,e=e.array;var n=t.array,r=e[0],a=e[1],o=e[2],h=e[3],c=r*r,d=a*a,f=o*o,p=h*h;switch(i=(i||"XYZ").toUpperCase()){case"XYZ":n[0]=l(2*(r*h-a*o),p-c-d+f),n[1]=u(s(2*(r*o+a*h),-1,1)),n[2]=l(2*(o*h-r*a),p+c-d-f);break;case"YXZ":n[0]=u(s(2*(r*h-a*o),-1,1)),n[1]=l(2*(r*o+a*h),p-c-d+f),n[2]=l(2*(r*a+o*h),p-c+d-f);break;case"ZXY":n[0]=u(s(2*(r*h+a*o),-1,1)),n[1]=l(2*(a*h-o*r),p-c-d+f),n[2]=l(2*(o*h-r*a),p-c+d-f);break;case"ZYX":n[0]=l(2*(r*h+o*a),p-c-d+f),n[1]=u(s(2*(a*h-r*o),-1,1)),n[2]=l(2*(r*a+o*h),p+c-d-f);break;case"YZX":n[0]=l(2*(r*h-o*a),p-c+d-f),n[1]=l(2*(a*h-r*o),p+c-d-f),n[2]=u(s(2*(r*a+o*h),-1,1));break;case"XZY":n[0]=l(2*(r*h+a*o),p-c+d-f),n[1]=l(2*(r*o+a*h),p+c-d-f),n[2]=u(s(2*(o*h-r*a),-1,1));break;default:console.warn("Unkown order: "+i)}return t},r.eulerFromMat3=function(t,e,i){var n=e.array,r=n[0],a=n[3],o=n[6],c=n[1],d=n[4],f=n[7],p=n[2],g=n[5],m=n[8],v=t.array;switch(i=(i||"XYZ").toUpperCase()){case"XYZ":v[1]=u(s(o,-1,1)),h(o)<.99999?(v[0]=l(-f,m),v[2]=l(-a,r)):(v[0]=l(g,d),v[2]=0);break;case"YXZ":v[0]=u(-s(f,-1,1)),h(f)<.99999?(v[1]=l(o,m),v[2]=l(c,d)):(v[1]=l(-p,r),v[2]=0);break;case"ZXY":v[0]=u(s(g,-1,1)),h(g)<.99999?(v[1]=l(-p,m),v[2]=l(-a,d)):(v[1]=0,v[2]=l(c,r));break;case"ZYX":v[1]=u(-s(p,-1,1)),h(p)<.99999?(v[0]=l(g,m),v[2]=l(c,r)):(v[0]=0,v[2]=l(-a,d));break;case"YZX":v[2]=u(s(c,-1,1)),h(c)<.99999?(v[0]=l(-f,d),v[1]=l(-p,r)):(v[0]=0,v[1]=l(o,m));break;case"XZY":v[2]=u(-s(a,-1,1)),h(a)<.99999?(v[0]=l(g,d),v[1]=l(o,r)):(v[0]=l(-f,m),v[1]=0);break;default:console.warn("Unkown order: "+i)}return t._dirty=!0,t},Object.defineProperties(r,{POSITIVE_X:{get:function(){return new r(1,0,0)}},NEGATIVE_X:{get:function(){return new r(-1,0,0)}},POSITIVE_Y:{get:function(){return new r(0,1,0)}},NEGATIVE_Y:{get:function(){return new r(0,-1,0)}},POSITIVE_Z:{get:function(){return new r(0,0,1)}},NEGATIVE_Z:{get:function(){return new r(0,0,-1)}},UP:{get:function(){return new r(0,1,0)}},ZERO:{get:function(){return new r}}}),e.a=r},function(t,e,i){"use strict";var n=i(7),r=i(11),a=i(57),o=n.a.extend({width:512,height:512,type:r.a.UNSIGNED_BYTE,format:r.a.RGBA,wrapS:r.a.REPEAT,wrapT:r.a.REPEAT,minFilter:r.a.LINEAR_MIPMAP_LINEAR,magFilter:r.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,sRGB:!0,unpackAlignment:4,premultiplyAlpha:!1,dynamic:!1,NPOT:!1,__used:0},(function(){this._cache=new a.a}),{getWebGLTexture:function(t){var e=t.gl,i=this._cache;return i.use(t.__uid__),i.miss("webgl_texture")&&i.put("webgl_texture",e.createTexture()),this.dynamic?this.update(t):i.isDirty()&&(this.update(t),i.fresh()),i.get("webgl_texture")},bind:function(){},unbind:function(){},dirty:function(){this._cache&&this._cache.dirtyAll()},update:function(t){},updateCommon:function(t){var e=t.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,this.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,this.unpackAlignment),this.format===r.a.DEPTH_COMPONENT&&(this.useMipmap=!1);var i=t.getGLExtension("EXT_sRGB");this.format!==o.SRGB||i||(this.format=o.RGB),this.format!==o.SRGB_ALPHA||i||(this.format=o.RGBA),this.NPOT=!this.isPowerOfTwo()},getAvailableWrapS:function(){return this.NPOT?r.a.CLAMP_TO_EDGE:this.wrapS},getAvailableWrapT:function(){return this.NPOT?r.a.CLAMP_TO_EDGE:this.wrapT},getAvailableMinFilter:function(){var t=this.minFilter;return this.NPOT||!this.useMipmap?t===r.a.NEAREST_MIPMAP_NEAREST||t===r.a.NEAREST_MIPMAP_LINEAR?r.a.NEAREST:t===r.a.LINEAR_MIPMAP_LINEAR||t===r.a.LINEAR_MIPMAP_NEAREST?r.a.LINEAR:t:t},getAvailableMagFilter:function(){return this.magFilter},nextHighestPowerOfTwo:function(t){--t;for(var e=1;e<32;e<<=1)t|=t>>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var i=e.get("webgl_texture");i&&t.gl.deleteTexture(i),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(o.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(o.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),o.BYTE=r.a.BYTE,o.UNSIGNED_BYTE=r.a.UNSIGNED_BYTE,o.SHORT=r.a.SHORT,o.UNSIGNED_SHORT=r.a.UNSIGNED_SHORT,o.INT=r.a.INT,o.UNSIGNED_INT=r.a.UNSIGNED_INT,o.FLOAT=r.a.FLOAT,o.HALF_FLOAT=36193,o.UNSIGNED_INT_24_8_WEBGL=34042,o.DEPTH_COMPONENT=r.a.DEPTH_COMPONENT,o.DEPTH_STENCIL=r.a.DEPTH_STENCIL,o.ALPHA=r.a.ALPHA,o.RGB=r.a.RGB,o.RGBA=r.a.RGBA,o.LUMINANCE=r.a.LUMINANCE,o.LUMINANCE_ALPHA=r.a.LUMINANCE_ALPHA,o.SRGB=35904,o.SRGB_ALPHA=35906,o.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,o.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,o.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,o.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,o.NEAREST=r.a.NEAREST,o.LINEAR=r.a.LINEAR,o.NEAREST_MIPMAP_NEAREST=r.a.NEAREST_MIPMAP_NEAREST,o.LINEAR_MIPMAP_NEAREST=r.a.LINEAR_MIPMAP_NEAREST,o.NEAREST_MIPMAP_LINEAR=r.a.NEAREST_MIPMAP_LINEAR,o.LINEAR_MIPMAP_LINEAR=r.a.LINEAR_MIPMAP_LINEAR,o.REPEAT=r.a.REPEAT,o.CLAMP_TO_EDGE=r.a.CLAMP_TO_EDGE,o.MIRRORED_REPEAT=r.a.MIRRORED_REPEAT,e.a=o},function(t,e,i){"use strict";var n=i(4),r=i(11),a=i(14),o=i(73).a.isPowerOfTwo;function s(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var l=n.a.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var i=this.format,a=this.type,o=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==n.a.REPEAT&&this.wrapT!==n.a.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,o?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,o?this.minFilter:this.getAvailableMinFilter());var s=t.getGLExtension("EXT_texture_filter_anisotropic");if(s&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,s.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===a&&(t.getGLExtension("OES_texture_half_float")||(a=r.a.FLOAT)),this.mipmaps.length)for(var l=this.width,u=this.height,h=0;h=n.a.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,i,o,r,a,0,e.pixels):t.texImage2D(t.TEXTURE_2D,i,o,r,a,0,o,l,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return o(this.width)&&o(this.height)},isRenderable:function(){return this.image?"CANVAS"===this.image.nodeName||"VIDEO"===this.image.nodeName||this.image.complete:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var i=a.a.createImage();e&&(i.crossOrigin=e);var n=this;return i.onload=function(){n.dirty(),n.trigger("success",n),i.onload=null},i.onerror=function(){n.trigger("error",n),i.onerror=null},i.src=t,this.image=i,this}});Object.defineProperty(l.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(l.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}}),e.a=l},function(t,e,i){"use strict";var n=i(161);e.a=n.a},function(t,e,i){"use strict";var n=i(110),r=i(53),a=i(23),o=function(){this.__uid__=a.a.genGUID()};o.__initializers__=[function(t){a.a.extend(this,t)}],a.a.extend(o,n.a),a.a.extend(o.prototype,r.a),e.a=o},function(t,e,i){"use strict";var n=i(23),r=i(14),a=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g,o=/attribute\s+(float|int|vec2|vec3|vec4)\s+([\s\S]*?);/g,s=/#define\s+(\w+)?(\s+[\d-.]+)?\s*;?\s*\n/g,l={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"};function u(t){for(var e=[],i=0;i=0){if(1!==l&&4!==l){_();break}l=2,h=[]}else if(1!==l)if(4!==l)p(g),l=0;else{var m=g;c.indexOf(m)>=0||d.indexOf(m)>=0||f.indexOf(m)>=0?u[s].semantic=m:"ignore"===m||"unconfigurable"===m?u[s].ignore=!0:u[s].value="bool"===t?"true"===m:parseFloat(m)}else u[s].value="bool"===t?"true"===g:parseFloat(g),h=null;else{if(2!==l){_();break}if(!(h instanceof Array)){_();break}h.push(+n[++o])}else u[s].value=new r.a.Float32Array(h),h=null,l=5;else if(2===l){if(!(h instanceof Array)){_();break}h.push(+n[++o])}else l=5;else l=4;else{if(0!==l&&3!==l){_();break}l=1}}return u}function x(t,e){"object"==typeof t&&(e=t.fragment,t=t.vertex),t=v(t),e=v(e),this._shaderID=function(t,e){var i="vertex:"+t+"fragment:"+e;if(g[i])return g[i];var r=n.a.genGUID();return g[i]=r,m[r]={vertex:t,fragment:e},r}(t,e),this._vertexCode=x.parseImport(t),this._fragmentCode=x.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}x.prototype={constructor:x,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var i=this.uniformTemplates[e];t[e]={type:i.type,value:i.value()}}return t},_parseImport:function(){this._vertexCode=x.parseImport(this.vertex),this._fragmentCode=x.parseImport(this.fragment)},_addSemanticUniform:function(t,e,i){if(c.indexOf(i)>=0)this.attributeSemantics[i]={symbol:t,type:e};else if(f.indexOf(i)>=0){var n=!1,r=i;i.match(/TRANSPOSE$/)&&(n=!0,r=i.slice(0,-9)),this.matrixSemantics[i]={symbol:t,type:e,isTranspose:n,semanticNoTranspose:r}}else d.indexOf(i)>=0&&(this.uniformSemantics[i]={symbol:t,type:e})},_addMaterialUniform:function(t,e,i,n,r,a){a[t]={type:i,value:r?h.array:n||h[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function i(t){return null!=t?function(){return t}:null}function n(n,r,a){var o=y(r,a),s=[];for(var u in o){var h=o[u],c=h.semantic,d=u,f=l[r],p=i(o[u].value);o[u].isArray&&(d+="["+o[u].arraySize+"]",f+="v"),s.push(d),e._uniformList.push(u),h.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[u]={shaderType:"fragment",type:r}),c?e._addSemanticUniform(u,f,c):e._addMaterialUniform(u,r,f,p,o[u].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(a,n),this._fragmentCode=this._fragmentCode.replace(a,n),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(o,(function(i,n,r){var a=y(n,r),o=p[n]||1,s=[];for(var l in a){var u=a[l].semantic;if(t[l]={type:"float",size:o,semantic:u||null},u){if(c.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:n}}s.push(l)}return"attribute "+n+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,i,n){var r=t.fragmentDefines;return r[i]||(r[i]="false"!==n&&("true"===n||(n?isNaN(parseFloat(n))?n.trim():parseFloat(n):null))),""}this._vertexCode=this._vertexCode.replace(s,e),this._fragmentCode=this._fragmentCode.replace(s,e)},clone:function(){var t=m[this._shaderID];return new x(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(x.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(x.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(x.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(x.prototype,"uniforms",{get:function(){return this._uniformList}}));var b=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;x.parseImport=function(t){return t=t.replace(b,(function(t,e,i){return(t=x.source(i))?x.parseImport(t):(console.error('Shader chunk "'+i+'" not existed in library'),"")}))};var w=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;x.import=function(t){t.replace(w,(function(t,e,i,n){if(n=n.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,a=i.split("."),o=x.codes,s=0;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},a.cross=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2];return t[0]=r*l-a*s,t[1]=a*o-n*l,t[2]=n*s-r*o,t},a.lerp=function(t,e,i,n){var r=e[0],a=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t},a.random=function(t,e){e=e||1;var i=2*Object(r.c)()*Math.PI,n=2*Object(r.c)()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(i)*a,t[1]=Math.sin(i)*a,t[2]=n*e,t},a.transformMat4=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[3]*n+i[7]*r+i[11]*a+i[15];return o=o||1,t[0]=(i[0]*n+i[4]*r+i[8]*a+i[12])/o,t[1]=(i[1]*n+i[5]*r+i[9]*a+i[13])/o,t[2]=(i[2]*n+i[6]*r+i[10]*a+i[14])/o,t},a.transformMat3=function(t,e,i){var n=e[0],r=e[1],a=e[2];return t[0]=n*i[0]+r*i[3]+a*i[6],t[1]=n*i[1]+r*i[4]+a*i[7],t[2]=n*i[2]+r*i[5]+a*i[8],t},a.transformQuat=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2],u=i[3],h=u*n+s*a-l*r,c=u*r+l*n-o*a,d=u*a+o*r-s*n,f=-o*n-s*r-l*a;return t[0]=h*u+f*-o+c*-l-d*-s,t[1]=c*u+f*-s+d*-o-h*-l,t[2]=d*u+f*-l+h*-s-c*-o,t},a.rotateX=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0],a[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),a[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},a.rotateY=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),a[1]=r[1],a[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},a.rotateZ=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),a[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),a[2]=r[2],t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},a.forEach=(n=a.create(),function(t,e,i,r,a,o){var s,l;for(e||(e=3),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s1?0:Math.acos(r)},e.a=a},function(t,e){var i={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},n={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},r=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,u=a.map,h=a.reduce,c={};function d(t){if(null==t||"object"!=typeof t)return t;var e=t,a=r.call(t);if("[object Array]"===a){if(!T(t)){e=[];for(var o=0,s=t.length;os[0]&&(s[0]=u),h>s[1]&&(s[1]=h),c>s[2]&&(s[2]=c)}i._dirty=!0,n._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,i=e.position.value,a=e.normal.value;if(a&&a.length===i.length)for(var o=0;o65535&&(this.indices=new n.a.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,i=this.getEnabledAttributes(),r={},a=0;a=i.COLOR_ATTACHMENT0&&a<=i.COLOR_ATTACHMENT0+8&&r.push(a);n.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var o=this.clearDepth?i.DEPTH_BUFFER_BIT:0;if(i.depthMask(!0),this.clearColor){o|=i.COLOR_BUFFER_BIT,i.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&i.clearColor(s[0],s[1],s[2],s[3])}i.clear(o),this.blendWithPrevious?(i.enable(i.BLEND),this.material.transparent=!0):(i.disable(i.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){d.material=this.material,t.renderPass([d],f)},dispose:function(t){}});e.a=p},function(t,e,i){"use strict";e.a=function(t,e,i){return{seriesType:t,reset:function(t,e){var i=t.getData(),n=t.visualColorAccessPath.split(".");n[n.length-1]="opacity";var r=t.get(n);return i.setVisual("opacity",null==r?1:r),{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"opacity",i)}:null}}}}},function(t,e,i){"use strict";var n,r,a,o,s,l,u=i(3),h=i(12),c=h.a.set,d=h.a.copy,f=function(t,e){this.min=t||new u.a(1/0,1/0,1/0),this.max=e||new u.a(-1/0,-1/0,-1/0),this.vertices=null};f.prototype={constructor:f,updateFromVertices:function(t){if(t.length>0){var e=this.min,i=this.max,n=e.array,r=i.array;d(n,t[0]),d(r,t[0]);for(var a=1;ar[0]&&(r[0]=o[0]),o[1]>r[1]&&(r[1]=o[1]),o[2]>r[2]&&(r[2]=o[2])}e._dirty=!0,i._dirty=!0}},union:function(t){var e=this.min,i=this.max;return h.a.min(e.array,e.array,t.min.array),h.a.max(i.array,i.array,t.max.array),e._dirty=!0,i._dirty=!0,this},intersection:function(t){var e=this.min,i=this.max;return h.a.max(e.array,e.array,t.min.array),h.a.min(i.array,i.array,t.max.array),e._dirty=!0,i._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,i=this.max.array,n=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||i[0]=r[0]&&i[1]>=r[1]&&i[2]>=r[2]},containPoint:function(t){var e=this.min.array,i=this.max.array,n=t.array;return e[0]<=n[0]&&e[1]<=n[1]&&e[2]<=n[2]&&i[0]>=n[0]&&i[1]>=n[1]&&i[2]>=n[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(n=h.a.create(),r=h.a.create(),a=h.a.create(),o=h.a.create(),s=h.a.create(),l=h.a.create(),function(t,e){var i=t.min.array,u=t.max.array,h=e.array;return n[0]=h[0]*i[0],n[1]=h[1]*i[0],n[2]=h[2]*i[0],r[0]=h[0]*u[0],r[1]=h[1]*u[0],r[2]=h[2]*u[0],a[0]=h[4]*i[1],a[1]=h[5]*i[1],a[2]=h[6]*i[1],o[0]=h[4]*u[1],o[1]=h[5]*u[1],o[2]=h[6]*u[1],s[0]=h[8]*i[2],s[1]=h[9]*i[2],s[2]=h[10]*i[2],l[0]=h[8]*u[2],l[1]=h[9]*u[2],l[2]=h[10]*u[2],i=this.min.array,u=this.max.array,i[0]=Math.min(n[0],r[0])+Math.min(a[0],o[0])+Math.min(s[0],l[0])+h[12],i[1]=Math.min(n[1],r[1])+Math.min(a[1],o[1])+Math.min(s[1],l[1])+h[13],i[2]=Math.min(n[2],r[2])+Math.min(a[2],o[2])+Math.min(s[2],l[2])+h[14],u[0]=Math.max(n[0],r[0])+Math.max(a[0],o[0])+Math.max(s[0],l[0])+h[12],u[1]=Math.max(n[1],r[1])+Math.max(a[1],o[1])+Math.max(s[1],l[1])+h[13],u[2]=Math.max(n[2],r[2])+Math.max(a[2],o[2])+Math.max(s[2],l[2])+h[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,i=this.max.array,n=t.array,r=e[0],a=e[1],o=e[2],s=i[0],l=i[1],u=e[2],h=i[0],c=i[1],d=i[2];if(1===n[15])e[0]=n[0]*r+n[12],e[1]=n[5]*a+n[13],i[2]=n[10]*o+n[14],i[0]=n[0]*h+n[12],i[1]=n[5]*c+n[13],e[2]=n[10]*d+n[14];else{var f=-1/o;e[0]=n[0]*r*f,e[1]=n[5]*a*f,i[2]=(n[10]*o+n[14])*f,f=-1/u,i[0]=n[0]*s*f,i[1]=n[5]*l*f,f=-1/d,e[2]=(n[10]*d+n[14])*f}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=h.a.fromValues(0,0,0);this.vertices=t}var i=this.min.array,n=this.max.array;return c(t[0],i[0],i[1],i[2]),c(t[1],i[0],n[1],i[2]),c(t[2],n[0],i[1],i[2]),c(t[3],n[0],n[1],i[2]),c(t[4],i[0],i[1],n[2]),c(t[5],i[0],n[1],n[2]),c(t[6],n[0],i[1],n[2]),c(t[7],n[0],n[1],n[2]),this},copy:function(t){var e=this.min,i=this.max;return d(e.array,t.min.array),d(i.array,t.max.array),e._dirty=!0,i._dirty=!0,this},clone:function(){var t=new f;return t.copy(this),t}},e.a=f},function(t,e,i){"use strict";var n=i(7),r=i(23),a=i(113).a.parseToFloat,o={};function s(t){var e=Object.keys(t);e.sort();for(var i=[],n=0;n=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"==typeof t)for(var i in t){var n=t[i];this.setUniform(i,n)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var i=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var n=this.uniforms;this._enabledUniforms=Object.keys(n),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var a=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=r.a.clone(t.vertexDefines),this.fragmentDefines=r.a.clone(t.fragmentDefines),e){for(var s in i)n[s]&&(n[s].value=i[s].value);r.a.defaults(this.vertexDefines,a),r.a.defaults(this.fragmentDefines,o)}var l={};for(var u in t.textures)l[u]={shaderType:t.textures[u].shaderType,type:t.textures[u].type,enabled:!(!e||!this._textureStatus[u])&&this._textureStatus[u].enabled};this._textureStatus=l,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=r.a.clone(this.vertexDefines),t.fragmentDefines=r.a.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,i){var n=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(i=e,e=t,t="both"),i=null!=i?i:null,"vertex"!==t&&"both"!==t||n[e]!==i&&(n[e]=i,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==i&&(r[e]=i,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e=i.x&&e>=i.y&&t<=i.x+i.width&&e<=i.y+i.height};var v=new c.a;m.prototype.castRay=function(t,e,i){var n=this.layer.renderer,r=n.viewport;return n.viewport=this.viewport,n.screenToNDC(t,e,v),this.camera.castRay(v,i),n.viewport=r,i},m.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},m.prototype._doRender=function(t,e,i){var n=this.scene,r=this.camera;i=i||0,this._updateTransparent(t,n,r,i),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,n,r,!0)),this._updateShadowPCFKernel(i);var a,o=t.clearColor;t.gl.clearColor(o[0],o[1],o[2],o[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,n,r,this._temporalSS.getFrame())),this._updateSSAO(t,n,r,this._temporalSS.getFrame()),this._enablePostEffect?((a=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(n,r,!0,!0),a.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,n,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,n,r,null,0))):this.needsTemporalSS()&&e?((a=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(n,r,!0,!0),t.restoreClear(),a.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(n,r,!0,!0))},m.prototype._updateTransparent=function(t,e,i,n){for(var r=new h.a,a=new u.a,o=i.getWorldPosition(),s=e.getRenderList(i).transparent,l=0;lthis.camera.far||t65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,i,n){return 1/(s.dist(t,e)+s.dist(i,e)+s.dist(n,i)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(l)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(l)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,i,n,r,a){null==a&&(a=1);var o=t[0],s=t[1],l=t[2],u=e[0],h=e[1],c=e[2],d=i[0],f=i[1],p=i[2],g=n[0],m=n[1],v=n[2],_=this._getCubicCurveApproxStep(t,e,i,n),y=_*_,x=y*_,b=3*_,w=3*y,T=6*y,S=6*x,M=o-2*u+d,A=s-2*h+f,C=l-2*c+p,I=3*(u-d)-o+g,L=3*(h-f)-s+m,E=3*(c-p)-l+v,P=o,D=s,O=l,R=(u-o)*b+M*w+I*x,N=(h-s)*b+A*w+L*x,k=(c-l)*b+C*w+E*x,z=M*T+I*S,B=A*T+L*S,F=C*T+E*S,V=I*S,G=L*S,H=E*S,U=0,W=0,j=Math.ceil(1/_),Z=new Float32Array(3*(j+1)),X=(Z=[],0);for(W=0;W1&&(P=R>0?Math.min(P,g):Math.max(P,g),D=N>0?Math.min(D,m):Math.max(D,m),O=k>0?Math.min(O,v):Math.max(O,v));return this.addPolyline(Z,r,a)},addLine:function(t,e,i,n){return this.addPolyline([t,e],i,n)},addPolyline:function(t,e,i,n,r){if(t.length){var a="number"!=typeof t[0];if(null==r&&(r=a?t.length:t.length/3),!(r<2)){null==n&&(n=0),null==i&&(i=1),this._itemVertexOffsets.push(this._vertexOffset);var o,s,l=(a="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,f=this.attributes.offset,p=this.indices,g=this._vertexOffset;i=Math.max(i,.01);for(var m=n;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(c.set(g-2,o),c.set(g-1,o)),u.set(g,o),u.set(g+1,o),d.set(g,s),d.set(g+1,s),f.set(g,i/2),f.set(g+1,-i/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,o),g++;else if(m>0){var y=3*this._triangleOffset;(p=this.indices)[y]=g-4,p[y+1]=g-3,p[y+2]=g-2,p[y+3]=g-3,p[y+4]=g-1,p[y+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(b-1,b-3),c.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var i=this._itemVertexOffsets[t],n=t1&&e.texParameterf(e.TEXTURE_CUBE_MAP,a.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===n&&(t.getGLExtension("OES_texture_half_float")||(n=r.a.FLOAT)),this.mipmaps.length)for(var o=this.width,s=this.height,l=0;l0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t[3]=e[3]*o),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},a.lerp=function(t,e,i,n){var r=e[0],a=e[1],o=e[2],s=e[3];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t[3]=s+n*(i[3]-s),t},a.random=function(t,e){return e=e||1,t[0]=Object(r.c)(),t[1]=Object(r.c)(),t[2]=Object(r.c)(),t[3]=Object(r.c)(),a.normalize(t,t),a.scale(t,t,e),t},a.transformMat4=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3];return t[0]=i[0]*n+i[4]*r+i[8]*a+i[12]*o,t[1]=i[1]*n+i[5]*r+i[9]*a+i[13]*o,t[2]=i[2]*n+i[6]*r+i[10]*a+i[14]*o,t[3]=i[3]*n+i[7]*r+i[11]*a+i[15]*o,t},a.transformQuat=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2],u=i[3],h=u*n+s*a-l*r,c=u*r+l*n-o*a,d=u*a+o*r-s*n,f=-o*n-s*r-l*a;return t[0]=h*u+f*-o+c*-l-d*-s,t[1]=c*u+f*-s+d*-o-h*-l,t[2]=d*u+f*-l+h*-s-c*-o,t},a.forEach=(n=a.create(),function(t,e,i,r,a,o){var s,l;for(e||(e=4),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof r.a&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof a.a?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof r.a&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},i=0;i0&&this._doUpdateRenderList(o,e,i,n,r)}},isFrustumCulled:(m=new o.a,v=new h.a,function(t,e,i){var n=t.boundingBox;if(n||(n=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!n)return!1;if(v.array=i,m.transformFrom(n,v),t.castShadow&&this.viewBoundingBoxLastFrame.union(m),t.frustumCulling){if(!m.intersectBoundingBox(e.frustum.boundingBox))return!0;v.array=e.projectionMatrix.array,m.max.array[2]>0&&m.min.array[2]<0&&(m.max.array[2]=-1e-20),m.applyProjection(v);var r=m.min.array,a=m.max.array;if(a[0]<-1||r[0]>1||a[1]<-1||r[1]>1||a[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(y);var e=this._lightUniforms;for(var i in e)for(var n in e[i])e[i][n].value.length=0;for(var r=0;r0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}}},function(t,e,i){"use strict";var n=i(0),r=i.n(n);e.a=function(t,e,i){var n=t.getData(),a=t.getRawValue(e),o=r.a.util.isArray(a)?function(t){var a=[],o=function(t,e){var i=[];return r.a.util.each(t.dimensions,(function(n){var r=t.getDimensionInfo(n),a=r.otherDims[e];null!=a&&!1!==a&&(i[a]=r.name)})),i}(n,"tooltip");function s(t,e){var o=n.getDimensionInfo(e);if(o&&!1!==o.otherDims.tooltip){var s=o.type,l="- "+(o.tooltipName||o.name)+": "+("ordinal"===s?t+"":"time"===s?i?"":r.a.format.formatTime("yyyy/MM/dd hh:mm:ss",t):r.a.format.addCommas(t));l&&a.push(r.a.format.encodeHTML(l))}}return o.length?r.a.util.each(o,(function(t){s(n.get(t,e),t)})):r.a.util.each(t,s),"
"+a.join("
")}(a):r.a.format.encodeHTML(r.a.format.addCommas(a)),s=n.getName(e),l=n.getItemVisual(e,"color");r.a.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=r.a.format.getTooltipMarker(l),h=t.name;return"\0-"===h&&(h=""),h=h?r.a.format.encodeHTML(h)+(i?": ":"
"):"",i?u+h+o:h+u+(s?r.a.format.encodeHTML(s)+": "+o:o)}},function(t,e,i){"use strict";var n=i(72),r=i(11),a=n.a.extend({skeleton:null,joints:null,useSkinMatricesTexture:!1},(function(){this.joints||(this.joints=[])}),{isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=n.a.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});a.POINTS=r.a.POINTS,a.LINES=r.a.LINES,a.LINE_LOOP=r.a.LINE_LOOP,a.LINE_STRIP=r.a.LINE_STRIP,a.TRIANGLES=r.a.TRIANGLES,a.TRIANGLE_STRIP=r.a.TRIANGLE_STRIP,a.TRIANGLE_FAN=r.a.TRIANGLE_FAN,a.BACK=r.a.BACK,a.FRONT=r.a.FRONT,a.FRONT_AND_BACK=r.a.FRONT_AND_BACK,a.CW=r.a.CW,a.CCW=r.a.CCW,e.a=a},function(t,e,i){"use strict";var n=i(58),r=n.a.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=n.a.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}});e.a=r},function(t,e,i){"use strict";var n=i(40),r=i(76),a=i(8),o=i(19),s=i(4),l=i(121);a.a.import(l.a);var u=n.a.extend((function(){var t=new a.a({vertex:a.a.source("clay.skybox.vertex"),fragment:a.a.source("clay.skybox.fragment")}),e=new o.a({shader:t,depthMask:!1});return{scene:null,geometry:new r.a,material:e,environmentMap:null,culling:!1}}),(function(){var t=this.scene;t&&this.attachScene(t),this.environmentMap&&this.setEnvironmentMap(this.environmentMap)}),{attachScene:function(t){this.scene&&this.detachScene(),t.skybox=this,this.scene=t,t.on("beforerender",this._beforeRenderScene,this)},detachScene:function(){this.scene&&(this.scene.off("beforerender",this._beforeRenderScene),this.scene.skybox=null),this.scene=null},dispose:function(t){this.detachScene(),this.geometry.dispose(t)},setEnvironmentMap:function(t){"texture2D"===t.textureType?(this.material.define("EQUIRECTANGULAR"),t.minFilter=s.a.LINEAR):this.material.undefine("EQUIRECTANGULAR"),this.material.set("environmentMap",t)},getEnvironmentMap:function(){return this.material.get("environmentMap")},_beforeRenderScene:function(t,e,i){this.renderSkybox(t,i)},renderSkybox:function(t,e){this.position.copy(e.getWorldPosition()),this.update(),t.gl.disable(t.gl.BLEND),this.material.get("lod")>0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],e)}});e.a=u},function(t,e,i){"use strict";var n=i(15),r=i(18),a=n.a.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,i=this.attributes,n=[],a=[],o=[],s=[],l=0;l<=t;l++)for(var u=l/t,h=0;h<=e;h++){var c=h/e;if(n.push([2*c-1,2*u-1,0]),a&&a.push([c,u]),o&&o.push([0,0,1]),h0&&this._notFirst?this.animateTo({alpha:h,beta:c,center:d,distance:a,targetOrthographicSize:s,easing:u.animationEasingUpdate,duration:u.animationDurationUpdate}):(this.setDistance(a),this.setAlpha(h),this.setBeta(c),this.setCenter(d),this.setOrthographicSize(s)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){null==s[this.panMouseButton]&&console.error("Unkown panMouseButton %s. It should be left|middle|right",this.panMouseButton),null==s[this.rotateMouseButton]&&console.error("Unkown rotateMouseButton %s. It should be left|middle|right",this.rotateMouseButton),"cw"!==this.autoRotateDirection&&"ccw"!==this.autoRotateDirection&&console.error("Unkown autoRotateDirection %s. It should be cw|ccw",this.autoRotateDirection)},animateTo:function(t){var e=this.zr,i=this,n={},r={};return null!=t.distance&&(n.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(n.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(n.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(n.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(n.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(n).when(t.duration||1e3,r).during((function(){null!=n.alpha&&i.setAlpha(n.alpha),null!=n.beta&&i.setBeta(n.beta),null!=n.distance&&i.setDistance(n.distance),null!=n.center&&i.setCenter(n.center),null!=n.orthographicSize&&i.setOrthographicSize(n.orthographicSize),i._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),i=this._orthoSize,n=i/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-n/2,e.right=n/2,e.top=i/2,e.bottom=-i/2},_updatePan:function(t){var e=this._panVelocity,i=this._distance,n=this.getCamera(),r=n.worldTransform.y,a=n.worldTransform.x;this._center.scaleAndAdd(a,-e.x*i/200).scaleAndAdd(r,-e.y*i/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new a.a,i=this._theta+Math.PI/2,n=this._phi+Math.PI/2,r=Math.sin(i);e.x=r*Math.cos(n),e.y=-Math.cos(i),e.z=r*Math.sin(n),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var i=t.len();(i*=e)<1e-4&&(i=0),t.normalize().scale(i)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),i=Math.atan2(t.x,t.z);this._theta=e,this._phi=-i,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,i=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,i)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===s[this.rotateMouseButton]?this._mode="rotate":t.event.button===s[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=l(this.panSensitivity),i=l(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*i[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*i[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var i,n=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(n,r)||(i="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*i*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var i=e.indexOf(t);i>=0&&e.splice(i,1)})),t}});Object.defineProperty(u.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}}),e.a=u},function(t,e,i){"use strict";e.a="@export ecgl.lines3D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, 1.0);\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n}\n@end\n\n\n\n@export ecgl.lines3D.clipNear\n\nvec4 clipNear(vec4 p1, vec4 p2) {\n float n = (p1.w - near) / (p1.w - p2.w);\n return vec4(mix(p1.xy, p2.xy, n), -near, near);\n}\n\n@end\n\n@export ecgl.lines3D.expandLine\n#ifdef VERTEX_ANIMATION\n vec4 prevProj = worldViewProjection * vec4(mix(prevPositionPrev, positionPrev, percent), 1.0);\n vec4 currProj = worldViewProjection * vec4(mix(prevPosition, position, percent), 1.0);\n vec4 nextProj = worldViewProjection * vec4(mix(prevPositionNext, positionNext, percent), 1.0);\n#else\n vec4 prevProj = worldViewProjection * vec4(positionPrev, 1.0);\n vec4 currProj = worldViewProjection * vec4(position, 1.0);\n vec4 nextProj = worldViewProjection * vec4(positionNext, 1.0);\n#endif\n\n if (currProj.w < 0.0) {\n if (nextProj.w > 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(t,e,i){var n=i(13),r=i(82),a=i(85).parsePercent,o=i(171),s=n.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=o+v)>r||l.newline?(a+=s+i,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+i:o=c+i)}))}var c=h,d=n.curry(h,"vertical"),f=n.curry(h,"horizontal");function p(t,e,i){i=o.normalizeCssArray(i||0);var n=e.width,s=e.height,l=a(t.left,n),u=a(t.top,s),h=a(t.right,n),c=a(t.bottom,s),d=a(t.width,n),f=a(t.height,s),p=i[2]+i[0],g=i[1]+i[3],m=t.aspect;switch(isNaN(d)&&(d=n-h-g-l),isNaN(f)&&(f=s-c-p-u),null!=m&&(isNaN(d)&&isNaN(f)&&(m>n/s?d=.8*n:f=.8*s),isNaN(d)&&(d=m*f),isNaN(f)&&(f=d/m)),isNaN(l)&&(l=n-h-d-g),isNaN(u)&&(u=s-c-f-p),t.left||t.right){case"center":l=n/2-d/2-i[3];break;case"right":l=n-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-f/2-i[0];break;case"bottom":u=s-f-p}l=l||0,u=u||0,isNaN(d)&&(d=n-g-l-(h||0)),isNaN(f)&&(f=s-p-u-(c||0));var v=new r(l+i[3],u+i[0],d,f);return v.margin=i,v}function g(t,e){return e&&t&&s(l,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}e.LOCATION_PARAMS=l,e.HV_NAMES=u,e.box=c,e.vbox=d,e.hbox=f,e.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,s=a(t.x,n),l=a(t.y,r),u=a(t.x2,n),h=a(t.y2,r);return(isNaN(s)||isNaN(parseFloat(t.x)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=n),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.y2)))&&(h=r),i=o.normalizeCssArray(i||0),{width:Math.max(u-s-i[1]-i[3],0),height:Math.max(h-l-i[0]-i[2],0)}},e.getLayoutRect=p,e.positionElement=function(t,e,i,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if(s||l){var h;if("raw"===u)h="group"===t.type?new r(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(h=h.clone()).applyTransform(c)}e=p(n.defaults({width:h.width,height:h.height},e),i,a);var d=t.position,f=s?e.x-h.x:0,g=l?e.y-h.y:0;t.attr("position","raw"===u?[f,g]:[d[0]+f,d[1]+g])}},e.sizeCalculable=function(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]},e.mergeLayoutParam=function(t,e,i){!n.isObject(i)&&(i={});var r=i.ignoreSize;!n.isArray(r)&&(r=[r,r]);var a=l(u[0],0),o=l(u[1],1);function l(i,n){var a={},o=0,l={},u=0;if(s(i,(function(e){l[e]=t[e]})),s(i,(function(t){h(e,t)&&(a[t]=l[t]=e[t]),c(a,t)&&o++,c(l,t)&&u++})),r[n])return c(e,i[1])?l[i[2]]=null:c(e,i[2])&&(l[i[1]]=null),l;if(2!==u&&o){if(o>=2)return a;for(var d=0;d0&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))}});e.a=n},function(t,e,i){"use strict";e.a=function(t,e){for(var i=0,n=1/e,r=t;r>0;)i+=n*(r%e),r=Math.floor(r/e),n/=e;return i}},function(t,e,i){"use strict";var n=i(0),r=i.n(n);e.a=function(t,e,i){i=i||t.getSource();var n=e||r.a.getCoordinateSystemDimensions(t.get("coordinateSystem"))||["x","y","z"],a=r.a.helper.createDimensions(i,{dimensionsDefine:i.dimensionsDefine||t.get("dimensions"),encodeDefine:i.encodeDefine||t.get("encode"),coordDimensions:n.map((function(e){var i=t.getReferringComponents(e+"Axis3D")[0];return{type:i&&"category"===i.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&a.forEach((function(e){if(n.indexOf(e.coordDim)>=0){var i=t.getReferringComponents(e.coordDim+"Axis3D")[0];i&&"category"===i.get("type")&&(e.ordinalMeta=i.getOrdinalMeta())}}));var o=r.a.helper.dataStack.enableDataStack(t,a,{byIndex:!0,stackedCoordDimension:"z"}),s=new r.a.List(a,t);return s.setCalculationInfo(o),s.initData(i),s}},function(t,e){t.exports=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,r){var a=t.getData(),o=t.get("symbol")||e,s=t.get("symbolSize"),l=t.get("symbolKeepAspect");if(a.setVisual({legendSymbol:i||o,symbol:o,symbolSize:s,symbolKeepAspect:l}),!n.isSeriesFiltered(t)){var u="function"==typeof s;return{dataEach:a.hasItemOption||u?function(e,i){if("function"==typeof s){var n=t.getRawValue(i),r=t.getDataParams(i);e.setItemVisual(i,"symbolSize",s(n,r))}if(e.hasItemOption){var a=e.getItemModel(i),o=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0),u=a.getShallow("symbolKeepAspect",!0);null!=o&&e.setItemVisual(i,"symbol",o),null!=l&&e.setItemVisual(i,"symbolSize",l),null!=u&&e.setItemVisual(i,"symbolKeepAspect",u)}}:null}}}}}},function(t,e,i){"use strict";var n=i(7),r=i(111),a=i(11),o=i(14),s=i(19),l=i(26),u=i(115),h=i(8),c=i(71),d=i(21),f=i(12);h.a.import(c.a);var p=d.a.create,g={};function m(t){return t.material}function v(t,e,i){return e.uniforms[i].value}function _(t,e,i,n){return i!==n}function y(t){return!0}function x(){}var b={float:a.a.FLOAT,byte:a.a.BYTE,ubyte:a.a.UNSIGNED_BYTE,short:a.a.SHORT,ushort:a.a.UNSIGNED_SHORT};function w(t,e,i){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=i,this.vao=null}function T(t){var e,i;this.bind=function(t){e||((e=o.a.createCanvas()).width=e.height=1,e.getContext("2d"));var n=t.gl,r=!i;r&&(i=n.createTexture()),n.bindTexture(n.TEXTURE_2D,i),r&&n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var S=n.a.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=o.a.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new r.a(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(t){throw"Error creating WebGL Context "+t}this._programMgr=new u.a(this),this._placeholderTexture=new T(this)}),{resize:function(t,e){var i=this.canvas,n=this.devicePixelRatio;null!=t?(i.style.width=t+"px",i.style.height=e+"px",i.width=t*n,i.height=e*n,this._width=t,this._height=e):(this._width=i.width/n,this._height=i.height/n),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,i,n,r){if("object"==typeof t){var a=t;t=a.x,e=a.y,i=a.width,n=a.height,r=a.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,i*r,n*r),this.viewport={x:t,y:e,width:i,height:n,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,i,n){var r=this.gl,a=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var o=this.viewport,s=!1,l=o.devicePixelRatio;(o.width!==this._width||o.height!==this._height||l&&l!==this.devicePixelRatio||o.x||o.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(o.x*l,o.y*l,o.width*l,o.height*l)),r.clearColor(a[0],a[1],a[2],a[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(i||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var h=u.opaque,c=u.transparent,g=t.material;t.trigger("beforerender",this,t,e,u),n?(this.renderPreZ(h,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var m=p(),v=f.a.create(),_=0;_0){var s=t[r-1],l=s.joints?s.joints.length:0;if((a.joints?a.joints.length:0)===l&&a.material===s.material&&a.lightGroup===s.lightGroup){a.__program=s.__program;continue}}var u=this._programMgr.getProgram(a,o,e);this.validateProgram(u),a.__program=u}},renderPass:function(t,e,i){this.trigger("beforerenderpass",this,t,e,i),(i=i||{}).getMaterial=i.getMaterial||m,i.getUniform=i.getUniform||v,i.isMaterialChanged=i.isMaterialChanged||_,i.beforeRender=i.beforeRender||x,i.afterRender=i.afterRender||x;var n=i.ifRender||y;this.updatePrograms(t,this._sceneRendering,i),i.sortCompare&&t.sort(i.sortCompare);var r=this.viewport,a=r.devicePixelRatio,o=[r.x*a,r.y*a,r.width*a,r.height*a],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[o[2],o[3]],h=Date.now();e?(d.a.copy(M.VIEW,e.viewMatrix.array),d.a.copy(M.PROJECTION,e.projectionMatrix.array),d.a.copy(M.VIEWINVERSE,e.worldTransform.array)):(d.a.identity(M.VIEW),d.a.identity(M.PROJECTION),d.a.identity(M.VIEWINVERSE)),d.a.multiply(M.VIEWPROJECTION,M.PROJECTION,M.VIEW),d.a.invert(M.PROJECTIONINVERSE,M.PROJECTION),d.a.invert(M.VIEWPROJECTIONINVERSE,M.VIEWPROJECTION);for(var c,f,p,g,b,w,T,S,A,C,I,L,E=this.gl,P=this._sceneRendering,D=this.getGLExtension("OES_vertex_array_object"),O=0;Othis._glinfo.getMaxJointNumber()){var a=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,a,i),e.setUniform(n,"1i","skinMatricesTexture",i),e.setUniform(n,"1f","skinMatricesTextureSize",a.width)}else{var o=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(n,"SKIN_MATRIX",o)}},_renderObject:function(t,e){var i=this.gl,n=t.geometry,r=t.mode;if(null==r&&(r=4),e.indicesBuffer){var a=this.getGLExtension("OES_element_index_uint")&&n.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;i.drawElements(r,e.indicesBuffer.count,a,0)}else i.drawArrays(r,0,n.vertexCount)},_bindMaterial:function(t,e,i,n,r,a,o){for(var s=this.gl,l=a===i,u=i.currentTextureSlot(),h=e.getEnabledUniforms(),c=e.getTextureUniforms(),d=this._placeholderTexture,f=0;fh)){var c=Math.sqrt(h-s),d=o-c,f=o+c;return n||(n=new l.a),d<0?f<0?null:(u.a.scaleAndAdd(n.array,r,a,f),n):(u.a.scaleAndAdd(n.array,r,a,d),n)}}}(),intersectBoundingBox:function(t,e){var i,n,r,a,o,s,h=this.direction.array,c=this.origin.array,d=t.min.array,f=t.max.array,p=1/h[0],g=1/h[1],m=1/h[2];if(p>=0?(i=(d[0]-c[0])*p,n=(f[0]-c[0])*p):(n=(d[0]-c[0])*p,i=(f[0]-c[0])*p),g>=0?(r=(d[1]-c[1])*g,a=(f[1]-c[1])*g):(a=(d[1]-c[1])*g,r=(f[1]-c[1])*g),i>a||r>n)return null;if((r>i||i!=i)&&(i=r),(a=0?(o=(d[2]-c[2])*m,s=(f[2]-c[2])*m):(s=(d[2]-c[2])*m,o=(f[2]-c[2])*m),i>s||o>n)return null;if((o>i||i!=i)&&(i=o),(s=0?i:n;return e||(e=new l.a),u.a.scaleAndAdd(e.array,c,h,v),e},intersectTriangle:(n=u.a.create(),r=u.a.create(),a=u.a.create(),o=u.a.create(),function(t,e,i,s,h,c){var d=this.direction.array,f=this.origin.array;t=t.array,e=e.array,i=i.array,u.a.sub(n,e,t),u.a.sub(r,i,t),u.a.cross(o,r,d);var p=u.a.dot(n,o);if(s){if(p>-1e-5)return null}else if(p>-1e-5&&p<1e-5)return null;u.a.sub(a,f,t);var g=u.a.dot(o,a)/p;if(g<0||g>1)return null;u.a.cross(o,n,a);var m=u.a.dot(d,o)/p;if(m<0||m>1||g+m>1)return null;u.a.cross(o,n,r);var v=-u.a.dot(a,o)/p;return v<0?null:(h||(h=new l.a),c&&l.a.set(c,1-g-m,g,m),u.a.scaleAndAdd(h.array,f,d,v),h)}),applyTransform:function(t){l.a.add(this.direction,this.direction,this.origin),l.a.transformMat4(this.origin,this.origin,t),l.a.transformMat4(this.direction,this.direction,t),l.a.sub(this.direction,this.direction,this.origin),l.a.normalize(this.direction,this.direction)},copy:function(t){l.a.copy(this.origin,t.origin),l.a.copy(this.direction,t.direction)},clone:function(){var t=new h;return t.copy(this),t}},e.a=h},function(t,e,i){"use strict";var n,r,a,o,s=i(20),l=i(12),u=i(33),h=i(34),c={create:function(){var t=new s.a(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}};c.rotationTo=(n=l.a.create(),r=l.a.fromValues(1,0,0),a=l.a.fromValues(0,1,0),function(t,e,i){var o=l.a.dot(e,i);return o<-.999999?(l.a.cross(n,r,e),l.a.length(n)<1e-6&&l.a.cross(n,a,e),l.a.normalize(n,n),c.setAxisAngle(t,n,Math.PI),t):o>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(l.a.cross(n,e,i),t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=1+o,c.normalize(t,t))}),c.setAxes=(o=h.a.create(),function(t,e,i,n){return o[0]=i[0],o[3]=i[1],o[6]=i[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],c.normalize(t,c.fromMat3(t,o))}),c.clone=u.a.clone,c.fromValues=u.a.fromValues,c.copy=u.a.copy,c.set=u.a.set,c.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},c.setAxisAngle=function(t,e,i){i*=.5;var n=Math.sin(i);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(i),t},c.add=u.a.add,c.multiply=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=i[0],l=i[1],u=i[2],h=i[3];return t[0]=n*h+o*s+r*u-a*l,t[1]=r*h+o*l+a*s-n*u,t[2]=a*h+o*u+n*l-r*s,t[3]=o*h-n*s-r*l-a*u,t},c.mul=c.multiply,c.scale=u.a.scale,c.rotateX=function(t,e,i){i*=.5;var n=e[0],r=e[1],a=e[2],o=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l+o*s,t[1]=r*l+a*s,t[2]=a*l-r*s,t[3]=o*l-n*s,t},c.rotateY=function(t,e,i){i*=.5;var n=e[0],r=e[1],a=e[2],o=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l-a*s,t[1]=r*l+o*s,t[2]=a*l+n*s,t[3]=o*l-r*s,t},c.rotateZ=function(t,e,i){i*=.5;var n=e[0],r=e[1],a=e[2],o=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l+r*s,t[1]=r*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},c.calculateW=function(t,e){var i=e[0],n=e[1],r=e[2];return t[0]=i,t[1]=n,t[2]=r,t[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),t},c.dot=u.a.dot,c.lerp=u.a.lerp,c.slerp=function(t,e,i,n){var r,a,o,s,l,u=e[0],h=e[1],c=e[2],d=e[3],f=i[0],p=i[1],g=i[2],m=i[3];return(a=u*f+h*p+c*g+d*m)<0&&(a=-a,f=-f,p=-p,g=-g,m=-m),1-a>1e-6?(r=Math.acos(a),o=Math.sin(r),s=Math.sin((1-n)*r)/o,l=Math.sin(n*r)/o):(s=1-n,l=n),t[0]=s*u+l*f,t[1]=s*h+l*p,t[2]=s*c+l*g,t[3]=s*d+l*m,t},c.invert=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=i*i+n*n+r*r+a*a,s=o?1/o:0;return t[0]=-i*s,t[1]=-n*s,t[2]=-r*s,t[3]=a*s,t},c.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},c.length=u.a.length,c.len=c.length,c.squaredLength=u.a.squaredLength,c.sqrLen=c.squaredLength,c.normalize=u.a.normalize,c.fromMat3=function(t,e){var i,n=e[0]+e[4]+e[8];if(n>0)i=Math.sqrt(n+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var a=(r+1)%3,o=(r+2)%3;i=Math.sqrt(e[3*r+r]-e[3*a+a]-e[3*o+o]+1),t[r]=.5*i,i=.5/i,t[3]=(e[3*a+o]-e[3*o+a])*i,t[a]=(e[3*a+r]+e[3*r+a])*i,t[o]=(e[3*o+r]+e[3*r+o])*i}return t},e.a=c},function(t,e,i){"use strict";var n,r=i(55),a=i(34),o=function(t,e,i,n){t=t||0,e=e||0,i=i||0,n=void 0===n?1:n,this.array=r.a.fromValues(t,e,i,n),this._dirty=!0};o.prototype={constructor:o,add:function(t){return r.a.add(this.array,this.array,t.array),this._dirty=!0,this},calculateW:function(){return r.a.calculateW(this.array,this.array),this._dirty=!0,this},set:function(t,e,i,n){return this.array[0]=t,this.array[1]=e,this.array[2]=i,this.array[3]=n,this._dirty=!0,this},setArray:function(t){return this.array[0]=t[0],this.array[1]=t[1],this.array[2]=t[2],this.array[3]=t[3],this._dirty=!0,this},clone:function(){return new o(this.x,this.y,this.z,this.w)},conjugate:function(){return r.a.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(t){return r.a.copy(this.array,t.array),this._dirty=!0,this},dot:function(t){return r.a.dot(this.array,t.array)},fromMat3:function(t){return r.a.fromMat3(this.array,t.array),this._dirty=!0,this},fromMat4:(n=a.a.create(),function(t){return a.a.fromMat4(n,t.array),a.a.transpose(n,n),r.a.fromMat3(this.array,n),this._dirty=!0,this}),identity:function(){return r.a.identity(this.array),this._dirty=!0,this},invert:function(){return r.a.invert(this.array,this.array),this._dirty=!0,this},len:function(){return r.a.len(this.array)},length:function(){return r.a.length(this.array)},lerp:function(t,e,i){return r.a.lerp(this.array,t.array,e.array,i),this._dirty=!0,this},mul:function(t){return r.a.mul(this.array,this.array,t.array),this._dirty=!0,this},mulLeft:function(t){return r.a.multiply(this.array,t.array,this.array),this._dirty=!0,this},multiply:function(t){return r.a.multiply(this.array,this.array,t.array),this._dirty=!0,this},multiplyLeft:function(t){return r.a.multiply(this.array,t.array,this.array),this._dirty=!0,this},normalize:function(){return r.a.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(t){return r.a.rotateX(this.array,this.array,t),this._dirty=!0,this},rotateY:function(t){return r.a.rotateY(this.array,this.array,t),this._dirty=!0,this},rotateZ:function(t){return r.a.rotateZ(this.array,this.array,t),this._dirty=!0,this},rotationTo:function(t,e){return r.a.rotationTo(this.array,t.array,e.array),this._dirty=!0,this},setAxes:function(t,e,i){return r.a.setAxes(this.array,t.array,e.array,i.array),this._dirty=!0,this},setAxisAngle:function(t,e){return r.a.setAxisAngle(this.array,t.array,e),this._dirty=!0,this},slerp:function(t,e,i){return r.a.slerp(this.array,t.array,e.array,i),this._dirty=!0,this},sqrLen:function(){return r.a.sqrLen(this.array)},squaredLength:function(){return r.a.squaredLength(this.array)},fromEuler:function(t,e){return o.fromEuler(this,t,e)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var s=Object.defineProperty;if(s){var l=o.prototype;s(l,"x",{get:function(){return this.array[0]},set:function(t){this.array[0]=t,this._dirty=!0}}),s(l,"y",{get:function(){return this.array[1]},set:function(t){this.array[1]=t,this._dirty=!0}}),s(l,"z",{get:function(){return this.array[2]},set:function(t){this.array[2]=t,this._dirty=!0}}),s(l,"w",{get:function(){return this.array[3]},set:function(t){this.array[3]=t,this._dirty=!0}})}o.add=function(t,e,i){return r.a.add(t.array,e.array,i.array),t._dirty=!0,t},o.set=function(t,e,i,n,a){r.a.set(t.array,e,i,n,a),t._dirty=!0},o.copy=function(t,e){return r.a.copy(t.array,e.array),t._dirty=!0,t},o.calculateW=function(t,e){return r.a.calculateW(t.array,e.array),t._dirty=!0,t},o.conjugate=function(t,e){return r.a.conjugate(t.array,e.array),t._dirty=!0,t},o.identity=function(t){return r.a.identity(t.array),t._dirty=!0,t},o.invert=function(t,e){return r.a.invert(t.array,e.array),t._dirty=!0,t},o.dot=function(t,e){return r.a.dot(t.array,e.array)},o.len=function(t){return r.a.length(t.array)},o.lerp=function(t,e,i,n){return r.a.lerp(t.array,e.array,i.array,n),t._dirty=!0,t},o.slerp=function(t,e,i,n){return r.a.slerp(t.array,e.array,i.array,n),t._dirty=!0,t},o.multiply=o.mul=function(t,e,i){return r.a.multiply(t.array,e.array,i.array),t._dirty=!0,t},o.rotateX=function(t,e,i){return r.a.rotateX(t.array,e.array,i),t._dirty=!0,t},o.rotateY=function(t,e,i){return r.a.rotateY(t.array,e.array,i),t._dirty=!0,t},o.rotateZ=function(t,e,i){return r.a.rotateZ(t.array,e.array,i),t._dirty=!0,t},o.setAxisAngle=function(t,e,i){return r.a.setAxisAngle(t.array,e.array,i),t._dirty=!0,t},o.normalize=function(t,e){return r.a.normalize(t.array,e.array),t._dirty=!0,t},o.squaredLength=o.sqrLen=function(t){return r.a.sqrLen(t.array)},o.fromMat3=function(t,e){return r.a.fromMat3(t.array,e.array),t._dirty=!0,t},o.setAxes=function(t,e,i,n){return r.a.setAxes(t.array,e.array,i.array,n.array),t._dirty=!0,t},o.rotationTo=function(t,e,i){return r.a.rotationTo(t.array,e.array,i.array),t._dirty=!0,t},o.fromEuler=function(t,e,i){t._dirty=!0,e=e.array;var n=t.array,r=Math.cos(e[0]/2),a=Math.cos(e[1]/2),o=Math.cos(e[2]/2),s=Math.sin(e[0]/2),l=Math.sin(e[1]/2),u=Math.sin(e[2]/2);switch(i=(i||"XYZ").toUpperCase()){case"XYZ":n[0]=s*a*o+r*l*u,n[1]=r*l*o-s*a*u,n[2]=r*a*u+s*l*o,n[3]=r*a*o-s*l*u;break;case"YXZ":n[0]=s*a*o+r*l*u,n[1]=r*l*o-s*a*u,n[2]=r*a*u-s*l*o,n[3]=r*a*o+s*l*u;break;case"ZXY":n[0]=s*a*o-r*l*u,n[1]=r*l*o+s*a*u,n[2]=r*a*u+s*l*o,n[3]=r*a*o-s*l*u;break;case"ZYX":n[0]=s*a*o-r*l*u,n[1]=r*l*o+s*a*u,n[2]=r*a*u-s*l*o,n[3]=r*a*o+s*l*u;break;case"YZX":n[0]=s*a*o+r*l*u,n[1]=r*l*o+s*a*u,n[2]=r*a*u-s*l*o,n[3]=r*a*o-s*l*u;break;case"XZY":n[0]=s*a*o-r*l*u,n[1]=r*l*o-s*a*u,n[2]=r*a*u+s*l*o,n[3]=r*a*o+s*l*u}},e.a=o},function(t,e,i){"use strict";var n=function(){this._contextId=0,this._caches=[],this._context={}};(n.prototype={use:function(t,e){var i=this._caches;i[t]||(i[t]={},e&&(i[t]=e())),this._contextId=t,this._context=i[t]},put:function(t,e){this._context[t]=e},get:function(t){return this._context[t]},dirty:function(t){var e="__dt__"+(t=t||"");this.put(e,!0)},dirtyAll:function(t){for(var e="__dt__"+(t=t||""),i=this._caches,n=0;n=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 r(e),s.key=t,i.insertEntry(s),n[t]=s}return a},o.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;t.exports=s},function(t,e,i){"use strict";var n=i(5),r=i(27),a=i(14),o=i(62),s=i(75),l=i(36),u=i(122),h=i(123),c={loadTexture:function(t,e,i,a){var o;if("function"==typeof e?(a=i=e,e={}):e=e||{},"string"==typeof t){if(t.match(/.hdr$/)||"hdr"===e.fileType)return o=new n.a({width:0,height:0,sRGB:!1}),c._fetchTexture(t,(function(t){h.a.parseRGBE(t,o,e.exposure),o.dirty(),i&&i(o)}),a),o;t.match(/.dds$/)||"dds"===e.fileType?(o=new n.a({width:0,height:0}),c._fetchTexture(t,(function(t){u.a.parse(t,o),o.dirty(),i&&i(o)}),a)):((o=new n.a).load(t),o.success(i),o.error(a))}else"object"==typeof t&&void 0!==t.px&&((o=new r.a).load(t),o.success(i),o.error(a));return o},loadPanorama:function(t,e,i,n,r,a){var o=this;"function"==typeof n?(a=r=n,n={}):n=n||{},c.loadTexture(e,n,(function(e){e.flipY=n.flipY||!1,o.panoramaToCubeMap(t,e,i,n),e.dispose(t),r&&r(i)}),a)},panoramaToCubeMap:function(t,e,i,n){var r=new o.a,a=new s.a({scene:new l.a});return a.setEnvironmentMap(e),(n=n||{}).encodeRGBM&&a.material.define("fragment","RGBM_ENCODE"),i.sRGB=e.sRGB,r.texture=i,r.render(t,a.scene),r.texture=null,r.dispose(t),i},heightToNormal:function(t,e){var i=document.createElement("canvas"),n=i.width=t.width,r=i.height=t.height,a=i.getContext("2d");a.drawImage(t,0,0,n,r),e=e||!1;for(var o=a.getImageData(0,0,n,r),s=a.createImageData(n,r),l=0;l20)return console.warn("Given image is not a height map"),t}var d,f,p,g;l%(4*n)==0?(d=o.data[l],p=o.data[l+4]):l%(4*n)==4*(n-1)?(d=o.data[l-4],p=o.data[l]):(d=o.data[l-4],p=o.data[l+4]),l<4*n?(f=o.data[l],g=o.data[l+4*n]):l>n*(r-1)*4?(f=o.data[l-4*n],g=o.data[l]):(f=o.data[l-4*n],g=o.data[l+4*n]),s.data[l]=d-p+127,s.data[l+1]=f-g+127,s.data[l+2]=255,s.data[l+3]=255}return a.putImageData(s,0,0),i},isHeightImage:function(t,e,i){if(!t||!t.width||!t.height)return!1;var n=document.createElement("canvas"),r=n.getContext("2d"),a=e||32;i=i||20,n.width=n.height=a,r.drawImage(t,0,0,a,a);for(var o=r.getImageData(0,0,a,a),s=0;si)return!1}return!0},_fetchTexture:function(t,e,i){a.a.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:i})},createChessboard:function(t,e,i,r){t=t||512,e=e||64,i=i||"black",r=r||"white";var a=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var s=o.getContext("2d");s.fillStyle=r,s.fillRect(0,0,t,t),s.fillStyle=i;for(var l=0;l65535?new Uint32Array(3*s):new Uint16Array(3*s),f.material.shader!==e&&f.material.attachShader(e,!0),a.a.setMaterialFromModel(e.__shading,f.material,t,i),l>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(l),this._linesMesh.geometry.setTriangleCount(u)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-n))},_updateRegionMesh:function(t,e,i,n){for(var r=t.getData(),o=0,s=0,u=!1,h=this._polygonMesh,c=this._linesMesh,d=i;d0;S&&(T*=e.getDevicePixelRatio(),this._updateLinesGeometry(c.geometry,t,d,x,T,t.coordinateSystem.transform)),c.invisible=!S,c.material.set({color:_})}(h=this._polygonMesh).material.transparent=u,h.material.depthMask=!u,h.geometry.updateBoundingBox(),h.frontFace=this.extrudeY?a.a.Mesh.CCW:a.a.Mesh.CW,h.material.get("normalMap")&&h.geometry.generateTangents(),h.seriesIndex=t.seriesIndex,h.on("mousemove",this._onmousemove,this),h.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var i=a.a.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),n=l.a.firstNotNull(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",i),r.material.set("wireframeLineWidth",n)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,i){var n=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!n.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(console.warn("Unkown shading "+r),o=this._groundMaterials.lambert),a.a.setMaterialFromModel(r,o,n,i),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",a.a.parseColor(n.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,i){this._triangulationResults=[];for(var n=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],a=t.coordinateSystem,s=e;s1?n:0,P[G][v]=C.points[U+2],l.set(r+G,P[G]),s?(N[0]=(C.points[U]*_[0]-y[0])/b,N[1]=(C.points[U+2]*_[v]-y[v])/b):(N[0]=(H?k:k+V)/b,N[1]=(P[G][m]*_[m]-y[m])/b),h.set(r+G,N)}for(f.sub(D,P[1],P[0]),f.sub(O,P[3],P[0]),f.cross(R,D,O),f.normalize(R,R),G=0;G<4;G++)u.set(r+G,R),p&&c.set(r+G,o);for(G=0;G<6;G++)g[3*a+G]=E[G]+r;r+=4,a+=2,k+=V}}return e.dirty(),{vertexOffset:r,triangleOffset:a}},_getRegionLinesInfo:function(t,e,i){var n=0,r=0;return e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,a=t.interiors;n+=i.getPolylineVertexCount(e),r+=i.getPolylineTriangleCount(e);for(var o=0;othis._endIndex)){e-=this._startIndex;for(var n=this._vertexRangeOfDataIndex[2*e];n=2e4},doSortTriangles:function(t,e){var i=this.indices;if(0===e){var n=this.attributes.position;t=t.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new i.constructor(i.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var l,u=0,h=0;h0,i={},n=0;n2?(m=this._updateSymbolSprite(t,p,d,f),u.enableTexture("sprite")):u.disableTexture("sprite"),c.position.init(r-n);var v=[];if(g){u.undefine("VERTEX_SIZE"),u.undefine("VERTEX_COLOR");var _=l.getVisual("color"),y=l.getVisual("opacity");a.a.parseColor(_,v),v[3]*=y,u.set({color:v,u_Size:d.maxSize*this._sizeScale})}else u.set({color:[1,1,1,1]}),u.define("VERTEX_SIZE"),u.define("VERTEX_COLOR"),c.size.init(r-n),c.color.init(r-n),this._originalOpacity=new Float32Array(r-n);for(var x=l.getLayout("points"),b=c.position.value,w=0;w1?(s[0]=i.maxSize,s[1]=i.maxSize/i.aspect):(s[1]=i.maxSize,s[0]=i.maxSize*i.aspect),s[0]=s[0]||1,s[1]=s[1]||1,this._symbolType===i.type&&(r=this._symbolSize,a=s,r&&a&&r[0]===a[0]&&r[1]===a[1])&&this._lineWidth===e.lineWidth||(o.a.createSymbolSprite(i.type,s,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(s[0]/2,10)},this._spriteImageCanvas),o.a.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=i.type,this._symbolSize=s,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/i.maxSize*n},_updateMaterial:function(t,e){var i="lighter"===t.get("blendMode")?a.a.additiveBlend:null,n=this._mesh.material;n.blend=i,n.set("lineWidth",e.lineWidth/20);var r=a.a.parseColor(e.stroke);n.set("strokeColor",r),n.transparent=!0,n.depthMask=!1,n.depthTest=!this.is2D,n.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,i){var n=t.getData(),r=this._mesh.geometry,a=r.attributes.position.value,o=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(n,e,i),this._labelsBuilder.getLabelPosition=function(t,i,n){var r=3*(t-e);return[a[r],a[r+1],a[r+2]]},this._labelsBuilder.getLabelDistance=function(t,i,n){return r.attributes.size.get(t-e)/o/2+n},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){a.a.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,i){var n,r=t.getData(),a=this._mesh,o=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(n=t.coordinateSystem.model),a.seriesIndex=t.seriesIndex,a.off("mousemove"),a.off("mouseout"),a.on("mousemove",(function(e){var u=e.vertexIndex+o._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&i.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:n.componentIndex})),a.dataIndex=u,s=u}),this),a.on("mouseout",(function(t){var e=t.vertexIndex+o._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,a.dataIndex=-1,l&&i.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:n.componentIndex})}),this)},updateLayout:function(t,e,i){var n=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,a=n.getLayout("points");if(this.is2D)for(var o=0;othis._endDataIndex||ethis._endDataIndex||e.05&&(a=!0),f!==o&&(s=!0),o=f,n=c}return a&&console.warn("Different symbol width / height ratio will be ignored."),s&&console.warn("Different symbol type will be ignored."),{maxSize:l,type:o,aspect:n}}},e.a=c},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";var n=i(114),r=function(t){this._list=new n.a,this._map={},this._maxSize=t||10};r.prototype.setMaxSize=function(t){this._maxSize=t},r.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var i=this._list.length();if(i>=this._maxSize&&i>0){var n=this._list.head;this._list.remove(n),delete this._map[n.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},r.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},r.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},r.prototype.clear=function(){this._list.clear(),this._map={}},e.a=r},function(t,e,i){"use strict";var n,r=i(20),a={create:function(){var t=new r.a(2);return t[0]=0,t[1]=0,t},clone:function(t){var e=new r.a(2);return e[0]=t[0],e[1]=t[1],e},fromValues:function(t,e){var i=new r.a(2);return i[0]=t,i[1]=e,i},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},subtract:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}};a.sub=a.subtract,a.multiply=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},a.mul=a.multiply,a.divide=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},a.div=a.divide,a.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},a.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},a.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},a.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},a.distance=function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)},a.dist=a.distance,a.squaredDistance=function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n},a.sqrDist=a.squaredDistance,a.length=function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},a.len=a.length,a.squaredLength=function(t){var e=t[0],i=t[1];return e*e+i*i},a.sqrLen=a.squaredLength,a.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},a.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},a.normalize=function(t,e){var i=e[0],n=e[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},a.cross=function(t,e,i){var n=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=n,t},a.lerp=function(t,e,i,n){var r=e[0],a=e[1];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t},a.random=function(t,e){e=e||1;var i=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t},a.transformMat2=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r,t[1]=i[1]*n+i[3]*r,t},a.transformMat2d=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},a.transformMat3=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[3]*r+i[6],t[1]=i[1]*n+i[4]*r+i[7],t},a.transformMat4=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t},a.forEach=(n=a.create(),function(t,e,i,r,a,o){var s,l;for(e||(e=2),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=r.a.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(n=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=r.a.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}};e.a=n},function(t,e,i){"use strict";var n,r,a,o,s=i(3),l=i(21),u=i(12),h=i(33),c=function(t,e){this.normal=t||new s.a(0,1,0),this.distance=e||0};c.prototype={constructor:c,distanceToPoint:function(t){return u.a.dot(t.array,this.normal.array)-this.distance},projectPoint:function(t,e){e||(e=new s.a);var i=this.distanceToPoint(t);return u.a.scaleAndAdd(e.array,t.array,this.normal.array,-i),e._dirty=!0,e},normalize:function(){var t=1/u.a.len(this.normal.array);u.a.scale(this.normal.array,t),this.distance*=t},intersectFrustum:function(t){for(var e=t.vertices,i=this.normal.array,n=u.a.dot(e[0].array,i)>this.distance,r=1;r<8;r++)if(u.a.dot(e[r].array,i)>this.distance!=n)return!0},intersectLine:(o=u.a.create(),function(t,e,i){var n=this.distanceToPoint(t),r=this.distanceToPoint(e);if(n>0&&r>0||n<0&&r<0)return null;var a=this.normal.array,l=this.distance,h=t.array;u.a.sub(o,e.array,t.array),u.a.normalize(o,o);var c=u.a.dot(a,o);if(0===c)return null;i||(i=new s.a);var d=(u.a.dot(a,h)-l)/c;return u.a.scaleAndAdd(i.array,h,o,-d),i._dirty=!0,i}),applyTransform:(n=l.a.create(),r=h.a.create(),a=h.a.create(),a[3]=1,function(t){t=t.array,u.a.scale(a,this.normal.array,this.distance),h.a.transformMat4(a,a,t),this.distance=u.a.dot(a,this.normal.array),l.a.invert(n,t),l.a.transpose(n,n),r[3]=0,u.a.copy(r,this.normal.array),h.a.transformMat4(r,r,n),u.a.copy(this.normal.array,r)}),copy:function(t){u.a.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new c;return t.copy(this),t}},e.a=c},function(t,e,i){"use strict";var n=i(42);e.a=n.a},function(t,e,i){"use strict";var n=i(15),r=i(43),a=i(9),o=i(3),s=i(18),l=i(14),u=new a.a,h=n.a.extend({dynamic:!1,widthSegments:1,heightSegments:1,depthSegments:1,inside:!1},(function(){this.build()}),{build:function(){var t={px:c("px",this.depthSegments,this.heightSegments),nx:c("nx",this.depthSegments,this.heightSegments),py:c("py",this.widthSegments,this.depthSegments),ny:c("ny",this.widthSegments,this.depthSegments),pz:c("pz",this.widthSegments,this.heightSegments),nz:c("nz",this.widthSegments,this.heightSegments)},e=["position","texcoord0","normal"],i=0,n=0;for(var r in t)i+=t[r].vertexCount,n+=t[r].indices.length;for(var a=0;a>>16)>>>0;c=(((16711935&(c=((252645135&(c=((858993459&(c=((1431655765&c)<<1|(2863311530&c)>>>1)>>>0))<<2|(3435973836&c)>>>2)>>>0))<<4|(4042322160&c)>>>4)>>>0))<<8|(4278255360&c)>>>8)>>>0)/4294967296;var d=Math.sqrt((1-c)/(1+(u*u-1)*c));o[h]=d}for(h=0;ho&&(r=this._x=0,a+=this._rowHeight+l,this._y=a,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,i),a+i+l>s)return null;t.position[0]+=this.offsetX*this.dpr+r,t.position[1]+=this.offsetY*this.dpr+a,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/o+u[0],a/s+u[1]],[(r+e)/o+u[0],(a+i)/s+u[1]]]},_fitElement:function(t,e,i){var n=t.getBoundingRect(),r=e/n.width,a=i/n.height;t.position=[-n.x*r,-n.y*a],t.scale=[r,a],t.update()}},s.prototype={clear:function(){for(var t=0;t=t)){var r=(i+this._nodeWidth)*this._dpr,a=(n+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:a})}catch(t){this._canvas.width=r,this._canvas.height=a}var s=new o(this._zr,i,n,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(s),s}console.error("Too much labels. Some will be ignored.")},add:function(t,e,i){if(this._coords[t.id])return console.warn("Element already been add"),this._coords[t.id];var n=this._getCurrentNode().add(t,e,i);if(!n){var r=this._expand();if(!r)return;n=r.add(t,e,i)}return this._coords[t.id]=n,n},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]}},e.a=s},function(t,e,i){var n,r,a,o,s=i(83),l=i(84),u=s.applyTransform,h=Math.min,c=Math.max;function d(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}d.prototype={constructor:d,union:function(t){var e=h(t.x,this.x),i=h(t.y,this.y);this.width=c(t.x+t.width,this.x+this.width)-e,this.height=c(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(n=[],r=[],a=[],o=[],function(t){if(t){n[0]=a[0]=this.x,n[1]=o[1]=this.y,r[0]=o[0]=this.x+this.width,r[1]=a[1]=this.y+this.height,u(n,n,t),u(r,r,t),u(a,a,t),u(o,o,t),this.x=h(n[0],r[0],a[0],o[0]),this.y=h(n[1],r[1],a[1],o[1]);var e=c(n[0],r[0],a[0],o[0]),i=c(n[1],r[1],a[1],o[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=l.create();return l.translate(r,r,[-e.x,-e.y]),l.scale(r,r,[i,n]),l.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof d||(t=d.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(t){return new d(t.x,t.y,t.width,t.height)};var f=d;t.exports=f},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array;function n(t){return Math.sqrt(a(t))}var r=n;function a(t){return t[0]*t[0]+t[1]*t[1]}var o=a;function s(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var l=s;function u(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var h=u;e.create=function(t,e){var n=new i(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,i){return t[0]=e,t[1]=i,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},e.sub=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},e.len=n,e.length=r,e.lenSquare=a,e.lengthSquare=o,e.mul=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},e.div=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},e.normalize=function(t,e){var i=n(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},e.distance=s,e.dist=l,e.distanceSquare=u,e.distSquare=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},e.applyTransform=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array;function n(){var t=new i(6);return r(t),t}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}e.create=n,e.identity=r,e.copy=a,e.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},e.translate=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},e.rotate=function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t},e.scale=function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},e.invert=function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null},e.clone=function(t){var e=n();return a(e,t),e}},function(t,e,i){var n=i(13),r=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function a(t){return Math.floor(Math.log(t)/Math.LN10)}e.linearMap=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},e.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},e.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},e.asc=function(t){return t.sort((function(t,e){return t-e})),t},e.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},e.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},e.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},e.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var r=n.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var a=Math.pow(10,i),o=n.map(t,(function(t){return(isNaN(t)?0:t)/r*a*100})),s=100*a,l=n.map(o,(function(t){return Math.floor(t)})),u=n.reduce(l,(function(t,e){return t+e}),0),h=n.map(o,(function(t,e){return t-l[e]}));uc&&(c=h[f],d=f);++l[d],h[d]=0,++u}return l[e]/a},e.MAX_SAFE_INTEGER=9007199254740991,e.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},e.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},e.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=r.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},e.quantity=function(t){return Math.pow(10,a(t))},e.nice=function(t,e){var i=a(t),n=Math.pow(10,i),r=t/n;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},e.reformIntervals=function(t){t.sort((function(t,e){return function t(e,i,n){return e.interval[n]=0}},function(t,e,i){"use strict";var n=i(5),r=i(11),a=i(23),o=function(){this._pool={},this._allocatedTextures=[]};o.prototype={constructor:o,get:function(t){var e=u(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]);var i=this._pool[e];if(!i.length){var r=new n.a(t);return this._allocatedTextures.push(r),r}return i.pop()},put:function(t){var e=u(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]),this._pool[e].push(t)},clear:function(t){for(var e=0;ec&&u.push({pivot:Math.floor((h+c)/2),left:c,right:h}),c=s[l].pivot+1,(h=s[l].right)>c&&u.push({pivot:Math.floor((h+c)/2),left:c,right:h})}s=this._parts=u}else for(l=0;l50&&(o=1e3);var s=[];n.perspective(s,r,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(s),this.viewGL.camera.decomposeProjectionMatrix(),s=n.identity([]);var l=this.dataToPoint(this.center);n.scale(s,s,[1,-1,1]),n.translate(s,s,[0,0,-t]),n.rotateX(s,s,e),n.rotateZ(s,s,-this.bearing/180*Math.PI),n.translate(s,s,[-l[0]*this.getScale()*.1,-l[1]*this.getScale()*.1,0]),this.viewGL.camera.viewMatrix.array=s;var u=[];n.invert(u,s),this.viewGL.camera.worldTransform.array=u,this.viewGL.camera.decomposeWorldTransform();var h,c=512*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var d=this.altitudeExtent[1]-this.altitudeExtent[0];h=this.boxHeight/d*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else h=c/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*.1;this.viewGL.rootNode.scale.set(.1*this.getScale(),.1*this.getScale(),h)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,512*this.getScale(),e)},projectOnTileWithScale:function(t,e,i){var n=t[0],r=t[1]*a/180,o=e*(n*a/180+a)/(2*a),s=e*(a-Math.log(Math.tan(a/4+.5*r)))/(2*a);return(i=i||[])[0]=o,i[1]=s,i},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,512*this.getScale(),e)},unprojectOnTileWithScale:function(t,e,i){var n=t[0],r=t[1],o=n/e*(2*a)-a,s=2*(Math.atan(Math.exp(a-r/e*(2*a)))-a/4);return(i=i||[])[0]=180*o/a,i[1]=180*s/a,i},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,512,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}},e.a=o},function(t,e,i){"use strict";var n=i(2),r=i(1),a=i(22);e.a=function(t,e,i){function o(t,e){var i=e.getWidth(),n=e.getHeight(),r=e.getDevicePixelRatio();this.viewGL.setViewport(0,0,i,n,r),this.width=i,this.height=n,this.altitudeScale=t.get("altitudeScale"),this.boxHeight=t.get("boxHeight")}function s(t,e){if("auto"!==this.model.get("boxHeight")){var i=[1/0,-1/0];t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),n=t.coordDimToDataDim("alt")[0];if(n){var r=e.getDataExtent(n,!0);i[0]=Math.min(i[0],r[0]),i[1]=Math.max(i[1],r[1])}}}),this),i&&isFinite(i[1]-i[0])&&(this.altitudeExtent=i)}}return{dimensions:e.prototype.dimensions,create:function(l,u){var h=[];return l.eachComponent(t,(function(t){var i=t.__viewGL;i||(i=t.__viewGL=new a.a).setRootNode(new r.a.Node);var n=new e;n.viewGL=t.__viewGL,n.resize=o,n.resize(t,u),h.push(n),t.coordinateSystem=n,n.model=t,n.update=s})),l.eachSeries((function(e){if(e.get("coordinateSystem")===t){var i=e.getReferringComponents(t)[0];if(i||(i=l.getComponent(t)),!i)throw new Error(t+' "'+n.a.firstNotNull(e.get(t+"Index"),e.get(t+"Id"),0)+'" not found');e.coordinateSystem=i.coordinateSystem}})),i&&i(h,l,u),h}}}},function(t,e,i){"use strict";e.a="\n@export ecgl.displayShadow.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_WorldPosition;\n\nvarying vec3 v_Normal;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n\n v_WorldPosition = (world * vec4(position, 1.0)).xyz;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n\n@end\n\n\n@export ecgl.displayShadow.fragment\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform float roughness: 0.2;\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.ssaoMap.header\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n float shadow = 1.0;\n\n @import ecgl.common.ssaoMap.main\n\n#if defined(DIRECTIONAL_LIGHT_COUNT) && defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n for (int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++) {\n shadow = min(shadow, shadowContribsDir[i] * 0.5 + 0.5);\n }\n#endif\n\n shadow *= 0.5 + ao * 0.5;\n shadow = clamp(shadow, 0.0, 1.0);\n\n gl_FragColor = vec4(vec3(0.0), 1.0 - shadow);\n}\n\n@end"},function(t,e,i){"use strict";var n=i(84),r=i.n(n),a=i(83),o=i.n(a);function s(t){this.viewGL=t}s.prototype.reset=function(t,e){this._updateCamera(e.getWidth(),e.getHeight(),e.getDevicePixelRatio()),this._viewTransform=r.a.create(),this.updateTransform(t,e)},s.prototype.updateTransform=function(t,e){var i=t.coordinateSystem;i.getRoamTransform&&(r.a.invert(this._viewTransform,i.getRoamTransform()),this._setCameraTransform(this._viewTransform),e.getZr().refresh())},s.prototype.dataToPoint=function(t,e,i){i=t.dataToPoint(e,null,i);var n=this._viewTransform;n&&o.a.applyTransform(i,i,n)},s.prototype.removeTransformInPoint=function(t){return this._viewTransform&&o.a.applyTransform(t,t,this._viewTransform),t},s.prototype.getZoom=function(){if(this._viewTransform){var t=this._viewTransform;return 1/Math.max(Math.sqrt(t[0]*t[0]+t[1]*t[1]),Math.sqrt(t[2]*t[2]+t[3]*t[3]))}return 1},s.prototype._setCameraTransform=function(t){var e=this.viewGL.camera;e.position.set(t[4],t[5],0),e.scale.set(Math.sqrt(t[0]*t[0]+t[1]*t[1]),Math.sqrt(t[2]*t[2]+t[3]*t[3]),1)},s.prototype._updateCamera=function(t,e,i){this.viewGL.setViewport(0,0,t,e,i);var n=this.viewGL.camera;n.left=n.top=0,n.bottom=e,n.right=t,n.near=0,n.far=100},e.a=s},function(t,e,i){(function(t){var i;"undefined"!=typeof window?i=window.__DEV__:void 0!==t&&(i=t.__DEV__),void 0===i&&(i=!0);var n=i;e.__DEV__=n}).call(e,i(68))},function(t,e,i){"use strict";var n,r,a,o,s,l,u,h=i(15),c=i(0),d=i.n(c),f=i(38),p=i(6).a.vec2,g=[[0,0],[1,1]],m=h.a.extend((function(){return{segmentScale:4,dynamic:!0,useNativeLine:!0,attributes:{position:new h.a.Attribute("position","float",2,"POSITION"),normal:new h.a.Attribute("normal","float",2),offset:new h.a.Attribute("offset","float",1),color:new h.a.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.offset.init(t),e.normal.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,i,n){return 1/(p.dist(t,e)+p.dist(i,e)+p.dist(n,i)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(g)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(g)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,i,n,r,a){null==a&&(a=1);var o=t[0],s=t[1],l=e[0],u=e[1],h=i[0],c=i[1],d=n[0],f=n[1],p=this._getCubicCurveApproxStep(t,e,i,n),g=p*p,m=g*p,v=3*p,_=3*g,y=6*g,x=6*m,b=o-2*l+h,w=s-2*u+c,T=3*(l-h)-o+d,S=3*(u-c)-s+f,M=o,A=s,C=(l-o)*v+b*_+T*m,I=(u-s)*v+w*_+S*m,L=b*y+T*x,E=w*y+S*x,P=T*x,D=S*x,O=0,R=0,N=Math.ceil(1/p),k=new Float32Array(3*(N+1)),z=(k=[],0);for(R=0;R1&&(M=C>0?Math.min(M,d):Math.max(M,d),A=I>0?Math.min(A,f):Math.max(A,f));this.addPolyline(k,r,a)},addLine:function(t,e,i,n){this.addPolyline([t,e],i,n)},addPolyline:(n=p.create(),r=p.create(),a=p.create(),o=p.create(),s=[],l=[],u=[],function(t,e,i,h,c){if(t.length){var d="number"!=typeof t[0];if(null==c&&(c=d?t.length:t.length/2),!(c<2)){null==h&&(h=0),null==i&&(i=1),this._itemVertexOffsets.push(this._vertexOffset);for(var f,g=d?"number"!=typeof e[0]:e.length/4===c,m=this.attributes.position,v=this.attributes.color,_=this.attributes.offset,y=this.attributes.normal,x=this.indices,b=this._vertexOffset,w=0;w1&&(m.copy(b,b-1),v.copy(b,b-1),b++);else{var M;if(w0){p.sub(n,s,u),p.sub(r,l,s),p.normalize(n,n),p.normalize(r,r),p.add(o,n,r),p.normalize(o,o);var A=i/2*Math.min(1/p.dot(n,o),2);a[0]=-o[1],a[1]=o[0],M=A}else p.sub(n,l,s),p.normalize(n,n),a[0]=-n[1],a[1]=n[0],M=i/2;else p.sub(n,s,u),p.normalize(n,n),a[0]=-n[1],a[1]=n[0],M=i/2;y.set(b,a),y.set(b+1,a),_.set(b,M),_.set(b+1,-M),p.copy(u,s),m.set(b,s),m.set(b+1,s),v.set(b,f),v.set(b+1,f),b+=2}if(this.useNativeLine)v.set(b,f),m.set(b,s),b++;else if(w>0){var C=3*this._faceOffset;(x=this.indices)[C]=b-4,x[C+1]=b-3,x[C+2]=b-2,x[C+3]=b-3,x[C+4]=b-1,x[C+5]=b-2,this._faceOffset+=2}}this._vertexOffset=b}}}),setItemColor:function(t,e){for(var i=this._itemVertexOffsets[t],n=tt&&o=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var i=this.zr;t.scene.traverse((function(t){t.__zr=i,t.addAnimatorsToZr&&t.addAnimatorsToZr(i)}))}},d.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(f,this),t.layer=null,this._viewsToDispose.push(t))}},d.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(f,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},d.prototype.resize=function(t,e){this.renderer.resize(t,e)},d.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},d.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},d.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},d.prototype.needsRefresh=function(){this.zr.refresh()},d.prototype.refresh=function(t){this._backgroundColor=t?l.a.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var n=this.pickObject(t.offsetX,t.offsetY);n&&(this._dispatchEvent(t.type,t,n),this._dispatchDataEvent(t.type,t,n));var r=this._clickToSetFocusPoint(t);r&&r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},d.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,i=e.viewport,n=this.views.length-1;n>=0;n--){var r=this.views[n];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var a=this._picking.pick(t.offsetX,t.offsetY,!0);if(a)return a.view=r,a}}e.viewport=i},d.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},d.prototype.pickObject=function(t,e){for(var i=[],n=this.renderer,r=n.viewport,a=0;a=0&&(l.dataIndex=this._lastDataIndex,l.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0):null!=o&&o!==this._lastEventData&&(null!=this._lastEventData&&(l.eventData=this._lastEventData,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0),this._lastEventData=o,this._lastDataIndex=r,this._lastSeriesIndex=a),l.eventData=o,l.dataIndex=r,l.seriesIndex=a,(null!=o||parseInt(r,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(u,t,e),s&&this.zr.handler.dispatchToElement(u,"mouseover",e))},d.prototype._dispatchToView=function(t,e){for(var i=0;i=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}}},function(t,e,i){"use strict";var n=i(69),r={},a={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function s(t){return t<0?0:t>1?1:t}function l(t){return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100*255):o(parseInt(t,10))}function u(t){return t.length&&"%"===t.charAt(t.length-1)?s(parseFloat(t)/100):s(parseFloat(t))}function h(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function c(t,e,i){return t+(e-t)*i}function d(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new n.a(20),g=null;function m(t,e){g&&f(g,e),g=p.put(t,g||e.slice())}function v(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=u(t[1]),r=u(t[2]),a=r<=.5?r*(n+1):r+n-r*n,s=2*r-a;return d(e=e||[],o(255*h(s,a,i+1/3)),o(255*h(s,a,i)),o(255*h(s,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}r.parse=function(t,e){if(t){e=e||[];var i=p.get(t);if(i)return f(e,i);var n,r=(t+="").replace(/ /g,"").toLowerCase();if(r in a)return f(e,a[r]),m(t,e),e;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(d(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),m(t,e),e):void d(e,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(d(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),m(t,e),e):void d(e,0,0,0,1):void 0;var o=r.indexOf("("),s=r.indexOf(")");if(-1!==o&&s+1===r.length){var h=r.substr(0,o),c=r.substr(o+1,s-(o+1)).split(","),g=1;switch(h){case"rgba":if(4!==c.length)return void d(e,0,0,0,1);g=u(c.pop());case"rgb":return 3!==c.length?void d(e,0,0,0,1):(d(e,l(c[0]),l(c[1]),l(c[2]),g),m(t,e),e);case"hsla":return 4!==c.length?void d(e,0,0,0,1):(c[3]=u(c[3]),v(c,e),m(t,e),e);case"hsl":return 3!==c.length?void d(e,0,0,0,1):(v(c,e),m(t,e),e);default:return}}d(e,0,0,0,1)}},r.parseToFloat=function(t,e){if(e=r.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},r.lift=function(t,e){var i=r.parse(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return r.stringify(i,4===i.length?"rgba":"rgb")}},r.toHex=function(t){var e=r.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},r.fastLerp=function(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),l=e[r],u=e[a],h=n-r;return i[0]=o(c(l[0],u[0],h)),i[1]=o(c(l[1],u[1],h)),i[2]=o(c(l[2],u[2],h)),i[3]=s(c(l[3],u[3],h)),i}},r.fastMapToColor=r.fastLerp,r.lerp=function(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),a=Math.floor(n),l=Math.ceil(n),u=r.parse(e[a]),h=r.parse(e[l]),d=n-a,f=r.stringify([o(c(u[0],h[0],d)),o(c(u[1],h[1],d)),o(c(u[2],h[2],d)),s(c(u[3],h[3],d))],"rgba");return i?{color:f,leftIndex:a,rightIndex:l,value:n}:f}},r.mapToColor=r.lerp,r.modifyHSL=function(t,e,i,n){if(t=r.parse(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(a=e,(a=Math.round(a))<0?0:a>360?360:a)),null!=i&&(t[1]=u(i)),null!=n&&(t[2]=u(n)),r.stringify(v(t),"rgba");var a},r.modifyAlpha=function(t,e){if((t=r.parse(t))&&null!=e)return t[3]=s(e),r.stringify(t,"rgba")},r.stringify=function(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}},e.a=r},function(t,e,i){"use strict";var n=function(){this.head=null,this.tail=null,this._length=0};n.prototype.insert=function(t){var e=new n.Entry(t);return this.insertEntry(e),e},n.prototype.insertAt=function(t,e){if(!(t<0)){for(var i=this.head,r=0;i&&r!=t;)i=i.next,r++;if(i){var a=new n.Entry(e),o=i.prev;o?(o.next=a,a.prev=o):this.head=a,a.next=i,i.prev=a}else this.insert(e)}},n.prototype.insertBeforeEntry=function(t,e){var i=new n.Entry(t),r=e.prev;r?(r.next=i,i.prev=r):this.head=i,i.next=e,e.prev=i,this._length++},n.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},n.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._length--},n.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,i=0;e&&i!=t;)e=e.next,i++;return e?(this.remove(e),e.value):void 0}},n.prototype.getHead=function(){if(this.head)return this.head.value},n.prototype.getTail=function(){if(this.tail)return this.tail.value},n.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,i=0;e&&i!=t;)e=e.next,i++;return e.value}},n.prototype.indexOf=function(t){for(var e=this.head,i=0;e;){if(e.value===t)return i;e=e.next,i++}},n.prototype.length=function(){return this._length},n.prototype.isEmpty=function(){return 0===this._length},n.prototype.forEach=function(t,e){for(var i=this.head,n=0,r=void 0!==e;i;)r?t.call(e,i.value,n):t(i.value,n),i=i.next,n++},n.prototype.clear=function(){this.tail=this.head=null,this._length=0},n.Entry=function(t){this.value=t,this.next=null,this.prev=null},e.a=n},function(t,e,i){"use strict";var n=i(116),r=/for\s*?\(int\s*?_idx_\s*\=\s*([\w-]+)\;\s*_idx_\s*<\s*([\w-]+);\s*_idx_\s*\+\+\s*\)\s*\{\{([\s\S]+?)(?=\}\})\}\}/g;function a(t,e,i){var n={};for(var a in i)n[a+"_COUNT"]=i[a];return t.replace(r,(function(t,i,r,a){var o="";isNaN(i)&&(i=i in e?e[i]:n[i]),isNaN(r)&&(r=r in e?e[r]:n[r]);for(var s=parseInt(i);s0&&n.push("#define "+r.toUpperCase()+"_COUNT "+a)}if(i)for(var o=0;oh.getMaxJointNumber()&&(p.USE_SKIN_MATRICES_TEXTURE=null),f="\n"+o(p)+"\n"}var g=f+o(e.vertexDefines,u,d),m=f+o(e.fragmentDefines,u,d),v=g+"\n"+e.shader.vertex,_=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=h.getGLExtension(t)}));_.indexOf("EXT_shader_texture_lod")>=0&&(m+="\n#define SUPPORT_TEXTURE_LOD"),_.indexOf("OES_standard_derivatives")>=0&&(m+="\n#define SUPPORT_STANDARD_DERIVATIVES");var y,x,b=function(t){for(var e=[],i=0;i=0&&A[S]>1e-4&&(g.a.transformMat4(L,M,w[C[S]]),g.a.scaleAndAdd(I,I,L,A[S]));E.set(T,I)}}for(T=0;T<_.length;T+=3){var P=_[T],D=_[T+1],O=_[T+2],R=i?l.attributes.skinnedPosition:y;if(R.get(P,n.array),R.get(D,r.array),R.get(O,a.array),h=v?o.intersectTriangle(n,r,a,t.culling):o.intersectTriangle(n,a,r,t.culling)){var N=new c.a;i?c.a.copy(N,h):c.a.transformMat4(N,h,t.worldTransform),e.push(new m.Intersection(h,N,t,[P,D,O],T/3,c.a.dist(N,this._ray.origin)))}}}}}),_intersectionCompareFunc:function(t,e){return t.distance-e.distance}});m.Intersection=function(t,e,i,n,r,a){this.point=t,this.pointWorld=e,this.target=i,this.triangle=n,this.triangleIndex=r,this.distance=a},e.a=m},function(t,e,i){"use strict";var n=i(7),r=i(11),a=i(57),o=i(14);function s(t){return{byte:o.a.Int8Array,ubyte:o.a.Uint8Array,short:o.a.Int16Array,ushort:o.a.Uint16Array}[t]||o.a.Float32Array}function l(t){return"attr_"+t}function u(t,e,i,n){switch(this.name=t,this.type=e,this.size=i,this.semantic=n||"",this.value=null,i){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var i=this.value;return e[0]=i[2*t],e[1]=i[2*t+1],e},this.set=function(t,e){var i=this.value;i[2*t]=e[0],i[2*t+1]=e[1]},this.copy=function(t,e){var i=this.value;e*=2,i[t*=2]=i[e],i[t+1]=i[e+1]};break;case 3:this.get=function(t,e){var i=3*t,n=this.value;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e},this.set=function(t,e){var i=3*t,n=this.value;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2]},this.copy=function(t,e){var i=this.value;e*=3,i[t*=3]=i[e],i[t+1]=i[e+1],i[t+2]=i[e+2]};break;case 4:this.get=function(t,e){var i=this.value,n=4*t;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e[3]=i[n+3],e},this.set=function(t,e){var i=this.value,n=4*t;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2],i[n+3]=e[3]},this.copy=function(t,e){var i=this.value;e*=4,i[t*=4]=i[e],i[t+1]=i[e+1],i[t+2]=i[e+2],i[t+3]=i[e+3]}}}function h(t,e,i,n,r){this.name=t,this.type=e,this.buffer=i,this.size=n,this.semantic=r,this.symbol="",this.needsRemove=!1}function c(t){this.buffer=t,this.count=0}u.prototype.init=function(t){if(!this.value||this.value.length!=t*this.size){var e=s(this.type);this.value=new e(t*this.size)}},u.prototype.fromArray=function(t){var e,i=s(this.type);if(t[0]&&t[0].length){var n=0,r=this.size;e=new i(t.length*r);for(var a=0;a=0){e||(e=[]);var i=this.indices;return e[0]=i[3*t],e[1]=i[3*t+1],e[2]=i[3*t+2],e}},setTriangleIndices:function(t,e){var i=this.indices;i[3*t]=e[0],i[3*t+1]=e[1],i[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,i=this.vertexCount>65535?o.a.Uint32Array:o.a.Uint16Array;if(t[0]&&t[0].length){var n=0;e=new i(3*t.length);for(var r=0;r=0&&(e.splice(i,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var i=[],n=this.vertexCount,r=0;r0){var r=Math.pow(2,t[3]-128-8+n);e[i+0]=t[0]*r,e[i+1]=t[1]*r,e[i+2]=t[2]*r}else e[i+0]=0,e[i+1]=0,e[i+2]=0;return e[i+3]=1,e}function s(t,e,i,n){for(var r,a,o=0,s=0,l=n;l>0;)if(t[s][0]=e[i++],t[s][1]=e[i++],t[s][2]=e[i++],t[s][3]=e[i++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(a=t[s])[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],s++,l--;o+=8}else s++,l--,o=0;return i}function l(t,e,i,n){if(n<8|n>32767)return s(t,e,i,n);if(2!=(r=e[i++]))return s(t,e,i-1,n);if(t[0][1]=e[i++],t[0][2]=e[i++],r=e[i++],(t[0][2]<<8>>>0|r)>>>0!==n)return null;for(var r=0;r<4;r++)for(var a=0;a128){o=(127&o)>>>0;for(var l=e[i++];o--;)t[a++][r]=l}else for(;o--;)t[a++][r]=e[i++]}return i}var u={parseRGBE:function(t,e,i){null==i&&(i=0);var s=new Uint8Array(t),u=s.length;if("#?"===function(t,e,i){for(var n="",r=e;r=u)){h+=2;for(var c="";h=0||(o.forEach((function(e){t.on(e,this[s(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),o.forEach((function(e){t.off(e,this[s(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}},e.a=m},function(t,e,i){"use strict";var n=i(24),r=i(77),a=n.a.extend({cubemap:null,castShadow:!1,_normalDistribution:null,_brdfLookup:null},{type:"AMBIENT_CUBEMAP_LIGHT",prefilter:function(t,e){if(t.getGLExtension("EXT_shader_texture_lod")){this._brdfLookup||(this._normalDistribution=r.a.generateNormalDistribution(),this._brdfLookup=r.a.integrateBRDF(t,this._normalDistribution));var i=this.cubemap;if(!i.__prefiltered){var n=r.a.prefilterEnvironmentMap(t,i,{encodeRGBM:!0,width:e,height:e},this._normalDistribution,this._brdfLookup);this.cubemap=n.environmentMap,this.cubemap.__prefiltered=!0,i.dispose(t)}}else console.warn("Device not support textureCubeLodEXT")},getBRDFLookup:function(){return this._brdfLookup},uniformTemplates:{ambientCubemapLightColor:{type:"3f",value:function(t){var e=t.color,i=t.intensity;return[e[0]*i,e[1]*i,e[2]*i]}},ambientCubemapLightCubemap:{type:"t",value:function(t){return t.cubemap}},ambientCubemapLightBRDFLookup:{type:"t",value:function(t){return t._brdfLookup}}}});e.a=a},function(t,e,i){"use strict";e.a="\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end"},function(t,e,i){"use strict";e.a="#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform sampler2D normalDistribution;\nuniform vec2 viewportSize : [512, 256];\nconst vec3 N = vec3(0.0, 0.0, 1.0);\nconst float fSampleNumber = float(SAMPLE_NUMBER);\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"},function(t,e,i){"use strict";e.a="#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"},function(t,e,i){"use strict";var n=i(24),r=i(14),a=n.a.extend({castShadow:!1,coefficients:[]},(function(){this._coefficientsTmpArr=new r.a.Float32Array(27)}),{type:"AMBIENT_SH_LIGHT",uniformTemplates:{ambientSHLightColor:{type:"3f",value:function(t){var e=t.color,i=t.intensity;return[e[0]*i,e[1]*i,e[2]*i]}},ambientSHLightCoefficients:{type:"3f",value:function(t){for(var e=t._coefficientsTmpArr,i=0;i65535?Uint32Array:Uint16Array,y=this.indices=new _(e*t*6),x=this.radius,b=this.phiStart,w=this.phiLength,T=this.thetaStart,S=this.thetaLength,M=[],A=[],C=0,I=1/(x=this.radius);for(f=0;f<=t;f++)for(d=0;d<=e;d++)h=d/e,c=f/t,s=-x*Math.cos(b+h*w)*Math.sin(T+c*S),l=x*Math.cos(T+c*S),u=x*Math.sin(b+h*w)*Math.sin(T+c*S),M[0]=s,M[1]=l,M[2]=u,A[0]=h,A[1]=c,i.set(C,M),n.set(C,A),M[0]*=I,M[1]*=I,M[2]*=I,a.set(C,M),C++;var L=e+1,E=0;for(f=0;f=0&&l.splice(t,1)})),l.push(u),this.__zr&&this.__zr.animation.addAnimator(u),u},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,i=e.length,n=0;n.5?e:t}function c(t,e,i,n,r){var a=t.length;if(1==r)for(var o=0;or)t.length=r;else for(var a=n;a=0&&!(C[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=V;ie);i++);i=Math.min(i-1,x-2)}V=i,G=e;var n=C[i+1]-C[i];if(0!==n)if(N=(e-C[i])/n,y)if(z=I[i],k=I[0===i?i:i-1],B=I[i>x-2?x-1:i+1],F=I[i>x-3?x-1:i+2],T)p(k,z,B,F,N,N*N,N*N*N,m(t,s),A);else{if(S)r=p(k,z,B,F,N,N*N,N*N*N,H,1),r=v(H);else{if(M)return h(z,B,N);r=g(k,z,B,F,N,N*N,N*N*N)}_(t,s,r)}else if(T)c(I[i],I[i+1],N,m(t,s),A);else{var r;if(S)c(I[i],I[i+1],N,H,1),r=v(H);else{if(M)return h(I[i],I[i+1],N);r=u(I[i],I[i+1],N)}_(t,s,r)}},ondestroy:i});return e&&"spline"!==e&&(U.easing=e),U}}}var y=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||s,this._setter=n||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};y.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:m(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t255?255:t}function o(t){return t<0?0:t>1?1:t}function s(t){return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function l(t){return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100):o(parseFloat(t))}function u(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function h(t,e,i){return t+(e-t)*i}function c(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var f=new n(20),p=null;function g(t,e){p&&d(p,e),p=f.put(t,p||e.slice())}function m(t,e){if(t){e=e||[];var i=f.get(t);if(i)return d(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in r)return d(e,r[a]),g(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(c(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),g(t,e),e):void c(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(c(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),g(t,e),e):void c(e,0,0,0,1):void 0;var o=a.indexOf("("),u=a.indexOf(")");if(-1!==o&&u+1===a.length){var h=a.substr(0,o),p=a.substr(o+1,u-(o+1)).split(","),m=1;switch(h){case"rgba":if(4!==p.length)return void c(e,0,0,0,1);m=l(p.pop());case"rgb":return 3!==p.length?void c(e,0,0,0,1):(c(e,s(p[0]),s(p[1]),s(p[2]),m),g(t,e),e);case"hsla":return 4!==p.length?void c(e,0,0,0,1):(p[3]=l(p[3]),v(p,e),g(t,e),e);case"hsl":return 3!==p.length?void c(e,0,0,0,1):(v(p,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=l(t[1]),r=l(t[2]),o=r<=.5?r*(n+1):r+n-r*n,s=2*r-o;return c(e=e||[],a(255*u(s,o,i+1/3)),a(255*u(s,o,i)),a(255*u(s,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function _(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=e[r],u=e[s],c=n-r;return i[0]=a(h(l[0],u[0],c)),i[1]=a(h(l[1],u[1],c)),i[2]=a(h(l[2],u[2],c)),i[3]=o(h(l[3],u[3],c)),i}}var y=_;function x(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=m(e[r]),u=m(e[s]),c=n-r,d=w([a(h(l[0],u[0],c)),a(h(l[1],u[1],c)),a(h(l[2],u[2],c)),o(h(l[3],u[3],c))],"rgba");return i?{color:d,leftIndex:r,rightIndex:s,value:n}:d}}var b=x;function w(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}e.parse=m,e.lift=function(t,e){var i=m(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return w(i,4===i.length?"rgba":"rgb")}},e.toHex=function(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},e.fastLerp=_,e.fastMapToColor=y,e.lerp=x,e.mapToColor=b,e.modifyHSL=function(t,e,i,n){if(t=m(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(t[1]=l(i)),null!=n&&(t[2]=l(n)),w(v(t),"rgba");var r},e.modifyAlpha=function(t,e){if((t=m(t))&&null!=e)return t[3]=o(e),w(t,"rgba")},e.stringify=w},function(t,e,i){"use strict";e.a="\n@export clay.util.rand\nhighp float rand(vec2 uv) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(uv.xy, vec2(a,b)), sn = mod(dt, 3.141592653589793);\n return fract(sin(sn) * c);\n}\n@end\n@export clay.util.calculate_attenuation\nuniform float attenuationFactor : 5.0;\nfloat lightAttenuation(float dist, float range)\n{\n float attenuation = 1.0;\n attenuation = dist*dist/(range*range+1.0);\n float att_s = attenuationFactor;\n attenuation = 1.0/(attenuation*att_s+1.0);\n att_s = 1.0/(att_s+1.0);\n attenuation = attenuation - att_s;\n attenuation /= 1.0 - att_s;\n return clamp(attenuation, 0.0, 1.0);\n}\n@end\n@export clay.util.edge_factor\n#ifdef SUPPORT_STANDARD_DERIVATIVES\nfloat edgeFactor(float width)\n{\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * width, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#else\nfloat edgeFactor(float width)\n{\n return 1.0;\n}\n#endif\n@end\n@export clay.util.encode_float\nvec4 encodeFloat(const in float depth)\n{\n const vec4 bitShifts = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\n const vec4 bit_mask = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\n vec4 res = fract(depth * bitShifts);\n res -= res.xxyz * bit_mask;\n return res;\n}\n@end\n@export clay.util.decode_float\nfloat decodeFloat(const in vec4 color)\n{\n const vec4 bitShifts = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);\n return dot(color, bitShifts);\n}\n@end\n@export clay.util.float\n@import clay.util.encode_float\n@import clay.util.decode_float\n@end\n@export clay.util.rgbm_decode\nvec3 RGBMDecode(vec4 rgbm, float range) {\n return range * rgbm.rgb * rgbm.a;\n}\n@end\n@export clay.util.rgbm_encode\nvec4 RGBMEncode(vec3 color, float range) {\n if (dot(color, color) == 0.0) {\n return vec4(0.0);\n }\n vec4 rgbm;\n color /= range;\n rgbm.a = clamp(max(max(color.r, color.g), max(color.b, 1e-6)), 0.0, 1.0);\n rgbm.a = ceil(rgbm.a * 255.0) / 255.0;\n rgbm.rgb = color / rgbm.a;\n return rgbm;\n}\n@end\n@export clay.util.rgbm\n@import clay.util.rgbm_decode\n@import clay.util.rgbm_encode\nvec4 decodeHDR(vec4 color)\n{\n#if defined(RGBM_DECODE) || defined(RGBM)\n return vec4(RGBMDecode(color, 8.12), 1.0);\n#else\n return color;\n#endif\n}\nvec4 encodeHDR(vec4 color)\n{\n#if defined(RGBM_ENCODE) || defined(RGBM)\n return RGBMEncode(color.xyz, 8.12);\n#else\n return color;\n#endif\n}\n@end\n@export clay.util.srgb\nvec4 sRGBToLinear(in vec4 value) {\n return vec4(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))), value.w);\n}\nvec4 linearTosRGB(in vec4 value) {\n return vec4(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))), value.w);\n}\n@end\n@export clay.chunk.skinning_header\n#ifdef SKINNING\nattribute vec3 weight : WEIGHT;\nattribute vec4 joint : JOINT;\n#ifdef USE_SKIN_MATRICES_TEXTURE\nuniform sampler2D skinMatricesTexture : ignore;\nuniform float skinMatricesTextureSize: ignore;\nmat4 getSkinMatrix(sampler2D tex, float idx) {\n float j = idx * 4.0;\n float x = mod(j, skinMatricesTextureSize);\n float y = floor(j / skinMatricesTextureSize) + 0.5;\n vec2 scale = vec2(skinMatricesTextureSize);\n return mat4(\n texture2D(tex, vec2(x + 0.5, y) / scale),\n texture2D(tex, vec2(x + 1.5, y) / scale),\n texture2D(tex, vec2(x + 2.5, y) / scale),\n texture2D(tex, vec2(x + 3.5, y) / scale)\n );\n}\nmat4 getSkinMatrix(float idx) {\n return getSkinMatrix(skinMatricesTexture, idx);\n}\n#else\nuniform mat4 skinMatrix[JOINT_COUNT] : SKIN_MATRIX;\nmat4 getSkinMatrix(float idx) {\n return skinMatrix[int(idx)];\n}\n#endif\n#endif\n@end\n@export clay.chunk.skin_matrix\nmat4 skinMatrixWS = getSkinMatrix(joint.x) * weight.x;\nif (weight.y > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end"},function(t,e,i){"use strict";e.a="\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"},function(t,e,i){"use strict";e.a="@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"},function(t,e,i){"use strict";e.a="/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(t,e,i){"use strict";e.a="@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(t,e,i){"use strict";e.a="@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"},function(t,e,i){"use strict";e.a="@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end"},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=["bar3D","line3D","map3D","scatter3D","surface","lines3D","scatterGL","scatter3D"];function o(t,e){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,n=t[e].emphasis;i&&(t[e]=i),n&&(t.emphasis=t.emphasis||{},t.emphasis[e]=n)}}function s(t){t&&(t instanceof Array||(t=[t]),r.a.util.each(t,(function(t){if(t.axisLabel){var e=t.axisLabel;r.a.util.extend(e,e.textStyle),e.textStyle=null}})))}e.a=function(t){r.a.util.each(t.series,(function(e){r.a.util.indexOf(a,e.type)>=0&&(function(t){o(t,"itemStyle"),o(t,"lineStyle"),o(t,"areaStyle"),o(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),s(t.xAxis3D),s(t.yAxis3D),s(t.zAxis3D),s(t.grid3D),o(t.geo3D)}},function(t,e,i){"use strict";i(155),i(159),i(160),i(167);var n=i(0),r=i.n(n);r.a.registerAction({type:"grid3DChangeCamera",event:"grid3dcamerachanged",update:"series:updateCamera"},(function(t,e){e.eachComponent({mainType:"grid3D",query:t},(function(e){e.setView(t)}))})),r.a.registerAction({type:"grid3DShowAxisPointer",event:"grid3dshowaxispointer",update:"grid3D:showAxisPointer"},(function(t,e){})),r.a.registerAction({type:"grid3DHideAxisPointer",event:"grid3dhideaxispointer",update:"grid3D:hideAxisPointer"},(function(t,e){}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(156),o=r.a.extendComponentModel({type:"cartesian3DAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid3D",index:this.option.gridIndex,id:this.option.gridId})[0]}});function s(t,e){return e.type||(e.data?"category":"value")}r.a.helper.mixinAxisModelCommonMethods(o),Object(a.a)("x",o,s,{name:"X"}),Object(a.a)("y",o,s,{name:"Y"}),Object(a.a)("z",o,s,{name:"Z"})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(157),o=i(158),s=i.n(o),l=["value","category","time","log"];e.a=function(t,e,i,n){r.a.util.each(l,(function(o){e.extend({type:t+"Axis3D."+o,__ordinalMeta:null,mergeDefaultAndTheme:function(e,n){var a=n.getTheme();r.a.util.merge(e,a.get(o+"Axis3D")),r.a.util.merge(e,this.getDefaultOption()),e.type=i(t,e)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=s.a.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r.a.util.merge(r.a.util.clone(a.a[o+"Axis3D"]),n||{},!0)})})),e.superClass.registerSubTypeDefaulter(t+"Axis3D",r.a.util.curry(i,t))}},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a={show:!0,grid3DIndex:0,inverse:!1,name:"",nameLocation:"middle",nameTextStyle:{fontSize:16},nameGap:20,axisPointer:{},axisLine:{},axisTick:{},axisLabel:{},splitArea:{}},o=r.a.util.merge({boundaryGap:!0,axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"},axisPointer:{label:{show:!1}}},a),s=r.a.util.merge({boundaryGap:[0,0],splitNumber:5,axisPointer:{label:{}}},a),l=r.a.util.defaults({scale:!0,min:"dataMin",max:"dataMax"},s),u=r.a.util.defaults({logBase:10},s);u.scale=!0,e.a={categoryAxis3D:o,valueAxis3D:s,timeAxis3D:l,logAxis3D:u}},function(t,e,i){var n=i(13),r=n.createHashMap,a=n.isObject,o=n.map;function s(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}s.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&o(i,h);return new s({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var l=s.prototype;function u(t){return t._map||(t._map=r(t.categories))}function h(t){return a(t)&&null!=t.value?t.value:t+""}l.getOrdinal=function(t){return u(this).get(t)},l.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=u(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var c=s;t.exports=c},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(44),o=i(28),s=i(29),l=r.a.extendComponentModel({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});r.a.util.merge(l.prototype,a.a),r.a.util.merge(l.prototype,o.a),r.a.util.merge(l.prototype,s.a)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(45),s=i(25),l=i(2),u=i(81),h=i(30),c=i(162),d=i(164),f=i(63),p=i(46),g=l.a.firstNotNull;a.a.Shader.import(p.a),["x","y","z"].forEach((function(t){r.a.extendComponentView({type:t+"Axis3D"})}));var m={x:0,y:2,z:1};r.a.extendComponentView({type:"grid3D",__ecgl__:!0,init:function(t,e){var i=new a.a.Material({shader:a.a.createShader("ecgl.color"),depthMask:!1,transparent:!0}),n=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});i.define("fragment","DOUBLE_SIDED"),i.define("both","VERTEX_COLOR"),this.groupGL=new a.a.Node,this._control=new o.a({zr:e.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(t){var e=new c.a(t,n,i);return this.groupGL.add(e.rootNode),e}),this),this._axes=["x","y","z"].map((function(t){var e=new d.a(t,n);return this.groupGL.add(e.rootNode),e}),this);var r=e.getDevicePixelRatio();this._axisLabelSurface=new u.a({width:256,height:256,devicePixelRatio:r}),this._axisLabelSurface.onupdate=function(){e.getZr().refresh()},this._axisPointerLineMesh=new a.a.Mesh({geometry:new s.a({useNativeLine:!1}),material:n,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new u.a({width:128,height:128,devicePixelRatio:r}),this._axisPointerLabelsMesh=new f.a({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new a.a.Node,this._sceneHelper=new h.a,this._sceneHelper.initLight(this._lightRoot)},render:function(t,e,i){this._model=t,this._api=i;var n=t.coordinateSystem;n.viewGL.add(this._lightRoot),t.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(n.viewGL);var a=t.getModel("viewControl");r.setFromViewControlModel(a,0),this._axisLabelSurface.clear(),r.off("update"),t.get("show")&&(this._faces.forEach((function(n){n.update(t,e,i)}),this),this._axes.forEach((function(e){e.update(t,this._axisLabelSurface,i)}),this)),r.on("update",this._onCameraChange.bind(this,t,i),this),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(t),n.viewGL.setPostEffect(t.getModel("postEffect"),i),n.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._initMouseHandler(t)},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i)},showAxisPointer:function(t,e,i,n){this._doShowAxisPointer(),this._updateAxisPointer(n.value)},hideAxisPointer:function(t,e,i,n){this._doHideAxisPointer()},_initMouseHandler:function(t){var e=t.coordinateSystem.viewGL;t.get("show")&&t.get("axisPointer.show")?e.on("mousemove",this._updateAxisPointerOnMousePosition,this):e.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(t){if(!t.target){for(var e,i=this._model.coordinateSystem,n=i.viewGL,r=n.castRay(t.offsetX,t.offsetY,new a.a.Ray),o=0;on[1]?0:1,s=this._faces[2*i+o],l=this._faces[2*i+1-o];s.rootNode.invisible=!0,l.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),i=t.getAxis("y"),n=t.getAxis("z"),r=n.getExtentMax(),a=n.getExtentMin(),o=e.getExtentMin(),s=e.getExtentMax(),l=i.getExtentMax(),u=i.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,f=this._faces,p=f[4].rootNode.invisible?u:l,g=f[2].rootNode.invisible?r:a,m=f[0].rootNode.invisible?o:s,v=f[2].rootNode.invisible?r:a,_=f[0].rootNode.invisible?s:o,y=f[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),f[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),f[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),f[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,g,p),c.position.set(m,v,0),d.position.set(_,0,y),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new a.a.Vector4,new a.a.Vector4],i=new a.a.Vector4;this.groupGL.getWorldPosition(i),i.w=1,i.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),i.x/=i.w,i.y/=i.w,this._axes.forEach((function(n){for(var r=n.axisLineCoords,a=(n.labelsMesh.geometry,0);ai.y?"bottom":"top"):(s="middle",o=h>i.x?"left":"right"),n.setSpriteAlign(o,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,i=e.dataToPoint(t),n=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function s(t){return l.a.firstNotNull(t.model.get("axisPointer.show"),r.get("show"))}function u(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),i=a.a.parseColor(e.get("color")),n=g(e.get("width"),1),o=g(e.get("opacity"),1);return i[3]*=o,{color:i,lineWidth:n}}n.convertToDynamicArray(!0);for(var h=0;h0&&t.rotation.rotateY(Math.PI),e.normal.z=-n)}(this.rootNode,this.plane,s,this.faceInfo[3])},c.prototype._updateSplitLines=function(t,e,i,n){var o=n.getDevicePixelRatio();e.forEach((function(n,s){var l=n.model,h=e[1-s].getExtent();if(!n.scale.isBlank()){var c=l.getModel("splitLine",i.getModel("splitLine"));if(c.get("show")){var d=c.getModel("lineStyle"),f=d.get("color"),p=u(d.get("opacity"),1),g=u(d.get("width"),1);f=r.a.util.isArray(f)?f:[f];for(var m=n.getTicksCoords({tickModel:c}),v=0,_=0;_65535?new Uint32Array(3*n):new Uint16Array(3*n))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:(n=c.create(),r=c.create(),a=c.create(),o=[0,3,1,3,2,1],function(t,e){var i=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;c.sub(n,t[1],t[0]),c.sub(r,t[2],t[1]),c.cross(a,n,r),c.normalize(a,a);for(var u=0;u<4;u++)i.set(this._vertexOffset+u,t[u]),l.set(this._vertexOffset+u,e),s.set(this._vertexOffset+u,a);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=o[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2})});u.a.util.defaults(d.prototype,h.a),e.a=d},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(25),s=i(2),l=i(63),u=s.a.firstNotNull,h={x:0,y:2,z:1};function c(t,e){var i=new a.a.Mesh({geometry:new o.a({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,renderOrder:2}),n=new l.a;n.material.depthMask=!1;var r=new a.a.Node;r.add(i),r.add(n),this.rootNode=r,this.dim=t,this.linesMesh=i,this.labelsMesh=n,this.axisLineCoords=null,this.labelElements=[]}var d={x:"y",y:"x",z:"y"};c.prototype.update=function(t,e,i){var n=t.coordinateSystem.getAxis(this.dim),o=this.linesMesh.geometry,s=this.labelsMesh.geometry;o.convertToDynamicArray(!0),s.convertToDynamicArray(!0);var l=n.model,c=n.getExtent(),f=i.getDevicePixelRatio(),p=l.getModel("axisLine",t.getModel("axisLine")),g=l.getModel("axisTick",t.getModel("axisTick")),m=l.getModel("axisLabel",t.getModel("axisLabel")),v=p.get("lineStyle.color");if(p.get("show")){var _=p.getModel("lineStyle"),y=[0,0,0];(L=[0,0,0])[E=h[n.dim]]=c[0],y[E]=c[1],this.axisLineCoords=[L,y];var x=a.a.parseColor(v),b=u(_.get("width"),1),w=u(_.get("opacity"),1);x[3]*=w,o.addLine(L,y,x,b*f)}if(g.get("show")){var T=g.getModel("lineStyle"),S=a.a.parseColor(u(T.get("color"),v));b=u(T.get("width"),1),S[3]*=u(T.get("opacity"),1);for(var M=n.getTicksCoords(),A=g.get("length"),C=0;C65535?new Uint32Array(3*i):new Uint16Array(3*i))},setSpriteAlign:function(t,e,i,n,r){var a,o,s,l;switch(null==i&&(i="left"),null==n&&(n="top"),r=r||0,i){case"left":a=r,s=e[0]+r;break;case"center":case"middle":a=-e[0]/2,s=e[0]/2;break;case"right":a=-e[0]-r,s=-r}switch(n){case"bottom":o=r,l=e[1]+r;break;case"middle":o=-e[1]/2,l=e[1]/2;break;case"top":o=-e[1]-r,l=-r}var u=4*t,h=this.attributes.offset;h.set(u,[a,l]),h.set(u+1,[s,l]),h.set(u+2,[s,o]),h.set(u+3,[a,o])},addSprite:function(t,e,i,n,r,a){var o=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,i,n,r,a);for(var l=0;l"'])/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"};function u(t){return null==t?"":(t+"").replace(s,(function(t,e){return l[e]}))}var h=["a","b","c","d","e","f","g"],c=function(t,e){return"{"+t+(null==e?"":e)+"}"};function d(t,e){return"0000".substr(0,e-(t+="").length)+t}var f=r.truncateText,p=r.getBoundingRect;e.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},e.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},e.normalizeCssArray=o,e.encodeHTML=u,e.formatTpl=function(t,e,i){n.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var a=e[0].$vars||[],o=0;o':'':""},e.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=a.parseDate(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),s=n["get"+r+"Month"]()+1,l=n["get"+r+"Date"](),u=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),c=n["get"+r+"Seconds"](),f=n["get"+r+"Milliseconds"]();return t=t.replace("MM",d(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",d(l,2)).replace("d",l).replace("hh",d(u,2)).replace("h",u).replace("mm",d(h,2)).replace("m",h).replace("ss",d(c,2)).replace("s",c).replace("SSS",d(f,3))},e.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},e.truncateText=f,e.getTextRect=p},function(t,e,i){var n=i(82),r=i(173),a=i(13),o=a.getContext,s=a.extend,l=a.retrieve2,u=a.retrieve3,h=a.trim,c={},d=0,f=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function g(t,e){var i=t+":"+(e=e||"12px sans-serif");if(c[i])return c[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a5e3&&(d=0,c={}),d++,c[i]=r,r}function m(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function v(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function _(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=y(e,i,n,r);for(var o=0,s=a.length;o=a;u++)o-=a;var h=g(i);return h>o&&(i="",h=0),o=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=o,n.containerWidth=t,n}function x(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=g(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?b(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=g(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function b(t,e,i,n){for(var r=0,a=0,o=t.length;al)t="",a=[];else if(null!=u)for(var h=y(u-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=a.length;ca&&A(i,t.substring(a,o)),A(i,n[2],n[1]),a=f.lastIndex}ay)return{lines:[],width:0,height:0};z.textWidth=g(z.text,L);var P=C.textWidth,D=null==P||"auto"===P;if("string"==typeof P&&"%"===P.charAt(P.length-1))z.percentWidth=P,d.push(z),P=0;else{if(D){P=z.textWidth;var O=C.textBackgroundColor,R=O&&O.image;R&&(R=r.findExistImage(R),r.isImageReady(R)&&(P=Math.max(P,R.width*E/R.height)))}var N=I?I[1]+I[3]:0;P+=N;var k=null!=v?v-S:null;null!=k&&k4){console.warn("Support at most 4 cascade");continue}p.shadowCascade>1&&(o=p),this.renderDirectionalLightShadow(t,e,i,p,c,h,u)}else"SPOT_LIGHT"===p.type?this.renderSpotLightShadow(t,e,p,l,s):"POINT_LIGHT"===p.type&&this.renderPointLightShadow(t,e,p,d);this._shadowMapNumber[p.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(f=0;f0?_.define("fragment",v,m):_.isDefined("fragment",v)&&_.undefine("fragment",v))}for(f=0;f0){var x=u.map(S);if(y.directionalLightShadowMaps={value:u,type:"tv"},y.directionalLightMatrices={value:h,type:"m4v"},y.directionalLightShadowMapSizes={value:x,type:"1fv"},o){var b=c.slice(),w=c.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),h.reverse(),y.shadowCascadeClipsNear={value:b,type:"1fv"},y.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var T=s.map(S);(y=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},y.spotLightMatrices={value:l,type:"m4v"},y.spotLightShadowMapSizes={value:T,type:"1fv"}}d.length>0&&(y.pointLightShadowMaps={value:d,type:"tv"})}function S(t){return t.height}},renderDirectionalLightShadow:(M=new s.a,A=new l.a,C=new o.a,I=new l.a,L=new l.a,E=new l.a,P=new l.a,function(t,e,i,n,r,a,o){var s=this._getDepthMaterial(n),h={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:S,getUniform:T,ifRender:function(t){return t.castShadow},sortCompare:u.a.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var c=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(c).applyTransform(i.viewMatrix)}var d=Math.min(-e.viewBoundingBoxLastFrame.min.z,i.far),f=Math.max(-e.viewBoundingBoxLastFrame.max.z,i.near),p=this._getDirectionalLightCamera(n,e,i),g=E.array;P.copy(p.projectionMatrix),x.a.invert(L.array,p.worldTransform.array),x.a.multiply(L.array,L.array,i.worldTransform.array),x.a.multiply(g,P.array,L.array);for(var v=[],_=i instanceof m.a,y=(i.near+i.far)/(i.near-i.far),b=2*i.near*i.far/(i.near-i.far),w=0;w<=n.shadowCascade;w++){var O=f*Math.pow(d/f,w/n.shadowCascade),R=f+(d-f)*w/n.shadowCascade,N=O*n.cascadeSplitLogFactor+R*(1-n.cascadeSplitLogFactor);v.push(N),r.push(-(-N*y+b)/-N)}var k=this._getTexture(n,n.shadowCascade);o.push(k);var z=t.viewport,B=t.gl;for(this._frameBuffer.attach(k),this._frameBuffer.bind(t),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT),w=0;wl?s>u?v[r>0?"px":"nx"]=!0:v[o>0?"pz":"nz"]=!0:l>u?v[a>0?"py":"ny"]=!0:v[o>0?"pz":"nz"]=!0}for(i=0;i=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=i.COLOR_ATTACHMENT0&&c<=i.COLOR_ATTACHMENT0+8&&h.push(c);u.drawBuffersEXT(h)}t.saveClear(),t.clearBit=r.a.DEPTH_BUFFER_BIT|r.a.COLOR_BUFFER_BIT,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),n.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}});e.a=o},function(t,e,i){"use strict";var n=i(48).a.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}});e.a=n},function(t,e,i){"use strict";var n=i(16),r=i(48),a=r.a.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new n.a({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var i=t.gl;for(var n in this.inputLinks){var r=(c=this.inputLinks[n]).node.getOutput(t,c.pin);this.pass.setUniform(n,r)}if(this.outputs){this.pass.outputs={};var a={};for(var o in this.outputs){var s=this.updateParameter(o,t);isNaN(s.width)&&this.updateParameter(o,t);var l=this.outputs[o],u=this._compositor.allocateTexture(s);this._outputTextures[o]=u,"string"==typeof(h=l.attachment||i.COLOR_ATTACHMENT0)&&(h=i[h]),a[h]=u}for(var h in this._compositor.getFrameBuffer().bind(t),a)this._compositor.getFrameBuffer().attach(a[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var n in this.inputLinks){var c;(c=this.inputLinks[n]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var i,n,r=this.outputs[t],a=r.parameters,o=r._parametersCopy;if(o||(o=r._parametersCopy={}),a)for(var s in a)"width"!==s&&"height"!==s&&(o[s]=a[s]);return i=a.width instanceof Function?a.width.call(this,e):a.width,n=a.height instanceof Function?a.height.call(this,e):a.height,i=Math.ceil(i),n=Math.ceil(n),o.width===i&&o.height===n||this._outputTextures[t]&&this._outputTextures[t].dispose(e),o.width=i,o.height=n,o},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){this._outputReferences[t]--,0===this._outputReferences[t]&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){r.a.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});e.a=a},function(t,e,i){"use strict";e.a=function(t){t.import(n.a),t.import(r.a),t.import(a.a),t.import(o.a),t.import(s.a),t.import(l.a),t.import(u.a),t.import(h.a),t.import(c.a),t.import(d.a),t.import(f.a),t.import(p.a),t.import(g.a)};var n=i(185),r=i(87),a=i(186),o=i(88),s=i(187),l=i(89),u=i(90),h=i(91),c=i(92),d=i(93),f=i(188),p=i(94),g=i(95)},function(t,e,i){"use strict";e.a="@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"},function(t,e,i){"use strict";e.a="@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"},function(t,e,i){"use strict";e.a="@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"},function(t,e,i){"use strict";e.a="@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"},function(t,e,i){"use strict";var n=i(9),r=i(3),a=i(5),o=i(4),s=i(16),l=i(8),u=i(10),h=i(49),c=i(190);function d(t){for(var e=new Uint8Array(t*t*4),i=0,n=new r.a,a=0;a=1?.95:0,weight2:r>=1?.05:1}),p.render(t)),h.attach(l),d.setUniform("texture",this._physicallyCorrect?this._currentTexture:s),d.render(t),h.attach(u),f.setUniform("texture",l),f.render(t),h.unbind(t),this._physicallyCorrect){var _=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=_}},c.prototype.getTargetTexture=function(){return this._texture3},c.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},c.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=u.a.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},c.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},c.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},c.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)},e.a=c},function(t,e,i){"use strict";e.a="@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"},function(t,e,i){"use strict";e.a=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925]},function(t,e,i){"use strict";var n=i(5),r=i(4),a=i(8),o=i(10),s=i(19),l=i(16),u=i(61),h=i(195);function c(t,e,i,n,r){var a=t.gl;e.setUniform(a,"1i",i,r),a.activeTexture(a.TEXTURE0+r),n.isRenderable()?n.bind(t):n.unbind(t)}function d(t,e,i,n,r){var a,o,s,l,u=t.gl;return function(r,h,d){if(!l||l.material!==r.material){var f=r.material,p=r.__program,g=f.get("roughness");null==g&&(g=1);var m=f.get("normalMap")||e,v=f.get("roughnessMap"),_=f.get("bumpMap"),y=f.get("uvRepeat"),x=f.get("uvOffset"),b=f.get("detailUvRepeat"),w=f.get("detailUvOffset"),T=!!_&&f.isTextureEnabled("bumpMap"),S=!!v&&f.isTextureEnabled("roughnessMap"),M=f.isDefined("fragment","DOUBLE_SIDED");_=_||i,v=v||n,d!==h?(h.set("normalMap",m),h.set("bumpMap",_),h.set("roughnessMap",v),h.set("useBumpMap",T),h.set("useRoughnessMap",S),h.set("doubleSide",M),null!=y&&h.set("uvRepeat",y),null!=x&&h.set("uvOffset",x),null!=b&&h.set("detailUvRepeat",b),null!=w&&h.set("detailUvOffset",w),h.set("roughness",g)):(p.setUniform(u,"1f","roughness",g),a!==m&&c(t,p,"normalMap",m,0),o!==_&&_&&c(t,p,"bumpMap",_,1),s!==v&&v&&c(t,p,"roughnessMap",v,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=x&&p.setUniform(u,"2f","uvOffset",x),null!=b&&p.setUniform(u,"2f","detailUvRepeat",b),null!=w&&p.setUniform(u,"2f","detailUvOffset",w),p.setUniform(u,"1i","useBumpMap",+T),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+M)),a=m,o=_,s=v,l=r}}}function f(t){t=t||{},this._depthTex=new n.a({format:r.a.DEPTH_COMPONENT,type:r.a.UNSIGNED_INT}),this._normalTex=new n.a({type:r.a.HALF_FLOAT}),this._framebuffer=new o.a,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,o.a.DEPTH_ATTACHMENT),this._normalMaterial=new s.a({shader:new a.a(a.a.source("ecgl.normal.vertex"),a.a.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=u.a.createBlank("#000"),this._defaultBumpMap=u.a.createBlank("#000"),this._defaultRoughessMap=u.a.createBlank("#000"),this._debugPass=new l.a({fragment:a.a.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}a.a.import(h.a),f.prototype.getDepthTexture=function(){return this._depthTex},f.prototype.getNormalTexture=function(){return this._normalTex},f.prototype.update=function(t,e,i){var n=t.getWidth(),r=t.getHeight(),a=this._depthTex,o=this._normalTex,s=this._normalMaterial;a.width=n,a.height=r,o.width=n,o.height=r;var l=e.getRenderList(i).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,i,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:d(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},f.prototype.renderDebug=function(t){this._debugPass.render(t)},f.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)},e.a=f},function(t,e,i){"use strict";e.a="@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"},function(t,e,i){"use strict";i(9),i(3);var n=i(5),r=i(4),a=i(16),o=i(8),s=i(10);function l(t){t=t||{},this._edgePass=new a.a({fragment:o.a.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new n.a({type:r.a.HALF_FLOAT}),this._frameBuffer=new s.a,this._frameBuffer.attach(this._targetTexture)}l.prototype.update=function(t,e,i,n){var r=t.getWidth(),a=t.getHeight(),o=this._targetTexture;o.width=r,o.height=a;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,a]),this._edgePass.setUniform("texture",i),this._edgePass.render(t),s.unbind(t)},l.prototype.getTargetTexture=function(){return this._targetTexture},l.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},l.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)},e.a=l},function(t,e,i){"use strict";e.a={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]}},function(t,e,i){"use strict";e.a="@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"},function(t,e,i){"use strict";e.a="@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end"},function(t,e,i){"use strict";var n=i(49),r=i(16),a=i(10),o=i(5),s=i(8),l=i(9);function u(t){for(var e=[],i=0;i<30;i++)e.push([Object(n.a)(i,2),Object(n.a)(i,3)]);this._haltonSequence=e,this._frame=0,this._sourceTex=new o.a,this._sourceFb=new a.a,this._sourceFb.attach(this._sourceTex),this._prevFrameTex=new o.a,this._outputTex=new o.a;var l=this._blendPass=new r.a({fragment:s.a.source("clay.compositor.blend")});l.material.disableTexturesAll(),l.material.enableTexture(["texture1","texture2"]),this._blendFb=new a.a({depthBuffer:!1}),this._outputPass=new r.a({fragment:s.a.source("clay.compositor.output"),blendWithPrevious:!0}),this._outputPass.material.define("fragment","OUTPUT_ALPHA"),this._outputPass.material.blend=function(t){t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)}}u.prototype={constructor:u,jitterProjection:function(t,e){var i=t.viewport,n=i.devicePixelRatio||t.getDevicePixelRatio(),r=i.width*n,a=i.height*n,o=this._haltonSequence[this._frame%this._haltonSequence.length],s=new l.a;s.array[12]=(2*o[0]-1)/r,s.array[13]=(2*o[1]-1)/a,l.a.mul(e.projectionMatrix,s,e.projectionMatrix),l.a.invert(e.invProjectionMatrix,e.projectionMatrix)},resetFrame:function(){this._frame=0},getFrame:function(){return this._frame},getSourceFrameBuffer:function(){return this._sourceFb},getOutputTexture:function(){return this._outputTex},resize:function(t,e){this._prevFrameTex.width=t,this._prevFrameTex.height=e,this._outputTex.width=t,this._outputTex.height=e,this._sourceTex.width=t,this._sourceTex.height=e,this._prevFrameTex.dirty(),this._outputTex.dirty(),this._sourceTex.dirty()},isFinished:function(){return this._frame>=this._haltonSequence.length},render:function(t,e,i){var n=this._blendPass;0===this._frame?(n.setUniform("weight1",0),n.setUniform("weight2",1)):(n.setUniform("weight1",.9),n.setUniform("weight2",.1)),n.setUniform("texture1",this._prevFrameTex),n.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),n.render(t),this._blendFb.unbind(t),i||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}},e.a=u},function(t,e,i){"use strict";var n=i(0),r=i.n(n);i(202),i(203),i(98),r.a.registerAction({type:"geo3DChangeCamera",event:"geo3dcamerachanged",update:"series:updateCamera"},(function(t,e){e.eachComponent({mainType:"geo3D",query:t},(function(e){e.setView(t)}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(44),o=i(28),s=i(29),l=i(31),u=i(96),h=r.a.extendComponentModel({type:"geo3D",layoutMode:"box",coordinateSystem:null,optionUpdated:function(){var t=this.option;t.regions=this.getFilledRegions(t.regions,t.map);var e=r.a.helper.completeDimensions(["value"],t.data,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),i=new r.a.List(e,this);i.initData(t.regions);var n={};i.each((function(t){var e=i.getName(t),r=i.getItemModel(t);n[e]=r})),this._regionModelMap=n,this._data=i},getData:function(){return this._data},getRegionModel:function(t){var e=this.getData().getName(t);return this._regionModelMap[e]||new r.a.Model(null,this)},getRegionPolygonCoords:function(t){var e=this.getData().getName(t),i=this.coordinateSystem.getRegion(e);return i?i.geometries:[]},getFormattedLabel:function(t,e){var i=this._data.getName(t),n=this.getRegionModel(i),r=n.get("normal"===e?["label","formatter"]:["emphasis","label","formatter"]);null==r&&(r=n.get(["label","formatter"]));var a={name:i};if("function"==typeof r)return a.status=e,r(a);if("string"==typeof r){var o=a.seriesName;return r.replace("{a}",null!=o?o:"")}return i},defaultOption:{regions:[]}});r.a.util.merge(h.prototype,u.a),r.a.util.merge(h.prototype,a.a),r.a.util.merge(h.prototype,o.a),r.a.util.merge(h.prototype,s.a),r.a.util.merge(h.prototype,l.a)},function(t,e,i){"use strict";var n=i(64),r=i(0),a=i.n(r),o=i(1),s=i(45),l=i(30);a.a.extendComponentView({type:"geo3D",__ecgl__:!0,init:function(t,e){this._geo3DBuilder=new n.a(e),this.groupGL=new o.a.Node,this._lightRoot=new o.a.Node,this._sceneHelper=new l.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot),this._control=new s.a({zr:e.getZr()}),this._control.init()},render:function(t,e,i){this.groupGL.add(this._geo3DBuilder.rootNode);var n=t.coordinateSystem;if(n&&n.viewGL){n.viewGL.add(this._lightRoot),t.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(n.viewGL);var a=t.getModel("viewControl");r.setFromViewControlModel(a,0),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(t),n.viewGL.setPostEffect(t.getModel("postEffect"),i),n.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._geo3DBuilder.update(t,e,i,0,t.getData().count());var o=n.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse((function(t){t.material&&t.material[o]("fragment","SRGB_DECODE")})),r.off("update"),r.on("update",(function(){i.dispatchAction({type:"geo3DChangeCamera",alpha:r.getAlpha(),beta:r.getBeta(),distance:r.getDistance(),center:r.getCenter(),from:this.uid,geo3DId:t.id})})),r.update()}},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i)},dispose:function(){this._control.dispose()}})},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,l,u,h,f,g,m=e&&e.length,v=m?e[0]*i:t.length,_=r(t,0,v,i,!0),y=[];if(!_)return y;if(m&&(_=function(t,e,i,n){var o,s,l,u,h,f=[];for(o=0,s=e.length;o80*i){n=l=t[0],s=u=t[1];for(var x=i;xl&&(l=h),f>u&&(u=f);g=Math.max(l-n,u-s)}return o(_,y,i,n,s,g),y}function r(t,e,i,n,r){var a,o;if(r===M(t,e,i,n)>0)for(a=e;a=e;a-=n)o=w(a,t[a],t[a+1],o);return o&&_(o,o.next)&&(T(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!_(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,r,c,d){if(t){!d&&c&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=f(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,a,o,s,l,u=1;do{for(i=t,t=null,a=null,o=0;i;){for(o++,n=i,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),a?a.nextZ=r:t=r,r.prevZ=a,a=r;i=n}a.nextZ=null,u*=2}while(o>1)}(r)}(t,n,r,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?l(t,n,r,c):s(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?o(t=u(t,e,i),e,i,n,r,c,2):2===d&&h(t,e,i,n,r,c):o(a(t),e,i,n,r,c,1);break}}}function s(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&v(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function l(t,e,i,n){var r=t.prev,a=t,o=t.next;if(v(r,a,o)>=0)return!1;for(var s=r.xa.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,h=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,c=f(s,l,e,i,n),d=f(u,h,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var r=n.prev,a=n.next.next;!_(r,a)&&y(r,n,n.next,a)&&x(r,a)&&x(a,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(a.i/i),T(n),T(n.next),n=t=a),n=n.next}while(n!==t);return n}function h(t,e,i,n,r,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var h=b(l,u);return l=a(l,l.next),h=a(h,h.next),o(l,e,i,n,r,s),void o(h,e,i,n,r,s)}u=u.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,r=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>o){if(o=s,s===r){if(a===n.y)return n;if(a===n.next.y)return n.next}i=n.x=n.x&&n.x>=h&&r!==n.x&&g(ai.x)&&x(n,t)&&(i=n,d=l),n=n.next;return i}(t,e)){var i=b(e,t);a(i,i.next)}}function f(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-s)-(i-o)*(e-s)>=0&&(i-o)*(a-s)-(r-o)*(n-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&x(t,e)&&x(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,a=(t.y+e.y)/2;do{i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,n){return!!(_(t,e)&&_(i,n)||_(t,n)&&_(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),r=t.next,a=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,a.next=n,n.prev=a,n}function w(t,e,i,n){var r=new S(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(t,e,i,n){for(var r=0,a=e,o=i-n;a0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});r.a.util.merge(h.prototype,a.a),r.a.util.merge(h.prototype,o.a),r.a.util.merge(h.prototype,s.a),r.a.util.merge(h.prototype,l.a)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(45),s=i(30),l=i(210),u=i(2);r.a.extendComponentView({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new a.a.Node,this._sphereGeometry=new a.a.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new a.a.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new a.a.PlaneGeometry,this._earthMesh=new a.a.Mesh({renderNormal:!0}),this._lightRoot=new a.a.Node,this._sceneHelper=new s.a,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._earthMesh),this._control=new o.a({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,i){var n=t.coordinateSystem,r=t.get("shading");n.viewGL.add(this._lightRoot),t.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL),this._sceneHelper.setScene(n.viewGL.scene),n.viewGL.setPostEffect(t.getModel("postEffect"),i),n.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var s="ecgl."+r;o.material&&o.material.shader.name===s||(o.material=a.a.createMaterial(s)),a.a.setMaterialFromModel(r,o.material,t,i),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",a.a.parseColor(t.get("baseColor")));var l=.99*n.radius;o.scale.set(l,l,l);var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),i,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",t.get("heightTexture"),i,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,i),this._displaceVertices(t,i),this._updateViewControl(t,i),this._updateLayers(t,i)},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i)},_updateLayers:function(t,e){var i=t.coordinateSystem,n=t.get("layers"),o=i.radius,s=[],l=[],h=[],c=[];r.a.util.each(n,(function(t){var n=new r.a.Model(t),d=n.get("type"),f=a.a.loadTexture(n.get("texture"),e,{flipY:!1,anisotropic:8});if(f.surface&&f.surface.attachToMesh(this._earthMesh),"blend"===d){var p=n.get("blendTo"),g=u.a.firstNotNull(n.get("intensity"),1);"emission"===p?(h.push(f),c.push(g)):(s.push(f),l.push(g))}else{var m=n.get("id"),v=this._layerMeshes[m];v||(v=this._layerMeshes[m]=new a.a.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===n.get("shading")?(v.material=v.__lambertMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),v.__lambertMaterial=v.material):(v.material=v.__colorMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.color"),transparent:!0,depthMask:!1}),v.__colorMaterial=v.material),v.material.enableTexture("diffuseMap");var _=n.get("distance"),y=o+(null==_?i.radius/100:_);v.scale.set(y,y,y),o=y;var x=this._blankTexture||(this._blankTexture=a.a.createBlankTexture("rgba(255, 255, 255, 0)"));v.material.set("diffuseMap",x),a.a.loadTexture(n.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(v),v.material.set("diffuseMap",t),e.getZr().refresh()})),n.get("show")?this.groupGL.add(v):this.groupGL.remove(v)}}),this);var d=this._earthMesh.material;d.define("fragment","LAYER_DIFFUSEMAP_COUNT",s.length),d.define("fragment","LAYER_EMISSIVEMAP_COUNT",h.length),d.set("layerDiffuseMap",s),d.set("layerDiffuseIntensity",l),d.set("layerEmissiveMap",h),d.set("layerEmissionIntensity",c);var f=t.getModel("debug.wireframe");if(f.get("show")){d.define("both","WIREFRAME_TRIANGLE");var p=a.a.parseColor(f.get("lineStyle.color")||"rgba(0,0,0,0.5)"),g=u.a.firstNotNull(f.get("lineStyle.width"),1);d.set("wireframeLineWidth",g),d.set("wireframeLineColor",p)}else d.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var i=t.coordinateSystem,n=t.getModel("viewControl"),r=(i.viewGL.camera,this),a=this._control;a.setViewGL(i.viewGL);var o,s,l=n.get("targetCoord");null!=l&&(s=l[0]+90,o=l[1]),a.setFromViewControlModel(n,{baseDistance:i.radius,alpha:o,beta:s}),a.off("update"),a.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:a.getAlpha(),beta:a.getBeta(),distance:a.getDistance()-i.radius,center:a.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var i=t.get("displacementQuality"),n=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||i!==this._displacementQuality||n!==this._showDebugWireframe){this._displacementQuality=i,this._showDebugWireframe=n;var a=this._sphereGeometry,o={low:100,medium:200,high:400,ultra:800}[i]||200,s=o/2;(a.widthSegments!==o||n)&&(a.widthSegments=o,a.heightSegments=s,a.build()),this._doDisplaceVertices(a,r),n&&a.generateBarycentric()}},_doDisplaceVertices:function(t,e){var i=t.attributes.position.value,n=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===i.length||((r=new Float32Array(i.length)).set(i),t.__originalPosition=r);for(var a=e.displacementWidth,o=e.displacementHeight,s=e.displacementData,l=0;lOpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return s.reduce((function(e,i){return e[i]=t.get(i),e}),{})},setMaptalksCameraOption:function(t){null!=t&&s.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});r.a.util.merge(l.prototype,a.a),r.a.util.merge(l.prototype,o.a)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(224),o=i(30),s=i(1),l=i(102);s.a.Shader.import(l.a),r.a.extendComponentView({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new s.a.Mesh({geometry:new s.a.PlaneGeometry,material:new s.a.Material({shader:new s.a.Shader({vertex:s.a.Shader.source("ecgl.displayShadow.vertex"),fragment:s.a.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var i=e.getZr();this._zrLayer=new a.a("maptalks3D",i,t.get("center"),t.get("zoom")),i.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new s.a.Node,this._sceneHelper=new o.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var n=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,n);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend"].forEach((function(t){n.on(t,r)}))},render:function(t,e,i){this._zrLayer||this._initMaptalksLayer(t,i);var n=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),a=n.getBaseLayer();r!==this._oldUrlTemplate&&(a?a.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(a=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),n.setBaseLayer(a))),this._oldUrlTemplate=r,n.setCenter(t.get("center")),n.setZoom(t.get("zoom"),{animation:!1}),n.setPitch(t.get("pitch")),n.setBearing(t.get("bearing")),t.setMaptalks(n);var o=t.coordinateSystem;o.viewGL.scene.add(this._lightRoot),o.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(o.viewGL.scene),this._sceneHelper.updateLight(t),o.viewGL.setPostEffect(t.getModel("postEffect"),i),o.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,i,n){t.coordinateSystem.setCameraOption(n),this._updateGroundMesh(),i.getZr().refresh()},_dispatchInteractAction:function(t,e,i){t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:e.getZoom(),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var i=new s.a.Plane(new s.a.Vector3(0,0,1),0),n=t.viewGL.camera.castRay(new s.a.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new s.a.Vector2(1,1)),a=n.intersectPlane(i),o=r.intersectPlane(i),l=a.dist(o)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(l,l,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}})},function(t,e,i){"use strict";function n(t,e,i,n){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:i,zoom:n,fog:!1}),this._initEvents()}n.prototype.resize=function(){this._maptalks.checkSize()},n.prototype.getMaptalks=function(){return this._maptalks},n.prototype.clear=function(){},n.prototype.refresh=function(){this._maptalks.checkSize()};var r=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];n.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},r.forEach((function(e){this._handlers[e]=function(i){var n={};for(var r in i)n[r]=i[r];n.bubbles=!1;var a=new i.constructor(i.type,n);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(a):t.firstElementChild.dispatchEvent(a)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},n.prototype.dispose=function(){r.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()},e.a=n},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(226),i(229),i(231),i(17));r.a.registerVisual(Object(a.a)("bar3D")),r.a.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(3),o=i(6),s=i(227),l=i(228),u=o.a.vec3,h=r.a.helper.dataStack.isDimensionStacked;function c(t,e){var i=h(t,e[2]);return{dimension:i?t.getCalculationInfo("stackResultDimension"):e[2],isStacked:i}}r.a.registerLayout((function(t,e){t.eachSeriesByType("bar3D",(function(t){var e=t.coordinateSystem,i=e&&e.type;if("globe"===i)!function(t,e){var i=t.getData(),n=t.get("minHeight")||0,o=t.get("barSize"),s=["lng","lat","alt"].map((function(e){return t.coordDimToDataDim(e)[0]}));if(null==o){var h=e.radius*Math.PI,d=Object(l.a)(i,s[0],s[1]);o=[h/Math.sqrt(i.count()/d),h/Math.sqrt(i.count()/d)]}else r.a.util.isArray(o)||(o=[o,o]);var f=c(i,s);i.each(s,(function(t,r,a,s){var l=i.get(f.dimension,s),h=f.isStacked?l-a:e.altitudeAxis.scale.getExtent()[0],c=Math.max(e.altitudeAxis.dataToCoord(a),n),d=e.dataToPoint([t,r,h]),p=e.dataToPoint([t,r,l]),g=u.sub([],p,d);u.normalize(g,g);var m=[o[0],c,o[1]];i.setItemLayout(s,[d,g,m])})),i.setLayout("orient",a.a.UP.array)}(t,e);else if("cartesian3D"===i)Object(s.a)(t,e);else if("geo3D"===i)!function(t,e){var i=t.getData(),n=t.get("barSize"),a=t.get("minHeight")||0,o=["lng","lat","alt"].map((function(e){return t.coordDimToDataDim(e)[0]}));if(null==n){var s=Math.min(e.size[0],e.size[2]),u=Object(l.a)(i,o[0],o[1]);n=[s/Math.sqrt(i.count()/u),s/Math.sqrt(i.count()/u)]}else r.a.util.isArray(n)||(n=[n,n]);var h=[0,1,0],d=c(i,o);i.each(o,(function(t,r,o,s){var l=i.get(d.dimension,s),u=d.isStacked?l-o:e.altitudeAxis.scale.getExtent()[0],c=Math.max(e.altitudeAxis.dataToCoord(o),a),f=e.dataToPoint([t,r,u]),p=[n[0],c,n[1]];i.setItemLayout(s,[f,h,p])})),i.setLayout("orient",[1,0,0])}(t,e);else{if("mapbox3D"!==i&&"maptalks3D"!==i)throw e?new Error("bar3D doesn't support coordinate system "+e.type):new Error("bar3D doesn't have coordinate system.");!function(t,e){var i=t.getData(),n=t.coordDimToDataDim("lng")[0],a=t.coordDimToDataDim("lat")[0],o=t.coordDimToDataDim("alt")[0],s=t.get("barSize"),u=t.get("minHeight")||0;if(null==s){var h=i.getDataExtent(n),d=i.getDataExtent(a),f=e.dataToPoint([h[0],d[0]]),p=e.dataToPoint([h[1],d[1]]),g=Math.min(Math.abs(f[0]-p[0]),Math.abs(f[1]-p[1]))||1,m=Object(l.a)(i,n,a);s=[g/Math.sqrt(i.count()/m),g/Math.sqrt(i.count()/m)]}else r.a.util.isArray(s)||(s=[s,s]),s[0]/=e.getScale()/16,s[1]/=e.getScale()/16;var v=[0,0,1],_=[n,a,o],y=c(i,_);i.each(_,(function(t,n,r,a){var o=i.get(y.dimension,a),l=y.isStacked?o-r:0,h=e.dataToPoint([t,n,l]),c=e.dataToPoint([t,n,o]),d=Math.max(c[2]-h[2],u),f=[s[0],d,s[1]];i.setItemLayout(a,[h,v,f])})),i.setLayout("orient",[1,0,0])}(t,e)}}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(6).a.vec3,o=r.a.helper.dataStack.isDimensionStacked;e.a=function(t,e){var i=t.getData(),n=t.get("barSize");if(null==n){var s,l,u=e.size,h=e.getAxis("x"),c=e.getAxis("y");s="category"===h.type?.7*h.getBandWidth():.6*Math.round(u[0]/Math.sqrt(i.count())),l="category"===c.type?.7*c.getBandWidth():.6*Math.round(u[1]/Math.sqrt(i.count())),n=[s,l]}else r.a.util.isArray(n)||(n=[n,n]);var d,f,p,g=e.getAxis("z").scale.getExtent(),m=(f=(d=g)[0],p=d[1],!(f>0&&p>0||f<0&&p<0)),v=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),_=o(i,v[2]),y=_?i.getCalculationInfo("stackResultDimension"):v[2];i.each(v,(function(t,r,o,s){var l=i.get(y,s),u=_?l-o:m?0:g[0],h=e.dataToPoint([t,r,u]),c=e.dataToPoint([t,r,l]),d=a.dist(h,c),f=[0,c[1]0&&(p++,c[3]<.99&&(g=!0))}})),s.geometry.setBarCount(p);var m=i.getLayout("orient"),v=this._barIndexOfData=new Int32Array(i.count());p=0,i.each((function(t){if(i.hasValue(t)){var e=i.getItemLayout(t),n=e[0],r=e[1],a=e[2],s=4*t;c[0]=d[s++],c[1]=d[s++],c[2]=d[s++],c[3]=d[s++],c[3]>0&&(o._barMesh.geometry.addBar(n,r,m,a,c,t),v[t]=p++)}else v[t]=-1})),s.geometry.dirty(),s.geometry.updateBoundingBox();var _=s.material;_.transparent=g,_.depthMask=!g,s.geometry.sortTriangles=g,this._initHandler(t,e)},_initHandler:function(t,e){var i=t.getData(),n=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;n.seriesIndex=t.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",(function(t){var o=n.geometry.getDataIndexOfVertex(t.triangle[0]);o!==a&&(this._downplay(a),this._highlight(o),this._labelsBuilder.updateLabels([o]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[i.get("x",o),i.get("y",o),i.get("z",o,!0)]})),a=o,n.dataIndex=o}),this),n.on("mouseout",(function(t){this._downplay(a),this._labelsBuilder.updateLabels(),a=-1,n.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var i=this._barIndexOfData[t];if(!(i<0)){var n=e.getItemModel(t).getModel("emphasis.itemStyle"),o=n.get("color"),s=n.get("opacity");if(null==o){var l=e.getItemVisual(t,"color");o=r.a.color.lift(l,-.4)}null==s&&(s=e.getItemVisual(t,"opacity"));var u=a.a.parseColor(o);u[3]*=s,this._barMesh.geometry.setColor(i,u),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var i=this._barIndexOfData[t];if(!(i<0)){var n=e.getItemVisual(t,"color"),r=e.getItemVisual(t,"opacity"),o=a.a.parseColor(n);o[3]*=r,this._barMesh.geometry.setColor(i,o),this._api.getZr().refresh()}}},highlight:function(t,e,i,n){this._toggleStatus("highlight",t,e,i,n)},downplay:function(t,e,i,n){this._toggleStatus("downplay",t,e,i,n)},_toggleStatus:function(t,e,i,n,a){var l=e.getData(),u=o.a.queryDataIndex(l,a),h=this;null!=u?r.a.util.each(s.a.normalizeToArray(u),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):l.each((function(e){"highlight"===t?h._highlight(e):h._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(t,e,i){"use strict";var n,r,a,o,s,l,u,h,c=i(0),d=i.n(c),f=i(38),p=i(65),g=i(15),m=i(6),v=m.a.vec3,_=m.a.mat3,y=g.a.extend((function(){return{attributes:{position:new g.a.Attribute("position","float",3,"POSITION"),normal:new g.a.Attribute("normal","float",3,"NORMAL"),color:new g.a.Attribute("color","float",4,"COLOR"),prevPosition:new g.a.Attribute("prevPosition","float",3),prevNormal:new g.a.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,i=this.getBarVertexCount()*t,n=this.getBarTriangleCount()*t;this.vertexCount!==i&&(this.attributes.position.init(i),e?this.attributes.normal.init(i):this.attributes.normal.value=null,this.attributes.color.init(i)),this.triangleCount!==n&&(this.indices=i>65535?new Uint32Array(3*n):new Uint16Array(3*n),this._dataIndices=new Uint32Array(i))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var i=this.getBarVertexCount(),n=i*(t+1),r=i*t;r0&&this.bevelSegments>0)this._addBevelBar(t,c,g,m,this.bevelSize,this.bevelSegments,_);else{v.copy(r,c),v.normalize(r,r),v.cross(a,g,r),v.normalize(a,a),v.cross(n,r,a),v.normalize(a,a),v.negate(o,n),v.negate(s,r),v.negate(l,a),e(u[0],t,n,m[0]/2),e(u[0],u[0],a,m[2]/2),e(u[1],t,n,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,o,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,o,m[0]/2),e(u[3],u[3],a,m[2]/2),e(i,t,r,m[1]),e(u[4],i,n,m[0]/2),e(u[4],u[4],a,m[2]/2),e(u[5],i,n,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],i,o,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],i,o,m[0]/2),e(u[7],u[7],a,m[2]/2);var b=this.attributes;if(this.enableNormal){h[0]=n,h[1]=o,h[2]=r,h[3]=s,h[4]=a,h[5]=l;for(var w=this._vertexOffset,T=0;T=0){var _=3*l,y=new u.a(this._points[_],this._points[_+1],this._points[_+2]);a.push({dataIndex:l,point:y,pointWorld:y.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(y)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(t,e){e.containStroke=function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||ot+s&&a>i+s||al?u.position[1]+=(h-l)/2:u.position[0]+=(h-s)/2;var c=u.getBoundingRect();return u.position[0]-=c.x,u.position[1]-=c.y,u.setStyle(i),u.update(),u.__size=h,u}(t,e,i),l=o.getMarginByStyle(i);return{image:a(s.__size,n,(function(t){s.brush(t)})),margin:l}},createSDFFromCanvas:function(t,e,i,n){return a(e,n,(function(e){var n=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,i){var n=e.width,r=e.height,a=t.canvas.width,o=t.canvas.height,s=n/a,l=r/o;function u(t){return t<128?1:-1}function h(t,a){var o=1/0;t=Math.floor(t*s);for(var h=(a=Math.floor(a*l))*n+t,c=u(e.data[4*h]),d=Math.max(a-i,0);d=0;c--){var d,f=s[2*(d=this.geometry.indices?this.geometry.indices[c]:c)],p=s[2*d+1],g=this.geometry.attributes.size.get(d)/this.sizeScale/2;if(t>f-g*u&&tp-g*h&&e=2e4},doSortVertices:function(t,e){var i=this.indices,n=r.create();if(!i){i=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var a=0;a.05);else for(a=0;a<3;a++)this._progressiveQuickSort(3*e+a);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,i=this.indices;function r(t,i){return e[i]-e[t]}t?Array.prototype.sort.call(i,r):n.a.sort(i,r,0,i.length-1)},_progressiveQuickSort:function(t){var e=this._zList,i=this.indices;this._quickSort=this._quickSort||new n.a,this._quickSort.step(i,(function(t,i){return e[i]-e[t]}),t)}}},function(t,e,i){"use strict";e.a="@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end"},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(244),i(245),i(248),i(17));r.a.registerVisual(Object(a.a)("lines3D")),r.a.registerAction({type:"lines3DPauseEffect",event:"lines3deffectpaused",update:"series.lines3D:pauseEffect"},(function(){})),r.a.registerAction({type:"lines3DResumeEffect",event:"lines3deffectresumed",update:"series.lines3D:resumeEffect"},(function(){})),r.a.registerAction({type:"lines3DToggleEffect",event:"lines3deffectchanged",update:"series.lines3D:toggleEffect"},(function(){}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(6),o=a.a.vec3,s=a.a.vec2,l=o.normalize,u=o.cross,h=o.sub,c=o.add,d=o.create,f=d(),p=d(),g=d(),m=d(),v=[],_=[];function y(t,e){s.copy(v,t[0]),s.copy(_,t[1]);var i=[],n=i[0]=d(),r=i[1]=d(),a=i[2]=d(),y=i[3]=d();e.dataToPoint(v,n),e.dataToPoint(_,y),l(f,n),h(p,y,n),l(p,p),u(g,p,f),l(g,g),u(p,f,g),c(r,f,p),l(r,r),l(f,y),h(p,n,y),l(p,p),u(g,p,f),l(g,g),u(p,f,g),c(a,f,p),l(a,a),c(m,n,y),l(m,m);var x=o.dot(n,m),b=o.dot(m,r),w=(Math.max(o.len(n),o.len(y))-x)/b*2;return o.scaleAndAdd(r,n,r,w),o.scaleAndAdd(a,y,a,w),i}function x(t,e){for(var i=new Float32Array(3*t.length),n=0,r=[],a=0;a0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");e.push(r)})),{coordsList:e}}function w(t,e,i){var n=t.getData(),r=t.get("polyline"),a=b(n);n.setLayout("lineType",r?"polyline":"cubicBezier"),n.each((function(t){var s=a.coordsList[t],l=r?x(s,e):function(t,e,i){var n=[],r=n[0]=o.create(),a=n[1]=o.create(),s=n[2]=o.create(),l=n[3]=o.create();e.dataToPoint(t[0],r),e.dataToPoint(t[1],l);var u=o.dist(r,l);return o.lerp(a,r,l,.3),o.lerp(s,r,l,.3),o.scaleAndAdd(a,a,i,Math.min(.1*u,10)),o.scaleAndAdd(s,s,i,Math.min(.1*u,10)),n}(s,e,i);n.setItemLayout(t,l)}))}r.a.registerLayout((function(t,e){t.eachSeriesByType("lines3D",(function(t){var e=t.coordinateSystem;"globe"===e.type?function(t,e){var i=t.getData(),n=t.get("polyline");i.setLayout("lineType",n?"polyline":"cubicBezier");var r=b(i);i.each((function(t){var a=r.coordsList[t],o=n?x:y;i.setItemLayout(t,o(a,e))}))}(t,e):"geo3D"===e.type?w(t,e,[0,1,0]):"mapbox3D"!==e.type&&"maptalks3D"!==e.type||w(t,e,[0,0,1])}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(25),s=i(246),l=i(46);a.a.Shader.import(l.a),r.a.extendChartView({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new a.a.Node,this._meshLinesMaterial=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new a.a.Mesh({geometry:new o.a,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new s.a},render:function(t,e,i){this.groupGL.add(this._linesMesh);var n=t.coordinateSystem,r=t.getData();if(n&&n.viewGL){n.viewGL.add(this.groupGL),this._updateLines(t,e,i);var o=n.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var s=this._trailMesh;s.stopAnimation(),t.get("effect.show")?(this.groupGL.add(s),s.updateData(r,i,this._linesMesh.geometry),s.__time=s.__time||0,this._curveEffectsAnimator=s.animate("",{loop:!0}).when(36e5,{__time:36e5}).during((function(){s.setAnimationTime(s.__time)})).start()):(this.groupGL.remove(s),this._curveEffectsAnimator=null),this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?a.a.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,i){var n=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,s=t.get("polyline");o.expandLine=!0;var l=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=l/20;var u="lineStyle.width".split("."),h=i.getDevicePixelRatio(),c=0;n.each((function(t){var e=n.getItemModel(t).get(u);null==e&&(e=1),n.setItemVisual(t,"lineWidth",e),c=Math.max(e,c)})),o.useNativeLine=!1;var d=0,f=0;n.each((function(t){var e=n.getItemLayout(t);s?(d+=o.getPolylineVertexCount(e),f+=o.getPolylineTriangleCount(e)):(d+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),f+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(d),o.setTriangleCount(f),o.resetOffset();var p=[];n.each((function(t){var e=n.getItemLayout(t),i=n.getItemVisual(t,"color"),r=n.getItemVisual(t,"opacity"),l=n.getItemVisual(t,"lineWidth")*h;null==r&&(r=1),(p=a.a.parseColor(i,p))[3]*=r,s?o.addPolyline(e,p,l):o.addCubicCurve(e[0],e[1],e[2],e[3],p,l)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(t,e,i){"use strict";var n=i(0),r=(i.n(n),i(1)),a=i(6),o=i(25),s=i(247),l=a.a.vec3;r.a.Shader.import(s.a),e.a=r.a.Mesh.extend((function(){var t=new r.a.Material({shader:new r.a.Shader(r.a.Shader.source("ecgl.trail2.vertex"),r.a.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new o.a({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,i){var n=t.hostModel,a=this.geometry,o=n.getModel("effect"),s=o.get("trailWidth")*e.getDevicePixelRatio(),u=o.get("trailLength"),h=n.get("effect.constantSpeed"),c=1e3*n.get("effect.period"),d=null!=h;this.getScene()||console.error("TrailMesh must been add to scene before updateData"),d?this.material.set("speed",h/1e3):this.material.set("period",c),this.material[d?"define":"undefine"]("vertex","CONSTANT_SPEED");var f=n.get("polyline");a.trailLength=u,this.material.set("trailLength",u),a.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){a.attributes[t].value=i.attributes[t].value})),["dist","distAll","start","offset","color"].forEach((function(t){a.attributes[t].init(a.vertexCount)})),a.indices=i.indices;var p=[],g=o.get("trailColor"),m=o.get("trailOpacity"),v=null!=g,_=null!=m;this.updateWorldTransform();var y=this.worldTransform.x.len(),x=this.worldTransform.y.len(),b=this.worldTransform.z.len(),w=0,T=0;t.each((function(e){var n=t.getItemLayout(e),o=_?m:t.getItemVisual(e,"opacity"),u=t.getItemVisual(e,"color");null==o&&(o=1),(p=r.a.parseColor(v?g:u,p))[3]*=o;for(var h=f?i.getPolylineVertexCount(n):i.getCubicCurveVertexCount(n[0],n[1],n[2],n[3]),S=0,M=[],A=[],C=w;Cw&&(S+=l.dist(M,A)),a.attributes.dist.set(C,S),l.copy(A,M);T=Math.max(T,S);var I=Math.random()*(d?S:c);for(C=w;C0?1:-1)*s/2),a.attributes.color.set(C,p);w+=h})),this.material.set("spotSize",.1*T*u),this.material.set("spotIntensity",o.get("spotIntensity")),a.dirty()},setAnimationTime:function(t){this.material.set("time",t)}})},function(t,e,i){"use strict";e.a="@export ecgl.trail2.vertex\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute float dist;\nattribute float distAll;\nattribute float start;\n\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nuniform float speed : 0;\nuniform float trailLength: 0.3;\nuniform float time;\nuniform float period: 1000;\n\nuniform float spotSize: 1;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n\n#ifdef CONSTANT_SPEED\n float t = mod((speed * time + start) / distAll, 1. + trailLength) - trailLength;\n#else\n float t = mod((time + start) / period, 1. + trailLength) - trailLength;\n#endif\n\n float trailLen = distAll * trailLength;\n\n v_Percent = (dist - t * distAll) / trailLen;\n\n v_SpotPercent = spotSize / distAll;\n\n }\n@end\n\n\n@export ecgl.trail2.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform float spotIntensity: 5;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n if (v_Percent > 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end"},function(t,e,i){"use strict";var n=i(0),r=i.n(n);r.a.extendSeriesModel({type:"series.lines3D",dependencies:["globe"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=new r.a.List(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,r){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[r]:a:void 0})),i},defaultOption:{coordinateSystem:"globe",globeIndex:0,geo3DIndex:0,zlevel:-10,polyline:!1,effect:{show:!1,period:4,trailWidth:4,trailLength:.2,spotIntensity:6},silent:!0,blendMode:"source-over",lineStyle:{width:1,opacity:.5}}})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(250),i(251),i(17));r.a.registerVisual(Object(a.a)("polygons3D"))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(31);function o(t,e){for(var i=[],n=0;n0;this._updateSurfaceMesh(this._surfaceMesh,t,c,p);var g=this._surfaceMesh.material;p?(g.define("WIREFRAME_QUAD"),g.set("wireframeLineWidth",f),g.set("wireframeLineColor",a.a.parseColor(d.get("lineStyle.color")))):g.undefine("WIREFRAME_QUAD"),this._initHandler(t,i),this._updateAnimation(t)},_updateAnimation:function(t){a.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new a.a.Mesh({geometry:new a.a.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new a.a.Material({shader:new a.a.Shader(a.a.Shader.source("ecgl.sm.depth.vertex"),a.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),r.a.util.extend(t.geometry,s.a),t},_initHandler:function(t,e){var i=t.getData(),n=this._surfaceMesh,r=t.coordinateSystem;n.seriesIndex=t.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",(function(t){var o=function(t,e){for(var i=1/0,r=-1,a=[],o=0;o=0){var s=[];n.geometry.attributes.position.get(o,s);for(var u=r.pointToData(s),h=1/0,c=-1,d=[],f=0;f65535?Uint32Array:Uint16Array)((m-1)*(v-1)*6),S=function(t,e,i){i[1]=t*v+e,i[0]=t*v+e+1,i[3]=(t+1)*v+e+1,i[2]=(t+1)*v+e},M=!1;if(h){var A=[],C=[],I=0;_?d.init(r.vertexCount):d.value=null;for(var L=[[],[],[]],E=[],P=[],D=l.create(),O=function(t,e,i){var n=3*e;return i[0]=t[n],i[1]=t[n+1],i[2]=t[n+2],i},R=new Float32Array(s.length),N=new Float32Array(s.length/3*4),k=0;k ")),a.value&&(h+=" : "+r.a.format.encodeHTML(a.value)),h}return s.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:r.a.util.extend({value:0},t)})),e=new r.a.List(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e "+v)),p++)}var _=r.a.helper.completeDimensions(["value"],t);(c=new r.a.List(_,i)).initData(t);var y=new r.a.List(["value"],i);return y.initData(f,d),a&&a(c,y),l()({mainData:c,struct:s,structAttr:"graph",datas:{node:c,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},function(t,e,i){i(104).__DEV__;var n=i(13),r=i(266).enableClassCheck;function a(t){return"_EC_"+t}var o=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function u(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[a(t)]){var n=new l(t,e);return n.hostGraph=this,this.nodes.push(n),i[a(t)]=n,n}},s.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},s.getNodeById=function(t){return this._nodesMap[a(t)]},s.addEdge=function(t,e,i){var n=this._nodesMap,r=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),l.isInstance(t)||(t=n[a(t)]),l.isInstance(e)||(e=n[a(e)]),t&&e){var o=t.id+"-"+e.id;if(!r[o]){var s=new u(t,e,i);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),r[o]=s,s}}},s.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},s.getEdge=function(t,e){l.isInstance(t)&&(t=t.id),l.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},s.eachNode=function(t,e){for(var i=this.nodes,n=i.length,r=0;r=0&&t.call(e,i[r],r)},s.eachEdge=function(t,e){for(var i=this.edges,n=i.length,r=0;r=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&t.call(e,i[r],r)},s.breadthFirstTraverse=function(t,e,i,n){if(l.isInstance(e)||(e=this._nodesMap[a(e)]),e){for(var r="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o=0&&i.node2.dataIndex>=0})),r=0,a=n.length;r=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};n.mixin(l,h("hostGraph","data")),n.mixin(u,h("hostGraph","edgeData")),o.Node=l,o.Edge=u,r(l),r(u);var c=o;t.exports=c},function(t,e,i){i(104).__DEV__;var n=i(13),r="___EC__COMPONENT__CONTAINER___";function a(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}var o=0;function s(t,e){var i=n.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function l(t,e,i){return this.superClass.prototype[e].apply(t,i)}e.parseClassType=a,e.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return n.extend(i.prototype,t),i.extend=this.extend,i.superCall=s,i.superApply=l,n.inherits(i,this),i.superClass=e,i}},e.enableClassCheck=function(t){var e=["__\0is_clz",o++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},e.enableClassManagement=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(function(t){n.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=a(e)).sub?e.sub!==r&&((function(t){var e=i[t.main];return e&&e[r]||((e=i[t.main]={})[r]=!0),e}(e))[e.sub]=t):i[e.main]=t),t},t.getClass=function(t,e,n){var a=i[t];if(a&&a[r]&&(a=e?a[e]:null),n&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=a(t);var e=[],o=i[t.main];return o&&o[r]?n.each(o,(function(t,i){i!==r&&e.push(t)})):e.push(o),e},t.hasClass=function(t){return t=a(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return n.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=a(t);var e=i[t.main];return e&&e[r]},t.parseClassType=a,e.registerWhenExtend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t},e.setReadOnly=function(t,e){}},function(t,e,i){var n=i(13),r=n.each,a="\0__link_datas",o="\0__link_mainData";function s(t,e){if((r=this)[o]===r){var i=n.extend({},this[a]);i[this.dataType]=e,c(e,i,t)}else d(e,this.dataType,this[o],t);var r;return e}function l(t,e){return t.struct&&t.struct.update(this),e}function u(t,e){return r(e[a],(function(i,n){i!==e&&d(i.cloneShallow(),n,e,t)})),e}function h(t){var e=this[o];return null==t||null==e?e:e[a][t]}function c(t,e,i){t[a]={},r(e,(function(e,n){d(e,n,t,i)}))}function d(t,e,i,n){i[a][e]=t,t[o]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=h}var f=function(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,c(e,i,t),r(i,(function(i){r(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,n.curry(s,t))}))})),e.wrapMethod("cloneShallow",n.curry(u,t)),r(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,n.curry(l,t))})),n.assert(i[e.dataType]===e)};t.exports=f},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(47),o=i.n(a),s=i(1),l=i(22),u=i(105),h=i(2),c=i(269),d=i(271),f=i(80),p=i.n(f),g=i(6),m=i(273),v=i(67),_=i(274),y=g.a.vec2;s.a.Shader.import(_.a);var x,b=1;r.a.extendChartView({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new s.a.Node,this.viewGL=new l.a("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new v.a(!0,e),this._forceEdgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new s.a.Geometry({attributes:{node:new s.a.Geometry.Attribute("node","float",2),color:new s.a.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:s.a.Mesh.LINES}),this._edgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new u.a({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new m.a({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,i){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=i,this._initLayout(t,e,i),this._pointsBuilder.update(t,e,i),this._forceLayoutInstance instanceof c.a||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,i),this._control.off("update"),this._control.on("update",(function(){i.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(h.a.firstNotNull(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var n=this._pointsBuilder.getPointsMesh();if(n.off("mousemove",this._mousemoveHandler),n.off("mouseout",this._mouseOutHandler,this),i.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?i.getZr().on("click",this._clickHandler):"mouseover"===r?(n.on("mousemove",this._mousemoveHandler,this),n.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1):console.warn("Unkown focusNodeAdjacencyOn value s"+r)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var i=this._forceEdgesMesh.geometry,n=e.getEdgeData(),r=0,a=this._forceLayoutInstance,o=2*n.count();i.attributes.node.init(o),i.attributes.color.init(o),n.each((function(e){var o=t[e];i.attributes.node.set(r,a.getNodeUV(o.node1)),i.attributes.node.set(r+1,a.getNodeUV(o.node2));var l=n.getItemVisual(o.dataIndex,"color"),u=s.a.parseColor(l);u[3]*=h.a.firstNotNull(n.getItemVisual(o.dataIndex,"opacity"),1),i.attributes.color.set(r,u),i.attributes.color.set(r+1,u),r+=2})),i.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,i=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var n=[],r=[],a=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(o){var l=t.graph.getEdgeByIndex(o),u=2*l.node1.dataIndex,c=2*l.node2.dataIndex;n[0]=i[u],n[1]=i[u+1],r[0]=i[c],r[1]=i[c+1];var d=t.getItemVisual(l.dataIndex,"color"),f=s.a.parseColor(d);f[3]*=h.a.firstNotNull(t.getItemVisual(l.dataIndex,"opacity"),1);var p=t.getItemModel(l.dataIndex),g=h.a.firstNotNull(p.get(a),1)*this._api.getDevicePixelRatio();e.addLine(n,r,f,g);for(var m=0;m<4;m++)this._originalEdgeColors[4*l.dataIndex+m]=f[m];this._edgeIndicesMap[l.dataIndex]=o}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),i=[],n=0;n=f&&(l._syncNodePosition(t),d=0),i.getZr().refresh(),p()((function(){g(e)}))}))};p()((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),g(u)})),this._layouting=!0}}else console.error("None layout don't have startLayout action")}},stopLayout:function(t,e,i,n){n&&null!=n.from&&n.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(n&&n.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,i)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,i){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,i),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,i,n){var r=this._model.getData();this._downplayAll();var a=n.dataIndex,o=r.graph,s=[],l=o.getNodeByIndex(a);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,i,n){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),i=s.a.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),n=h.a.firstNotNull(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);i[3]*=n,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],i)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:(x=[],function(t,e){this._getColor(t,x),x[3]*=e,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],x)}),_getColor:function(t,e){for(var i=0;i<4;i++)e[i]=this._originalEdgeColors[4*t+i];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var i=this.viewGL.camera,n=t.getData().getLayout("points"),r=y.create(1/0,1/0),a=y.create(-1/0,-1/0),o=[],s=0;si.left&&ui.top)){var h=Math.max(a[0]-r[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,r[0]-=.2*h,i.left=r[0],i.top=l-c/2,i.bottom=l+c/2,i.right=h+r[0],i.near=0,i.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1},remove:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(16),s=i(10),l=i(270);a.a.Shader.import(l.a);var u={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function h(t){var e={type:a.a.Texture.FLOAT,minFilter:a.a.Texture.NEAREST,magFilter:a.a.Texture.NEAREST};this._positionSourceTex=new a.a.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new a.a.Texture2D(e),this._positionPrevTex=new a.a.Texture2D(e),this._forceTex=new a.a.Texture2D(e),this._forcePrevTex=new a.a.Texture2D(e),this._weightedSumTex=new a.a.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new a.a.Texture2D(e),this._globalSpeedPrevTex=new a.a.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new o.a({fragment:a.a.Shader.source("clay.compositor.output")});var i=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new a.a.Mesh({geometry:new a.a.Geometry({attributes:{node1:new a.a.Geometry.Attribute("node1","float",2),node2:new a.a.Geometry.Attribute("node2","float",2),weight:new a.a.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new a.a.Material({transparent:!0,shader:a.a.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:i,depthMask:!1,depthText:!1}),mode:a.a.Mesh.POINTS}),this._weightedSumMesh=new a.a.Mesh({geometry:new a.a.Geometry({attributes:{node:new a.a.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new a.a.Material({transparent:!0,shader:a.a.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:i,depthMask:!1,depthText:!1}),mode:a.a.Mesh.POINTS}),this._framebuffer=new s.a({depthBuffer:!1}),this._dummyCamera=new a.a.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}h.prototype.updateOption=function(t){for(var e in u)this[e]=u[e];var i=this._nodes.length;if(this.jitterTolerence=i>5e4?10:i>5e3?1:.1,this.scaling=i>100?2:10,t)for(var e in u)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var n=this._positionSourceTex.pixels,r=0;rt},h.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t,t=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=t,t=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},h.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},h.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(i){this[i].width=t,this[i].height=e,this[i].dirty()}),this)},h.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)},r.a.ForceAtlas2GPU=h,e.a=h},function(t,e,i){"use strict";e.a="@export ecgl.forceAtlas2.updateNodeRepulsion\n\n#define NODE_COUNT 0\n\nuniform sampler2D positionTex;\n\nuniform vec2 textureSize;\nuniform float gravity;\nuniform float scaling;\nuniform vec2 gravityCenter;\n\nuniform bool strongGravityMode;\nuniform bool preventOverlap;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, v_Texcoord);\n\n vec2 force = vec2(0.0);\n for (int i = 0; i < NODE_COUNT; i++) {\n vec2 uv = vec2(\n mod(float(i), textureSize.x) / (textureSize.x - 1.0),\n floor(float(i) / textureSize.x) / (textureSize.y - 1.0)\n );\n vec4 n1 = texture2D(positionTex, uv);\n\n vec2 dir = n0.xy - n1.xy;\n float d2 = dot(dir, dir);\n\n if (d2 > 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end"},function(t,e,i){"use strict";var n=i(5),r=i(4),a=i(272).a.toString();a=a.slice(a.indexOf("{")+1,a.lastIndexOf("}"));var o={barnesHutOptimize:!0,barnesHutTheta:1.5,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null},s=function(t){for(var e in o)this[e]=o[e];if(t)for(var e in t)this[e]=t[e];this._nodes=[],this._edges=[],this._disposed=!1,this._positionTex=new n.a({type:r.a.FLOAT,flipY:!1,minFilter:r.a.NEAREST,magFilter:r.a.NEAREST})};s.prototype.initData=function(t,e){var i=new Blob([a]),n=window.URL.createObjectURL(i);this._worker=new Worker(n),this._worker.onmessage=this._$onupdate.bind(this),this._nodes=t,this._edges=e,this._frame=0;for(var r=t.length,o=e.length,s=new Float32Array(2*r),l=new Float32Array(r),u=new Float32Array(r),h=new Float32Array(2*o),c=new Float32Array(o),d=0;d5e4?10:a>5e3?1:.1,e.scaling=a>100?2:10,e.barnesHutOptimize=a>1e3,t)for(var i in o)null!=t[i]&&(e[i]=t[i]);if(!e.gravityCenter){for(var s=[1/0,1/0],l=[-1/0,-1/0],u=0;ut},s.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var i=0;i=t&&this.bbox[1]<=e&&this.bbox[3]>=e},u.setBBox=function(t,e,i,n){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=i,this.bbox[3]=n,this.size=(i-t+n-e)/2},u._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new l,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},u._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),i=this.bbox;if(!e){var n=(i[0]+i[2])/2,r=(i[1]+i[3])/2,a=(i[2]-i[0])/2,o=(i[3]-i[1])/2,s=t.position[0]>=n?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*a+i[0],l*o+i[1],(s+1)*a+i[0],(l+1)*o+i[1])}e.addNode(t)},u._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,i=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,i+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=i/this.mass};var f,p=d.prototype;p.initNodes=function(t,e,i){var n=e.length;this.nodes.length=0;for(var r=void 0!==i,a=0;a0&&(this.strongGravityMode?this.applyNodeStrongGravity(h):this.applyNodeGravity(h))}for(l=0;l0&&(m=Math.min(m/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=m,l=0;l0&&(_=Math.min(y*_,10)/y,n(u.position,u.position,u.force,_))}},p.applyRegionToNodeRepulsion=(f=t(),function(t,e){if(t.node)this.applyNodeToNodeRepulsion(t.node,e,!0);else{a(f,e.position,t.centerOfMass);var i=f[0]*f[0]+f[1]*f[1];if(i>this.barnesHutTheta*t.size*t.size){var r=this.scaling*e.mass*t.mass/i;n(e.force,e.force,f,r)}else for(var o=0;o0)s=this.scaling*t.mass*i.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*i.mass}}else s=this.scaling*t.mass*i.mass/o;n(t.force,t.force,e,s),n(i.force,i.force,e,-s)}}}}(),p.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,o=t.target;a(e,r.position,o.position);var s,l,u=i(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-o.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,n(r.force,r.force,e,l),n(o.force,o.force,e,-l))}}(),p.applyNodeGravity=function(){var e=t();return function(t){a(e,this.gravityCenter,t.position);var r=i(e);n(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),p.applyNodeStrongGravity=function(){var e=t();return function(t){a(e,this.gravityCenter,t.position),n(t.force,t.force,e,this.gravity*t.mass)}}(),p.updateBBox=function(){for(var t=1/0,e=1/0,i=-1/0,n=-1/0,r=0;r0?1.1:.9,a=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=a/this._zoom;var o=this._convertPos(i,n),s=(o.x-this._dx)*(r-1),l=(o.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=a,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}}));e.a=r},function(t,e,i){"use strict";e.a="@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end"},function(t,e,i){"use strict";var n=i(0);i.n(n),i(276),i(280)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(2),s=i(22),l=i(277);r.a.extendChartView({type:"flowGL",__ecgl__:!0,init:function(t,e){this.viewGL=new s.a("orthographic"),this.groupGL=new a.a.Node,this.viewGL.add(this.groupGL),this._particleSurface=new l.a;var i=new a.a.Mesh({geometry:new a.a.PlaneGeometry,material:new a.a.Material({shader:new a.a.Shader({vertex:a.a.Shader.source("ecgl.color.vertex"),fragment:a.a.Shader.source("ecgl.color.fragment")}),transparent:!0})});i.material.enableTexture("diffuseMap"),this.groupGL.add(i),this._planeMesh=i},render:function(t,e,i){var n=this._particleSurface;n.setParticleType(t.get("particleType")),n.setSupersampling(t.get("supersampling")),this._updateData(t,i),this._updateCamera(i.getWidth(),i.getHeight(),i.getDevicePixelRatio());var r=o.a.firstNotNull(t.get("particleDensity"),128);n.setParticleDensity(r,r);var s=this._planeMesh,l=+new Date,u=this,h=!0;s.__percent=0,s.stopAnimation(),s.animate("",{loop:!0}).when(1e5,{__percent:1}).during((function(){var t=+new Date,e=Math.min(t-l,20);l+=e,u._renderer&&(n.update(u._renderer,i,e/1e3,h),s.material.set("diffuseMap",n.getSurfaceTexture())),h=!1})).start();var c=t.getModel("itemStyle"),d=a.a.parseColor(c.get("color"));d[3]*=o.a.firstNotNull(c.get("opacity"),1),s.material.set("color",d),n.setColorTextureImage(t.get("colorTexture"),i),n.setParticleSize(t.get("particleSize")),n.particleSpeedScaling=t.get("particleSpeed"),n.motionBlurFactor=1-Math.pow(.1,t.get("particleTrail"))},updateTransform:function(t,e,i){this._updateData(t,i)},afterRender:function(t,e,i,n){var r=n.renderer;this._renderer=r},_updateData:function(t,e){var i=t.coordinateSystem,n=i.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]})),r=t.getData(),a=r.getDataExtent(n[0]),o=r.getDataExtent(n[1]),s=t.get("gridWidth"),l=t.get("gridHeight");if(null==s||"auto"===s){var u=(a[1]-a[0])/(o[1]-o[0]);s=Math.round(Math.sqrt(u*r.count()))}null!=l&&"auto"!==l||(l=Math.ceil(r.count()/s));var h=this._particleSurface.vectorFieldTexture,c=h.pixels;if(c&&c.length===l*s*4)for(var d=0;d=359&&(r[0]>0&&(r[0]=0),a[0]0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new l.a),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var i=e.getContext("2d");return i.fillStyle="#fff",i.arc(t/2,t/2,t/2,0,2*Math.PI),i.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var i=this._downsampleTextures,n=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,a=this._width*this._supersampling,o=this._height*this._supersampling,s=0;s65535?new Uint32Array(3*n):new Uint16Array(3*n))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}}));e.a=a},function(t,e,i){"use strict";e.a="@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n"},function(t,e,i){"use strict";var n=i(0),r=i.n(n);r.a.extendSeriesModel({type:"series.flowGL",dependencies:["geo","grid","bmap"],visualColorAccessPath:"itemStyle.color",getInitialData:function(t,e){var i=r.a.getCoordinateSystemDimensions(this.get("coordinateSystem"))||["x","y"];if(i.length>2)throw new Error("flowGL can only be used on 2d coordinate systems.");i.push("vx","vy");var n=r.a.helper.completeDimensions(i,this.getSource(),{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),a=new r.a.List(n,this);return a.initData(this.getSource()),a},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,supersampling:1,particleType:"point",particleDensity:128,particleSize:1,particleSpeed:1,particleTrail:2,colorTexture:null,gridWidth:"auto",gridHeight:"auto",itemStyle:{color:"#fff",opacity:.8}}})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(282),i(283),i(17));r.a.registerVisual(Object(a.a)("linesGL"))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(13),o=(i.n(a),r.a.extendSeriesModel({type:"series.linesGL",dependencies:["grid","geo"],visualColorAccessPath:"lineStyle.color",streamEnabled:!0,init:function(t){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),o.superApply(this,"init",arguments)},mergeOption:function(t){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),o.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Object(a.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Object(a.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),i=e.option instanceof Array?e.option:e.getShallow("coords");if(!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],r=0;ri)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,o),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){var i=new r.a.List(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,r){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[r]:a:void 0})),i},defaultOption:{coordinateSystem:"geo",zlevel:10,progressive:1e4,progressiveThreshold:5e4,blendMode:"source-over",lineStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(22),s=i(105),l=i(103),u=i(2);r.a.extendChartView({type:"linesGL",__ecgl__:!0,init:function(t,e){this.groupGL=new a.a.Node,this.viewGL=new o.a("orthographic"),this.viewGL.add(this.groupGL),this._glViewHelper=new l.a(this.viewGL),this._nativeLinesShader=a.a.createShader("ecgl.lines3D"),this._meshLinesShader=a.a.createShader("ecgl.meshLines3D"),this._linesMeshes=[],this._currentStep=0},render:function(t,e,i){this.groupGL.removeAll(),this._glViewHelper.reset(t,i);var n=this._linesMeshes[0];n||(n=this._linesMeshes[0]=this._createLinesMesh(t)),this._linesMeshes.length=1,this.groupGL.add(n),this._updateLinesMesh(t,n,0,t.getData().count()),this.viewGL.setPostEffect(t.getModel("postEffect"),i)},incrementalPrepareRender:function(t,e,i){this.groupGL.removeAll(),this._glViewHelper.reset(t,i),this._currentStep=0,this.viewGL.setPostEffect(t.getModel("postEffect"),i)},incrementalRender:function(t,e,i,n){var r=this._linesMeshes[this._currentStep];r||(r=this._createLinesMesh(e),this._linesMeshes[this._currentStep]=r),this._updateLinesMesh(e,r,t.start,t.end),this.groupGL.add(r),n.getZr().refresh(),this._currentStep++},updateTransform:function(t,e,i){t.coordinateSystem.getRoamTransform&&this._glViewHelper.updateTransform(t,i)},_createLinesMesh:function(t){return new a.a.Mesh({$ignorePicking:!0,material:new a.a.Material({shader:a.a.createShader("ecgl.lines3D"),transparent:!0,depthMask:!1,depthTest:!1}),geometry:new s.a({segmentScale:10,useNativeLine:!0,dynamic:!1}),mode:a.a.Mesh.LINES,culling:!1})},_updateLinesMesh:function(t,e,i,n){var r=t.getData();e.material.blend="lighter"===t.get("blendMode")?a.a.additiveBlend:null;var o=t.get("lineStyle.curveness")||0,s=t.get("polyline"),l=e.geometry,h=t.coordinateSystem,c=u.a.firstNotNull(t.get("lineStyle.width"),1);c>1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=a.a.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=a.a.Mesh.LINES),i=i||0,n=n||r.count(),l.resetOffset();var d=0,f=0,p=[],g=[],m=[],v=[],_=[],y=.3;function x(){g[0]=.7*p[0]+v[0]*y-(p[1]-v[1])*o,g[1]=.7*p[1]+v[1]*y-(v[0]-p[0])*o,m[0]=p[0]*y+.7*v[0]-(p[1]-v[1])*o,m[1]=p[1]*y+.7*v[1]-(v[0]-p[0])*o}if(s||0!==o)for(var b=i;bn)return!1;return!0}(s,e))){var l=e.mapDimension(s.dim),u={};return n.each(s.getViewLabels(),(function(t){u[t.tickValue]=1})),function(t){return!u.hasOwnProperty(e.get(l,t))}}}}function M(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),r=_(t,e,i);if(!i.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);n?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return y(t,e,i)}var A=f.extend({type:"line",init:function(){var t=new l.Group,e=new a;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var r=t.coordinateSystem,a=this.group,o=t.getData(),s=t.getModel("lineStyle"),u=t.getModel("areaStyle"),h=o.mapArray(o.getItemLayout),c="polar"===r.type,d=this._coordSys,f=this._symbolDraw,p=this._polyline,v=this._polygon,_=this._lineGroup,y=t.get("animation"),b=!u.isEmpty(),A=u.get("origin"),C=function(t,e,i){if(!i.valueDim)return[];for(var n=[],r=0,a=e.count();r=0;o--){var s=i[o].dimension,u=t.dimensions[s],h=t.getDimensionInfo(u);if("x"===(r=h&&h.coordDim)||"y"===r){a=i[o];break}}if(a){var c=e.getAxis(r),d=n.map(a.stops,(function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}})),f=d.length,p=a.outerColors.slice();f&&d[0].coord>d[f-1].coord&&(d.reverse(),p.reverse());var g=d[0].coord-10,m=d[f-1].coord+10,v=m-g;if(v<.001)return"transparent";n.each(d,(function(t){t.offset=(t.coord-g)/v})),d.push({offset:f?d[f-1].offset:.5,color:p[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:p[0]||"transparent"});var _=new l.LinearGradient(0,0,0,0,d,!0);return _[r]=g,_[r+"2"]=m,_}}}(o,r)||o.getVisual("color");p.useStyle(n.defaults(s.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"}));var R=t.get("smooth");if(R=w(t.get("smooth")),p.setShape({smooth:R,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var N=o.getCalculationInfo("stackedOnSeries"),k=0;v.useStyle(n.defaults(u.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel"})),N&&(k=w(N.get("smooth"))),v.setShape({smooth:R,stackedOnSmooth:k,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=r,this._stackedOnPoints=C,this._points=h,this._step=D,this._valueOrigin=A},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),a=u.queryDataIndex(r,n);if(!(a instanceof Array)&&null!=a&&a>=0){var s=r.getItemGraphicEl(a);if(!s){var l=r.getItemLayout(a);if(!l)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l[0],l[1]))return;(s=new o(r,a)).position=l,s.setZ(t.get("zlevel"),t.get("z")),s.ignore=isNaN(l[0])||isNaN(l[1]),s.__temp=!0,r.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else f.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=u.queryDataIndex(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else f.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new c({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new d({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,r,a){var o=this._polyline,u=this._polygon,h=t.hostModel,c=s(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),d=c.current,f=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(r&&(d=T(c.current,i,r),f=T(c.stackedOnCurrent,i,r),p=T(c.next,i,r),g=T(c.stackedOnNext,i,r)),b(d,p)>3e3||u&&b(f,g)>3e3)return o.setShape({points:p}),void(u&&u.setShape({points:p,stackedOnPoints:g}));o.shape.__points=c.current,o.shape.points=d,l.updateProps(o,{shape:{points:p}},h),u&&(u.setShape({points:d,stackedOnPoints:f}),l.updateProps(u,{shape:{points:p,stackedOnPoints:g}},h));for(var m=[],v=c.status,_=0;_e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i1)"string"==typeof o?l=i[o]:"function"==typeof o&&(l=o),l&&t.setData(a.downSample(a.mapDimension(h.dim),1/f,l,n))}}}}},function(t,e,i){var n=i(0),r=i(11),a=i(320);function o(t){a.call(this,t)}o.prototype={constructor:o,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),a=Math.max(t[0],t[1])-i,o=Math.max(e[0],e[1])-n;return new r(i,n,a,o)}},n.inherits(o,a);var s=o;t.exports=s},function(t,e,i){var n=i(0);function r(t){return this._axes[t]}var a=function(t){this._axes={},this._dimList=[],this.name=t||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return n.map(this._dimList,r,this)},getAxesByScale:function(t){return t=t.toLowerCase(),n.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;re[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){i(192);var n=i(16).extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});t.exports=n},function(t,e,i){i(192),i(324)},function(t,e,i){var n=i(0),r=i(3),a=i(37),o=i(45),s=i(181),l=i(194),u=l.rectCoordAxisBuildSplitArea,h=l.rectCoordAxisHandleRemove,c=["axisLine","axisTickLabel","axisName"],d=["splitArea","splitLine","minorSplitLine"],f=o.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,o){this.group.removeAll();var l=this._axisGroup;if(this._axisGroup=new r.Group,this.group.add(this._axisGroup),t.get("show")){var u=t.getCoordSysModel(),h=s.layout(u,t),p=new a(t,h);n.each(c,p.add,p),this._axisGroup.add(p.getGroup()),n.each(d,(function(e){t.get(e+".show")&&this["_"+e](t,u)}),this),r.groupTransition(l,this._axisGroup,t),f.superCall(this,"render",t,e,i,o)}},remove:function(){h(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=n.isArray(s)?s:[s];for(var l=e.coordinateSystem.getRect(),u=i.isHorizontal(),h=0,c=i.getTicksCoords({tickModel:a}),d=[],f=[],p=o.getLineStyle(),g=0;gt&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});t.exports=n},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(0),a=i(3),o=i(196).setLabel,s=i(15),l=i(328),u=i(12),h=i(40),c=i(34).throttle,d=i(70).createClipPath,f=i(329),p=["itemStyle","barBorderWidth"],g=[0,0];r.extend(s.prototype,l);var m=n.extendChartView({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,r=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?n=u.isHorizontal():"polar"===l.type&&(n="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,d=t.get("clip",!0),f=function(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var r=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=r,i.width+=2*r):(i.y-=r,i.height+=2*r)}}return i}(l,o);r.removeClipPath();var p=t.get("roundCap",!0),g=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),v=m.get("barBorderRadius")||0,_=[],S=this._backgroundEls||[],A=function(t){var e=T[l.type](o,t),i=function(t,e,i){return new("polar"===t.type?a.Sector:a.Rect)({shape:L(e,i,t),silent:!0,z2:0})}(l,n,e);return i.useStyle(m.getBarItemStyle()),"cartesian2d"===l.type&&i.setShape("r",v),_[t]=i,i};o.diff(s).add((function(e){var i=o.getItemModel(e),a=T[l.type](o,e,i);if(g&&A(e),o.hasValue(e)){if(d)if(y[l.type](f,a))return void r.remove(s);var s=x[l.type](e,a,n,c,!1,p);o.setItemGraphicEl(e,s),r.add(s),M(s,o,e,i,a,t,n,"polar"===l.type)}})).update((function(e,i){var u=o.getItemModel(e),h=T[l.type](o,e,u);if(g){var b;0===S.length?b=A(i):((b=S[i]).useStyle(m.getBarItemStyle()),"cartesian2d"===l.type&&b.setShape("r",v),_[e]=b);var w=T[l.type](o,e),C=L(n,w,l);a.updateProps(b,{shape:C},c,e)}var I=s.getItemGraphicEl(i);if(o.hasValue(e)){if(d)if(y[l.type](f,h))return void r.remove(I);I?a.updateProps(I,{shape:h},c,e):I=x[l.type](e,h,n,c,!0,p),o.setItemGraphicEl(e,I),r.add(I),M(I,o,e,u,h,t,n,"polar"===l.type)}else r.remove(I)})).remove((function(t){var e=s.getItemGraphicEl(t);"cartesian2d"===l.type?e&&b(t,c,e):e&&w(t,c,e)})).execute();var C=this._backgroundGroup||(this._backgroundGroup=new h);C.removeAll();for(var I=0;I<_.length;++I)C.add(_[I]);r.add(C),this._backgroundEls=_,this._data=o},_renderLarge:function(t,e,i){this._clear(),C(t,this.group);var n=t.get("clip",!0)?d(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),C(e,this.group,!0)},dispose:r.noop,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(e){"sector"===e.type?w(e.dataIndex,t,e):b(e.dataIndex,t,e)}))):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}}),v=Math.max,_=Math.min,y={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var r=v(e.x,t.x),a=_(e.x+e.width,t.x+t.width),o=v(e.y,t.y),s=_(e.y+e.height,t.y+t.height);e.x=r,e.y=o,e.width=a-r,e.height=s-o;var l=e.width<0||e.height<0;return i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(i<0){var n=e.r;e.r=e.r0,e.r0=n}n=_(e.r,t.r);var r=v(e.r0,t.r0);e.r=n,e.r0=r;var a=n-r<0;if(i<0){n=e.r;e.r=e.r0,e.r0=n}return a}},x={cartesian2d:function(t,e,i,n,o){var s=new a.Rect({shape:r.extend({},e),z2:1});if(s.name="item",n){var l=i?"height":"width",u={};s.shape[l]=0,u[l]=e[l],a[o?"updateProps":"initProps"](s,{shape:u},n,t)}return s},polar:function(t,e,i,n,o,s){var l=e.startAngle0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*r/2,y:n.y+o*r/2,width:n.width-a*r,height:n.height-o*r}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function S(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function M(t,e,i,n,s,l,u,h){var c=e.getItemVisual(i,"color"),d=e.getItemVisual(i,"opacity"),f=e.getVisual("borderColor"),p=n.getModel("itemStyle"),g=n.getModel("emphasis.itemStyle").getBarItemStyle();h||t.setShape("r",p.get("barBorderRadius")||0),t.useStyle(r.defaults({stroke:S(s)?"none":f,fill:S(s)?"none":c,opacity:d},p.getBarItemStyle()));var m=n.getShallow("cursor");m&&t.attr("cursor",m);var v=u?s.height>0?"bottom":"top":s.width>0?"left":"right";h||o(t.style,g,n,c,l,i,v),S(s)&&(g.fill=g.stroke="none"),a.setHoverStyle(t,g)}var A=u.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,r=this.__baseDimIdx,a=0;a=c&&v<=d&&(l<=_?h>=l&&h<=_:h>=_&&h<=l))return o[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=e>=0?e:null}),30,!1);function L(t,e,i){var n,r="polar"===i.type;return n=r?i.getArea():i.grid.getRect(),r?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}t.exports=m},function(t,e,i){var n=i(49)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),r={getBarItemStyle:function(t){var e=n(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}};t.exports=r},function(t,e,i){var n=(0,i(3).extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+i,d*r+n),t.arc(c*s+i,d*s+n,o,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,o,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(i,n,r,u,l,h),t.moveTo(c*r+i,p*r+n)),t.closePath()}});t.exports=n},function(t,e,i){var n=i(2),r=i(0);i(331),i(332);var a=i(197),o=i(90),s=i(333),l=i(73);a("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),n.registerVisual(o("pie")),n.registerLayout(r.curry(s,"pie")),n.registerProcessor(l("pie"))},function(t,e,i){var n=i(2),r=i(57),a=i(0),o=i(5),s=i(4).getPercentWithPrecision,l=i(118),u=i(42).retrieveRawAttr,h=i(31).makeSeriesEncodeForNameBased,c=i(66),d=n.extendSeriesModel({type:"series.pie",init:function(t){d.superApply(this,"init",arguments),this.legendVisualProvider=new c(a.bind(this.getData,this),a.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){d.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return r(this,{coordDimensions:["value"],encodeDefaulter:a.curry(h,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,r=t.count();n0&&(c?"scale"!==d:"transition"!==f)){for(var m=a.getItemLayout(0),v=1;isNaN(m.startAngle)&&v=i.r0}}});t.exports=h},function(t,e,i){var n=i(4),r=n.parsePercent,a=n.linearMap,o=i(8),s=i(334),l=i(0),u=2*Math.PI,h=Math.PI/180;t.exports=function(t,e,i,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),n=e.mapDimension("value"),c=function(t,e){return o.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,i),d=t.get("center"),f=t.get("radius");l.isArray(f)||(f=[0,f]),l.isArray(d)||(d=[d,d]);var p=r(c.width,i.getWidth()),g=r(c.height,i.getHeight()),m=Math.min(p,g),v=r(d[0],p)+c.x,_=r(d[1],g)+c.y,y=r(f[0],m/2),x=r(f[1],m/2),b=-t.get("startAngle")*h,w=t.get("minAngle")*h,T=0;e.each(n,(function(t){!isNaN(t)&&T++}));var S=e.getSum(n),M=Math.PI/(S||T)*2,A=t.get("clockwise"),C=t.get("roseType"),I=t.get("stillShowZeroSum"),L=e.getDataExtent(n);L[0]=0;var E=u,P=0,D=b,O=A?1:-1;if(e.each(n,(function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:v,cy:_,r0:y,r:C?NaN:x,viewRect:c});else{(n="area"!==C?0===S&&I?M:t*M:u/T)l+o);a++)if(t[a].y+=n,a>e&&a+1t[a].y+t[a].height)return void c(a,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;n>=0&&!(t[n].y-i0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=o&&(d=o-10),!e&&d<=o&&(d=o+10),t[s].x=i+d*a,o=d}}t.sort((function(t,e){return t.y-e.y}));for(var f,p=0,g=t.length,m=[],v=[],_=0;_=i?v.push(t[_]):m.push(t[_]);d(m,!1,e,i,n,r),d(v,!0,e,i,n,r)}function s(t){return"center"===t.position}t.exports=function(t,e,i,l,u,h){var c,d,f=t.getData(),p=[],g=!1,m=(t.get("minShowLabelAngle")||0)*a;f.each((function(a){var o=f.getItemLayout(a),s=f.getItemModel(a),l=s.getModel("label"),h=l.get("position")||s.get("emphasis.label.position"),v=l.get("distanceToLabelLine"),_=l.get("alignTo"),y=r(l.get("margin"),i),x=l.get("bleedMargin"),b=l.getFont(),w=s.getModel("labelLine"),T=w.get("length");T=r(T,i);var S=w.get("length2");if(S=r(S,i),!(o.angle0?"right":"left":E>0?"left":"right"}var G=l.get("rotate");D="number"==typeof G?G*(Math.PI/180):G?E<0?-L+Math.PI:-L:0,g=!!D,o.label={x:M,y:A,position:h,height:R.height,len:T,len2:S,linePoints:C,textAlign:I,verticalAlign:"middle",rotation:D,inside:N,labelDistance:v,labelAlignTo:_,labelMargin:y,bleedMargin:x,textRect:R,text:O,font:b},N||p.push(o.label)}})),!g&&t.get("avoidLabelOverlap")&&function(t,e,i,r,a,l,u,h){for(var c=[],d=[],f=Number.MAX_VALUE,p=-Number.MAX_VALUE,g=0;g1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=o().reset(t);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new a:new r,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},function(t,e,i){var n=i(3),r=i(23).createSymbol,a=i(99),o=n.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,r=this.symbolProxy,a=r.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-o/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+o)return s}return-1}});function s(){this.group=new n.Group}var l=s.prototype;l.isPersistent=function(){return!this._incremental},l.updateData=function(t,e){this.group.removeAll();var i=new o({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},l.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)}))}},l.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new a({silent:!0})),this.group.add(this._incremental)):this._incremental=null},l.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new o,this._incremental.addDisplayable(n,!0)):((n=new o({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},l._setCommon=function(t,e,i,n){var a=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=r(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var s=t.shape.size[0]<4;t.useStyle(a.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var l=e.getVisual("color");l&&t.setColor(l),i||(t.seriesIndex=a.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))})))},l.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},l._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var u=s;t.exports=u},function(t,e,i){var n=i(2);i(340),i(345),i(346);var r=i(90),a=i(44),o=i(347),s=i(73),l=i(348);n.registerVisual(r("radar")),n.registerVisual(a("radar","circle")),n.registerLayout(o),n.registerProcessor(s("radar")),n.registerPreprocessor(l)},function(t,e,i){i(341),i(343),i(344)},function(t,e,i){var n=i(0),r=i(342),a=i(82),o=i(4),s=i(25),l=s.getScaleExtent,u=s.niceScaleExtent,h=i(24),c=i(161);function d(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=n.map(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new r(i,"log"===t.get("axisType")?new c:new a);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}d.prototype.getIndicatorAxes=function(){return this._indicatorAxes},d.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},d.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},d.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var r,a=Math.atan2(-i,e),o=1/0,s=-1,l=0;li[0]&&isFinite(p)&&isFinite(i[0]))}else{r.getTicks().length-1>a&&(d=s(d));var f=Math.ceil(i[1]/d)*d,p=o.round(f-d*a);r.setExtent(p,f),r.setInterval(d)}}))},d.dimensions=[],d.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var r=new d(n,t,e);i.push(r),n.coordinateSystem=r})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},h.register("radar",d);var f=d;t.exports=f},function(t,e,i){var n=i(0),r=i(36);function a(t,e,i){r.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(2),r=i(0),a=i(193),o=i(15),s=i(53),l=a.valueAxis;function u(t,e){return r.defaults({show:e},t)}var h=n.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),a=this.get("axisTick"),l=this.get("axisType"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),f=this.get("nameGap"),p=this.get("triggerEvent"),g=r.map(this.get("indicator")||[],(function(g){null!=g.max&&g.max>0&&!g.min?g.min=0:null!=g.min&&g.min<0&&!g.max&&(g.max=0);var m=h;if(null!=g.color&&(m=r.defaults({color:g.color},h)),g=r.merge(r.clone(g),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:a,axisType:l,axisLabel:u,name:g.text,nameLocation:"end",nameGap:f,nameTextStyle:m,triggerEvent:p},!1),c||(g.name=""),"string"==typeof d){var v=g.name;g.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(g.name=d(g.name,g));var _=r.extend(new o(g,null,this.ecModel),s);return _.mainType="radar",_.componentIndex=this.componentIndex,_}),this);this.getIndicatorModels=function(){return g}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:r.merge({lineStyle:{color:"#bbb"}},l.axisLine),axisLabel:u(l.axisLabel,!1),axisTick:u(l.axisTick,!1),axisType:"interval",splitLine:u(l.splitLine,!0),splitArea:u(l.splitArea,!0),indicator:[]}});t.exports=h},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(0),a=i(37),o=i(3),s=["axisLine","axisTickLabel","axisName"],l=n.extendComponentView({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=r.map(i,(function(t){return new a(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));r.each(n,(function(t){r.each(s,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),d=l.get("color"),f=u.get("color");d=r.isArray(d)?d:[d],f=r.isArray(f)?f:[f];var p=[],g=[];if("circle"===n)for(var m=i[0].getTicksCoords(),v=e.cx,_=e.cy,y=0;y":"\n";return o(""===l?this.name:l)+u+a.map(s,(function(e,i){var n=r.get(r.mapDimension(e.dim),t);return o(e.name+" : "+n)})).join(u)},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(a.map(i.dimensions,(function(t){return e.mapDimension(t)})),t,!0),r=0,o=n.length;r":"\n";return h.join(", ")+p+s(o+" : "+a)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});n.mixin(f,u);var p=f;t.exports=p},function(t,e,i){var n=i(0).each,r=i(162),a=i(5).makeInner,o=i(352),s=i(353),l=i(354),u=i(355),h=a(),c={load:function(t,e,i){var a=h(e).parsed;if(a)return a;var c,f=e.specialAreas||{},p=e.geoJSON;try{c=p?r(p,i):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return o(t,c),n(c,(function(e){var i=e.name;s(t,e),l(t,e),u(t,e);var n=f[i];n&&e.transformTo(n.left,n.top,n.width,n.height)})),h(e).parsed={regions:c,boundingRect:d(c)}}};function d(t){for(var e,i=0;is&&(s=t.depth)}));var l=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:s;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l})),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),r=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return a(o+(isNaN(r)||null==r?"":" : "+r))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});t.exports=s},function(t,e,i){var n=i(0),r=i(3),a=i(85),o=i(200).radialCoordinate,s=i(2),l=i(61),u=i(109),h=i(106),c=i(68),d=i(86).onIrrelevantElement,f=(i(7).__DEV__,i(4).parsePercent),p=r.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,r=e.parentPoint,a=i[0],o=i[n-1];if(1===n)return t.moveTo(r[0],r[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=f(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(o[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=o[l],t.lineTo(c[0],c[1]),t.lineTo(o[0],o[1]);for(var d=1;dM.x)||(w-=Math.PI);var I=T?"left":"right",L=l.labelModel.get("rotate"),E=L*(Math.PI/180);b.setStyle({textPosition:l.labelModel.get("position")||I,textRotation:null==L?-w:E,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,a,o,s,l,u,h){var c=h.edgeShape,d=a.__edge;if("curve"===c)e.parentNode&&e.parentNode!==i&&(d||(d=a.__edge=new r.BezierCurve({shape:x(h,o,o),style:n.defaults({opacity:0,strokeNoScale:!0},h.lineStyle)})),r.updateProps(d,{shape:x(h,s,l),style:n.defaults({opacity:1},h.lineStyle)},t));else if("polyline"===c&&"orthogonal"===h.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var f=e.children,g=[],m=0;m_.getLayout().x&&(_=t),t.depth>y.depth&&(y=t)}));var x=v===_?1:p(v,_)/2,b=x-v.getLayout().x,w=0,T=0,S=0,M=0;if("radial"===n)w=o/(_.getLayout().x+x+b),T=f/(y.depth-1||1),a(m,(function(t){S=(t.getLayout().x+b)*w,M=(t.depth-1)*T;var e=c(S,M);t.setLayout({x:e.x,y:e.y,rawX:S,rawY:M},!0)}));else{var A=t.getOrient();"RL"===A||"LR"===A?(T=f/(_.getLayout().x+x+b),w=o/(y.depth-1||1),a(m,(function(t){M=(t.getLayout().x+b)*T,S="LR"===A?(t.depth-1)*w:o-(t.depth-1)*w,t.setLayout({x:S,y:M},!0)}))):"TB"!==A&&"BT"!==A||(w=o/(_.getLayout().x+x+b),T=f/(y.depth-1||1),a(m,(function(t){S=(t.getLayout().x+b)*w,M="TB"===A?(t.depth-1)*T:f-(t.depth-1)*T,t.setLayout({x:S,y:M},!0)})))}}}(t,e)}))}},function(t,e){e.eachAfter=function(t,e,i){for(var n,r=[t],a=[];n=r.pop();)if(a.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;a--)n.push(r[a])}}},function(t,e,i){var n=i(2);i(370),i(371),i(374);var r=i(375),a=i(376);n.registerVisual(r),n.registerLayout(a)},function(t,e,i){var n=i(0),r=i(17),a=i(120),o=i(15),s=i(9),l=s.encodeHTML,u=s.addCommas,h=i(46).wrapTreePathInfo,c=r.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function t(e){var i=0;n.each(e.children,(function(e){t(e);var r=e.value;n.isArray(r)&&(r=r[0]),i+=r}));var r=e.value;n.isArray(r)&&(r=r[0]);(null==r||isNaN(r))&&(r=i);r<0&&(r=0);n.isArray(e.value)?e.value[0]=r:e.value=r}(i);var r=t.levels||[],s=this.designatedVisualItemStyle={},l=new o({itemStyle:s},this,e);r=t.levels=function(t,e){var i,r=e.get("color");if(!r)return;if(t=t||[],n.each(t,(function(t){var e=new o(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)})),!i){(t[0]||(t[0]={})).color=r.slice()}return t}(r,e);var u=n.map(r||[],(function(t){return new o(t,l,e)}),this),h=a.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=h.getNodeByDataIndex(e),n=u[i.depth];return t.parentModel=n||l,t}))}));return h.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),r=n.isArray(i)?u(i[0]):u(i),a=e.getName(t);return l(a+": "+r)},getDataParams:function(t){var e=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=h(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},n.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=n.createHashMap(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});t.exports=c},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(43),s=i(46),l=i(372),u=i(68),h=i(11),c=i(20),d=i(373),f=i(49),p=i(9).windowOpen,g=r.bind,m=a.Group,v=a.Rect,_=r.each,y=["label"],x=["emphasis","label"],b=["upperLabel"],w=["emphasis","upperLabel"],T=f([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),S=function(t){var e=T(t);return e.stroke=e.fill=e.lineWidth=null,e},M=n.extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(r.indexOf(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=s.retrieveTargetInfo(n,["treemapZoomToNode","treemapRootToNode"],t),l=n&&n.type,u=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===l&&o&&c?{rootNodeGroup:c.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(u),p=this._doRender(f,t,d);h||l&&"treemapZoomToNode"!==l&&"treemapRootToNode"!==l?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new m,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,a=this._oldTree,s={nodeGroup:[],background:[],content:[]},l={nodeGroup:[],background:[],content:[]},u=this._storage,h=[],c=r.curry(A,e,l,u,i,s,h);!function t(e,i,n,a,s){a?(i=e,_(e,(function(t,e){!t.isRemoved()&&u(e,e)}))):new o(i,e,l,l).add(u).update(u).remove(r.curry(u,null)).execute();function l(t){return t.getId()}function u(r,o){var l=null!=r?e[r]:null,u=null!=o?i[o]:null,h=c(l,u,n,s);h&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],h,a,s+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var d=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&_(t,(function(t,i){var n=e[i];_(t,(function(t){t&&(n.push(t),t.__tmWillDelete=1)}))})),e}(u);return this._oldTree=n,this._storage=l,{lastsForAnimation:s,willDeleteEls:d,renderFinally:function(){_(d,(function(t){_(t,(function(t){t.parent&&t.parent.remove(t)}))})),_(h,(function(t){t.invisible=!0,t.dirty()}))}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=d.createWrap();_(e.willDeleteEls,(function(t,e){_(t,(function(t,i){if(!t.invisible){var r,l=t.parent;if(n&&"drillDown"===n.direction)r=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),r="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}r&&s.add(t,r,a,o)}}))})),_(this._storage,(function(t,i){_(t,(function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r.extend({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))}))}),this),this._state="animating",s.done(g((function(){this._state="ready",e.renderFinally()}),this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new u(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",g(this._onPan,this)),e.on("zoom",g(this._onZoom,this)));var i=new h(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var a=new h(r.x,r.y,r.width,r.height),o=this.seriesModel.layoutInfo;e-=o.x,i-=o.y;var s=c.create();c.translate(s,s,[-e,-i]),c.scale(s,s,[t.scale,t.scale]),c.translate(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var r=n.hostTree.data.getItemModel(n.dataIndex),a=r.get("link",!0),o=r.get("target",!0)||"blank";a&&p(a,o)}}}}}),this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(t,e,i.node,g((function(e){"animating"!==this._state&&(s.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var r=this._storage.background[n.getRawIndex()];if(r){var a=r.transformCoordToLocal(t,e),o=r.shape;if(!(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}}),this),i}});function A(t,e,i,n,o,s,l,u,h,c){if(l){var d=l.getLayout(),f=t.getData();if(f.setItemGraphicEl(l.dataIndex,null),d&&d.isInView){var p=d.width,g=d.height,_=d.borderWidth,M=d.invisible,A=l.getRawIndex(),I=u&&u.getRawIndex(),L=l.viewChildren,E=d.upperHeight,P=L&&L.length,D=l.getModel("itemStyle"),O=l.getModel("emphasis.itemStyle"),R=G("nodeGroup",m);if(R){if(h.add(R),R.attr("position",[d.x||0,d.y||0]),R.__tmNodeWidth=p,R.__tmNodeHeight=g,d.isAboveViewRoot)return R;var N=l.getModel(),k=G("background",v,c,1);if(k&&function(e,i,n){if(i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:p,height:g}),M)B(i);else{i.invisible=!1;var r=l.getVisual("borderColor",!0),o=O.get("borderColor"),s=S(D);s.fill=r;var u=T(O);if(u.fill=o,n){var h=p-2*_;F(s,u,r,h,E,{x:_,y:0,width:h,height:E})}else s.text=u.text=null;i.setStyle(s),a.setElementHoverStyle(i,u)}e.add(i)}(R,k,P&&d.upperLabelHeight),P)a.isHighDownDispatcher(R)&&a.setAsHighDownDispatcher(R,!1),k&&(a.setAsHighDownDispatcher(k,!0),f.setItemGraphicEl(l.dataIndex,k));else{var z=G("content",v,c,2);z&&function(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(p-2*_,0),r=Math.max(g-2*_,0);if(i.culling=!0,i.setShape({x:_,y:_,width:n,height:r}),M)B(i);else{i.invisible=!1;var o=l.getVisual("color",!0),s=S(D);s.fill=o;var u=T(O);F(s,u,o,n,r),i.setStyle(s),a.setElementHoverStyle(i,u)}e.add(i)}(R,z),k&&a.isHighDownDispatcher(k)&&a.setAsHighDownDispatcher(k,!1),a.setAsHighDownDispatcher(R,!0),f.setItemGraphicEl(l.dataIndex,R)}return R}}}function B(t){!t.invisible&&s.push(t)}function F(e,i,n,o,s,u){var h=N.get("name"),c=N.getModel(u?b:y),f=N.getModel(u?w:x),p=c.getShallow("show");a.setLabelStyle(e,i,c,f,{defaultText:p?h:null,autoColor:n,isRectText:!0,labelFetcher:t,labelDataIndex:l.dataIndex,labelProp:u?"upperLabel":"label"}),V(e,u,d),V(i,u,d),u&&(e.textRect=r.clone(u)),e.truncate=p&&c.get("ellipsis")?{outerWidth:o,outerHeight:s,minChar:2}:null}function V(e,i,n){var r=e.text;if(!i&&n.isLeafRoot&&null!=r){var a=t.get("drillDownIcon",!0);e.text=a?a+" "+r:r}}function G(t,a,s,u){var h=null!=I&&i[t][I],c=o[t];return h?(i[t][I]=null,function(t,e,i){(t[A]={}).old="nodeGroup"===i?e.position.slice():r.extend({},e.shape)}(c,h,t)):M||((h=new a({z:C(s,u)})).__tmDepth=s,h.__tmStorageName=t,function(t,e,i){var r=t[A]={},a=l.parentNode;if(a&&(!n||"drillDown"===n.direction)){var s=0,u=0,h=o.background[a.getRawIndex()];!n&&h&&h.old&&(s=h.old.width,u=h.old.height),r.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}r.fadein="nodeGroup"!==i}(c,0,t)),e[t][A]=h}}function C(t,e){var i=10*t+e;return(i-1)/i}t.exports=M},function(t,e,i){var n=i(3),r=i(8),a=i(0),o=i(46).wrapTreePathInfo;function s(t){this.group=new n.Group,t.add(this.group)}function l(t,e,i,n,r,a){var o=[[r?t:t-5,e],[t+i,e],[t+i,e+n],[r?t:t-5,e+n]];return!a&&o.splice(2,0,[t+i+5,e+n/2]),!r&&o.push([t,e+n/2]),o}function u(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&o(i,e)}}s.prototype={constructor:s,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var s=a.getModel("itemStyle"),l=s.getModel("textStyle"),u={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,u,l),this._renderContent(t,u,s,l,n),r.positionElement(o,u.pos,u.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var r=n.getModel().get("name"),a=i.getTextRect(r),o=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=o+8,e.renderList.push({node:n,text:r,width:o})}},_renderContent:function(t,e,i,o,s){for(var h=0,c=e.emptyItemWidth,d=t.get("breadcrumb.height"),f=r.getAvailableSize(e.pos,e.box),p=e.totalWidth,g=e.renderList,m=g.length-1;m>=0;m--){var v=g[m],_=v.node,y=v.width,x=v.text;p>f.width&&(p-=y-c,y=c,x=null);var b=new n.Polygon({shape:{points:l(h,0,y,d,m===g.length-1,0===m)},style:a.defaults(i.getItemStyle(),{lineJoin:"bevel",text:x,textFill:o.getTextColor(),textFont:o.getFont()}),z:10,onclick:a.curry(s,_)});this.group.add(b),u(b,t,_),h+=y+8}},remove:function(){this.group.removeAll()}};var h=s;t.exports=h},function(t,e,i){var n=i(0);e.createWrap=function(){var t,e=[],i={};return{add:function(t,r,a,o,s){return n.isString(o)&&(s=o,o=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:r,time:a,delay:o,easing:s}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,r=0,a=e.length;rc[1]&&(c[1]=u);var d=e.get("colorMappingBy"),f={type:s.name,dataExtent:c,visual:s.range};"color"!==f.type||"index"!==d&&"id"!==d?f.mappingMethod="linear":(f.mappingMethod="category",f.loop=!0);var p=new n(f);return p.__drColorMappingBy=d,p}(0,u,c,0,p,v);a.each(v,(function(e,i){if(e.depth>=o.length||e===o[e.depth]){var n=function(t,e,i,n,r,o){var s=a.extend({},e);if(r){var l=r.type,u="color"===l&&r.__drColorMappingBy,h="index"===u?n:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=r.mapValueToVisual(h)}return s}(u,p,e,i,_,s);t(e,n,o,s)}}))}else d=l(p),e.setVisual("color",d)}(s,{},t.getViewRoot().getAncestors(),t)}};function l(t){var e=u(t,"color");if(e){var i=u(t,"colorAlpha"),n=u(t,"colorSaturation");return n&&(e=r.modifyHSL(e,null,null,n)),i&&(e=r.modifyAlpha(e,i)),e}}function u(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function h(t,e){var i=t.get(e);return o(i)&&i.length?{name:e,range:i}:null}t.exports=s},function(t,e,i){var n=i(0),r=i(11),a=i(4),o=a.parsePercent,s=a.MAX_SAFE_INTEGER,l=i(8),u=i(46),h=Math.max,c=Math.min,d=n.retrieve,f=n.each,p=["itemStyle","borderWidth"],g=["itemStyle","gapWidth"],m=["upperLabel","show"],v=["upperLabel","height"],_={seriesType:"treemap",reset:function(t,e,i,a){var m=i.getWidth(),v=i.getHeight(),_=t.option,T=l.getLayoutRect(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),S=_.size||[],M=o(d(T.width,S[0]),m),A=o(d(T.height,S[1]),v),C=a&&a.type,I=u.retrieveTargetInfo(a,["treemapZoomToNode","treemapRootToNode"],t),L="treemapRender"===C||"treemapMove"===C?a.rootRect:null,E=t.getViewRoot(),P=u.getPathToRoot(E);if("treemapMove"!==C){var D="treemapZoomToNode"===C?function(t,e,i,n,r){var a,o=(e||{}).node,l=[n,r];if(!o||o===i)return l;var u=n*r,h=u*t.option.zoomToNodeRatio;for(;a=o.parentNode;){for(var c=0,d=a.children,f=0,g=d.length;fs&&(h=s),o=a}hs[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,s,l);if(0===h.sum)return t.viewChildren=[];if(h.sum=function(t,e,i,n,r){if(!n)return i;for(var a=t.get("visibleMin"),o=r.length,s=o,l=o-1;l>=0;l--){var u=r["asc"===n?o-l-1:l].getValue();u/i*er&&(r=n));var l=t.area*t.area,u=e*e*i;return l?h(u*r/l,l/(u*a)):1/0}function b(t,e,i,n,r){var a=e===i.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],d=e?t.area/e:0;(r||d>i[l[o]])&&(d=i[l[o]]);for(var f=0,p=t.length;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(y.get("show")&&E!==b){for(var z=0;z<=w;z++){P=Math.cos(M),D=Math.sin(M);var B=new r.Line({shape:{x1:P*g+f,y1:D*g+p,x2:P*(g-S)+f,y2:D*(g-S)+p},silent:!0,style:L});"auto"===L.stroke&&B.setStyle({stroke:n((E+z/w)/b)}),d.add(B),M+=C}M-=C}else M+=A}},_renderPointer:function(t,e,i,a,o,l,h,c){var d=this.group,f=this._data;if(t.get("pointer.show")){var p=[+t.get("min"),+t.get("max")],g=[l,h],m=t.getData(),v=m.mapDimension("value");m.diff(f).add((function(e){var i=new n({shape:{angle:l}});r.initProps(i,{shape:{angle:u(m.get(v,e),p,g,!0)}},t),d.add(i),m.setItemGraphicEl(e,i)})).update((function(e,i){var n=f.getItemGraphicEl(i);r.updateProps(n,{shape:{angle:u(m.get(v,e),p,g,!0)}},t),d.add(n),m.setItemGraphicEl(e,n)})).remove((function(t){var e=f.getItemGraphicEl(t);d.remove(e)})).execute(),m.eachItemGraphicEl((function(t,e){var i=m.getItemModel(e),n=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:s(n.get("width"),o.r),r:s(n.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",a(u(m.get(v,e),p,[0,1],!0))),r.setHoverStyle(t,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=m}else f&&f.eachItemGraphicEl((function(t){d.remove(t)}))},_renderTitle:function(t,e,i,n,a){var o=t.getData(),l=o.mapDimension("value"),h=t.getModel("title");if(h.get("show")){var c=h.get("offsetCenter"),d=a.cx+s(c[0],a.r),f=a.cy+s(c[1],a.r),p=+t.get("min"),g=+t.get("max"),m=t.getData().get(l,0),v=n(u(m,[p,g],[0,1],!0));this.group.add(new r.Text({silent:!0,style:r.setTextStyle({},h,{x:d,y:f,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:v,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),l=+t.get("min"),c=+t.get("max");if(o.get("show")){var d=o.get("offsetCenter"),f=a.cx+s(d[0],a.r),p=a.cy+s(d[1],a.r),g=s(o.get("width"),a.r),m=s(o.get("height"),a.r),v=t.getData(),_=v.get(v.mapDimension("value"),0),y=n(u(_,[l,c],[0,1],!0));this.group.add(new r.Text({silent:!0,style:r.setTextStyle({},o,{x:f,y:p,text:h(_,o.get("formatter")),textWidth:isNaN(g)?null:g,textHeight:isNaN(m)?null:m,textAlign:"center",textVerticalAlign:"middle"},{autoColor:y,forceRich:!0})}))}}});t.exports=d},function(t,e,i){var n=i(12).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,r=e.r,a=e.width,o=e.angle,s=e.x-i(o)*a*(a>=r/3?1:2),l=e.y-n(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(o)*a,e.y+n(o)*a),t.lineTo(e.x+i(e.angle)*r,e.y+n(e.angle)*r),t.lineTo(e.x-i(o)*a,e.y-n(o)*a),t.lineTo(s,l)}});t.exports=n},function(t,e,i){var n=i(2);i(382),i(383);var r=i(90),a=i(384),o=i(73);n.registerVisual(r("funnel")),n.registerLayout(a),n.registerProcessor(o("funnel"))},function(t,e,i){var n=i(2),r=i(0),a=i(57),o=i(5).defaultEmphasis,s=i(31).makeSeriesEncodeForNameBased,l=i(66),u=n.extendSeriesModel({type:"series.funnel",init:function(t){u.superApply(this,"init",arguments),this.legendVisualProvider=new l(r.bind(this.getData,this),r.bind(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return a(this,{coordDimensions:["value"],encodeDefaulter:r.curry(s,this)})},_defaultLabelLine:function(t){o(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=u.superCall(this,"getDataParams",t),n=e.mapDimension("value"),r=e.getSum(n);return i.percent=r?+(e.get(n,t)/r*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}),h=u;t.exports=h},function(t,e,i){var n=i(3),r=i(0),a=i(28);function o(t,e){n.Group.call(this);var i=new n.Polygon,r=new n.Polyline,a=new n.Text;this.add(i),this.add(r),this.add(a),this.highDownOnUpdate=function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(t,e,!0)}var s=o.prototype,l=["itemStyle","opacity"];s.updateData=function(t,e,i){var a=this.childAt(0),o=t.hostModel,s=t.getItemModel(e),u=t.getItemLayout(e),h=t.getItemModel(e).get(l);h=null==h?1:h,a.useStyle({}),i?(a.setShape({points:u.points}),a.setStyle({opacity:0}),n.initProps(a,{style:{opacity:h}},o,e)):n.updateProps(a,{style:{opacity:h},shape:{points:u.points}},o,e);var c=s.getModel("itemStyle"),d=t.getItemVisual(e,"color");a.setStyle(r.defaults({lineJoin:"round",fill:d},c.getItemStyle(["opacity"]))),a.hoverStyle=c.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),n.setHoverStyle(this)},s._updateLabel=function(t,e){var i=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");n.updateProps(i,{shape:{points:s.linePoints||s.linePoints}},a,e),n.updateProps(r,{style:{x:s.x,y:s.y}},a,e),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");n.setLabelStyle(r.style,r.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),r.ignore=r.normalIgnore=!u.get("show"),r.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},r.inherits(o,n.Group);var u=a.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),r=this._data,a=this.group;n.diff(r).add((function(t){var e=new o(n,t);n.setItemGraphicEl(t,e),a.add(e)})).update((function(t,e){var i=r.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=r.getItemGraphicEl(t);a.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});t.exports=u},function(t,e,i){i(7).__DEV__;var n=i(8),r=i(4),a=r.parsePercent,o=r.linearMap;t.exports=function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),r=i.mapDimension("value"),s=t.get("sort"),l=function(t,e){return n.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),u=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,(function(t){return t})),r=[],a="ascending"===e,o=0,s=t.count();o=i&&a<=i+e.axisLength&&o>=n&&o<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();c(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),o.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=a.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],r=["width","height"],a=e.get("layout"),o="horizontal"===a?0:1,s=i[r[o]],l=[0,s],u=this.dimensions.length,h=y(e.get("axisExpandWidth"),l),c=y(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=y(f[1]-f[0],l),f[1]=f[0]+t):(t=y(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||p(u/2))-t/2])[1]=f[0]+t);var v=(s-t)/(u-c);v<3&&(v=0);var _=[p(m(f[0]/h,1))+1,g(m(f[1]/h,1))-1],x=v/h*f[0];return{layout:a,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[r[1-o]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:v,axisExpandWindow:f,axisCount:u,winInnerIndices:_,axisExpandWindow0Pos:x}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),c(i,(function(e,i){var o=(n.axisExpandable?b:x)(i,n),s={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},l={horizontal:v/2,vertical:0},u=[s[a].x+t.x,s[a].y+t.y],h=l[a],c=r.create();r.rotate(c,c,h),r.translate(c,c,u),this._axesLayout[e]={position:u,rotation:h,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,r){null==i&&(i=0),null==r&&(r=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];n.each(o,(function(e){s.push(t.mapDimension(e)),l.push(a.get(e).model)}));for(var u=this.hasAxisBrushed(),h=i;hr*(1-c[0])?(l="jump",o=s-r*(1-c[2])):(o=s-r*c[1])>=0&&(o=s-r*(1-c[1]))<=0&&(o=0),(o*=e.axisExpandWidth/u)?h(o,n,a,"all"):l="none";else{r=n[1]-n[0];(n=[f(0,a[1]*s/r-r/2)])[1]=d(a[1],n[0]+r),n[0]=n[1]-r}return{axisExpandWindow:n,behavior:l}}};var w=_;t.exports=w},function(t,e,i){var n=i(0),r=i(36),a=function(t,e,i,n,a){r.call(this,t,e,i),this.type=n||"value",this.axisIndex=a};a.prototype={constructor:a,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(16);i(390);var a=r.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&n.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){n.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=n.filter(this.dependentModels.parallelAxis,(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);n.each(i,(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))}});t.exports=a},function(t,e,i){var n=i(0),r=i(16),a=i(49),o=i(89),s=i(4),l=i(53),u=r.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return a([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n.clone(t);if(e)for(var i=e.length-1;i>=0;i--)s.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,r=e.length;n=0&&(s[a[l].depth]=new o(a[l],this,e));if(n&&i)return r(n,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var i=this.parentModel,n=i.getData().getItemLayout(e).depth;return i.levelModels[n]||this.parentModel})),t})),e.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var i=this.parentModel,n=i.getGraph().getEdgeByIndex(e).node1.getLayout().depth;return i.levelModels[n]||this.parentModel})),t}))})).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),r=n.data,o=r.source+" -- "+r.target;return n.value&&(o+=" : "+n.value),a(o)}if("node"===i){var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,i).data.name;if(l)o=u+" : "+l;return a(o)}return s.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=s.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=n}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}})),l=s;t.exports=l},function(t,e,i){var n=i(3),r=i(2),a=i(0),o=["itemStyle","opacity"],s=["emphasis","itemStyle","opacity"],l=["lineStyle","opacity"],u=["emphasis","lineStyle","opacity"];function h(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function c(t,e,i){var n=t.getGraphicEl(),r=h(t,e);null!=i&&(null==r&&(r=1),r*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",r)}))}function d(t,e){var i=h(t,e),n=t.getGraphicEl();n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)})),n.highlight&&n.highlight()}var f=n.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}}),p=r.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var r=this,a=t.getGraph(),o=this.group,s=t.layoutInfo,l=s.width,u=s.height,h=t.getData(),c=t.getData("edge"),d=t.get("orient");this._model=t,o.removeAll(),o.attr("position",[s.x,s.y]),a.eachEdge((function(e){var i=new f;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var r,a,s,h,p,g,m,v,_=e.getModel("lineStyle"),y=_.get("curveness"),x=e.node1.getLayout(),b=e.node1.getModel(),w=b.get("localX"),T=b.get("localY"),S=e.node2.getLayout(),M=e.node2.getModel(),A=M.get("localX"),C=M.get("localY"),I=e.getLayout();switch(i.shape.extent=Math.max(1,I.dy),i.shape.orient=d,"vertical"===d?(r=(null!=w?w*l:x.x)+I.sy,a=(null!=T?T*u:x.y)+x.dy,s=(null!=A?A*l:S.x)+I.ty,p=r,g=a*(1-y)+(h=null!=C?C*u:S.y)*y,m=s,v=a*y+h*(1-y)):(r=(null!=w?w*l:x.x)+x.dx,a=(null!=T?T*u:x.y)+I.sy,p=r*(1-y)+(s=null!=A?A*l:S.x)*y,g=a,m=r*y+s*(1-y),v=h=(null!=C?C*u:S.y)+I.ty),i.setShape({x1:r,y1:a,x2:s,y2:h,cpx1:p,cpy1:g,cpx2:m,cpy2:v}),i.setStyle(_.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}n.setHoverStyle(i,e.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),c.setItemGraphicEl(e.dataIndex,i)})),a.eachNode((function(e){var i=e.getLayout(),r=e.getModel(),a=r.get("localX"),s=r.get("localY"),c=r.getModel("label"),d=r.getModel("emphasis.label"),f=new n.Rect({shape:{x:null!=a?a*l:i.x,y:null!=s?s*u:i.y,width:i.dx,height:i.dy},style:r.getModel("itemStyle").getItemStyle()}),p=e.getModel("emphasis.itemStyle").getItemStyle();n.setLabelStyle(f.style,p,c,d,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),f.setStyle("fill",e.getVisual("color")),n.setHoverStyle(f,p),o.add(f),h.setItemGraphicEl(e.dataIndex,f),f.dataType="node"})),h.eachItemGraphicEl((function(e,n){var a=h.getItemModel(n);a.get("draggable")&&(e.drift=function(e,a){r._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(n),localX:this.shape.x/l,localY:this.shape.y/u})},e.ondragend=function(){r._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),e.highlight=function(){this.trigger("emphasis")},e.downplay=function(){this.trigger("normal")},e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))})),c.eachItemGraphicEl((function(e,n){var a=c.getItemModel(n);e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))})),!this._data&&t.get("animation")&&o.setClipPath(function(t,e,i){var r=new n.Rect({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return n.initProps(r,{shape:{width:t.width+20}},e,i),r}(o.getBoundingRect(),t,(function(){o.removeClipPath()}))),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var r=t.getData(),h=r.graph,f=n.dataIndex,p=r.getItemModel(f),g=n.edgeDataIndex;if(null!=f||null!=g){var m=h.getNodeByIndex(f),v=h.getEdgeByIndex(g);if(h.eachNode((function(t){c(t,o,.1)})),h.eachEdge((function(t){c(t,l,.1)})),m){d(m,s);var _=p.get("focusNodeAdjacency");"outEdges"===_?a.each(m.outEdges,(function(t){t.dataIndex<0||(d(t,u),d(t.node2,s))})):"inEdges"===_?a.each(m.inEdges,(function(t){t.dataIndex<0||(d(t,u),d(t.node1,s))})):"allEdges"===_&&a.each(m.edges,(function(t){t.dataIndex<0||(d(t,u),t.node1!==m&&d(t.node1,s),t.node2!==m&&d(t.node2,s))}))}v&&(d(v,u),d(v.node1,s),d(v.node2,s))}},unfocusNodeAdjacency:function(t,e,i,n){var r=t.getGraph();r.eachNode((function(t){c(t,o)})),r.eachEdge((function(t){c(t,l)}))}});t.exports=p},function(t,e,i){var n=i(2);i(169),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},function(t,e,i){var n=i(8),r=i(0),a=i(5).groupData;function o(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function s(t,e,i,n,a){var o="vertical"===a?"x":"y";r.each(t,(function(t){var r,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===a?"dx":"dy",d=0;d0&&(r=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===a?n:i))>0)for(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0),u=r,d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]}))}function l(t,e,i){r.each(t.slice().reverse(),(function(t){r.each(t,(function(t){if(t.outEdges.length){var n=g(t.outEdges,u,i)/g(t.outEdges,p,i);if(isNaN(n)){var r=t.outEdges.length;n=r?g(t.outEdges,h,i)/r:0}if("vertical"===i){var a=t.getLayout().x+(n-f(t,i))*e;t.setLayout({x:a},!0)}else{var o=t.getLayout().y+(n-f(t,i))*e;t.setLayout({y:o},!0)}}}))}))}function u(t,e){return f(t.node2,e)*t.getValue()}function h(t,e){return f(t.node2,e)}function c(t,e){return f(t.node1,e)*t.getValue()}function d(t,e){return f(t.node1,e)}function f(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function p(t){return t.getValue()}function g(t,e,i){for(var n=0,r=t.length,a=-1;++a=0;y&&_.depth>g&&(g=_.depth),v.setLayout({depth:y?_.depth:f},!0),"vertical"===s?v.setLayout({dy:i},!0):v.setLayout({dx:i},!0);for(var x=0;xf-1?g:f-1;l&&"left"!==l&&function(t,e,i,n){if("right"===e){for(var a=[],s=t,l=0;s.length;){for(var u=0;u0;u--)l(c,d*=.99,h),s(c,o,i,n,h),m(c,d,h),s(c,o,i,n,h)}(t,e,h,u,n,c,d),function(t,e){var i="vertical"===e?"x":"y";r.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),r.each(t,(function(t){var e=0,i=0;r.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),r.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,d)}(v,_,i,u,c,d,0!==r.filter(v,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}},function(t,e,i){var n=i(47),r=i(0);t.exports=function(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph().nodes;if(e.length){var i=1/0,a=-1/0;r.each(e,(function(t){var e=t.getLayout().value;ea&&(a=e)})),r.each(e,(function(e){var r=new n({type:"color",mappingMethod:"linear",dataExtent:[i,a],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get("itemStyle.color");null!=o?e.setVisual("color",o):e.setVisual("color",r)}))}}))}},function(t,e,i){var n=i(2);i(404),i(405);var r=i(406),a=i(407);n.registerVisual(r),n.registerLayout(a)},function(t,e,i){var n=i(0),r=i(17),a=i(203).seriesModelMixin,o=r.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});n.mixin(o,a,!0);var s=o;t.exports=s},function(t,e,i){var n=i(0),r=i(28),a=i(3),o=i(12),s=["itemStyle"],l=["emphasis","itemStyle"],u=r.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),r=this.group,a=this._data;this._data||r.removeAll();var o="horizontal"===t.get("layout")?1:0;n.diff(a).add((function(t){if(n.hasValue(t)){var e=c(n.getItemLayout(t),n,t,o,!0);n.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?d(s,i,n,t):i=c(s,n,t,o),r.add(i),n.setItemGraphicEl(t,i)}else r.remove(i)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(t){t&&e.remove(t)}))},dispose:n.noop}),h=o.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n0?"P":"N",a=n.getVisual("borderColor"+r)||n.getVisual("color"+r),o=i.getModel(l).getItemStyle(h);e.useStyle(o),e.style.fill=null,e.style.stroke=a}var x=c;t.exports=x},function(t,e,i){var n=i(0);t.exports=function(t){t&&n.isArray(t.series)&&n.each(t.series,(function(t){n.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}},function(t,e,i){var n=i(51),r=["itemStyle","borderColor"],a=["itemStyle","borderColor0"],o=["itemStyle","color"],s=["itemStyle","color0"],l={seriesType:"candlestick",plan:n(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){var r;for(;null!=(r=t.next());){var a=e.getItemModel(r),o=e.getItemLayout(r).sign;e.setItemVisual(r,{color:i(o,a),borderColor:n(o,a)})}}};function i(t,e){return e.get(t>0?o:s)}function n(t,e){return e.get(t>0?r:a)}}};t.exports=l},function(t,e,i){var n=i(3).subPixelOptimize,r=i(51),a=i(4).parsePercent,o=i(0).retrieve2,s="undefined"!=typeof Float32Array?Float32Array:Array,l={seriesType:"candlestick",plan:r(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),r=function(t,e){var i,n=t.getBaseAxis(),r="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),s=a(o(t.get("barMaxWidth"),r),r),l=a(o(t.get("barMinWidth"),1),r),u=t.get("barWidth");return null!=u?a(u,r):Math.max(Math.min(r/2,s),l)}(t,i),l=["x","y"],h=i.mapDimension(l[0]),c=i.mapDimension(l[1],!0),d=c[0],f=c[1],p=c[2],g=c[3];if(i.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(null==h||c.length<4))return{progress:t.pipelineContext.large?function(t,i){var n,r,a=new s(4*t.count),o=0,l=[],c=[];for(;null!=(r=t.next());){var m=i.get(h,r),v=i.get(d,r),_=i.get(f,r),y=i.get(p,r),x=i.get(g,r);isNaN(m)||isNaN(y)||isNaN(x)?(a[o++]=NaN,o+=3):(a[o++]=u(i,r,v,_,f),l[0]=m,l[1]=y,n=e.dataToPoint(l,null,c),a[o++]=n?n[0]:NaN,a[o++]=n?n[1]:NaN,l[1]=x,n=e.dataToPoint(l,null,c),a[o++]=n?n[1]:NaN)}i.setLayout("largePoints",a)}:function(t,i){var a;for(;null!=(a=t.next());){var o=i.get(h,a),s=i.get(d,a),l=i.get(f,a),c=i.get(p,a),m=i.get(g,a),v=Math.min(s,l),_=Math.max(s,l),y=S(v,o),x=S(_,o),b=S(c,o),w=S(m,o),T=[];M(T,x,0),M(T,y,1),T.push(C(w),C(x),C(b),C(y)),i.setItemLayout(a,{sign:u(i,a,s,l,f),initBaseline:s>l?x[1]:y[1],ends:T,brushRect:A(c,m,o)})}function S(t,i){var n=[];return n[0]=i,n[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function M(t,e,i){var a=e.slice(),o=e.slice();a[0]=n(a[0]+r/2,1,!1),o[0]=n(o[0]-r/2,1,!0),i?t.push(a,o):t.push(o,a)}function A(t,e,i){var n=S(t,i),a=S(e,i);return n[0]-=r/2,a[0]-=r/2,{x:n[0],y:n[1],width:r,height:a[1]-n[1]}}function C(t){return t[0]=n(t[0],1),t}}}}};function u(t,e,i,n,r){return i>n?-1:i0?t.get(r,e-1)<=n?1:-1:1}t.exports=l},function(t,e,i){i(415),i(416)},function(t,e,i){var n=i(17),r=i(32),a=i(24),o=n.extend({type:"series.heatmap",getInitialData:function(t,e){return r(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=a.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});t.exports=o},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(3),a=i(417),o=i(0);var s=n.extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(r)&&this._renderOnGeo(r,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,a){var s,l,u=t.coordinateSystem;if("cartesian2d"===u.type){var h=u.getAxis("x"),c=u.getAxis("y");s=h.getBandWidth(),l=c.getBandWidth()}for(var d=this.group,f=t.getData(),p=t.getModel("itemStyle").getItemStyle(["color"]),g=t.getModel("emphasis.itemStyle").getItemStyle(),m=t.getModel("label"),v=t.getModel("emphasis.label"),_=u.type,y="cartesian2d"===_?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],x=i;x=e[0]&&t<=e[1]}}(b,i.option.range):function(t,e,i){var n=t[1]-t[0],r=(e=o.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,a=0;return function(t){for(var n=a;n=0;n--){var o;if((o=e[n].interval)[0]<=t&&t<=o[1]){a=n;break}}return n>=0&&n0){var M=a(v)?s:l;v>0&&(v=v*T+w),y[x++]=M[S],y[x++]=M[S+1],y[x++]=M[S+2],y[x++]=M[S+3]*v*256}else x+=4}return c.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=n.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var r=t.getContext("2d");return r.clearRect(0,0,i,i),r.shadowOffsetX=i,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-e,e,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,r=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[i](s/255,!0,a),r[o++]=a[0],r[o++]=a[1],r[o++]=a[2],r[o++]=a[3];return r}};var a=r;t.exports=a},function(t,e,i){var n=i(2),r=i(0);i(117),i(419),i(420);var a=i(83).layout,o=i(44);i(72),n.registerLayout(r.curry(a,"pictorialBar")),n.registerVisual(o("pictorialBar","roundRect"))},function(t,e,i){var n=i(195).extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,n.superApply(this,"getInitialData",arguments)}}),r=n;t.exports=r},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(23).createSymbol,s=i(4),l=s.parsePercent,u=s.isNumeric,h=i(196).setLabel,c=["itemStyle","borderWidth"],d=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],f=new a.Circle;function p(t,e,i,n){var a=t.getItemLayout(e),o=i.get("symbolRepeat"),s=i.get("symbolClip"),h=i.get("symbolPosition")||"start",d=(i.get("symbolRotate")||0)*Math.PI/180||0,p=i.get("symbolPatternSize")||2,m=i.isAnimationEnabled(),v={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:s,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:p,rotation:d,animationModel:m?i:null,hoverAnimation:m&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,a){var o,s=n.valueDim,l=t.get("symbolBoundingData"),u=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),h=u.toGlobalCoord(u.dataToCoord(0)),c=1-+(i[s.wh]<=0);if(r.isArray(l)){var d=[g(u,l[0])-h,g(u,l[1])-h];d[1]0?1:o<0?-1:0}(i,o,a,n,v),function(t,e,i,n,a,o,s,u,h,c){var d=h.valueDim,f=h.categoryDim,p=Math.abs(i[f.wh]),g=t.getItemVisual(e,"symbolSize");r.isArray(g)?g=g.slice():(null==g&&(g="100%"),g=[g,g]);g[f.index]=l(g[f.index],p),g[d.index]=l(g[d.index],n?p:Math.abs(o)),c.symbolSize=g,(c.symbolScale=[g[0]/u,g[1]/u])[d.index]*=(h.isHorizontal?-1:1)*s}(t,e,a,o,0,v.boundingLength,v.pxSign,p,n,v),function(t,e,i,n,r){var a=t.get(c)||0;a&&(f.attr({scale:e.slice(),rotation:i}),f.updateTransform(),a/=f.getLineScale(),a*=e[n.valueDim.index]);r.valueLineWidth=a}(i,v.symbolScale,d,n,v);var _=v.symbolSize,y=i.get("symbolOffset");return r.isArray(y)&&(y=[l(y[0],_[0]),l(y[1],_[1])]),function(t,e,i,n,a,o,s,h,c,d,f,p){var g=f.categoryDim,m=f.valueDim,v=p.pxSign,_=Math.max(e[m.index]+h,0),y=_;if(n){var x=Math.abs(c),b=r.retrieve(t.get("symbolMargin"),"15%")+"",w=!1;b.lastIndexOf("!")===b.length-1&&(w=!0,b=b.slice(0,b.length-1)),b=l(b,e[m.index]);var T=Math.max(_+2*b,0),S=w?0:2*b,M=u(n),A=M?n:P((x+S)/T);T=_+2*(b=(x-A*_)/2/(w?A:A-1)),S=w?0:2*b,M||"fixed"===n||(A=d?P((Math.abs(d)+S)/T):0),y=A*T-S,p.repeatTimes=A,p.symbolMargin=b}var C=v*(y/2),I=p.pathPosition=[];I[g.index]=i[g.wh]/2,I[m.index]="start"===s?C:"end"===s?c-C:c/2,o&&(I[0]+=o[0],I[1]+=o[1]);var L=p.bundlePosition=[];L[g.index]=i[g.xy],L[m.index]=i[m.xy];var E=p.barRectShape=r.extend({},i);E[m.wh]=v*Math.max(Math.abs(i[m.wh]),Math.abs(I[m.index]+C)),E[g.wh]=i[g.wh];var D=p.clipShape={};D[g.xy]=-i[g.xy],D[g.wh]=f.ecSize[g.wh],D[m.xy]=0,D[m.wh]=i[m.wh]}(i,_,a,o,0,y,h,v.valueLineWidth,v.boundingLength,v.repeatCutLength,n,v),v}function g(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function m(t){var e=t.symbolPatternSize,i=o(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function v(t,e,i,n){var r=t.__pictorialBundle,a=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,u=i.repeatTimes||0,h=0,c=a[e.valueDim.index]+o+2*i.symbolMargin;for(I(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:n<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){I(t,(function(t){t.trigger("emphasis")}))}function v(){I(t,(function(t){t.trigger("normal")}))}}function _(t,e,i,n){var r=t.__pictorialBundle,a=t.__pictorialMainPath;a?L(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=m(i),r.add(a),L(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),S(a,i)}function y(t,e,i){var n=r.extend({},e.barRectShape),o=t.__pictorialBarRect;o?L(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new a.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function x(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,s=r.extend({},i.clipShape),l=e.valueDim,u=i.animationModel,h=i.dataIndex;if(o)a.updateProps(o,{shape:s},u,h);else{s[l.wh]=0,o=new a.Rect({shape:s}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var c={};c[l.wh]=i.clipShape[l.wh],a[n?"updateProps":"initProps"](o,{shape:c},u,h)}}}function b(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=w,i.isAnimationEnabled=T,i}function w(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function T(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function S(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function M(t,e,i,n){var r=new a.Group,o=new a.Group;return r.add(o),r.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?v(r,e,i):_(r,0,i),y(r,i,n),x(r,e,i,n),r.__pictorialShapeStr=C(t,i),r.__pictorialSymbolMeta=i,r}function A(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var s=[];I(n,(function(t){s.push(t)})),n.__pictorialMainPath&&s.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),r.each(s,(function(t){a.updateProps(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function C(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function I(t,e,i){r.each(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function L(t,e,i,n,r,o){e&&t.attr(e),n.symbolClip&&!r?i&&t.attr(i):i&&a[r?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function E(t,e,i){var n=i.color,o=i.dataIndex,s=i.itemModel,l=s.getModel("itemStyle").getItemStyle(["color"]),u=s.getModel("emphasis.itemStyle").getItemStyle(),c=s.getShallow("cursor");I(t,(function(t){t.setColor(n),t.setStyle(r.defaults({fill:n,opacity:i.opacity},l)),a.setHoverStyle(t,u),c&&(t.cursor=c),t.z2=i.z2}));var d={},f=e.valueDim.posDesc[+(i.boundingLength>0)],p=t.__pictorialBarRect;h(p.style,d,s,n,e.seriesModel,o,f),a.setHoverStyle(p,d)}function P(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var D=n.extendChartView({type:"pictorialBar",render:function(t,e,i){var n=this.group,r=t.getData(),o=this._data,s=t.coordinateSystem,l=!!s.getBaseAxis().isHorizontal(),u=s.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:s,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:d[+l],categoryDim:d[1-l]};return r.diff(o).add((function(t){if(r.hasValue(t)){var e=b(r,t),i=p(r,t,e,h),a=M(r,h,i);r.setItemGraphicEl(t,a),n.add(a),E(a,h,i)}})).update((function(t,e){var i=o.getItemGraphicEl(e);if(r.hasValue(t)){var s=b(r,t),l=p(r,t,s,h),u=C(r,l);i&&u!==i.__pictorialShapeStr&&(n.remove(i),r.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,r=i.dataIndex,o=t.__pictorialBundle;a.updateProps(o,{position:i.bundlePosition.slice()},n,r),i.symbolRepeat?v(t,e,i,!0):_(t,e,i,!0);y(t,i,!0),x(t,e,i,!0)}(i,h,l):i=M(r,h,l,!0),r.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=l,n.add(i),E(i,h,l)}else n.remove(i)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&A(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=r,this.group},dispose:r.noop,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){A(n,e.dataIndex,t,e)})):i.removeAll()}});t.exports=D},function(t,e,i){var n=i(2);i(204),i(428),i(429);var r=i(430),a=i(431),o=i(73);n.registerLayout(r),n.registerVisual(a),n.registerProcessor(o("themeRiver"))},function(t,e,i){var n=i(423);i(24).register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(r,a){var o=new n(r,t,e);o.name="single_"+a,o.resize(r,e),r.coordinateSystem=o,i.push(o)})),t.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:n.prototype.dimensions})},function(t,e,i){var n=i(424),r=i(25),a=i(8).getLayoutRect,o=i(0).each;function s(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}s.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:s,_init:function(t,e,i){var a=this.dimension,o=new n(a,r.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),s="category"===o.type;o.onBand=s&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();o(e.mapDimension(this.dimension,!0),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),r.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=a({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(n[r],n[1-r]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2,n}};var l=s;t.exports=l},function(t,e,i){var n=i(0),r=i(36),a=function(t,e,i,n,a){r.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(37),a=i(3),o=i(205),s=i(45),l=i(194),u=l.rectCoordAxisBuildSplitArea,h=l.rectCoordAxisHandleRemove,c=["axisLine","axisTickLabel","axisName"],d=["splitArea","splitLine"],f=s.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,s){var l=this.group;l.removeAll();var u=this._axisGroup;this._axisGroup=new a.Group;var h=o.layout(t),p=new r(t,h);n.each(c,p.add,p),l.add(this._axisGroup),l.add(p.getGroup()),n.each(d,(function(e){t.get(e+".show")&&this["_"+e](t)}),this),a.groupTransition(u,this._axisGroup,t),f.superCall(this,"render",t,e,i,s)},remove:function(){h(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),r=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var s=t.coordinateSystem.getRect(),l=e.isHorizontal(),u=[],h=0,c=e.getTicksCoords({tickModel:i}),d=[],f=[],p=0;pa&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return o.y0=r,o.max=a,o}(u),c=h.y0,d=i/h.max,f=o.length,p=o[0].indices.length,g=0;g0){s.virtualPiece?s.virtualPiece.updateData(!1,i,"normal",t,e):(s.virtualPiece=new a(i,t,e),c.add(s.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var r=function(t){s._rootToNode(n.parentNode)};n.piece._onclickEvent=r,s.virtualPiece.on("click",r)}else s.virtualPiece&&(c.remove(s.virtualPiece),s.virtualPiece=null)}(u,h),r&&r.highlight&&r.highlight.piece){var g=t.getShallow("highlightPolicy");r.highlight.piece.onEmphasis(g)}else if(r&&r.unhighlight){var m=this.virtualPiece;!m&&u.children.length&&(m=u.children[0].piece),m&&m.onNormal()}this._initEvents(),this._oldChildren=f},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var r=n.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(n);else if("link"===r){var a=n.getModel(),o=a.get("link");if(o){var l=a.get("target",!0)||"_blank";s(o,l)}}i=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,r=t[1]-i.cy,a=Math.sqrt(n*n+r*r);return a<=i.r&&a>=i.r0}}});t.exports=l},function(t,e,i){var n=i(0),r=i(3),a="none",o="ancestor",s="self";function l(t,e,i){r.Group.call(this);var n=new r.Sector({z2:2});n.seriesIndex=e.seriesIndex;var a=new r.Text({z2:4,silent:t.getModel("label").get("silent")});function o(){a.ignore=a.hoverIgnore}function s(){a.ignore=a.normalIgnore}this.add(n),this.add(a),this.updateData(!0,t,"normal",e,i),this.on("emphasis",o).on("normal",s).on("mouseover",o).on("mouseout",s)}var u=l.prototype;u.updateData=function(t,e,i,a,o){this.node=e,e.piece=this,a=a||this._seriesModel,o=o||this._ecModel;var s=this.childAt(0);s.dataIndex=e.dataIndex;var l=e.getModel(),u=e.getLayout(),h=n.extend({},u);h.label=null;var c=function(t,e,i){var r=t.getVisual("color"),a=t.getVisual("visualMeta");a&&0!==a.length||(r=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(r)return r;if(0===t.depth)return i.option.color[0];var s=i.option.color.length;o=i.option.color[function(t){var e=t;for(;e.depth>1;)e=e.parentNode;var i=t.getAncestors()[0];return n.indexOf(i.children,e)}(t)%s];return o}(e,0,o);!function(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}(e,a,c);var d,f=l.getModel("itemStyle").getItemStyle();if("normal"===i)d=f;else{var p=l.getModel(i+".itemStyle").getItemStyle();d=n.merge(p,f)}d=n.defaults({lineJoin:"bevel",fill:d.fill||c},d),t?(s.setShape(h),s.shape.r=u.r0,r.updateProps(s,{shape:{r:u.r}},a,e.dataIndex),s.useStyle(d)):"object"==typeof d.fill&&d.fill.type||"object"==typeof s.style.fill&&s.style.fill.type?(r.updateProps(s,{shape:h},a),s.useStyle(d)):r.updateProps(s,{shape:h,style:d},a),this._updateLabel(a,c,i);var g=l.getShallow("cursor");if(g&&s.attr("cursor",g),t){var m=a.getShallow("highlightPolicy");this._initEvents(s,e,a,m)}this._seriesModel=a||this._seriesModel,this._ecModel=o||this._ecModel,r.setHoverStyle(this)},u.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode((function(i){var n,r,l;i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):(n=i,r=e.node,(l=t)!==a&&(l===s?n===r:l===o?n===r||n.isAncestorOf(r):n===r||n.isDescendantOf(r))?i.piece.childAt(0).trigger("highlight"):t!==a&&i.piece.childAt(0).trigger("downplay")))}))},u.onNormal=function(){this.node.hostTree.root.eachNode((function(t){t.piece&&t.piece.updateData(!1,t,"normal")}))},u.onHighlight=function(){this.updateData(!1,this.node,"highlight")},u.onDownplay=function(){this.updateData(!1,this.node,"downplay")},u._updateLabel=function(t,e,i){var a=this.node.getModel(),o=a.getModel("label"),s="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),l=a.getModel("emphasis.label"),u=s.get("formatter")?i:"normal",h=n.retrieve(t.getFormattedLabel(this.node.dataIndex,u,null,null,"label"),this.node.name);!1===A("show")&&(h="");var c=this.node.getLayout(),d=s.get("minAngle");null==d&&(d=o.get("minAngle")),d=d/180*Math.PI;var f=c.endAngle-c.startAngle;null!=d&&Math.abs(f)Math.PI/2?"right":"left"):b&&"center"!==b?"left"===b?(g=c.r0+x,m>Math.PI/2&&(b="right")):"right"===b&&(g=c.r-x,m>Math.PI/2&&(b="left")):(g=(c.r+c.r0)/2,b="center"),p.attr("style",{text:h,textAlign:b,textVerticalAlign:A("verticalAlign")||"middle",opacity:A("opacity")});var w=g*v+c.cx,T=g*_+c.cy;p.attr("position",[w,T]);var S=A("rotate"),M=0;function A(t){var e=s.get(t);return null==e?o.get(t):e}"radial"===S?(M=-m)<-Math.PI/2&&(M+=Math.PI):"tangential"===S?(M=Math.PI/2-m)>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI):"number"==typeof S&&(M=S*Math.PI/180),p.attr("rotation",M)},u._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,a=function(){r.onEmphasis(n)},o=function(){r.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",(function(){r.onDownplay()})).on("highlight",(function(){r.onHighlight()}))},n.inherits(l,r.Group);var h=l;t.exports=h},function(t,e,i){var n=i(2),r=i(46);n.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=r.retrieveTargetInfo(t,["sunburstRootToNode"],e);if(n){var a=e.getViewRoot();a&&(t.direction=r.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}));n.registerAction({type:"sunburstHighlight",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=r.retrieveTargetInfo(t,["sunburstHighlight"],e);n&&(t.highlight=n.node)}))}));n.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){t.unhighlight=!0}))}))},function(t,e,i){var n=i(4).parsePercent,r=i(0),a=Math.PI/180;function o(t,e){var i=t.children||[];t.children=function(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort((function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n}))}(i,e),i.length&&r.each(t.children,(function(t){o(t,e)}))}t.exports=function(t,e,i,s){e.eachSeriesByType(t,(function(t){var e=t.get("center"),s=t.get("radius");r.isArray(s)||(s=[0,s]),r.isArray(e)||(e=[e,e]);var l=i.getWidth(),u=i.getHeight(),h=Math.min(l,u),c=n(e[0],l),d=n(e[1],u),f=n(s[0],h/2),p=n(s[1],h/2),g=-t.get("startAngle")*a,m=t.get("minAngle")*a,v=t.getData().tree.root,_=t.getViewRoot(),y=_.depth,x=t.get("sort");null!=x&&o(_,x);var b=0;r.each(_.children,(function(t){!isNaN(t.getValue())&&b++}));var w=_.getValue(),T=Math.PI/(w||b)*2,S=_.depth>0,M=_.height-(S?-1:1),A=(p-f)/(M||1),C=t.get("clockwise"),I=t.get("stillShowZeroSum"),L=C?1:-1,E=function(t,e){if(t){var i=e;if(t!==v){var a=t.getValue(),o=0===w&&I?T:a*T;oa[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:n.bind((function(n){var r=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),o=t.coordToPoint([r,a]);return o.push(r,a*Math.PI/180),o})),size:n.bind(r,t)}}}},function(t,e){t.exports=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}},function(t,e,i){i(72),i(180),i(71)},function(t,e,i){var n=i(2),r=i(0),a=i(446);i(121),i(452),i(454),i(71),i(456),n.registerLayout(r.curry(a,"bar")),n.extendComponentView({type:"polar"})},function(t,e,i){var n=i(0),r=i(4).parsePercent,a=i(29).isDimensionStacked;function o(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function s(t,e){return e.dim+t.model.componentIndex}var l=function(t,e,i){var l={},u=function(t,e){var i={};n.each(t,(function(t,e){var n=t.getData(),a=t.coordinateSystem,l=a.getBaseAxis(),u=s(a,l),h=l.getExtent(),c="category"===l.type?l.getBandWidth():Math.abs(h[1]-h[0])/n.count(),d=i[u]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=d.stacks;i[u]=d;var p=o(t);f[p]||d.autoWidthCount++,f[p]=f[p]||{width:0,maxWidth:0};var g=r(t.get("barWidth"),c),m=r(t.get("barMaxWidth"),c),v=t.get("barGap"),_=t.get("barCategoryGap");g&&!f[p].width&&(g=Math.min(d.remainedWidth,g),f[p].width=g,d.remainedWidth-=g),m&&(f[p].maxWidth=m),null!=v&&(d.gap=v),null!=_&&(d.categoryGap=_)}));var a={};return n.each(i,(function(t,e){a[e]={};var i=t.stacks,o=t.bandWidth,s=r(t.categoryGap,o),l=r(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),n.each(i,(function(t,e){var i=t.maxWidth;i&&i=0?"p":"n",O=T;if(b&&(l[h][P]||(l[h][P]={p:T,n:T}),O=l[h][P][D]),"radius"===p.dim){var R=p.dataToRadius(E)-T,N=n.dataToAngle(P);Math.abs(R)o;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,r=i*i+n*n,a=this.r,o=this.r0;return r<=a*a&&r>=o*o}}}};var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(36);function a(t,e){r.call(this,"radius",t,e),this.type="category"}a.prototype={constructor:a,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:r.prototype.dataToCoord,radiusToData:r.prototype.coordToData},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(21),a=i(36),o=(0,i(5).makeInner)();function s(t,e){e=e||[0,360],a.call(this,"angle",t,e),this.type="category"}s.prototype={constructor:s,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:a.prototype.dataToCoord,angleToData:a.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,i=e.getExtent(),n=e.count();if(i[1]-i[0]<1)return 0;var a=i[0],s=this.dataToCoord(a+1)-this.dataToCoord(a),l=Math.abs(s),u=r.getBoundingRect(a,t.getFont(),"center","top"),h=Math.max(u.height,7)/l;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),d=o(this.model),f=d.lastAutoInterval,p=d.lastTickCount;return null!=f&&null!=p&&Math.abs(f-c)<=1&&Math.abs(p-n)<=1&&f>c?c=f:(d.lastTickCount=n,d.lastAutoInterval=c),c}},n.inherits(s,a);var l=s;t.exports=l},function(t,e,i){var n=i(2);i(451);var r=n.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});t.exports=r},function(t,e,i){var n=i(0),r=i(16),a=i(89),o=i(53),s=r.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n.merge(s.prototype,o);var l={splitNumber:5};function u(t,e){return e.type||(e.data?"category":"value")}a("angle",s,u,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),a("radius",s,u,l)},function(t,e,i){i(121),i(453)},function(t,e,i){var n=i(0),r=i(3),a=i(15),o=i(45),s=i(37),l=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function u(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),r=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:r[0],y2:r[1]}}function h(t){return t.getRadiusAxis().inverse?0:1}function c(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}var d=o.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,r=i.polar,a=r.getRadiusAxis().getExtent(),o=i.getTicksCoords(),s=i.getMinorTicksCoords(),u=n.map(i.getViewLabels(),(function(t){return(t=n.clone(t)).coord=i.dataToCoord(t.tickValue),t}));c(u),c(o),n.each(l,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,r,o,s,a,u)}),this)}},_axisLine:function(t,e,i,n,a){var o,s=t.getModel("axisLine.lineStyle"),l=h(e),u=l?0:1;(o=0===a[u]?new r.Circle({shape:{cx:e.cx,cy:e.cy,r:a[l]},style:s.getLineStyle(),z2:1,silent:!0}):new r.Ring({shape:{cx:e.cx,cy:e.cy,r:a[l],r0:a[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,a,o){var s=t.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),c=o[h(e)],d=n.map(i,(function(t){return new r.Line({shape:u(e,[c,c+l],t.coord)})}));this.group.add(r.mergePath(d,{style:n.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,a,o){if(a.length){for(var s=t.getModel("axisTick"),l=t.getModel("minorTick"),c=(s.get("inside")?-1:1)*l.get("length"),d=o[h(e)],f=[],p=0;pv?"left":"right",x=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";c&&c[u]&&c[u].textStyle&&(o=new a(c[u].textStyle,d,d.ecModel));var b=new r.Text({silent:s.isLabelSilent(t)});this.group.add(b),r.setTextStyle(b.style,o,{x:m[0],y:m[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:y,textVerticalAlign:x}),p&&(b.eventData=s.makeAxisEventDataBase(t),b.eventData.targetType="axisLabel",b.eventData.value=i.rawLabel)}),this)},_splitLine:function(t,e,i,a,o){var s=t.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),h=0;l=l instanceof Array?l:[l];for(var c=[],d=0;dy?"left":"right",f=Math.abs(c[1]-x)/_<.3?"middle":c[1]>x?"top":"bottom"}return{position:c,align:d,verticalAlign:f}}(e,i,0,f,r.get("label.margin"));o.buildLabelElOption(t,i,r,u,_)}});var c={line:function(t,e,i,n,r){return"angle"===t.dim?{type:"Line",shape:o.makeLineShape(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,r){var a=Math.max(1,t.getBandWidth()),s=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:o.makeSectorShape(e.cx,e.cy,n[0],n[1],(-i-a/2)*s,(a/2-i)*s)}:{type:"Sector",shape:o.makeSectorShape(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};u.registerAxisPointerClass("PolarAxisPointer",h);var d=h;t.exports=d},function(t,e,i){var n=i(2),r=i(0);function a(t,e){e.update="updateView",n.registerAction(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name);var a=i.coordinateSystem;r.each(a.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}i(458),i(119),i(459),i(199),a("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a("select",{type:"geoSelect",event:"geoselected"}),a("unSelect",{type:"geoUnSelect",event:"geounselected"})},function(t,e,i){var n=i(0),r=i(5),a=i(16),o=i(15),s=i(118),l=i(119),u=a.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){a.prototype.init.apply(this,arguments),r.defaultEmphasis(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=l.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=n.reduce(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new o(i,e)),t}),n.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new o(null,this,this.ecModel)},getFormattedLabel:function(t,e){e=e||"normal";var i=this.getRegionModel(t).get(("normal"===e?"":e+".")+"label.formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});n.mixin(u,s);var h=u;t.exports=h},function(t,e,i){var n=i(198),r=i(2).extendComponentView({type:"geo",init:function(t,e){var i=new n(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});t.exports=r},function(t,e,i){i(461),i(462),i(463)},function(t,e,i){var n=i(0),r=i(8),a=i(4),o=i(24);function s(t,e,i){this._model=t}function l(t,e,i,n){var r=i.calendarModel,a=i.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem:null;return o===this?o[t](n):null}s.prototype={constructor:s,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=a.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var r=t.getDay();return{y:e,m:i,d:n,day:r=Math.abs((r+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),s=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[i,7]:[7,i];n.each([0,1],(function(t){c(o,t)&&(s[a[t]]=o[t]*l[t])}));var u={width:e.getWidth(),height:e.getHeight()},h=this._rect=r.getLayoutRect(s,u);function c(t,e){return null!=t[e]&&"auto"!==t[e]}n.each([0,1],(function(t){c(o,t)||(o[t]=h[a[t]]/l[t])})),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){n.isArray(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),r=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=r.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),r=n.getDate(),a=t[1].date.getDate();n.setDate(r+i-1);var o=n.getDate();if(o!==a)for(var s=n.getTime()-t[1].time>0?1:-1;(o=n.getDate())!==a&&(n.getTime()-t[1].time)*s>0;)i-=s,n.setDate(o-s);var l=Math.floor((i+t[0].day+6)/7),u=e?1-l:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var r=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+r),this.getDateInfo(a)}},s.dimensions=s.prototype.dimensions,s.getDimensionsInfo=s.prototype.getDimensionsInfo,s.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(n){var r=new s(n,t,e);i.push(r),n.coordinateSystem=r})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},o.register("calendar",s);var u=s;t.exports=u},function(t,e,i){var n=i(0),r=i(16),a=i(8),o=a.getLayoutParams,s=a.sizeCalculable,l=a.mergeLayoutParam,u=r.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var r=o(t);u.superApply(this,"init",arguments),h(t,r)},mergeOption:function(t,e){u.superApply(this,"mergeOption",arguments),h(this.option,t)}});function h(t,e){var i=t.cellSize;n.isArray(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var r=n.map([0,1],(function(t){return s(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));l(t,e,{type:"box",ignoreSize:r})}var c=u;t.exports=c},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(9),s=i(4),l={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},u={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},h=n.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var r=t.coordinateSystem,a=r.getRangeInfo(),o=r.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,o,n),this._renderYearText(t,a,o,n),this._renderMonthText(t,o,n),this._renderWeekText(t,a,o,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),s=n.getCellHeight(),l=e.start.time;l<=e.end.time;l=n.getNextNDay(l,1).time){var u=n.dataToRect([l],!1).tl,h=new a.Rect({shape:{x:u[0],y:u[1],width:o,height:s},cursor:"default",style:r});i.add(h)}},_renderLines:function(t,e,i,n){var r=this,a=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=a.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=a.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(a.getDateInfo(e)),r._firstDayPoints.push(a.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,i);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,o,n)}d(a.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,i),o,n),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,i),o,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===i?0:1;return n[0][r]=n[0][r]-e/2,n[1][r]=n[1][r]+e/2,n},_drawSplitline:function(t,e,i){var n=new a.Polyline({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var r=[],a=0;a<7;a++){var o=n.getNextNDay(e.time,a),s=n.dataToRect([o.time],!1);r[2*o.day]=s.tl,r[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"==typeof t&&t?o.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,r){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=r,a=["center","top"]):"left"===n?e[0]-=r:"right"===n?(e[0]+=r,a=["center","top"]):e[1]-=r;var o=0;return"left"!==n&&"right"!==n||(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),s=r.get("position");s||(s="horizontal"!==i?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],u=(l[0][0]+l[1][0])/2,h=(l[0][1]+l[1][1])/2,c="horizontal"===i?0:1,d={top:[u,l[c][1]],bottom:[u,l[1-c][1]],left:[l[1-c][0],h],right:[l[c][0],h]},f=e.start.y;+e.end.y>+e.start.y&&(f=f+"-"+e.end.y);var p=r.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:f},m=this._formatterLabel(p,g),v=new a.Text({z2:30});a.setTextStyle(v.style,r,{text:m}),v.attr(this._yearTextPositionControl(v,d[s],i,s,o)),n.add(v)}},_monthTextPositionControl:function(t,e,i,n,r){var a="left",o="top",s=t[0],l=t[1];return"horizontal"===i?(l+=r,e&&(a="center"),"start"===n&&(o="bottom")):(s+=r,e&&(o="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),s=n.get("margin"),u=n.get("position"),h=n.get("align"),c=[this._tlpoints,this._blpoints];r.isString(o)&&(o=l[o.toUpperCase()]||[]);var d="start"===u?0:1,f="horizontal"===e?0:1;s="start"===u?-s:s;for(var p="center"===h,g=0;g=0;c--)null==o[c]?o.splice(c,1):delete o[c].$action},_flatten:function(t,e,i){r.each(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function c(t,e,i,n){var r=i.type,a=new(u.hasOwnProperty(r)?u[r]:o.getShapeClass(r))(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function d(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){d(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function f(t,e){var i;return r.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}n.extendComponentView({type:"graphic",init:function(t,e){this._elMap=r.createHashMap(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;r.each(e,(function(e){var a=e.$action,o=e.id,l=i.get(o),u=e.parentId,h=null!=u?i.get(u):n,f=e.style;"text"===e.type&&f&&(e.hv&&e.hv[1]&&(f.textVerticalAlign=f.textBaseline=null),!f.hasOwnProperty("textFill")&&f.fill&&(f.textFill=f.fill),!f.hasOwnProperty("textStroke")&&f.stroke&&(f.textStroke=f.stroke));var p=function(t){return t=r.extend({},t),r.each(["id","parentId","$action","hv","bounding"].concat(s.LOCATION_PARAMS),(function(e){delete t[e]})),t}(e);a&&"merge"!==a?"replace"===a?(d(l,i),c(o,h,p,i)):"remove"===a&&d(l,i):l?l.attr(p):c(o,h,p,i);var g=i.get(o);g&&(g.__ecGraphicWidthOption=e.width,g.__ecGraphicHeightOption=e.height,function(t,e,i){var n=t.eventData;t.silent||t.ignore||n||(n=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});n&&(n.info=t.info)}(g,t))}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,r=this._elMap,a=e.getWidth(),o=e.getHeight(),u=0;u=0;u--){var d;h=i[u];if(d=r.get(h.id)){var f,p=(f=d.parent)===n?{width:a,height:o}:{width:f.__ecGraphicWidth,height:f.__ecGraphicHeight};s.positionElement(d,h,p,null,{hv:h.hv,boundingMode:h.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){d(e,t)})),this._elMap=r.createHashMap()},dispose:function(){this._clear()}})},function(t,e,i){var n=i(2),r=i(466);i(206),i(468),i(469),i(470),i(471),n.registerPreprocessor(r)},function(t,e,i){var n=i(0),r=["rect","polygon","keep","clear"];t.exports=function(t,e){var i=t&&t.brush;if(n.isArray(i)||(i=i?[i]:[]),i.length){var a=[];n.each(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(a=a.concat(e))}));var o=t&&t.toolbox;n.isArray(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var s,l,u=o.feature||(o.feature={}),h=u.brush||(u.brush={}),c=h.type||(h.type=[]);c.push.apply(c,a),s=c,l={},n.each(s,(function(t){l[t]=1})),s.length=0,n.each(l,(function(t,e){s.push(e)})),e&&!c.length&&c.push.apply(c,r)}}},function(t,e,i){var n=i(164),r=i(11),a=i(3).linePolygonIntersect;function o(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var r=n.range;return s(e[t],r)}},rect:function(n,r,a){if(n){var o=a.range,l=[n[e[t]],n[e[t]]+n[i[t]]];return l[1]=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,r=this._names=[];if("category"===i){var s=[];n.each(e,(function(t,e){var i,a=o.getDataItemValue(t);n.isObject(t)?(i=n.clone(t)).value=e:i=e,s.push(i),n.isString(a)||null!=a&&!isNaN(a)||(a=""),r.push(a+"")})),e=s}var l={category:"ordinal",time:"time"}[i]||"number";(this._data=new a([{name:"value",type:l}],this)).initData(e,r)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),l=s;t.exports=l},function(t,e,i){var n=i(0),r=i(11),a=i(20),o=i(3),s=i(8),l=i(479),u=i(480),h=i(23).createSymbol,c=i(25),d=i(4),f=i(9).encodeHTML,p=n.bind,g=n.each,m=Math.PI,v=l.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var r=this._layout(t,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(r,t);t.formatTooltip=function(t){return f(s.scale.getLabel(t))},g(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](r,a,s,t)}),this),this._renderAxisLabel(r,o,s,t),this._position(r,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),r=function(t,e){return s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?r.y+r.height/2=0||"+"===i?"left":"right"},c={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:m/2},f="vertical"===n?r.height:r.width,p=t.getModel("controlStyle"),g=p.get("show",!0),v=g?p.get("itemSize"):0,_=g?p.get("itemGap"):0,y=v+_,x=t.get("label.rotate")||0;x=x*m/180;var b=p.get("position",!0),w=g&&p.get("showPlayBtn",!0),T=g&&p.get("showPrevBtn",!0),S=g&&p.get("showNextBtn",!0),M=0,A=f;return"left"===b||"bottom"===b?(w&&(a=[0,0],M+=y),T&&(o=[M,0],M+=y),S&&(l=[A-v,0],A-=y)):(w&&(a=[A-v,0],A-=y),T&&(o=[0,0],M+=y),S&&(l=[A-v,0],A-=y)),u=[M,A],t.get("inverse")&&u.reverse(),{viewRect:r,mainLength:f,orient:n,rotation:d[n],labelRotation:x,labelPosOpt:i,labelAlign:t.get("label.align")||h[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||c[n],playPosition:a,prevBtnPosition:o,nextBtnPosition:l,axisExtent:u,controlSize:v,controlGap:_}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=a.create(),s=r.x,l=r.y+r.height;a.translate(o,o,[-s,-l]),a.rotate(o,o,-m/2),a.translate(o,o,[s,l]),(r=r.clone()).applyTransform(o)}var u=_(r),h=_(i.getBoundingRect()),c=_(n.getBoundingRect()),d=i.position,f=n.position;f[0]=d[0]=u[0][0];var p,g=t.labelPosOpt;isNaN(g)?(y(d,h,u,1,p="+"===g?0:1),y(f,c,u,1,1-p)):(y(d,h,u,1,p=g>=0?0:1),f[1]=d[1]+g);function v(t){var e=t.position;t.origin=[u[0][0]-e[0],u[1][0]-e[1]]}function _(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,i,n,r){t[n]+=i[n][r]-e[n][r]}i.attr("position",d),n.attr("position",f),i.rotation=n.rotation=t.rotation,v(i),v(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),r=c.createScaleByModel(e,n);r.getTicks=function(){return i.mapArray(["value"],(function(t){return t}))};var a=i.getDataExtent("value");r.setExtent(a[0],a[1]),r.niceTicks();var o=new u("value",r,t.axisExtent,n);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new o.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,r){var a=i.getExtent();r.get("lineStyle.show")&&e.add(new o.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:n.extend({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var r=n.getData(),a=i.scale.getTicks();g(a,(function(t){var a=i.dataToCoord(t),s=r.getItemModel(t),l=s.getModel("itemStyle"),u=s.getModel("emphasis.itemStyle"),h={position:[a,0],onclick:p(this._changeTimeline,this,t)},c=_(s,l,e,h);o.setHoverStyle(c,u.getItemStyle()),s.get("tooltip")?(c.dataIndex=t,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var r=n.getData(),a=i.getViewLabels();g(a,(function(n){var a=n.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel("emphasis.label"),h=i.dataToCoord(n.tickValue),c=new o.Text({position:[h,0],rotation:t.labelRotation-t.rotation,onclick:p(this._changeTimeline,this,a),silent:!1});o.setTextStyle(c.style,l,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(c),o.setHoverStyle(c,o.setTextStyle({},u))}),this)}},_renderControl:function(t,e,i,n){var a=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel("emphasis.controlStyle").getItemStyle(),h=[0,-a/2,a,a],c=n.getPlayState(),d=n.get("inverse",!0);function f(t,i,c,d){if(t){var f=function(t,e,i,n){var a=n.style,s=o.createIcon(t.get(e),n||{},new r(i[0],i[1],i[2],i[3]));a&&s.setStyle(a);return s}(n,i,h,{position:t,origin:[a/2,0],rotation:d?-s:0,rectHover:!0,style:l,onclick:c});e.add(f),o.setHoverStyle(f,u)}}f(t.nextBtnPosition,"controlStyle.nextIcon",p(this._changeTimeline,this,d?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",p(this._changeTimeline,this,d?"+":"-")),f(t.playPosition,"controlStyle."+(c?"stopIcon":"playIcon"),p(this._handlePlayClick,this,!c),!0)},_renderCurrentPointer:function(t,e,i,n){var r=n.getData(),a=n.getCurrentIndex(),o=r.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=p(s._handlePointerDrag,s),t.ondragend=p(s._handlePointerDragend,s),y(t,a,i,n,!0)},onUpdate:function(t){y(t,a,i,n)}};this._currentPointer=_(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,r=d.asc(n.getExtent().slice());i>r[1]&&(i=r[1]),i=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,r=[g,m,{type:s,valueIndex:r.valueIndex,value:h}]}return(r=[o.dataTransform(t,r[0]),o.dataTransform(t,r[1]),n.extend({},r[2])])[2].type=r[2].type||"",n.merge(r[2],r[0]),n.merge(r[2],r[1]),r};function c(t){return!isNaN(t)&&!isFinite(t)}function d(t,e,i,n){var r=1-t,a=n.dimensions[t];return c(e[r])&&c(i[r])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function f(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(d(1,i,n,t)||d(0,i,n,t)))return!0}return o.dataFilter(t,e[0])&&o.dataFilter(t,e[1])}function p(t,e,i,n,r){var o,s=n.coordinateSystem,l=t.getItemModel(e),u=a.parsePercent(l.get("x"),r.getWidth()),h=a.parsePercent(l.get("y"),r.getHeight());if(isNaN(u)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var d=s.dimensions,f=t.get(d[0],e),p=t.get(d[1],e);o=s.dataToPoint([f,p])}if("cartesian2d"===s.type){var g=s.getAxis("x"),m=s.getAxis("y");d=s.dimensions;c(t.get(d[0],e))?o[0]=g.toGlobalCoord(g.getExtent()[i?0:1]):c(t.get(d[1],e))&&(o[1]=m.toGlobalCoord(m.getExtent()[i?0:1]))}isNaN(u)||(o[0]=u),isNaN(h)||(o[1]=h)}else o=[u,h];t.setItemLayout(e,o)}var g=l.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,a=e.__to;r.each((function(e){p(r,e,!0,t,i),p(a,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[r.getItemLayout(t),a.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,a){var l=t.coordinateSystem,u=t.id,c=t.getData(),d=this.markerGroupMap,g=d.get(u)||d.set(u,new s);this.group.add(g.group);var m=function(t,e,i){var a;a=t?n.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return n.defaults({name:t},i)})):[{name:"value",type:"float"}];var s=new r(a,i),l=new r(a,i),u=new r([],i),c=n.map(i.get("data"),n.curry(h,e,t,i));t&&(c=n.filter(c,n.curry(f,t)));var d=t?o.dimValueGetter:function(t){return t.value};return s.initData(n.map(c,(function(t){return t[0]})),null,d),l.initData(n.map(c,(function(t){return t[1]})),null,d),u.initData(n.map(c,(function(t){return t[2]}))),u.hasItemOption=!0,{from:s,to:l,line:u}}(l,t,e),v=m.from,_=m.to,y=m.line;e.__from=v,e.__to=_,e.setData(y);var x=e.get("symbol"),b=e.get("symbolSize");function w(e,i,n){var r=e.getItemModel(i);p(e,i,n,t,a),e.setItemVisual(i,{symbolRotate:r.get("symbolRotate"),symbolSize:r.get("symbolSize")||b[n?0:1],symbol:r.get("symbol",!0)||x[n?0:1],color:r.get("itemStyle.color")||c.getVisual("color")})}n.isArray(x)||(x=[x,x]),"number"==typeof b&&(b=[b,b]),m.from.each((function(t){w(v,t,!0),w(_,t,!1)})),y.each((function(t){var e=y.getItemModel(t).get("lineStyle.color");y.setItemVisual(t,{color:e||v.getItemVisual(t,"color")}),y.setItemLayout(t,[v.getItemLayout(t),_.getItemLayout(t)]),y.setItemVisual(t,{fromSymbolRotate:v.getItemVisual(t,"symbolRotate"),fromSymbolSize:v.getItemVisual(t,"symbolSize"),fromSymbol:v.getItemVisual(t,"symbol"),toSymbolRotate:_.getItemVisual(t,"symbolRotate"),toSymbolSize:_.getItemVisual(t,"symbolSize"),toSymbol:_.getItemVisual(t,"symbol")})})),g.updateData(y),m.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),g.__keep=!0,g.group.silent=e.get("silent")||t.get("silent")}});t.exports=g},function(t,e,i){var n=i(2);i(488),i(489),n.registerPreprocessor((function(t){t.markArea=t.markArea||{}}))},function(t,e,i){var n=i(122).extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});t.exports=n},function(t,e,i){var n=i(0),r=i(27),a=i(22),o=i(4),s=i(3),l=i(123),u=i(124),h=function(t,e,i,r){var a=l.dataTransform(t,r[0]),o=l.dataTransform(t,r[1]),s=n.retrieve,u=a.coord,h=o.coord;u[0]=s(u[0],-1/0),u[1]=s(u[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var c=n.mergeAll([{},a,o]);return c.coord=[a.coord,o.coord],c.x0=a.x,c.y0=a.y,c.x1=o.x,c.y1=o.y,c};function c(t){return!isNaN(t)&&!isFinite(t)}function d(t,e,i,n){var r=1-t;return c(e[r])&&c(i[r])}function f(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!d(1,i,n)&&!d(0,i,n))||(l.dataFilter(t,{coord:i,x:e.x0,y:e.y0})||l.dataFilter(t,{coord:n,x:e.x1,y:e.y1}))}function p(t,e,i,n,r){var a,s=n.coordinateSystem,l=t.getItemModel(e),u=o.parsePercent(l.get(i[0]),r.getWidth()),h=o.parsePercent(l.get(i[1]),r.getHeight());if(isNaN(u)||isNaN(h)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var d=[g=t.get(i[0],e),m=t.get(i[1],e)];s.clampData&&s.clampData(d,d),a=s.dataToPoint(d,!0)}if("cartesian2d"===s.type){var f=s.getAxis("x"),p=s.getAxis("y"),g=t.get(i[0],e),m=t.get(i[1],e);c(g)?a[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):c(m)&&(a[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(u)||(a[0]=u),isNaN(h)||(a[1]=h)}else a=[u,h];return a}var g=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];u.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var r=e.getData();r.each((function(e){var a=n.map(g,(function(n){return p(r,e,n,t,i)}));r.setItemLayout(e,a),r.getItemGraphicEl(e).setShape("points",a)}))}}),this)},renderSeries:function(t,e,i,o){var l=t.coordinateSystem,u=t.id,d=t.getData(),m=this.markerGroupMap,v=m.get(u)||m.set(u,{group:new s.Group});this.group.add(v.group),v.__keep=!0;var _=function(t,e,i){var r,o;t?(r=n.map(t&&t.dimensions,(function(t){var i=e.getData(),r=i.getDimensionInfo(i.mapDimension(t))||{};return n.defaults({name:t},r)})),o=new a(n.map(["x0","y0","x1","y1"],(function(t,e){return{name:t,type:r[e%2].type}})),i)):o=new a(r=[{name:"value",type:"float"}],i);var s=n.map(i.get("data"),n.curry(h,e,t,i));t&&(s=n.filter(s,n.curry(f,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(s,null,l),o.hasItemOption=!0,o}(l,t,e);e.setData(_),_.each((function(e){var i=n.map(g,(function(i){return p(_,e,i,t,o)})),r=!0;n.each(g,(function(t){if(r){var i=_.get(t[0],e),n=_.get(t[1],e);(c(i)||l.getAxis("x").containData(i))&&(c(n)||l.getAxis("y").containData(n))&&(r=!1)}})),_.setItemLayout(e,{points:i,allClipped:r}),_.setItemVisual(e,{color:d.getVisual("color")})})),_.diff(v.__data).add((function(t){var e=_.getItemLayout(t);if(!e.allClipped){var i=new s.Polygon({shape:{points:e.points}});_.setItemGraphicEl(t,i),v.group.add(i)}})).update((function(t,i){var n=v.__data.getItemGraphicEl(i),r=_.getItemLayout(t);r.allClipped?n&&v.group.remove(n):(n?s.updateProps(n,{shape:{points:r.points}},e,t):n=new s.Polygon({shape:{points:r.points}}),_.setItemGraphicEl(t,n),v.group.add(n))})).remove((function(t){var e=v.__data.getItemGraphicEl(t);v.group.remove(e)})).execute(),_.eachItemGraphicEl((function(t,i){var a=_.getItemModel(i),o=a.getModel("label"),l=a.getModel("emphasis.label"),u=_.getItemVisual(i,"color");t.useStyle(n.defaults(a.getModel("itemStyle").getItemStyle(),{fill:r.modifyAlpha(u,.4),stroke:u})),t.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),s.setLabelStyle(t.style,t.hoverStyle,o,l,{labelFetcher:e,labelDataIndex:i,defaultText:_.getName(i)||"",isRectText:!0,autoColor:u}),s.setHoverStyle(t,{}),t.dataModel=e})),v.__data=_,v.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){i(116),i(491),i(492),i(493)},function(t,e,i){var n=i(188),r=i(8),a=r.mergeLayoutParam,o=r.getLayoutParams,s=n.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var r=o(t);s.superCall(this,"init",t,e,i,n),l(this,t,r)},mergeOption:function(t,e){s.superCall(this,"mergeOption",t,e),l(this,this.option,t)}});function l(t,e,i){var n=[1,1];n[t.getOrient().index]=0,a(e,i,{type:"box",ignoreSize:n})}var u=s;t.exports=u},function(t,e,i){var n=i(0),r=i(3),a=i(8),o=i(189),s=r.Group,l=["width","height"],u=["x","y"],h=o.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){h.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new s),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new s),this._showController},resetInner:function(){h.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,a,o,s,l){var u=this;h.superCall(this,"renderInner",t,e,i,a,o,s,l);var c=this._controllerGroup,d=e.get("pageIconSize",!0);n.isArray(d)||(d=[d,d]),p("pagePrev",0);var f=e.getModel("pageTextStyle");function p(t,i){var o=t+"DataIndex",s=r.createIcon(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:n.bind(u._pageGo,u,o,e,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});s.name=t,c.add(s)}c.add(new r.Text({name:"pageText",style:{textFill:f.getTextColor(),font:f.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),p("pageNext",1)},layoutInner:function(t,e,i,r,o,s){var h=this.getSelectorGroup(),c=t.getOrient().index,d=l[c],f=u[c],p=l[1-c],g=u[1-c];o&&a.box("horizontal",h,t.get("selectorItemGap",!0));var m=t.get("selectorButtonGap",!0),v=h.getBoundingRect(),_=[-v.x,-v.y],y=n.clone(i);o&&(y[d]=i[d]-v[d]-m);var x=this._layoutContentAndController(t,r,y,c,d,p,g);if(o){if("end"===s)_[c]+=x[d]+m;else{var b=v[d]+m;_[c]-=b,x[f]-=b}x[d]+=v[d]+m,_[1-c]+=x[g]+x[p]/2-v[p]/2,x[p]=Math.max(x[p],v[p]),x[g]=Math.min(x[g],v[g]+_[1-c]),h.attr("position",_)}return x},_layoutContentAndController:function(t,e,i,o,s,l,u){var h=this.getContentGroup(),c=this._containerGroup,d=this._controllerGroup;a.box(t.get("orient"),h,t.get("itemGap"),o?i.width:null,o?null:i.height),a.box("horizontal",d,t.get("pageButtonItemGap",!0));var f=h.getBoundingRect(),p=d.getBoundingRect(),g=this._showController=f[s]>i[s],m=[-f.x,-f.y];e||(m[o]=h.position[o]);var v=[0,0],_=[-p.x,-p.y],y=n.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));g&&("end"===t.get("pageButtonPosition",!0)?_[o]+=i[s]-p[s]:v[o]+=p[s]+y);_[1-o]+=f[l]/2-p[l]/2,h.attr("position",m),c.attr("position",v),d.attr("position",_);var x={x:0,y:0};if(x[s]=g?i[s]:f[s],x[l]=Math.max(f[l],p[l]),x[u]=Math.min(0,p[u]+_[1-o]),c.__rectSize=i[s],g){var b={x:0,y:0};b[s]=Math.max(i[s]-p[s]-y,0),b[l]=x[l],c.setClipPath(new r.Rect({shape:b})),c.__rectSize=b[s]}else d.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(t);return null!=w.pageIndex&&r.updateProps(h,{position:w.contentPosition},!!g&&t),this._updatePageInfoView(t,w),x},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;n.each(["pagePrev","pageNext"],(function(n){var r=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")}));var r=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,s=null!=o?o+1:0,l=e.pageCount;r&&a&&r.setStyle("text",n.isString(a)?a.replace("{current}",s).replace("{total}",l):a({current:s,total:l}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,r=t.getOrient().index,a=l[r],o=u[r],s=this._findTargetItemIndex(e),h=i.children(),c=h[s],d=h.length,f=d?1:0,p={contentPosition:i.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=x(c);p.contentPosition[r]=-g.s;for(var m=s+1,v=g,_=g,y=null;m<=d;++m)(!(y=x(h[m]))&&_.e>v.s+n||y&&!b(y,v.s))&&(v=_.i>v.i?_:y)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount),_=y;for(m=s-1,v=g,_=g,y=null;m>=-1;--m)(y=x(h[m]))&&b(_,y.s)||!(v.i<_.i)||(_=v,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=v.i),++p.pageCount,++p.pageIndex),v=y;return p;function x(t){if(t){var e=t.getBoundingRect(),i=e[o]+t.position[r];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function b(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(t){return this._showController?(this.getContentGroup().eachChild((function(n,r){var a=n.__legendDataIndex;null==i&&null!=a&&(i=r),a===t&&(e=r)})),null!=e?e:i):0;var e,i}}),c=h;t.exports=c},function(t,e,i){i(2).registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))},function(t,e,i){i(207),i(208)},function(t,e,i){var n=i(55).extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});t.exports=n},function(t,e,i){var n=i(0),r=i(26),a=i(3),o=i(34),s=i(56),l=i(4),u=i(8),h=i(54),c=a.Rect,d=l.linearMap,f=l.asc,p=n.bind,g=n.each,m=["line","bar","candlestick","scatter"],v=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){v.superApply(this,"render",arguments),o.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){v.superApply(this,"remove",arguments),o.clear(this,"_dispatchZoomAction")},dispose:function(){v.superApply(this,"dispose",arguments),o.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},a="horizontal"===this._orient?{right:r.width-i.x-i.width,top:r.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=u.getLayoutParams(t.option);n.each(["right","top","width","height"],(function(t){"ph"===o[t]&&(o[t]=a[t])}));var s=u.getLayoutRect(o,r,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr("horizontal"!==i||r?"horizontal"===i&&r?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new c({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new c({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:n.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var s=r.getDataExtent(o),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var u,h=[0,e[1]],c=[0,e[0]],f=[[e[0],0],[0,0]],p=[],g=c[1]/(r.count()-1),m=0,v=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(v>0&&e%v)m+=g;else{var i=null==t||isNaN(t)||""===t,n=i?0:d(t,s,h,!0);i&&!u&&e?(f.push([f[f.length-1][0],0]),p.push([p[p.length-1][0],0])):!i&&u&&(f.push([m,0]),p.push([m,0])),f.push([m,n]),p.push([m,n]),m+=g,u=i}}));var _=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:f},style:n.defaults({fill:_.get("dataBackgroundColor")},_.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new a.Polyline({shape:{points:p},style:_.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,r=this.ecModel;return t.eachTargetAxis((function(a,o){var s=t.getAxisProxy(a.name,o).getTargetSeriesModels();n.each(s,(function(t){if(!(i||!0!==e&&n.indexOf(m,t.get("type"))<0)){var s,l=r.getComponent(a.axis,o).axis,u={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(s=h.getOtherAxis(l).inverse),u=t.getData().mapDimension(u),i={thisAxis:l,series:t,thisDim:a.name,otherDim:u,otherAxisInverse:s}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new c({draggable:!0,cursor:_(this._orient),drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new c({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),g([0,1],(function(t){var r=a.createIcon(o.get("handleIcon"),{cursor:_(this._orient),draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),s=r.getBoundingRect();this._handleHeight=l.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=s.width/s.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var u=o.get("handleColor");null!=u&&(r.style.fill=u),n.add(e[t]=r);var h=o.textStyleModel;this.group.add(i[t]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[d(t[0],[0,100],e,!0),d(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];h(e,n,r,i.get("zoomLock")?"all":t,null!=a.minSpan?d(a.minSpan,o,r,!0):null,null!=a.maxSpan?d(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=f([d(n[0],r,o,!0),d(n[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=f(i.slice()),r=this._size;g([0,1],(function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],r[1]/2-a/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,o=["",""];if(e.get("showDetail")){var s=e.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();o=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=f(this._handleEnds.slice());function d(t){var e=a.getTransform(i.handles[t].parent,this.group),s=a.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+5,u=a.applyTransform([c[t]+(0===t?-l:l),this._size[1]/2],e);n[t].setStyle({x:u[0],y:u[1],textVerticalAlign:"horizontal"===r?"middle":s,textAlign:"horizontal"===r?s:"center",text:o[t]})}d.call(this,0),d.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,r=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return n.isFunction(r)?r(t,o):n.isString(r)?r.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,r.stop(n.event);var o=this._displayables.barGroup.getLocalTransform(),s=a.applyTransform([e,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(g(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}})),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});function _(t){return"vertical"===t?"ns-resize":"ew-resize"}var y=v;t.exports=y},function(t,e,i){var n=i(55).extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});t.exports=n},function(t,e,i){var n=i(0),r=i(56),a=i(54),o=i(499),s=n.bind,l=r.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,r){l.superApply(this,"render",arguments),this._range=t.getPercentRange(),n.each(this.getTargetCoordInfo(),(function(e,r){var a=n.map(e,(function(t){return o.generateCoordId(t.model)}));n.each(e,(function(e){var l=e.model,h={};n.each(["pan","zoom","scrollMove"],(function(t){h[t]=s(u[t],this,e,r)}),this),o.register(i,{coordId:o.generateCoordId(l),allCoordIds:a,containsPoint:function(t,e,i){return l.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:h})}),this)}),this)},dispose:function(){o.unregister(this.api,this.dataZoomModel.id),l.superApply(this,"dispose",arguments),this._range=null}}),u={zoom:function(t,e,i,n){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s){var l=c[e](null,[n.originX,n.originY],s,i,t),u=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0],h=Math.max(1/n.scale,0);o[0]=(o[0]-u)*h+u,o[1]=(o[1]-u)*h+u;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return a(0,o,[0,100],0,d.minSpan,d.maxSpan),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:h((function(t,e,i,n,r,a){var o=c[n]([a.oldX,a.oldY],[a.newX,a.newY],e,r,i);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength})),scrollMove:h((function(t,e,i,n,r,a){return c[n]([0,0],[a.scrollDelta,a.scrollDelta],e,r,i).signal*(t[1]-t[0])*a.scrollDelta}))};function h(t){return function(e,i,n,r){var o=this._range,s=o.slice(),l=e.axisModels[0];if(l){var u=t(s,l,e,i,n,r);return a(u,s,[0,100],"all"),this._range=s,o[0]!==s[0]||o[1]!==s[1]?s:void 0}}}var c={grid:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,i,n,r){var a=i.axis,o=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},d=l;t.exports=d},function(t,e,i){var n=i(0),r=i(68),a=i(34),o="\0_ec_dataZoom_roams";function s(t){var e=t.getZr();return e[o]||(e[o]={})}function l(t){n.each(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function u(t,e){t.dispatchAction({type:"dataZoom",batch:e})}e.register=function(t,e){var i=s(t),o=e.dataZoomId,h=e.coordId;n.each(i,(function(t,i){var r=t.dataZoomInfos;r[o]&&n.indexOf(e.allCoordIds,h)<0&&(delete r[o],t.count--)})),l(i);var c=i[h];c||((c=i[h]={coordId:h,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new r(t.getZr());return n.each(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(i){var r=[];n.each(e.dataZoomInfos,(function(n){if(i.isAvailableBehavior(n.dataZoomModel.option)){var a=(n.getRange||{})[t],o=a&&a(e.controller,i);!n.dataZoomModel.get("disabled",!0)&&o&&r.push({dataZoomId:n.dataZoomId,start:o[0],end:o[1]})}})),r.length&&e.dispatchAction(r)}))})),i}(t,c),c.dispatchAction=n.curry(u,t)),!c.dataZoomInfos[o]&&c.count++,c.dataZoomInfos[o]=e;var d,f,p,g,m=(d=c.dataZoomInfos,p={type_true:2,type_move:1,type_false:0,type_undefined:-1},g=!0,n.each(d,(function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");p["type_"+i]>p["type_"+f]&&(f=i),g&=e.get("preventDefaultMouseMove",!0)})),{controlType:f,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!g}});c.controller.enable(m.controlType,m.opt),c.controller.setPointerChecker(e.containsPoint),a.createOrUpdate(c,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")},e.unregister=function(t,e){var i=s(t);n.each(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),l(i)},e.generateCoordId=function(t){return t.type+"\0_"+t.id}},function(t,e,i){i(209),i(218)},function(t,e,i){var n=i(0),r=i(213),a=i(4),o=[20,140],s=r.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){s.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=o[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=o[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):n.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){r.prototype.completeVisualOption.apply(this,arguments),n.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)}),this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=a.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=l(this,"outOfRange",this.getExtent()),i=l(this,"inRange",this.option.range.slice()),n=[];function r(e,i){n.push({value:e,color:t(e,i)})}for(var a=0,o=0,s=i.length,u=e.length;ot[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:r/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new s.Group("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,a=i.handleLabels;f([0,1],(function(o){var l=r[o];l.setStyle("fill",e.handlesColor[o]),l.position[1]=t[o];var u=s.applyTransform(i.handleLabelPoints[o],s.getTransform(l,this.group));a[o].setStyle({x:u[0],y:u[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,a=r.getExtent(),o=r.itemSize,l=[0,o[1]],u=d(t,a,l,!0),h=this._shapes,c=h.indicator;if(c){c.position[1]=u,c.attr("invisible",!1),c.setShape("points",function(t,e,i,n){return t?[[0,-p(e,g(i,0))],[6,0],[0,p(e,g(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,u,o[1]));var f=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",f);var m=s.applyTransform(h.indicatorLabelPoint,s.getTransform(c,this.group)),v=h.indicatorLabel;v.attr("invisible",!1);var _=this._applyTransform("left",h.barGroup),y=this._orient;v.setStyle({text:(i||"")+r.formatValueText(e),textVerticalAlign:"horizontal"===y?_:"middle",textAlign:"horizontal"===y?"center":_,x:m[0],y:m[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=p(g(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],a=i.getExtent();t=p(g(r[0],t),r[1]);var o=function(t,e,i){var n=6,r=t.get("hoverLinkDataSize");r&&(n=d(r,e,i,!0)/2);return n}(i,a,r),s=[t-o,t+o],l=d(t,r,a,!0),u=[d(s[0],r,a,!0),d(s[1],r,a,!0)];s[0]r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var f=this._hoverLinkDataIndices,m=[];(e||_(i))&&(m=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var v=c.compressBatches(f,m);this._dispatchHighDown("downplay",h.makeHighDownBatch(v[0],i)),this._dispatchHighDown("highlight",h.makeHighDownBatch(v[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var r=n.getData(e.dataType),a=r.get(i.getDataDimension(r),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",h.makeHighDownBatch(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,r){var a=s.getTransform(e,r?null:this.group);return s[n.isArray(t)?"applyTransform":"transformDirection"](t,a,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function v(t,e,i,n){return new s.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){a.stop(t.event)},ondragend:n})}function _(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function y(t){return"vertical"===t?"ns-resize":"ew-resize"}var x=m;t.exports=x},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(213),a=i(47),o=i(214),s=i(4).reformIntervals,l=r.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){l.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();u[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n.clone(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=n.map(this._pieceList,(function(t){t=n.clone(t);return"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=a.listVisualTypes(),s=this.isCategory();function l(t,e,i){return t&&t[e]&&(n.isObject(t[e])?t[e].hasOwnProperty(i):t[e]===i)}n.each(t.pieces,(function(t){n.each(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),n.each(e,(function(e,i){var r=0;n.each(this.stateList,(function(e){r|=l(t,e,i)||l(t.target,e,i)}),this),!r&&n.each(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=o.get(i,"inRange"===e?"active":"inactive",s)}))}),this),r.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,r=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,n.each(r,(function(t,e){var i=this.getSelectedMapKey(t);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var o=!1;n.each(r,(function(t,e){var i=this.getSelectedMapKey(t);a[i]&&(o?a[i]=!1:o=!0)}),this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n.clone(t)},getValueState:function(t){var e=a.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),(function(e,i){a.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],i=[],r=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return n.each(a,(function(t){var e=t.interval;e&&(e[0]>s&&l([s,e[0]],"outOfRange"),l(e.slice()),s=e[1])}),this),{stops:e,outerColors:i}}function l(n,a){var o=r.getRepresentValue({interval:n});a||(a=r.getValueState(o));var s=t(o,a);n[0]===-1/0?i[0]=s:n[1]===1/0?i[1]=s:e.push({value:n[0],color:s},{value:n[1],color:s})}}}),u={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),r=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(r[1]-r[0])/a;+o.toFixed(i)!==o&&i<5;)i++;t.precision=i,o=+o.toFixed(i),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var l=0,u=r[0];l","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function h(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var c=l;t.exports=c},function(t,e,i){var n=i(0),r=i(215),a=i(3),o=i(23).createSymbol,s=i(8),l=i(216),u=r.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),r=e.textStyleModel,o=r.getFont(),l=r.getTextColor(),u=this._getItemAlign(),h=e.itemSize,c=this._getViewData(),d=c.endsText,f=n.retrieve(e.get("showLabel",!0),!d);d&&this._renderEndsText(t,d[0],h,f,u),n.each(c.viewPieceList,(function(r){var s=r.piece,c=new a.Group;c.onclick=n.bind(this._onItemClick,this,s),this._enableHoverLink(c,r.indexInModelPieceList);var d=e.getRepresentValue(s);if(this._createItemSymbol(c,d,[0,0,h[0],h[1]]),f){var p=this.visualMapModel.getValueState(d);c.add(new a.Text({style:{x:"right"===u?-i:h[0]+i,y:h[1]/2,text:s.text,textVerticalAlign:"middle",textAlign:u,textFont:o,textFill:l,opacity:"outOfRange"===p?.5:1}}))}t.add(c)}),this),d&&this._renderEndsText(t,d[1],h,f,u),s.box(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:l.makeHighDownBatch(i.findTargetDataIndices(e),i)})}t.on("mouseover",n.bind(i,this,"highlight")).on("mouseout",n.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return l.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,r){if(e){var o=new a.Group,s=this.visualMapModel.textStyleModel;o.add(new a.Text({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:e,textFont:s.getFont(),textFill:s.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=n.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),r=t.get("orient"),a=t.get("inverse");return("horizontal"===r?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(o(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,r=n.clone(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(r[a]=!0,n.each(r,(function(t,e){r[e]=e===a}))):r[a]=!r[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}});t.exports=u},function(t,e,i){i(506),(0,i(74).registerPainter)("vml",i(507))},function(t,e,i){var n=i(14),r=i(10).applyTransform,a=i(11),o=i(27),s=i(21),l=i(78),u=i(137),h=i(60),c=i(48),d=i(41),f=i(12),p=i(50),g=i(79),m=i(219),v=p.CMD,_=Math.round,y=Math.sqrt,x=Math.abs,b=Math.cos,w=Math.sin,T=Math.max;if(!n.canvasSupported){var S=21600,M=S/2,A=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=S+","+S,t.coordorigin="0,0"},C=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},I=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},L=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},E=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},P=l.parsePercent,D=function(t,e,i){var n=o.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=C(n[0],n[1],n[2]),t.opacity=i*n[3])},O=function(t,e,i,n){var a="fill"===e,s=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof g&&L(t,s),s||(s=m.createNode(e)),a?function(t,e,i){var n,a,s=e.fill;if(null!=s)if(s instanceof g){var l,u=0,h=[0,0],c=0,d=1,f=i.getBoundingRect(),p=f.width,m=f.height;if("linear"===s.type){l="gradient";var v=i.transform,_=[s.x*p,s.y*m],y=[s.x2*p,s.y2*m];v&&(r(_,_,v),r(y,y,v));var x=y[0]-_[0],b=y[1]-_[1];(u=180*Math.atan2(x,b)/Math.PI)<0&&(u+=360),u<1e-6&&(u=0)}else{l="gradientradial";_=[s.x*p,s.y*m],v=i.transform;var w=i.scale,M=p,A=m;h=[(_[0]-f.x)/M,(_[1]-f.y)/A],v&&r(_,_,v),M/=w[0]*S,A/=w[1]*S;var I=T(M,A);c=0/I,d=2*s.r/I-c}var L=s.colorStops.slice();L.sort((function(t,e){return t.offset-e.offset}));for(var E=L.length,P=[],O=[],R=0;R=2){var z=P[0][0],B=P[1][0],F=P[0][1]*e.opacity,V=P[1][1]*e.opacity;t.type=l,t.method="none",t.focus="100%",t.angle=u,t.color=z,t.color2=B,t.colors=O.join(","),t.opacity=V,t.opacity2=F}"radial"===l&&(t.focusposition=h.join(","))}else D(t,s,e.opacity)}(s,i,n):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof g||D(t,e.stroke,e.opacity)}(s,i),I(t,s)):(t[a?"filled":"stroked"]="false",L(t,s))},R=[[],[],[]];f.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=m.createNode("shape"),A(i),this._vmlEl=i),O(i,"fill",e,this),O(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var s=e.lineWidth;if(a&&!e.strokeNoScale){var l=n[0]*n[3]-n[1]*n[2];s*=y(x(l))}o.weight=s+"px"}var u=this.path||(this.path=new p);this.__dirtyPath&&(u.beginPath(),u.subPixelOptimize=!1,this.buildPath(u,this.shape),u.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,a,o,s,l,u=v.M,h=v.C,c=v.L,d=v.A,f=v.Q,p=[],g=t.data,m=t.len();for(o=0;o.01?H&&(U+=.0125):Math.abs(W-z)<1e-4?H&&Uk?C-=.0125:C+=.0125:H&&Wz?A+=.0125:A-=.0125),p.push(j,_(((k-B)*D+E)*S-M),",",_(((z-F)*O+P)*S-M),",",_(((k+B)*D+E)*S-M),",",_(((z+F)*O+P)*S-M),",",_((U*D+E)*S-M),",",_((W*O+P)*S-M),",",_((A*D+E)*S-M),",",_((C*O+P)*S-M)),s=A,l=C;break;case v.R:var Z=R[0],X=R[1];Z[0]=g[o++],Z[1]=g[o++],X[0]=Z[0]+g[o++],X[1]=Z[1]+g[o++],e&&(r(Z,Z,e),r(X,X,e)),Z[0]=_(Z[0]*S-M),X[0]=_(X[0]*S-M),Z[1]=_(Z[1]*S-M),X[1]=_(X[1]*S-M),p.push(" m ",Z[0],",",Z[1]," l ",X[0],",",Z[1]," l ",X[0],",",X[1]," l ",Z[0],",",X[1]);break;case v.Z:p.push(" x ")}if(i>0){p.push(n);for(var Y=0;Y100&&(z=0,k={});var i,n=B.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},k[t]=e,z++}return e}(a.font),b=x.style+" "+x.variant+" "+x.weight+" "+x.size+'px "'+x.family+'"';i=i||s.getBoundingRect(o,b,v,y,a.textPadding,a.textLineHeight);var w=this.transform;if(w&&!n&&(F.copy(e),F.applyTransform(w),e=F),n)p=e.x,g=e.y;else{var T=a.textPosition;if(T instanceof Array)p=e.x+P(T[0],e.width),g=e.y+P(T[1],e.height),v=v||"left";else{var S=this.calculateTextPosition?this.calculateTextPosition({},a,e):s.calculateTextPosition({},a,e);p=S.x,g=S.y,v=v||S.textAlign,y=y||S.textVerticalAlign}}p=s.adjustTextX(p,i.width,v),g=s.adjustTextY(g,i.height,y),g+=i.height/2;var M,C,L,D=m.createNode,R=this._textVmlEl;R?C=(M=(L=R.firstChild).nextSibling).nextSibling:(R=D("line"),M=D("path"),C=D("textpath"),L=D("skew"),C.style["v-text-align"]="left",A(R),M.textpathok=!0,C.on=!0,R.from="0 0",R.to="1000 0.05",I(R,L),I(R,M),I(R,C),this._textVmlEl=R);var N=[p,g],V=R.style;w&&n?(r(N,N,w),L.on=!0,L.matrix=w[0].toFixed(3)+","+w[2].toFixed(3)+","+w[1].toFixed(3)+","+w[3].toFixed(3)+",0,0",L.offset=(_(N[0])||0)+","+(_(N[1])||0),L.origin="0 0",V.left="0px",V.top="0px"):(L.on=!1,V.left=_(p)+"px",V.top=_(g)+"px"),C.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{C.style.font=b}catch(t){}O(R,"fill",{fill:a.textFill,opacity:a.opacity},this),O(R,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),R.style.zIndex=E(this.zlevel,this.z,this.z2),I(t,R)}},G=function(t){L(t,this._textVmlEl),this._textVmlEl=null},H=function(t){I(t,this._textVmlEl)},U=[u,h,c,f,d],W=0;W=0;--n)if(i[n]===t)return!0;return!1}),e):null:e[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=i.style;r.width=t+"px",r.height=e+"px";var a=this._svgDom;a.setAttribute("width",t),a.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||v(s[i])||v(o.style[i]))-(v(s[r])||0)-(v(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<"))}},r.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(t){var e;S.prototype[t]=(e=t,function(){a('In SVG mode painter not support method "'+e+'"')})}));var M=S;t.exports=M},function(t,e){function i(){}function n(t,e,i,n){for(var r=0,a=e.length,o=0,s=0;r=a&&h+1>=o){for(var c=[],d=0;d=a&&d+1>=o)return n(r,l.components,e,t);u[i]=l}else u[i]=void 0}var g;s++}for(;s<=l;){var p=f();if(p)return p}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,a=i.length,o=t.newPos,s=o-n,l=0;o+1-1){var u=o.parse(l)[3],h=o.toHex(l);s.setAttribute("stop-color","#"+h),s.setAttribute("stop-opacity",u)}else s.setAttribute("stop-color",i[n].color);e.appendChild(s)}t._dom=e},s.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&n.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&n.prototype.markUsed.call(this,e._dom)}};var l=s;t.exports=l},function(t,e,i){var n=i(127),r=i(0),a=i(20);function o(t,e){n.call(this,t,e,"clipPath","__clippath_in_use__")}r.inherits(o,n),o.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},o.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,r,o=this.getDefs(!0),s=e[0],l=i?"_textDom":"_dom";s[l]?(r=s[l].getAttribute("id"),n=s[l],o.contains(n)||o.appendChild(n)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(n),s[l]=n);var u=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!i){var h=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),u.brush(s),s.transform=h}else u.brush(s);var c=this.getSvgElement(s);n.innerHTML="",n.appendChild(c.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},o.prototype.markUsed=function(t){var e=this;t.__clipPaths&&r.each(t.__clipPaths,(function(t){t._dom&&n.prototype.markUsed.call(e,t._dom),t._textDom&&n.prototype.markUsed.call(e,t._textDom)}))};var s=o;t.exports=s},function(t,e,i){var n=i(127);function r(t,e){n.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function a(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}i(0).inherits(r,n),r.prototype.addWithoutUpdate=function(t,e){if(e&&a(e.style)){var i;if(e._shadowDom)i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i);else i=this.add(e);this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},r.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},r.prototype.update=function(t,e){if(a(e.style)){var i=this;n.prototype.update.call(this,e,(function(){i.updateDom(e,e._shadowDom)}))}else this.remove(t,e)},r.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},r.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,r,a,o,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,r=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",r/u),i.setAttribute("flood-color",o);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),t._shadowDom=e},r.prototype.markUsed=function(t){t._shadowDom&&n.prototype.markUsed.call(this,t._shadowDom)};var o=r;t.exports=o},function(t,e,i){"use strict";i.r(e);var n={...{metadata:!0,svgRender:!1,echartsOption:{title:{text:"NetJSONGraph",link:"",textStyle:{color:"grey",fontWeight:"bold",fontSize:30},left:"center",top:"5%"},aria:{show:!0,description:"This is a force-oriented graph chart that depicts the relationship between ip nodes."},toolbox:{show:!0,feature:{restore:{show:!0,title:"Restore view"},saveAsImage:{show:!0,title:"Save image"}}},color:["#d66b30","#a3c7dd","#5c9660","#d66b30"]},graphConfig:{layout:"force",label:{show:!0,color:"#000000",position:"top"},force:{gravity:.1,edgeLength:[20,60],repulsion:120},roam:!0,draggable:!0,focusNodeAdjacency:!1,hoverAnimation:!0,legendHoverLink:!0},mapOptions:{roam:!0},mapTileConfig:[],mapLinkConfig:[{}],mapNodeConfig:{label:{show:!0,color:"#000000",position:"top",formatter:"{b}"}},nodeSize:25,nodeStyleProperty:(()=>{const t=[{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#a3c7dd"},{offset:.7,color:"#a3c7dd"},{offset:.71,color:"#e3edf6"},{offset:1,color:"#e3edf6"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#5c9660"},{offset:.7,color:"#5c9660"},{offset:.71,color:"#aecbb0"},{offset:1,color:"#aecbb0"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}}];let e=0;return()=>t[e++%t.length]})(),linkStyleProperty:()=>({width:5,color:"#999",shadowColor:"rgba(0, 0, 0, 0.5)",shadowBlur:10}),prepareData(t){},onClickElement(t,e){const i=document.getElementsByClassName("njg-overlay")[0];i.style.visibility="visible",i.innerHTML=`\n
\n ${"link"===t?this.utils.linkInfo(e):this.utils.nodeInfo(e)}\n
\n `;const n=document.createElement("a");n.setAttribute("class","njg-close"),n.setAttribute("id","nodelinkOverlay-close"),n.onclick=()=>{i.style.visibility="hidden"},i.appendChild(n)}}};var r=class{JSONParamParse(t){return"string"==typeof t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(t=>t.json?t.json():t).catch(t=>{console.error(t)}):Promise.resolve(t)}dateParse({dateString:t,parseRegular:e=/^([1-9]\d{3})-(\d{1,2})-(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})(?:\.(\d{1,3}))?Z$/,hourDiffer:i=(new Date).getTimezoneOffset()/60}){const n=e.exec(t);if(!n||n.length<7)return console.error("Date doesn't meet the specifications."),"";const r=["dateYear","dateMonth","dateDay","dateHour"],a={},o=n[1]%4==0&&n[1]%100!=0||n[1]%400==0,s=new Map([["dateMonth",12],["dateDay",[31,o?29:28,31,30,31,30,31,31,30,31,30,31]],["dateHour",24]]);for(let t=r.length;t>0;t--)a[r[t-1]]=parseInt(n[t],10);let l,u=-i;for(let t=r.length;t>0;t--){if("dateYear"===r[t-1]){a[r[t-1]]+=u;break}l="dateDay"===r[t-1]?s.get("dateDay")[a.dateMonth-1]:s.get(r[t-1]);let e=a[r[t-1]]+u;u="dateHour"===r[t-1]?e<0?-1:e>=l?1:0:e<=0?-1:e>l?1:0,1===u?e-=l:u<0&&("dateDay"===r[t-1]&&(l=s.get("dateDay")[(a[r[t-1]]+10)%11]),e+=l),a[r[t-1]]=e}return`${a.dateYear}.${this.numberMinDigit(a.dateMonth)}.${this.numberMinDigit(a.dateDay)} ${this.numberMinDigit(a.dateHour)}:${this.numberMinDigit(n[5])}:${this.numberMinDigit(n[6])}${n[7]?"."+this.numberMinDigit(n[7],3):""}`}numberMinDigit(t,e=2,i="0"){return(Array(e).join(i)+t).slice(-e)}isObject(t){return"Object"===Object.prototype.toString.call(t).slice(8,14)}isArray(t){return"Array"===Object.prototype.toString.call(t).slice(8,13)}isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}deepMergeObj(...t){const e=[...t].reverse(),i=e.length;for(let t=0;t{t.style.visibility="hidden"},e.innerHTML=this.utils._getMetadata.call(this),t.appendChild(e),t.appendChild(i),t}updateMetadata(){this.config.metadata&&(document.getElementsByClassName("njg-metadata")[0].style.visibility="visible",document.getElementById("metadata-innerDiv").innerHTML=this.utils._getMetadata.call(this))}_getMetadata(){const t=["protocol","version","revision","metric","router_id","topology_id"],e=this.data;let i="";e.label&&(i+=`

${e.label}

`);for(const n of t)e[n]&&(i+=`

${n}: ${e[n]}

`);return i+=`\n

nodes: ${e.nodes.length}

\n

links: ${e.links.length}

\n `,i}nodeInfo(t){let e=`

id: ${t.id}

`;if(t.label&&"string"==typeof t.label&&(e+=`

label: ${t.label}

`),t.properties)for(const i in t.properties)e+="location"===i?`

location:
lat: ${t.properties.location.lat}
lng: ${t.properties.location.lng}

`:"time"===i?`

time: ${this.dateParse({dateString:t.properties[i]})}

`:`

${i.replace(/_/g," ")}: ${t.properties[i]}

`;return t.linkCount&&(e+=`

links: ${t.linkCount}

`),t.local_addresses&&(e+=`

local addresses:
${t.local_addresses.join("
")}

`),e}linkInfo(t){let e=`

source: ${t.source}

target: ${t.target}

cost: ${t.cost}

`;if(t.properties)for(const i in t.properties)e+="time"===i?`

time: ${this.dateParse({dateString:t.properties[i]})}

`:`

${i.replace(/_/g," ")}: ${t.properties[i]}

`;return e}showLoading(){let t=document.getElementById("loadingContainer");return t?t.style.visibility="visible":(t=document.createElement("div"),t.setAttribute("id","loadingContainer"),t.innerHTML='\n
\n
\n

Loading...

\n
\n ',this.el.appendChild(t)),t}hideLoading(){const t=document.getElementById("loadingContainer");return t&&(t.style.visibility="hidden"),t}createEvent(){const t=new Map,e=new Map;return{on(e,...i){t.set(e,[...t.get(e)||[],...i])},once(t,...i){e.set(t,[...e.get(t)||[],...i])},emit(i){const n=t.get(i)||[],r=e.get(i)||[],a=n.map(t=>t()),o=r.map(t=>t());return e.delete(i),[...a,...o]},delete(i){t.delete(i),e.delete(i)}}}};var a=class extends r{searchElements(t){const e=this,i={"":{data:{...e.data},param:[...e.JSONParam]}};return window.history.pushState({searchValue:""},""),window.onpopstate=n=>{i[n.state.searchValue]?e.utils.JSONDataUpdate.call(e,i[n.state.searchValue].data).then(()=>{e.JSONParam=i[n.state.searchValue].param}):e.utils.JSONDataUpdate.call(e,t+n.state.searchValue)},function(n,r=!0,a=!0){const o=n.trim();if(!history.state||history.state&&history.state.searchValue!==o)return history.pushState({searchValue:o},""),e.utils.JSONDataUpdate.call(e,t+o,r,a).then(()=>{i[o]={data:{...e.data},param:[...e.JSONParam]}})}}JSONDataUpdate(t,e=!0,i=!0){const n=this;return n.config.onUpdate.call(n),n.utils.JSONParamParse(t).then(r=>{function a(){e?(n.JSONParam=[t],n.utils._overrideData(r,n)):(n.JSONParam.push(t),n.config.render===n.utils.mapRender?n.utils._appendData(r,n):n.utils._addData(r,n)),n.utils.updateMetadata.call(n)}return i?(n.config.prepareData.call(n,r),n.config.dealDataByWorker?n.utils.dealDataByWorker.call(n,r,n.config.dealDataByWorker,a):a()):a(),r}).catch(t=>{console.error(t)})}dealDataByWorker(t,e,i){const n=new Worker(e),r=this;n.postMessage(t),n.addEventListener("error",t=>{console.error(t),console.error("Error in dealing JSONData!")}),n.addEventListener("message",t=>{i?i():(r.utils._overrideData(t.data,r),r.utils.updateMetadata.call(r))})}_overrideData(t,e){e.data=t,e.utils._render(),e.config.afterUpdate.call(e)}};var o=class{constructor(t,e){this.utils=new a,this.config={...n},this.setConfig(e),this.JSONParam=this.utils.isArray(t)?t:[t]}setConfig(t){return this.utils.deepMergeObj(this.config,t),this.el?t&&t.el&&console.error("Can't change el again!"):(this.config.el?this.utils.isElement(this.config.el)?this.el=this.config.el:this.el=document.getElementById(this.config.el):this.el=document.getElementsByTagName("body")[0],this.el&&(this.el.classList.add("njg-relativePosition"),this.el.setAttribute("id","graphChartContainer"))),this.config}render(){const[t,...e]=this.JSONParam;if(this.config.onRender.call(this),this.event.once("onLoad",this.config.onLoad.bind(this)),this.utils.JSONParamParse(t).then(t=>{this.config.prepareData.call(this,t),this.data=t,function(t){const e=document.createElement("div");e.setAttribute("class","njg-overlay njg-container"),t.el.appendChild(e)}(this),this.config.metadata&&this.el.appendChild(this.utils.NetJSONMetadata.call(this)),this.config.dealDataByWorker?this.utils.dealDataByWorker.call(this,t,this.config.dealDataByWorker):(this.data=t,this.utils._render())}).catch(t=>{console.error(t)}),e.length){const i=function(){e.map(t=>this.utils.JSONDataUpdate.call(this,t,!1))};this.JSONParam=[t],this.event.once("renderArray",i.bind(this))}}setUtils(t={}){const e=this;return e.utils=Object.assign(e.utils,{...t},{_render(){if(!e.config.render)throw new Error("No render function!");e.config.render(e.data,e)}}),e.utils}},s=i(2),l=(i(165),i(172),i(173),i(177),i(182),i(183),i(116),i(13)),u=i(1),h=function(t,e){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}Object.create;Object.create;function d(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}var f=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))};var p=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function g(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function m(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function v(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var _=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},y=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)}return t.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 _(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.handler.dispatchToElement(new _(e,t),"drag",t.event);var o=this.handler.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.handler.dispatchToElement(new _(s,t),"dragleave",t.event),o&&o!==s&&this.handler.dispatchToElement(new _(o,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new _(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new _(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),x=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(n=i,i=e,e=null),!i||!t)return this;var a=this._$eventProcessor;null!=e&&a&&a.normalizeQuery&&(e=a.normalizeQuery(e)),r[t]||(r[t]=[]);for(var o=0;o>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(e,a),a,r);if(o)return o(t,i,n),!0}return!1}function M(t){return"CANVAS"===t.nodeName.toUpperCase()}var A=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,C=[],I=l.default.browser.firefox&&+l.default.browser.version.split(".")[0]<39;function L(t,e,i,n){return i=i||{},n?E(t,e,i):I&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):E(t,e,i),i}function E(t,e,i){if(l.default.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(M(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(S(C,t,n,r))return i.zrX=C[0],void(i.zrY=C[1])}i.zrX=i.zrY=0}function P(t){return t||window.event}function D(t,e,i){if(null!=(e=P(e)).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&L(t,r,e,i)}else{L(t,e,e,i);var a=function(t){var e=t.wheelDelta;if(e)return e;var i=t.deltaX,n=t.deltaY;if(null==i||null==n)return e;return 3*(0!==n?Math.abs(n):Math.abs(i))*(n>0?-1:n<0?1:i>0?-1:1)}(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var o=e.button;return null==e.which&&void 0!==o&&A.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function O(t,e,i,n){t.removeEventListener(e,i,n)}var R=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,o=n.length;a1&&r&&r.length>1){var o=N(r)/N(a);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function z(){var t;(t=this.event).preventDefault(),t.stopPropagation(),t.cancelBubble=!0}var B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return c(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(x),F=function(t,e){this.x=t,this.y=e},V=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],G=function(t){function e(e,i,n,r){var a=t.call(this)||this;return a._hovered=new F(0,0),a.storage=e,a.painter=i,a.painterRoot=r,n=n||new B,a.proxy=null,a.setHandlerProxy(n),a._draggingMgr=new y(a),a}return c(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(u.each(V,(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,i=t.zrY,n=U(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?new F(e,i):this.findHover(e,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new F(0,0)},e.prototype.dispatch=function(t,e){var i=this[t];i&&i.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,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:z}}(e,t,i);n&&(n[r]&&(a.cancelBubble=!!n[r].call(n,a)),n.trigger(e,a),n=n.__hostTarget?n.__hostTarget:n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},e.prototype.findHover=function(t,e,i){for(var n=this.storage.getDisplayList(),r=new F(t,e),a=n.length-1;a>=0;a--){var o=void 0;if(n[a]!==i&&!n[a].ignore&&(o=H(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),"silent"!==o)){r.target=n[a];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new R);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r;var a=new F;a.target=n.target,this.dispatchToElement(a,r,n.event)}},e}(x);function H(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n=t,r=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,i))return!1;n.silent&&(r=!0)}var s=n.__hostTarget;n=s||n.parent}return!r||"silent"}return!1}function U(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}u.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){G.prototype[t]=function(e){var i,n,r=e.zrX,a=e.zrY,o=U(this,r,a);if("mouseup"===t&&o||(n=(i=this.findHover(r,a)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||f(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}));var W=G;function j(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function Z(t,e,i,n,r){for(n===e&&n++;n>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function X(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o>>1);a(t,e[i+h])>0?o=h+1:l=h}return l}function Y(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o>>1);a(t,e[i+h])<0?l=h:o=h+1}return l}function q(t,e){var i,n,r,a=7,o=0;i=t.length;var s=[];function l(i){var l=n[i],u=r[i],h=n[i+1],c=r[i+1];r[i]=u+c,i===o-3&&(n[i+1]=n[i+2],r[i+1]=r[i+2]),o--;var d=Y(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=X(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(i,n,r,o){var l=0;for(l=0;l=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l=0;l--)t[f+l]=t[d+l];return void(t[c]=s[h])}var p=a;for(;;){var g=0,m=0,v=!1;do{if(e(s[h],t[u])<0){if(t[c--]=t[u--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=s[h--],m++,g=0,1==--o){v=!0;break}}while((g|m)=0;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=s[h--],1==--o){v=!0;break}if(0!==(m=o-X(t[u],s,0,o,o-1,e))){for(o-=m,f=(c-=m)+1,d=(h-=m)+1,l=0;l=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(a=p)<1&&(a=1);if(1===o){for(f=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=s[h]}else{if(0===o)throw new Error;for(d=c-(o-1),l=0;l1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;l(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((a=j(t,i,n,e))s&&(l=s),Z(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}}(i,$)},t.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():[];for(var r=n,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.getClipPath()}if(t.childrenRef){for(var o=t.childrenRef(),s=0;s0&&(u.__clipPaths=[]),isNaN(u.z)&&(J(),u.z=0),isNaN(u.z2)&&(J(),u.z2=0),isNaN(u.zlevel)&&(J(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,i);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e=0&&this._roots.splice(n,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),tt=l.default.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},et={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.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){return(t*=2)<1?.5*t*t*t*t:-.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){return(t*=2)<1?.5*t*t*t*t*t:.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 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.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=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-et.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*et.bounceIn(2*t):.5*et.bounceOut(2*t-1)+.5}},it=et,nt=Math.pow,rt=Math.sqrt,at=rt(3),ot=d(),st=d(),lt=d();function ut(t){return t>-1e-8&&t<1e-8}function ht(t){return t>1e-8||t<-1e-8}function ct(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function dt(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(ut(h)&&ut(c)){if(ut(s))a[0]=0;else(S=-l/s)>=0&&S<=1&&(a[f++]=S)}else{var p=c*c-4*h*d;if(ut(p)){var g=c/h,m=-g/2;(S=-s/o+g)>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=rt(p),_=h*s+1.5*o*(-c+v),y=h*s+1.5*o*(-c-v);(S=(-s-((_=_<0?-nt(-_,1/3):nt(_,1/3))+(y=y<0?-nt(-y,1/3):nt(y,1/3))))/(3*o))>=0&&S<=1&&(a[f++]=S)}else{var x=(2*h*s-3*o*c)/(2*rt(h*h*h)),b=Math.acos(x)/3,w=rt(h),T=Math.cos(b),S=(-s-2*w*T)/(3*o),M=(m=(-s+w*(T+at*Math.sin(b)))/(3*o),(-s+w*(T-at*Math.sin(b)))/(3*o));S>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m),M>=0&&M<=1&&(a[f++]=M)}}return f}function ft(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(ut(o)){if(ht(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(ut(u))r[0]=-a/(2*o);else if(u>0){var h,c=rt(u),d=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}function pt(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function gt(t,e,i,n,r,a,o,s,l){for(var u=t,h=e,c=0,d=1/l,f=1;f<=l;f++){var p=f*d,g=ct(t,i,r,o,p),m=ct(e,n,a,s,p),v=g-u,_=m-h;c+=Math.sqrt(v*v+_*_),u=g,h=m}return c}function mt(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function vt(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function _t(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function yt(t,e,i,n,r,a,o){for(var s=t,l=e,u=0,h=1/o,c=1;c<=o;c++){var d=c*h,f=mt(t,i,r,d),p=mt(e,n,a,d),g=f-s,m=p-l;u+=Math.sqrt(g*g+m*m),s=f,l=p}return u}var xt=/cubic-bezier\(([0-9,\.e ]+)\)/;function bt(t){var e=t&&xt.exec(t);if(e){var i=e[1].split(","),n=+Object(u.trim)(i[0]),r=+Object(u.trim)(i[1]),a=+Object(u.trim)(i[2]),o=+Object(u.trim)(i[3]);if(isNaN(n+r+a+o))return;var s=[];return function(t){return t<=0?0:t>=1?1:dt(0,n,a,1,t,s)&&ct(0,r,o,1,s[0])}}}var wt=function(){function t(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||u.noop,this.ondestroy=t.ondestroy||u.noop,this.onrestart=t.onrestart||u.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,n=t-this._startTime-this._pausedTime,r=n/i;r<0&&(r=0),r=Math.min(r,1);var a=this.easingFunc,o=a?a(r):r;if(this.onframe(o),1===r){if(!this.loop)return!0;var s=n%i;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Object(u.isFunction)(t)?t:it[t]||bt(t)},t}(),Tt=i(19),St=i(6),Mt=Array.prototype.slice;function At(t,e,i){return(e-t)*i+t}function Ct(t,e,i,n){for(var r=e.length,a=0;an?e:t,a=Math.min(i,n),o=r[a-1]||{color:[0,0,0,0],offset:0},s=a;so)n.length=o;else for(var s=a;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,r=n.length,a=!1,o=6,s=e;if(Object(u.isArrayLike)(e)){var l=function(t){return Object(u.isArrayLike)(t&&t[0])?2:1}(e);o=l,(1===l&&!Object(u.isNumber)(e[0])||2===l&&!Object(u.isNumber)(e[0][0]))&&(a=!0)}else if(Object(u.isNumber)(e)&&!Object(u.eqNaN)(e))o=0;else if(Object(u.isString)(e))if(isNaN(+e)){var h=Tt.parse(e);h&&(s=h,o=3)}else o=0;else if(Object(u.isGradientObject)(e)){var c=Object(u.extend)({},s);c.colorStops=Object(u.map)(e.colorStops,(function(t){return{offset:t.offset,color:Tt.parse(t.color)}})),Object(St.m)(e)?o=4:Object(St.o)(e)&&(o=5),s=c}0===r?this.valType=o:o===this.valType&&6!==o||(a=!0),this.discrete=this.discrete||a;var d={time:t,value:s,rawValue:e,percent:0};return i&&(d.easing=i,d.easingFunc=Object(u.isFunction)(i)?i:it[i]||bt(i)),n.push(d),d},t.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort((function(t,e){return t.time-e.time}));for(var n=this.valType,r=i.length,a=i[r-1],o=this.discrete,s=Nt(n),l=Rt(n),u=0;u=0&&!(l[i].percent<=e);i--);i=p(i,h-2)}else{for(i=f;ie);i++);i=p(i-1,h-2)}r=l[i+1],n=l[i]}if(n&&r){this._lastFr=i,this._lastFrP=e;var g=r.percent-n.percent,m=0===g?1:p((e-n.percent)/g,1);r.easingFunc&&(m=r.easingFunc(m));var v=a?this._additiveValue:d?kt:t[c];if(!Nt(s)&&!d||v||(v=this._additiveValue=[]),this.discrete)t[c]=m<1?n.rawValue:r.rawValue;else if(Nt(s))1===s?Ct(v,n[o],r[o],m):function(t,e,i,n){for(var r=e.length,a=r&&e[0].length,o=0;o0&&s.addKeyframe(0,Dt(l),n),this._trackKeys.push(o)}s.addKeyframe(t,Dt(e[o]),n)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,r=0;r1){var o=a.pop();r.addKeyframe(o.time,t[n]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function Ft(){return(new Date).getTime()}var Vt,Gt,Ht=function(t){function e(e){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return c(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){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=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Ft()-this._pausedTime,i=e-this._time,n=this._head;n;){var r=n.next;n.step(e,i)?(n.ondestroy(),this.removeClip(n),n=r):n=r}this._time=e,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,tt((function e(){t._running&&(tt(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Ft(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ft(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ft()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var i=new Bt(t,e.loop);return this.addAnimator(i),i},e}(x),Ut=l.default.domSupported,Wt=(Gt={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Vt=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(Vt,(function(t){var e=t.replace("mouse","pointer");return Gt.hasOwnProperty(e)?e:t}))}),jt=["mousemove","mouseup"],Zt=["pointermove","pointerup"],Xt=!1;function Yt(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qt(t){t&&(t.zrByTouch=!0)}function Kt(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}var Jt=function(t,e){this.stopPropagation=u.noop,this.stopImmediatePropagation=u.noop,this.preventDefault=u.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},$t={mousedown:function(t){t=D(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=D(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=D(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Kt(this,(t=D(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Xt=!0,t=D(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Xt||(t=D(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){qt(t=D(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),$t.mousemove.call(this,t),$t.mousedown.call(this,t)},touchmove:function(t){qt(t=D(this.dom,t)),this.handler.processGesture(t,"change"),$t.mousemove.call(this,t)},touchend:function(t){qt(t=D(this.dom,t)),this.handler.processGesture(t,"end"),$t.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&$t.click.call(this,t)},pointerdown:function(t){$t.mousedown.call(this,t)},pointermove:function(t){Yt(t)||$t.mousemove.call(this,t)},pointerup:function(t){$t.mouseup.call(this,t)},pointerout:function(t){Yt(t)||$t.mouseout.call(this,t)}};u.each(["click","dblclick","contextmenu"],(function(t){$t[t]=function(e){e=D(this.dom,e),this.trigger(t,e)}}));var Qt={pointermove:function(t){Yt(t)||Qt.mousemove.call(this,t)},pointerup:function(t){Qt.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function te(t,e){var i=e.domHandlers;l.default.pointerEventsSupported?u.each(Wt.pointer,(function(n){ie(e,n,(function(e){i[n].call(t,e)}))})):(l.default.touchEventsSupported&&u.each(Wt.touch,(function(n){ie(e,n,(function(r){i[n].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),u.each(Wt.mouse,(function(n){ie(e,n,(function(r){r=P(r),e.touching||i[n].call(t,r)}))})))}function ee(t,e){function i(i){ie(e,i,(function(n){n=P(n),Kt(t,n.target)||(n=function(t,e){return D(t.dom,new Jt(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}l.default.pointerEventsSupported?u.each(Zt,i):l.default.touchEventsSupported||u.each(jt,i)}function ie(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,function(t,e,i,n){t.addEventListener(e,i,n)}(t.domTarget,e,i,n)}function ne(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&O(t.domTarget,i,e[i],t.listenerOpts[i]);t.mounted={}}var re=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},ae=function(t){function e(e,i){var n=t.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new re(e,$t),Ut&&(n._globalHandlerScope=new re(document,Qt)),te(n,n._localHandlerScope),n}return c(e,t),e.prototype.dispose=function(){ne(this._localHandlerScope),Ut&&ne(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Ut&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?ee(this,e):ne(e)}},e}(x),oe=1;l.default.hasGlobalWindow&&(oe=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var se=oe;function le(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ue(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function he(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}var ce=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t};function de(t){return t>5e-5||t<-5e-5}var fe=[],pe=[],ge=[1,0,0,1,0,0],me=Math.abs,ve=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return de(this.rotation)||de(this.x)||de(this.y)||de(this.scaleX-1)||de(this.scaleY-1)||de(this.skewX)||de(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;e||t?(i=i||[1,0,0,1,0,0],e?this.getLocalTransform(i):ce(i),t&&(e?ue(i,t,i):le(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&ce(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e,i,n,r,a,o,s,l,u,h=this.globalScaleRatio;if(null!=h&&1!==h){this.getGlobalScale(fe);var c=fe[0]<0?-1:1,d=fe[1]<0?-1:1,f=((fe[0]-c)*h+c)/fe[0]||0,p=((fe[1]-d)*h+d)/fe[1]||0;t[0]*=f,t[1]*=f,t[2]*=p,t[3]*=p}this.invTransform=this.invTransform||[1,0,0,1,0,0],e=this.invTransform,n=(i=t)[0],r=i[2],a=i[4],o=i[1],s=i[3],l=i[5],(u=n*s-o*r)&&(u=1/u,e[0]=s*u,e[1]=-o*u,e[2]=-r*u,e[3]=n*u,e[4]=(r*l-s*a)*u,e[5]=(o*a-n*l)*u)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),r=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ue(pe,t.invTransform,e),e=pe);var i=this.originX,n=this.originY;(i||n)&&(ge[4]=i,ge[5]=n,ue(pe,e,ge),pe[4]-=i,pe[5]-=n,e=pe),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&g(i,i,n),i},t.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&g(i,i,n),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&me(t[0]-1)>1e-10&&me(t[3]-1)>1e-10?Math.sqrt(me(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){ye(this,t)},t.getLocalTransform=function(t,e){e=e||[];var i,n,r,a,o,s,l,u,h,c,d,f=t.originX||0,p=t.originY||0,g=t.scaleX,m=t.scaleY,v=t.anchorX,_=t.anchorY,y=t.rotation||0,x=t.x,b=t.y,w=t.skewX?Math.tan(t.skewX):0,T=t.skewY?Math.tan(-t.skewY):0;if(f||p||v||_){var S=f+v,M=p+_;e[4]=-S*g-w*M*m,e[5]=-M*m-T*S*g}else e[4]=e[5]=0;return e[0]=g,e[3]=m,e[1]=T*g,e[2]=w*m,y&&(i=e,r=y,a=(n=e)[0],o=n[2],s=n[4],l=n[1],u=n[3],h=n[5],c=Math.sin(r),d=Math.cos(r),i[0]=a*d+l*c,i[1]=-a*c+l*d,i[2]=o*d+u*c,i[3]=-o*c+d*u,i[4]=d*s+c*h,i[5]=d*h-c*s),e[4]+=f+x,e[5]+=p+b,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),_e=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ye(t,e){for(var i=0;i<_e.length;i++){var n=_e[i];t[n]=e[n]}}var xe=ve,be=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,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){return this.x-=t.x,this.y-=t.y,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();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.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}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,i){t.x=e,t.y=i},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,i){t.x=e.x+i.x,t.y=e.y+i.y},t.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},t.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},t.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},t.lerp=function(t,e,i,n){var r=1-n;t.x=r*e.x+n*i.x,t.y=r*e.y+n*i.y},t}(),we=Math.min,Te=Math.max,Se=new be,Me=new be,Ae=new be,Ce=new be,Ie=new be,Le=new be,Ee=function(){function t(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return t.prototype.union=function(t){var e=we(t.x,this.x),i=we(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Te(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Te(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=[1,0,0,1,0,0];return he(r,r,[-e.x,-e.y]),function(t,e,i){var n=i[0],r=i[1];t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r}(r,r,[i,n]),he(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,i){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,r=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,d=!(ap&&(p=y,gp&&(p=x,v<_?be.set(Le,0,-v):be.set(Le,0,_)):y=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.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 0===this.width||0===this.height},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,i,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],a=n[3],o=n[4],s=n[5];return e.x=i.x*r+o,e.y=i.y*a+s,e.width=i.width*r,e.height=i.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Se.x=Ae.x=i.x,Se.y=Ce.y=i.y,Me.x=Ce.x=i.x+i.width,Me.y=Ae.y=i.y+i.height,Se.transform(n),Ce.transform(n),Me.transform(n),Ae.transform(n),e.x=we(Se.x,Me.x,Ae.x,Ce.x),e.y=we(Se.y,Me.y,Ae.y,Ce.y);var l=Te(Se.x,Me.x,Ae.x,Ce.x),u=Te(Se.y,Me.y,Ae.y,Ce.y);e.width=l-e.x,e.height=u-e.y}else e!==i&&t.copy(e,i)},t}(),Pe=i(58),De=i(18),Oe={};function Re(t,e){e=e||De.a;var i=Oe[e];i||(i=Oe[e]=new Pe.a(500));var n=i.get(t);return null==n&&(n=De.d.measureText(t,e).width,i.put(t,n)),n}function Ne(t,e,i,n){var r=Re(t,e),a=Be(e),o=ke(0,r,i),s=ze(0,a,n);return new Ee(o,s,r,a)}function ke(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ze(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Be(t){return Re("国",t)}function Fe(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}var Ve=_e.concat(["ignore"]),Ge=Object(u.reduce)(_e,(function(t,e){return t[e]=!0,t}),{ignore:!1}),He={},Ue=new Ee(0,0,0,0),We=function(){function t(t){this.id=Object(u.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,r=e.innerTransformable,a=void 0,o=void 0,s=!1;r.parent=n?this:null;var l=!1;if(r.copyTransform(e),null!=i.position){var u=Ue;i.layoutRect?u.copy(i.layoutRect):u.copy(this.getBoundingRect()),n||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(He,i,u):function(t,e,i){var n=e.position||"inside",r=null!=e.distance?e.distance:5,a=i.height,o=i.width,s=a/2,l=i.x,u=i.y,h="left",c="top";if(n instanceof Array)l+=Fe(n[0],i.width),u+=Fe(n[1],i.height),h=null,c=null;else switch(n){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+o,u+=s,c="middle";break;case"top":l+=o/2,u-=r,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+r,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=o-r,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=r,h="center";break;case"insideBottom":l+=o/2,u+=a-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=o-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=a-r,c="bottom";break;case"insideBottomRight":l+=o-r,u+=a-r,h="right",c="bottom"}(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c}(He,i,u),r.x=He.x,r.y=He.y,a=He.align,o=He.verticalAlign;var h=i.origin;if(h&&null!=i.rotation){var c=void 0,d=void 0;"center"===h?(c=.5*u.width,d=.5*u.height):(c=Fe(h[0],u.width),d=Fe(h[1],u.height)),l=!0,r.originX=-r.x+c+(n?0:u.x),r.originY=-r.y+d+(n?0:u.y)}}null!=i.rotation&&(r.rotation=i.rotation);var f=i.offset;f&&(r.x+=f[0],r.y+=f[1],l||(r.originX=-f[0],r.originY=-f[1]));var p=null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,_=void 0;p&&this.canBeInsideText()?(m=i.insideFill,v=i.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),_=!0)):(m=i.outsideFill,v=i.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),_=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&_===g.autoStroke&&a===g.align&&o===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=_,g.align=a,g.verticalAlign=o,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i="string"==typeof e&&Object(Tt.parse)(e);i||(i=[255,255,255,1]);for(var n=i[3],r=this.__zr.isDarkMode(),a=0;a<3;a++)i[a]=i[a]*n+(r?0:255)*(1-n);return i[3]=1,Object(Tt.stringify)(i,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},Object(u.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Object(u.isObject)(t))for(var i=t,n=Object(u.keys)(i),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState("__zr_normal__",!1,t)},t.prototype.useState=function(t,e,i,n){var r="__zr_normal__"===t;if(this.hasState()||!r){var a=this.currentStates,o=this.stateTransition;if(!(Object(u.indexOf)(a,t)>=0)||!e&&1!==a.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||n);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!i&&!this.__inHover&&o&&o.duration>0,o);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,l),c&&c.useState(t,e,i,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}Object(u.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,i){if(t.length){var n=[],r=this.currentStates,a=t.length,o=a===r.length;if(o)for(var s=0;s0,f);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},t.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),r=Object(u.indexOf)(n,t),a=Object(u.indexOf)(n,e)>=0;r>=0?a?n.splice(r,1):n[r]=e:i&&!a&&n.push(e),this.useStates(n)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,i={},n=0;n=0&&e.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,r=[],a=0;a0||a.force&&!s.length){var S,M=void 0,A=void 0,C=void 0;if(l){A={},p&&(M={});for(w=0;w0&&i.during&&a[0].during((function(t,e){i.during(e)}));for(var f=0;f=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var i=u.indexOf(this._children,t);return i>=0&&this.replaceAt(e,i),this},e.prototype.replaceAt=function(t,e){var i=this._children,n=i[e];if(t&&t!==this&&t.parent!==this&&t!==n){i[e]=t,n.parent=null;var r=this.__zr;r&&n.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,i=this._children,n=u.indexOf(i,t);return n<0||(i.splice(n,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,i=0;i>1,h=-7,c=i?r-1:0,d=i?-1:1,f=t[e+c];for(c+=d,a=f&(1<<-h)-1,f>>=-h,h+=s;h>0;a=256*a+t[e+c],c+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+t[e+c],c+=d,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=u}return(f?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,i,n,r,a){var o,s,l,u=8*a-r-1,h=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=h?(s=0,o=h):o+c>=1?(s=(e*l-1)*Math.pow(2,r),o+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;t[i+f]=255&s,f+=p,s/=256,r-=8);for(o=o<0;t[i+f]=255&o,f+=p,o/=256,u-=8);t[i+f-p]|=128*g}},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){var n;n=function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=106)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(40),r=i(52),a=i(5),o=i(4),s=i(8),l=i(19),u=i(35),h=i(15),c=i(0),d=i.n(c),f=i(36),p=i(60),g=i.n(p),m=i(61),v=i(124),_=i(125),y=i(129),x=i(130),b=i(2),w=i(132),T=i(43),S=i(76),M=i(133),A=i(134),C=i(135),I=i(136),L=i(41),E=i(37),P=i(26),D=i(3),O=i(137),R=i(56),N=i(138),k=i(139),z=i(140),B=i(9),F=i(74),V=i(54),G=i(18),H=i(59),U=i(141),W=i(146),j=i(71),Z=i(147),X=i(148),Y=i(149),q=i(150),K=i(151),J=i(152);function $(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}d.a.util.extend(u.a.prototype,U.a),s.a.import(W.a),s.a.import(j.a),s.a.import(Z.a),s.a.import(X.a),s.a.import(Y.a),s.a.import(q.a),s.a.import(K.a),s.a.import(J.a);var Q=f.a.prototype.addToScene,tt=f.a.prototype.removeFromScene;f.a.prototype.addToScene=function(t){if(Q.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},f.a.prototype.removeFromScene=function(t){tt.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},l.a.prototype.setTextureImage=function(t,e,i,n){if(this.shader){var r,a,o=i.getZr(),s=this;return s.autoUpdateTextureStatus=!1,s.disableTexture(t),(a=e)&&"none"!==a&&(r=et.loadTexture(e,i,n,(function(e){s.enableTexture(t),o&&o.refresh()})),s.set(t,r)),r}};var et={};et.Renderer=r.a,et.Node=u.a,et.Mesh=n.a,et.Shader=s.a,et.Material=l.a,et.Texture=o.a,et.Texture2D=a.a,et.Geometry=h.a,et.SphereGeometry=w.a,et.PlaneGeometry=T.a,et.CubeGeometry=S.a,et.AmbientLight=M.a,et.DirectionalLight=A.a,et.PointLight=C.a,et.SpotLight=I.a,et.PerspectiveCamera=L.a,et.OrthographicCamera=E.a,et.Vector2=P.a,et.Vector3=D.a,et.Vector4=O.a,et.Quaternion=R.a,et.Matrix2=N.a,et.Matrix2d=k.a,et.Matrix3=z.a,et.Matrix4=B.a,et.Plane=F.a,et.Ray=V.a,et.BoundingBox=G.a,et.Frustum=H.a;var it=m.a.createBlank("rgba(255,255,255,0)").image;function nt(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function rt(t){if((t.wrapS===o.a.REPEAT||t.wrapT===o.a.REPEAT)&&t.image){var e=nt(t.width),i=nt(t.height);if(e!==t.width||i!==t.height){var n=document.createElement("canvas");n.width=e,n.height=i,n.getContext("2d").drawImage(t.image,0,0,e,i),t.image=n}}}et.loadTexture=function(t,e,i,n){"function"==typeof i&&(n=i,i={}),i=i||{};for(var r=Object.keys(i).sort(),a="",o=0;o3?e[3]=t[3]:e[3]=1,e):((e=d.a.color.parse(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},et.directionFromAlphaBeta=function(t,e){var i=t/180*Math.PI+Math.PI/2,n=-e/180*Math.PI+Math.PI/2,r=[],a=Math.sin(i);return r[0]=a*Math.cos(n),r[1]=-Math.cos(i),r[2]=a*Math.sin(n),r},et.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},et.COMMON_SHADERS=["lambert","color","realistic","hatching"],et.createShader=function(t){var e=s.a.source(t+".vertex"),i=s.a.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),i||console.error("Fragment shader of '%s' not exits",t);var n=new s.a(e,i);return n.name=t,n},et.createMaterial=function(t,e){e instanceof Array||(e=[e]);var i=et.createShader(t),n=new l.a({shader:i});return e.forEach((function(t){"string"==typeof t&&n.define(t)})),n},et.setMaterialFromModel=function(t,e,i,n){e.autoUpdateTextureStatus=!1;var r=i.getModel(t+"Material"),a=r.get("detailTexture"),o=b.a.firstNotNull(r.get("textureTiling"),1),s=b.a.firstNotNull(r.get("textureOffset"),0);"number"==typeof o&&(o=[o,o]),"number"==typeof s&&(s=[s,s]);var l=o[0]>1||o[1]>1?et.Texture.REPEAT:et.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var h=r.get("roughness"),c=r.get("metalness");null!=c?isNaN(c)&&(e.setTextureImage("metalnessMap",c,n,u),c=b.a.firstNotNull(r.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(e.setTextureImage("roughnessMap",h,n,u),h=b.a.firstNotNull(r.get("roughnessAdjust"),.5)):h=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",a,n,u),e.setTextureImage("normalMap",d,n,u),e.set({roughness:h,metalness:c,detailUvRepeat:o,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",a,n,u),e.set({detailUvRepeat:o,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",a,n,u),e.set({detailUvRepeat:o,detailUvOffset:s});else if("hatching"===t){var f=r.get("hatchingTextures")||[];f.length<6&&console.error("Invalid hatchingTextures.");for(var p=0;p<6;p++)e.setTextureImage("hatch"+(p+1),f[p],n,{anisotropic:8,wrapS:et.Texture.REPEAT,wrapT:et.Texture.REPEAT});e.set({detailUvRepeat:o,detailUvOffset:s})}},et.updateVertexAnimation=function(t,e,i,n){var r=n.get("animation"),a=n.get("animationDurationUpdate"),o=n.get("animationEasingUpdate"),s=i.shadowDepthMaterial;if(r&&e&&a>0&&e.geometry.vertexCount===i.geometry.vertexCount){i.material.define("vertex","VERTEX_ANIMATION"),i.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;li?i:t}r.add=function(t,e,i){return n.a.add(t.array,e.array,i.array),t._dirty=!0,t},r.set=function(t,e,i,r){n.a.set(t.array,e,i,r),t._dirty=!0},r.copy=function(t,e){return n.a.copy(t.array,e.array),t._dirty=!0,t},r.cross=function(t,e,i){return n.a.cross(t.array,e.array,i.array),t._dirty=!0,t},r.distance=r.dist=function(t,e){return n.a.distance(t.array,e.array)},r.divide=r.div=function(t,e,i){return n.a.divide(t.array,e.array,i.array),t._dirty=!0,t},r.dot=function(t,e){return n.a.dot(t.array,e.array)},r.len=function(t){return n.a.length(t.array)},r.lerp=function(t,e,i,r){return n.a.lerp(t.array,e.array,i.array,r),t._dirty=!0,t},r.min=function(t,e,i){return n.a.min(t.array,e.array,i.array),t._dirty=!0,t},r.max=function(t,e,i){return n.a.max(t.array,e.array,i.array),t._dirty=!0,t},r.multiply=r.mul=function(t,e,i){return n.a.multiply(t.array,e.array,i.array),t._dirty=!0,t},r.negate=function(t,e){return n.a.negate(t.array,e.array),t._dirty=!0,t},r.normalize=function(t,e){return n.a.normalize(t.array,e.array),t._dirty=!0,t},r.random=function(t,e){return n.a.random(t.array,e),t._dirty=!0,t},r.scale=function(t,e,i){return n.a.scale(t.array,e.array,i),t._dirty=!0,t},r.scaleAndAdd=function(t,e,i,r){return n.a.scaleAndAdd(t.array,e.array,i.array,r),t._dirty=!0,t},r.squaredDistance=r.sqrDist=function(t,e){return n.a.sqrDist(t.array,e.array)},r.squaredLength=r.sqrLen=function(t){return n.a.sqrLen(t.array)},r.subtract=r.sub=function(t,e,i){return n.a.subtract(t.array,e.array,i.array),t._dirty=!0,t},r.transformMat3=function(t,e,i){return n.a.transformMat3(t.array,e.array,i.array),t._dirty=!0,t},r.transformMat4=function(t,e,i){return n.a.transformMat4(t.array,e.array,i.array),t._dirty=!0,t},r.transformQuat=function(t,e,i){return n.a.transformQuat(t.array,e.array,i.array),t._dirty=!0,t};var l=Math.atan2,u=Math.asin,h=Math.abs;r.eulerFromQuat=function(t,e,i){t._dirty=!0,e=e.array;var n=t.array,r=e[0],a=e[1],o=e[2],h=e[3],c=r*r,d=a*a,f=o*o,p=h*h;switch(i=(i||"XYZ").toUpperCase()){case"XYZ":n[0]=l(2*(r*h-a*o),p-c-d+f),n[1]=u(s(2*(r*o+a*h),-1,1)),n[2]=l(2*(o*h-r*a),p+c-d-f);break;case"YXZ":n[0]=u(s(2*(r*h-a*o),-1,1)),n[1]=l(2*(r*o+a*h),p-c-d+f),n[2]=l(2*(r*a+o*h),p-c+d-f);break;case"ZXY":n[0]=u(s(2*(r*h+a*o),-1,1)),n[1]=l(2*(a*h-o*r),p-c-d+f),n[2]=l(2*(o*h-r*a),p-c+d-f);break;case"ZYX":n[0]=l(2*(r*h+o*a),p-c-d+f),n[1]=u(s(2*(a*h-r*o),-1,1)),n[2]=l(2*(r*a+o*h),p+c-d-f);break;case"YZX":n[0]=l(2*(r*h-o*a),p-c+d-f),n[1]=l(2*(a*h-r*o),p+c-d-f),n[2]=u(s(2*(r*a+o*h),-1,1));break;case"XZY":n[0]=l(2*(r*h+a*o),p-c+d-f),n[1]=l(2*(r*o+a*h),p+c-d-f),n[2]=u(s(2*(o*h-r*a),-1,1));break;default:console.warn("Unkown order: "+i)}return t},r.eulerFromMat3=function(t,e,i){var n=e.array,r=n[0],a=n[3],o=n[6],c=n[1],d=n[4],f=n[7],p=n[2],g=n[5],m=n[8],v=t.array;switch(i=(i||"XYZ").toUpperCase()){case"XYZ":v[1]=u(s(o,-1,1)),h(o)<.99999?(v[0]=l(-f,m),v[2]=l(-a,r)):(v[0]=l(g,d),v[2]=0);break;case"YXZ":v[0]=u(-s(f,-1,1)),h(f)<.99999?(v[1]=l(o,m),v[2]=l(c,d)):(v[1]=l(-p,r),v[2]=0);break;case"ZXY":v[0]=u(s(g,-1,1)),h(g)<.99999?(v[1]=l(-p,m),v[2]=l(-a,d)):(v[1]=0,v[2]=l(c,r));break;case"ZYX":v[1]=u(-s(p,-1,1)),h(p)<.99999?(v[0]=l(g,m),v[2]=l(c,r)):(v[0]=0,v[2]=l(-a,d));break;case"YZX":v[2]=u(s(c,-1,1)),h(c)<.99999?(v[0]=l(-f,d),v[1]=l(-p,r)):(v[0]=0,v[1]=l(o,m));break;case"XZY":v[2]=u(-s(a,-1,1)),h(a)<.99999?(v[0]=l(g,d),v[1]=l(o,r)):(v[0]=l(-f,m),v[1]=0);break;default:console.warn("Unkown order: "+i)}return t._dirty=!0,t},Object.defineProperties(r,{POSITIVE_X:{get:function(){return new r(1,0,0)}},NEGATIVE_X:{get:function(){return new r(-1,0,0)}},POSITIVE_Y:{get:function(){return new r(0,1,0)}},NEGATIVE_Y:{get:function(){return new r(0,-1,0)}},POSITIVE_Z:{get:function(){return new r(0,0,1)}},NEGATIVE_Z:{get:function(){return new r(0,0,-1)}},UP:{get:function(){return new r(0,1,0)}},ZERO:{get:function(){return new r}}}),e.a=r},function(t,e,i){"use strict";var n=i(7),r=i(11),a=i(57),o=n.a.extend({width:512,height:512,type:r.a.UNSIGNED_BYTE,format:r.a.RGBA,wrapS:r.a.REPEAT,wrapT:r.a.REPEAT,minFilter:r.a.LINEAR_MIPMAP_LINEAR,magFilter:r.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,sRGB:!0,unpackAlignment:4,premultiplyAlpha:!1,dynamic:!1,NPOT:!1,__used:0},(function(){this._cache=new a.a}),{getWebGLTexture:function(t){var e=t.gl,i=this._cache;return i.use(t.__uid__),i.miss("webgl_texture")&&i.put("webgl_texture",e.createTexture()),this.dynamic?this.update(t):i.isDirty()&&(this.update(t),i.fresh()),i.get("webgl_texture")},bind:function(){},unbind:function(){},dirty:function(){this._cache&&this._cache.dirtyAll()},update:function(t){},updateCommon:function(t){var e=t.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,this.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,this.unpackAlignment),this.format===r.a.DEPTH_COMPONENT&&(this.useMipmap=!1);var i=t.getGLExtension("EXT_sRGB");this.format!==o.SRGB||i||(this.format=o.RGB),this.format!==o.SRGB_ALPHA||i||(this.format=o.RGBA),this.NPOT=!this.isPowerOfTwo()},getAvailableWrapS:function(){return this.NPOT?r.a.CLAMP_TO_EDGE:this.wrapS},getAvailableWrapT:function(){return this.NPOT?r.a.CLAMP_TO_EDGE:this.wrapT},getAvailableMinFilter:function(){var t=this.minFilter;return this.NPOT||!this.useMipmap?t===r.a.NEAREST_MIPMAP_NEAREST||t===r.a.NEAREST_MIPMAP_LINEAR?r.a.NEAREST:t===r.a.LINEAR_MIPMAP_LINEAR||t===r.a.LINEAR_MIPMAP_NEAREST?r.a.LINEAR:t:t},getAvailableMagFilter:function(){return this.magFilter},nextHighestPowerOfTwo:function(t){--t;for(var e=1;e<32;e<<=1)t|=t>>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var i=e.get("webgl_texture");i&&t.gl.deleteTexture(i),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(o.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(o.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),o.BYTE=r.a.BYTE,o.UNSIGNED_BYTE=r.a.UNSIGNED_BYTE,o.SHORT=r.a.SHORT,o.UNSIGNED_SHORT=r.a.UNSIGNED_SHORT,o.INT=r.a.INT,o.UNSIGNED_INT=r.a.UNSIGNED_INT,o.FLOAT=r.a.FLOAT,o.HALF_FLOAT=36193,o.UNSIGNED_INT_24_8_WEBGL=34042,o.DEPTH_COMPONENT=r.a.DEPTH_COMPONENT,o.DEPTH_STENCIL=r.a.DEPTH_STENCIL,o.ALPHA=r.a.ALPHA,o.RGB=r.a.RGB,o.RGBA=r.a.RGBA,o.LUMINANCE=r.a.LUMINANCE,o.LUMINANCE_ALPHA=r.a.LUMINANCE_ALPHA,o.SRGB=35904,o.SRGB_ALPHA=35906,o.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,o.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,o.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,o.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,o.NEAREST=r.a.NEAREST,o.LINEAR=r.a.LINEAR,o.NEAREST_MIPMAP_NEAREST=r.a.NEAREST_MIPMAP_NEAREST,o.LINEAR_MIPMAP_NEAREST=r.a.LINEAR_MIPMAP_NEAREST,o.NEAREST_MIPMAP_LINEAR=r.a.NEAREST_MIPMAP_LINEAR,o.LINEAR_MIPMAP_LINEAR=r.a.LINEAR_MIPMAP_LINEAR,o.REPEAT=r.a.REPEAT,o.CLAMP_TO_EDGE=r.a.CLAMP_TO_EDGE,o.MIRRORED_REPEAT=r.a.MIRRORED_REPEAT,e.a=o},function(t,e,i){"use strict";var n=i(4),r=i(11),a=i(14),o=i(73).a.isPowerOfTwo;function s(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var l=n.a.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var i=this.format,a=this.type,o=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==n.a.REPEAT&&this.wrapT!==n.a.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,o?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,o?this.minFilter:this.getAvailableMinFilter());var s=t.getGLExtension("EXT_texture_filter_anisotropic");if(s&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,s.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===a&&(t.getGLExtension("OES_texture_half_float")||(a=r.a.FLOAT)),this.mipmaps.length)for(var l=this.width,u=this.height,h=0;h=n.a.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,i,o,r,a,0,e.pixels):t.texImage2D(t.TEXTURE_2D,i,o,r,a,0,o,l,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return o(this.width)&&o(this.height)},isRenderable:function(){return this.image?"CANVAS"===this.image.nodeName||"VIDEO"===this.image.nodeName||this.image.complete:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var i=a.a.createImage();e&&(i.crossOrigin=e);var n=this;return i.onload=function(){n.dirty(),n.trigger("success",n),i.onload=null},i.onerror=function(){n.trigger("error",n),i.onerror=null},i.src=t,this.image=i,this}});Object.defineProperty(l.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(l.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}}),e.a=l},function(t,e,i){"use strict";var n=i(161);e.a=n.a},function(t,e,i){"use strict";var n=i(110),r=i(53),a=i(23),o=function(){this.__uid__=a.a.genGUID()};o.__initializers__=[function(t){a.a.extend(this,t)}],a.a.extend(o,n.a),a.a.extend(o.prototype,r.a),e.a=o},function(t,e,i){"use strict";var n=i(23),r=i(14),a=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g,o=/attribute\s+(float|int|vec2|vec3|vec4)\s+([\s\S]*?);/g,s=/#define\s+(\w+)?(\s+[\d-.]+)?\s*;?\s*\n/g,l={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"};function u(t){for(var e=[],i=0;i=0){if(1!==l&&4!==l){_();break}l=2,h=[]}else if(1!==l)if(4!==l)p(g),l=0;else{var m=g;c.indexOf(m)>=0||d.indexOf(m)>=0||f.indexOf(m)>=0?u[s].semantic=m:"ignore"===m||"unconfigurable"===m?u[s].ignore=!0:u[s].value="bool"===t?"true"===m:parseFloat(m)}else u[s].value="bool"===t?"true"===g:parseFloat(g),h=null;else{if(2!==l){_();break}if(!(h instanceof Array)){_();break}h.push(+n[++o])}else u[s].value=new r.a.Float32Array(h),h=null,l=5;else if(2===l){if(!(h instanceof Array)){_();break}h.push(+n[++o])}else l=5;else l=4;else{if(0!==l&&3!==l){_();break}l=1}}return u}function x(t,e){"object"==typeof t&&(e=t.fragment,t=t.vertex),t=v(t),e=v(e),this._shaderID=function(t,e){var i="vertex:"+t+"fragment:"+e;if(g[i])return g[i];var r=n.a.genGUID();return g[i]=r,m[r]={vertex:t,fragment:e},r}(t,e),this._vertexCode=x.parseImport(t),this._fragmentCode=x.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}x.prototype={constructor:x,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var i=this.uniformTemplates[e];t[e]={type:i.type,value:i.value()}}return t},_parseImport:function(){this._vertexCode=x.parseImport(this.vertex),this._fragmentCode=x.parseImport(this.fragment)},_addSemanticUniform:function(t,e,i){if(c.indexOf(i)>=0)this.attributeSemantics[i]={symbol:t,type:e};else if(f.indexOf(i)>=0){var n=!1,r=i;i.match(/TRANSPOSE$/)&&(n=!0,r=i.slice(0,-9)),this.matrixSemantics[i]={symbol:t,type:e,isTranspose:n,semanticNoTranspose:r}}else d.indexOf(i)>=0&&(this.uniformSemantics[i]={symbol:t,type:e})},_addMaterialUniform:function(t,e,i,n,r,a){a[t]={type:i,value:r?h.array:n||h[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function i(t){return null!=t?function(){return t}:null}function n(n,r,a){var o=y(r,a),s=[];for(var u in o){var h=o[u],c=h.semantic,d=u,f=l[r],p=i(o[u].value);o[u].isArray&&(d+="["+o[u].arraySize+"]",f+="v"),s.push(d),e._uniformList.push(u),h.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[u]={shaderType:"fragment",type:r}),c?e._addSemanticUniform(u,f,c):e._addMaterialUniform(u,r,f,p,o[u].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(a,n),this._fragmentCode=this._fragmentCode.replace(a,n),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(o,(function(i,n,r){var a=y(n,r),o=p[n]||1,s=[];for(var l in a){var u=a[l].semantic;if(t[l]={type:"float",size:o,semantic:u||null},u){if(c.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:n}}s.push(l)}return"attribute "+n+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,i,n){var r=t.fragmentDefines;return r[i]||(r[i]="false"!==n&&("true"===n||(n?isNaN(parseFloat(n))?n.trim():parseFloat(n):null))),""}this._vertexCode=this._vertexCode.replace(s,e),this._fragmentCode=this._fragmentCode.replace(s,e)},clone:function(){var t=m[this._shaderID];return new x(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(x.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(x.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(x.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(x.prototype,"uniforms",{get:function(){return this._uniformList}}));var b=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;x.parseImport=function(t){return t=t.replace(b,(function(t,e,i){return(t=x.source(i))?x.parseImport(t):(console.error('Shader chunk "'+i+'" not existed in library'),"")}))};var w=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;x.import=function(t){t.replace(w,(function(t,e,i,n){if(n=n.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,a=i.split("."),o=x.codes,s=0;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},a.cross=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2];return t[0]=r*l-a*s,t[1]=a*o-n*l,t[2]=n*s-r*o,t},a.lerp=function(t,e,i,n){var r=e[0],a=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t},a.random=function(t,e){e=e||1;var i=2*Object(r.c)()*Math.PI,n=2*Object(r.c)()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(i)*a,t[1]=Math.sin(i)*a,t[2]=n*e,t},a.transformMat4=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[3]*n+i[7]*r+i[11]*a+i[15];return o=o||1,t[0]=(i[0]*n+i[4]*r+i[8]*a+i[12])/o,t[1]=(i[1]*n+i[5]*r+i[9]*a+i[13])/o,t[2]=(i[2]*n+i[6]*r+i[10]*a+i[14])/o,t},a.transformMat3=function(t,e,i){var n=e[0],r=e[1],a=e[2];return t[0]=n*i[0]+r*i[3]+a*i[6],t[1]=n*i[1]+r*i[4]+a*i[7],t[2]=n*i[2]+r*i[5]+a*i[8],t},a.transformQuat=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2],u=i[3],h=u*n+s*a-l*r,c=u*r+l*n-o*a,d=u*a+o*r-s*n,f=-o*n-s*r-l*a;return t[0]=h*u+f*-o+c*-l-d*-s,t[1]=c*u+f*-s+d*-o-h*-l,t[2]=d*u+f*-l+h*-s-c*-o,t},a.rotateX=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0],a[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),a[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},a.rotateY=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),a[1]=r[1],a[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},a.rotateZ=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),a[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),a[2]=r[2],t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},a.forEach=(n=a.create(),function(t,e,i,r,a,o){var s,l;for(e||(e=3),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s1?0:Math.acos(r)},e.a=a},function(t,e){var i={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},n={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},r=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,u=a.map,h=a.reduce,c={};function d(t){if(null==t||"object"!=typeof t)return t;var e=t,a=r.call(t);if("[object Array]"===a){if(!T(t)){e=[];for(var o=0,s=t.length;os[0]&&(s[0]=u),h>s[1]&&(s[1]=h),c>s[2]&&(s[2]=c)}i._dirty=!0,n._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,i=e.position.value,a=e.normal.value;if(a&&a.length===i.length)for(var o=0;o65535&&(this.indices=new n.a.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,i=this.getEnabledAttributes(),r={},a=0;a=i.COLOR_ATTACHMENT0&&a<=i.COLOR_ATTACHMENT0+8&&r.push(a);n.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var o=this.clearDepth?i.DEPTH_BUFFER_BIT:0;if(i.depthMask(!0),this.clearColor){o|=i.COLOR_BUFFER_BIT,i.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&i.clearColor(s[0],s[1],s[2],s[3])}i.clear(o),this.blendWithPrevious?(i.enable(i.BLEND),this.material.transparent=!0):(i.disable(i.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){d.material=this.material,t.renderPass([d],f)},dispose:function(t){}});e.a=p},function(t,e,i){"use strict";e.a=function(t,e,i){return{seriesType:t,reset:function(t,e){var i=t.getData(),n=t.visualColorAccessPath.split(".");n[n.length-1]="opacity";var r=t.get(n);return i.setVisual("opacity",null==r?1:r),{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"opacity",i)}:null}}}}},function(t,e,i){"use strict";var n,r,a,o,s,l,u=i(3),h=i(12),c=h.a.set,d=h.a.copy,f=function(t,e){this.min=t||new u.a(1/0,1/0,1/0),this.max=e||new u.a(-1/0,-1/0,-1/0),this.vertices=null};f.prototype={constructor:f,updateFromVertices:function(t){if(t.length>0){var e=this.min,i=this.max,n=e.array,r=i.array;d(n,t[0]),d(r,t[0]);for(var a=1;ar[0]&&(r[0]=o[0]),o[1]>r[1]&&(r[1]=o[1]),o[2]>r[2]&&(r[2]=o[2])}e._dirty=!0,i._dirty=!0}},union:function(t){var e=this.min,i=this.max;return h.a.min(e.array,e.array,t.min.array),h.a.max(i.array,i.array,t.max.array),e._dirty=!0,i._dirty=!0,this},intersection:function(t){var e=this.min,i=this.max;return h.a.max(e.array,e.array,t.min.array),h.a.min(i.array,i.array,t.max.array),e._dirty=!0,i._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,i=this.max.array,n=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||i[0]=r[0]&&i[1]>=r[1]&&i[2]>=r[2]},containPoint:function(t){var e=this.min.array,i=this.max.array,n=t.array;return e[0]<=n[0]&&e[1]<=n[1]&&e[2]<=n[2]&&i[0]>=n[0]&&i[1]>=n[1]&&i[2]>=n[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(n=h.a.create(),r=h.a.create(),a=h.a.create(),o=h.a.create(),s=h.a.create(),l=h.a.create(),function(t,e){var i=t.min.array,u=t.max.array,h=e.array;return n[0]=h[0]*i[0],n[1]=h[1]*i[0],n[2]=h[2]*i[0],r[0]=h[0]*u[0],r[1]=h[1]*u[0],r[2]=h[2]*u[0],a[0]=h[4]*i[1],a[1]=h[5]*i[1],a[2]=h[6]*i[1],o[0]=h[4]*u[1],o[1]=h[5]*u[1],o[2]=h[6]*u[1],s[0]=h[8]*i[2],s[1]=h[9]*i[2],s[2]=h[10]*i[2],l[0]=h[8]*u[2],l[1]=h[9]*u[2],l[2]=h[10]*u[2],i=this.min.array,u=this.max.array,i[0]=Math.min(n[0],r[0])+Math.min(a[0],o[0])+Math.min(s[0],l[0])+h[12],i[1]=Math.min(n[1],r[1])+Math.min(a[1],o[1])+Math.min(s[1],l[1])+h[13],i[2]=Math.min(n[2],r[2])+Math.min(a[2],o[2])+Math.min(s[2],l[2])+h[14],u[0]=Math.max(n[0],r[0])+Math.max(a[0],o[0])+Math.max(s[0],l[0])+h[12],u[1]=Math.max(n[1],r[1])+Math.max(a[1],o[1])+Math.max(s[1],l[1])+h[13],u[2]=Math.max(n[2],r[2])+Math.max(a[2],o[2])+Math.max(s[2],l[2])+h[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,i=this.max.array,n=t.array,r=e[0],a=e[1],o=e[2],s=i[0],l=i[1],u=e[2],h=i[0],c=i[1],d=i[2];if(1===n[15])e[0]=n[0]*r+n[12],e[1]=n[5]*a+n[13],i[2]=n[10]*o+n[14],i[0]=n[0]*h+n[12],i[1]=n[5]*c+n[13],e[2]=n[10]*d+n[14];else{var f=-1/o;e[0]=n[0]*r*f,e[1]=n[5]*a*f,i[2]=(n[10]*o+n[14])*f,f=-1/u,i[0]=n[0]*s*f,i[1]=n[5]*l*f,f=-1/d,e[2]=(n[10]*d+n[14])*f}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=h.a.fromValues(0,0,0);this.vertices=t}var i=this.min.array,n=this.max.array;return c(t[0],i[0],i[1],i[2]),c(t[1],i[0],n[1],i[2]),c(t[2],n[0],i[1],i[2]),c(t[3],n[0],n[1],i[2]),c(t[4],i[0],i[1],n[2]),c(t[5],i[0],n[1],n[2]),c(t[6],n[0],i[1],n[2]),c(t[7],n[0],n[1],n[2]),this},copy:function(t){var e=this.min,i=this.max;return d(e.array,t.min.array),d(i.array,t.max.array),e._dirty=!0,i._dirty=!0,this},clone:function(){var t=new f;return t.copy(this),t}},e.a=f},function(t,e,i){"use strict";var n=i(7),r=i(23),a=i(113).a.parseToFloat,o={};function s(t){var e=Object.keys(t);e.sort();for(var i=[],n=0;n=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"==typeof t)for(var i in t){var n=t[i];this.setUniform(i,n)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var i=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var n=this.uniforms;this._enabledUniforms=Object.keys(n),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var a=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=r.a.clone(t.vertexDefines),this.fragmentDefines=r.a.clone(t.fragmentDefines),e){for(var s in i)n[s]&&(n[s].value=i[s].value);r.a.defaults(this.vertexDefines,a),r.a.defaults(this.fragmentDefines,o)}var l={};for(var u in t.textures)l[u]={shaderType:t.textures[u].shaderType,type:t.textures[u].type,enabled:!(!e||!this._textureStatus[u])&&this._textureStatus[u].enabled};this._textureStatus=l,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=r.a.clone(this.vertexDefines),t.fragmentDefines=r.a.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,i){var n=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(i=e,e=t,t="both"),i=null!=i?i:null,"vertex"!==t&&"both"!==t||n[e]!==i&&(n[e]=i,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==i&&(r[e]=i,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e=i.x&&e>=i.y&&t<=i.x+i.width&&e<=i.y+i.height};var v=new c.a;m.prototype.castRay=function(t,e,i){var n=this.layer.renderer,r=n.viewport;return n.viewport=this.viewport,n.screenToNDC(t,e,v),this.camera.castRay(v,i),n.viewport=r,i},m.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},m.prototype._doRender=function(t,e,i){var n=this.scene,r=this.camera;i=i||0,this._updateTransparent(t,n,r,i),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,n,r,!0)),this._updateShadowPCFKernel(i);var a,o=t.clearColor;t.gl.clearColor(o[0],o[1],o[2],o[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,n,r,this._temporalSS.getFrame())),this._updateSSAO(t,n,r,this._temporalSS.getFrame()),this._enablePostEffect?((a=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(n,r,!0,!0),a.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,n,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,n,r,null,0))):this.needsTemporalSS()&&e?((a=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(n,r,!0,!0),t.restoreClear(),a.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(n,r,!0,!0))},m.prototype._updateTransparent=function(t,e,i,n){for(var r=new h.a,a=new u.a,o=i.getWorldPosition(),s=e.getRenderList(i).transparent,l=0;lthis.camera.far||t65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,i,n){return 1/(s.dist(t,e)+s.dist(i,e)+s.dist(n,i)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(l)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(l)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,i,n,r,a){null==a&&(a=1);var o=t[0],s=t[1],l=t[2],u=e[0],h=e[1],c=e[2],d=i[0],f=i[1],p=i[2],g=n[0],m=n[1],v=n[2],_=this._getCubicCurveApproxStep(t,e,i,n),y=_*_,x=y*_,b=3*_,w=3*y,T=6*y,S=6*x,M=o-2*u+d,A=s-2*h+f,C=l-2*c+p,I=3*(u-d)-o+g,L=3*(h-f)-s+m,E=3*(c-p)-l+v,P=o,D=s,O=l,R=(u-o)*b+M*w+I*x,N=(h-s)*b+A*w+L*x,k=(c-l)*b+C*w+E*x,z=M*T+I*S,B=A*T+L*S,F=C*T+E*S,V=I*S,G=L*S,H=E*S,U=0,W=0,j=Math.ceil(1/_),Z=new Float32Array(3*(j+1)),X=(Z=[],0);for(W=0;W1&&(P=R>0?Math.min(P,g):Math.max(P,g),D=N>0?Math.min(D,m):Math.max(D,m),O=k>0?Math.min(O,v):Math.max(O,v));return this.addPolyline(Z,r,a)},addLine:function(t,e,i,n){return this.addPolyline([t,e],i,n)},addPolyline:function(t,e,i,n,r){if(t.length){var a="number"!=typeof t[0];if(null==r&&(r=a?t.length:t.length/3),!(r<2)){null==n&&(n=0),null==i&&(i=1),this._itemVertexOffsets.push(this._vertexOffset);var o,s,l=(a="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,f=this.attributes.offset,p=this.indices,g=this._vertexOffset;i=Math.max(i,.01);for(var m=n;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(c.set(g-2,o),c.set(g-1,o)),u.set(g,o),u.set(g+1,o),d.set(g,s),d.set(g+1,s),f.set(g,i/2),f.set(g+1,-i/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,o),g++;else if(m>0){var y=3*this._triangleOffset;(p=this.indices)[y]=g-4,p[y+1]=g-3,p[y+2]=g-2,p[y+3]=g-3,p[y+4]=g-1,p[y+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(b-1,b-3),c.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var i=this._itemVertexOffsets[t],n=t1&&e.texParameterf(e.TEXTURE_CUBE_MAP,a.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===n&&(t.getGLExtension("OES_texture_half_float")||(n=r.a.FLOAT)),this.mipmaps.length)for(var o=this.width,s=this.height,l=0;l0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t[3]=e[3]*o),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},a.lerp=function(t,e,i,n){var r=e[0],a=e[1],o=e[2],s=e[3];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t[3]=s+n*(i[3]-s),t},a.random=function(t,e){return e=e||1,t[0]=Object(r.c)(),t[1]=Object(r.c)(),t[2]=Object(r.c)(),t[3]=Object(r.c)(),a.normalize(t,t),a.scale(t,t,e),t},a.transformMat4=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3];return t[0]=i[0]*n+i[4]*r+i[8]*a+i[12]*o,t[1]=i[1]*n+i[5]*r+i[9]*a+i[13]*o,t[2]=i[2]*n+i[6]*r+i[10]*a+i[14]*o,t[3]=i[3]*n+i[7]*r+i[11]*a+i[15]*o,t},a.transformQuat=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2],u=i[3],h=u*n+s*a-l*r,c=u*r+l*n-o*a,d=u*a+o*r-s*n,f=-o*n-s*r-l*a;return t[0]=h*u+f*-o+c*-l-d*-s,t[1]=c*u+f*-s+d*-o-h*-l,t[2]=d*u+f*-l+h*-s-c*-o,t},a.forEach=(n=a.create(),function(t,e,i,r,a,o){var s,l;for(e||(e=4),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof r.a&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof a.a?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof r.a&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},i=0;i0&&this._doUpdateRenderList(o,e,i,n,r)}},isFrustumCulled:(m=new o.a,v=new h.a,function(t,e,i){var n=t.boundingBox;if(n||(n=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!n)return!1;if(v.array=i,m.transformFrom(n,v),t.castShadow&&this.viewBoundingBoxLastFrame.union(m),t.frustumCulling){if(!m.intersectBoundingBox(e.frustum.boundingBox))return!0;v.array=e.projectionMatrix.array,m.max.array[2]>0&&m.min.array[2]<0&&(m.max.array[2]=-1e-20),m.applyProjection(v);var r=m.min.array,a=m.max.array;if(a[0]<-1||r[0]>1||a[1]<-1||r[1]>1||a[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(y);var e=this._lightUniforms;for(var i in e)for(var n in e[i])e[i][n].value.length=0;for(var r=0;r0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}}},function(t,e,i){"use strict";var n=i(0),r=i.n(n);e.a=function(t,e,i){var n=t.getData(),a=t.getRawValue(e),o=r.a.util.isArray(a)?function(t){var a=[],o=function(t,e){var i=[];return r.a.util.each(t.dimensions,(function(n){var r=t.getDimensionInfo(n),a=r.otherDims[e];null!=a&&!1!==a&&(i[a]=r.name)})),i}(n,"tooltip");function s(t,e){var o=n.getDimensionInfo(e);if(o&&!1!==o.otherDims.tooltip){var s=o.type,l="- "+(o.tooltipName||o.name)+": "+("ordinal"===s?t+"":"time"===s?i?"":r.a.format.formatTime("yyyy/MM/dd hh:mm:ss",t):r.a.format.addCommas(t));l&&a.push(r.a.format.encodeHTML(l))}}return o.length?r.a.util.each(o,(function(t){s(n.get(t,e),t)})):r.a.util.each(t,s),"
"+a.join("
")}(a):r.a.format.encodeHTML(r.a.format.addCommas(a)),s=n.getName(e),l=n.getItemVisual(e,"color");r.a.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=r.a.format.getTooltipMarker(l),h=t.name;return"\0-"===h&&(h=""),h=h?r.a.format.encodeHTML(h)+(i?": ":"
"):"",i?u+h+o:h+u+(s?r.a.format.encodeHTML(s)+": "+o:o)}},function(t,e,i){"use strict";var n=i(72),r=i(11),a=n.a.extend({skeleton:null,joints:null,useSkinMatricesTexture:!1},(function(){this.joints||(this.joints=[])}),{isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=n.a.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});a.POINTS=r.a.POINTS,a.LINES=r.a.LINES,a.LINE_LOOP=r.a.LINE_LOOP,a.LINE_STRIP=r.a.LINE_STRIP,a.TRIANGLES=r.a.TRIANGLES,a.TRIANGLE_STRIP=r.a.TRIANGLE_STRIP,a.TRIANGLE_FAN=r.a.TRIANGLE_FAN,a.BACK=r.a.BACK,a.FRONT=r.a.FRONT,a.FRONT_AND_BACK=r.a.FRONT_AND_BACK,a.CW=r.a.CW,a.CCW=r.a.CCW,e.a=a},function(t,e,i){"use strict";var n=i(58),r=n.a.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=n.a.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}});e.a=r},function(t,e,i){"use strict";var n=i(40),r=i(76),a=i(8),o=i(19),s=i(4),l=i(121);a.a.import(l.a);var u=n.a.extend((function(){var t=new a.a({vertex:a.a.source("clay.skybox.vertex"),fragment:a.a.source("clay.skybox.fragment")}),e=new o.a({shader:t,depthMask:!1});return{scene:null,geometry:new r.a,material:e,environmentMap:null,culling:!1}}),(function(){var t=this.scene;t&&this.attachScene(t),this.environmentMap&&this.setEnvironmentMap(this.environmentMap)}),{attachScene:function(t){this.scene&&this.detachScene(),t.skybox=this,this.scene=t,t.on("beforerender",this._beforeRenderScene,this)},detachScene:function(){this.scene&&(this.scene.off("beforerender",this._beforeRenderScene),this.scene.skybox=null),this.scene=null},dispose:function(t){this.detachScene(),this.geometry.dispose(t)},setEnvironmentMap:function(t){"texture2D"===t.textureType?(this.material.define("EQUIRECTANGULAR"),t.minFilter=s.a.LINEAR):this.material.undefine("EQUIRECTANGULAR"),this.material.set("environmentMap",t)},getEnvironmentMap:function(){return this.material.get("environmentMap")},_beforeRenderScene:function(t,e,i){this.renderSkybox(t,i)},renderSkybox:function(t,e){this.position.copy(e.getWorldPosition()),this.update(),t.gl.disable(t.gl.BLEND),this.material.get("lod")>0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],e)}});e.a=u},function(t,e,i){"use strict";var n=i(15),r=i(18),a=n.a.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,i=this.attributes,n=[],a=[],o=[],s=[],l=0;l<=t;l++)for(var u=l/t,h=0;h<=e;h++){var c=h/e;if(n.push([2*c-1,2*u-1,0]),a&&a.push([c,u]),o&&o.push([0,0,1]),h0&&this._notFirst?this.animateTo({alpha:h,beta:c,center:d,distance:a,targetOrthographicSize:s,easing:u.animationEasingUpdate,duration:u.animationDurationUpdate}):(this.setDistance(a),this.setAlpha(h),this.setBeta(c),this.setCenter(d),this.setOrthographicSize(s)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){null==s[this.panMouseButton]&&console.error("Unkown panMouseButton %s. It should be left|middle|right",this.panMouseButton),null==s[this.rotateMouseButton]&&console.error("Unkown rotateMouseButton %s. It should be left|middle|right",this.rotateMouseButton),"cw"!==this.autoRotateDirection&&"ccw"!==this.autoRotateDirection&&console.error("Unkown autoRotateDirection %s. It should be cw|ccw",this.autoRotateDirection)},animateTo:function(t){var e=this.zr,i=this,n={},r={};return null!=t.distance&&(n.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(n.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(n.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(n.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(n.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(n).when(t.duration||1e3,r).during((function(){null!=n.alpha&&i.setAlpha(n.alpha),null!=n.beta&&i.setBeta(n.beta),null!=n.distance&&i.setDistance(n.distance),null!=n.center&&i.setCenter(n.center),null!=n.orthographicSize&&i.setOrthographicSize(n.orthographicSize),i._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),i=this._orthoSize,n=i/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-n/2,e.right=n/2,e.top=i/2,e.bottom=-i/2},_updatePan:function(t){var e=this._panVelocity,i=this._distance,n=this.getCamera(),r=n.worldTransform.y,a=n.worldTransform.x;this._center.scaleAndAdd(a,-e.x*i/200).scaleAndAdd(r,-e.y*i/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new a.a,i=this._theta+Math.PI/2,n=this._phi+Math.PI/2,r=Math.sin(i);e.x=r*Math.cos(n),e.y=-Math.cos(i),e.z=r*Math.sin(n),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var i=t.len();(i*=e)<1e-4&&(i=0),t.normalize().scale(i)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),i=Math.atan2(t.x,t.z);this._theta=e,this._phi=-i,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,i=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,i)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===s[this.rotateMouseButton]?this._mode="rotate":t.event.button===s[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=l(this.panSensitivity),i=l(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*i[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*i[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var i,n=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(n,r)||(i="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*i*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var i=e.indexOf(t);i>=0&&e.splice(i,1)})),t}});Object.defineProperty(u.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}}),e.a=u},function(t,e,i){"use strict";e.a="@export ecgl.lines3D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, 1.0);\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n}\n@end\n\n\n\n@export ecgl.lines3D.clipNear\n\nvec4 clipNear(vec4 p1, vec4 p2) {\n float n = (p1.w - near) / (p1.w - p2.w);\n return vec4(mix(p1.xy, p2.xy, n), -near, near);\n}\n\n@end\n\n@export ecgl.lines3D.expandLine\n#ifdef VERTEX_ANIMATION\n vec4 prevProj = worldViewProjection * vec4(mix(prevPositionPrev, positionPrev, percent), 1.0);\n vec4 currProj = worldViewProjection * vec4(mix(prevPosition, position, percent), 1.0);\n vec4 nextProj = worldViewProjection * vec4(mix(prevPositionNext, positionNext, percent), 1.0);\n#else\n vec4 prevProj = worldViewProjection * vec4(positionPrev, 1.0);\n vec4 currProj = worldViewProjection * vec4(position, 1.0);\n vec4 nextProj = worldViewProjection * vec4(positionNext, 1.0);\n#endif\n\n if (currProj.w < 0.0) {\n if (nextProj.w > 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(t,e,i){var n=i(13),r=i(82),a=i(85).parsePercent,o=i(171),s=n.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=o+v)>r||l.newline?(a+=s+i,o=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=h+i:o=c+i)}))}var c=h,d=n.curry(h,"vertical"),f=n.curry(h,"horizontal");function p(t,e,i){i=o.normalizeCssArray(i||0);var n=e.width,s=e.height,l=a(t.left,n),u=a(t.top,s),h=a(t.right,n),c=a(t.bottom,s),d=a(t.width,n),f=a(t.height,s),p=i[2]+i[0],g=i[1]+i[3],m=t.aspect;switch(isNaN(d)&&(d=n-h-g-l),isNaN(f)&&(f=s-c-p-u),null!=m&&(isNaN(d)&&isNaN(f)&&(m>n/s?d=.8*n:f=.8*s),isNaN(d)&&(d=m*f),isNaN(f)&&(f=d/m)),isNaN(l)&&(l=n-h-d-g),isNaN(u)&&(u=s-c-f-p),t.left||t.right){case"center":l=n/2-d/2-i[3];break;case"right":l=n-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-f/2-i[0];break;case"bottom":u=s-f-p}l=l||0,u=u||0,isNaN(d)&&(d=n-g-l-(h||0)),isNaN(f)&&(f=s-p-u-(c||0));var v=new r(l+i[3],u+i[0],d,f);return v.margin=i,v}function g(t,e){return e&&t&&s(l,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}e.LOCATION_PARAMS=l,e.HV_NAMES=u,e.box=c,e.vbox=d,e.hbox=f,e.getAvailableSize=function(t,e,i){var n=e.width,r=e.height,s=a(t.x,n),l=a(t.y,r),u=a(t.x2,n),h=a(t.y2,r);return(isNaN(s)||isNaN(parseFloat(t.x)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=n),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.y2)))&&(h=r),i=o.normalizeCssArray(i||0),{width:Math.max(u-s-i[1]-i[3],0),height:Math.max(h-l-i[0]-i[2],0)}},e.getLayoutRect=p,e.positionElement=function(t,e,i,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if(s||l){var h;if("raw"===u)h="group"===t.type?new r(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(h=h.clone()).applyTransform(c)}e=p(n.defaults({width:h.width,height:h.height},e),i,a);var d=t.position,f=s?e.x-h.x:0,g=l?e.y-h.y:0;t.attr("position","raw"===u?[f,g]:[d[0]+f,d[1]+g])}},e.sizeCalculable=function(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]},e.mergeLayoutParam=function(t,e,i){!n.isObject(i)&&(i={});var r=i.ignoreSize;!n.isArray(r)&&(r=[r,r]);var a=l(u[0],0),o=l(u[1],1);function l(i,n){var a={},o=0,l={},u=0;if(s(i,(function(e){l[e]=t[e]})),s(i,(function(t){h(e,t)&&(a[t]=l[t]=e[t]),c(a,t)&&o++,c(l,t)&&u++})),r[n])return c(e,i[1])?l[i[2]]=null:c(e,i[2])&&(l[i[1]]=null),l;if(2!==u&&o){if(o>=2)return a;for(var d=0;d0&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))}});e.a=n},function(t,e,i){"use strict";e.a=function(t,e){for(var i=0,n=1/e,r=t;r>0;)i+=n*(r%e),r=Math.floor(r/e),n/=e;return i}},function(t,e,i){"use strict";var n=i(0),r=i.n(n);e.a=function(t,e,i){i=i||t.getSource();var n=e||r.a.getCoordinateSystemDimensions(t.get("coordinateSystem"))||["x","y","z"],a=r.a.helper.createDimensions(i,{dimensionsDefine:i.dimensionsDefine||t.get("dimensions"),encodeDefine:i.encodeDefine||t.get("encode"),coordDimensions:n.map((function(e){var i=t.getReferringComponents(e+"Axis3D")[0];return{type:i&&"category"===i.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&a.forEach((function(e){if(n.indexOf(e.coordDim)>=0){var i=t.getReferringComponents(e.coordDim+"Axis3D")[0];i&&"category"===i.get("type")&&(e.ordinalMeta=i.getOrdinalMeta())}}));var o=r.a.helper.dataStack.enableDataStack(t,a,{byIndex:!0,stackedCoordDimension:"z"}),s=new r.a.List(a,t);return s.setCalculationInfo(o),s.initData(i),s}},function(t,e){t.exports=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,r){var a=t.getData(),o=t.get("symbol")||e,s=t.get("symbolSize"),l=t.get("symbolKeepAspect");if(a.setVisual({legendSymbol:i||o,symbol:o,symbolSize:s,symbolKeepAspect:l}),!n.isSeriesFiltered(t)){var u="function"==typeof s;return{dataEach:a.hasItemOption||u?function(e,i){if("function"==typeof s){var n=t.getRawValue(i),r=t.getDataParams(i);e.setItemVisual(i,"symbolSize",s(n,r))}if(e.hasItemOption){var a=e.getItemModel(i),o=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0),u=a.getShallow("symbolKeepAspect",!0);null!=o&&e.setItemVisual(i,"symbol",o),null!=l&&e.setItemVisual(i,"symbolSize",l),null!=u&&e.setItemVisual(i,"symbolKeepAspect",u)}}:null}}}}}},function(t,e,i){"use strict";var n=i(7),r=i(111),a=i(11),o=i(14),s=i(19),l=i(26),u=i(115),h=i(8),c=i(71),d=i(21),f=i(12);h.a.import(c.a);var p=d.a.create,g={};function m(t){return t.material}function v(t,e,i){return e.uniforms[i].value}function _(t,e,i,n){return i!==n}function y(t){return!0}function x(){}var b={float:a.a.FLOAT,byte:a.a.BYTE,ubyte:a.a.UNSIGNED_BYTE,short:a.a.SHORT,ushort:a.a.UNSIGNED_SHORT};function w(t,e,i){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=i,this.vao=null}function T(t){var e,i;this.bind=function(t){e||((e=o.a.createCanvas()).width=e.height=1,e.getContext("2d"));var n=t.gl,r=!i;r&&(i=n.createTexture()),n.bindTexture(n.TEXTURE_2D,i),r&&n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var S=n.a.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=o.a.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new r.a(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(t){throw"Error creating WebGL Context "+t}this._programMgr=new u.a(this),this._placeholderTexture=new T(this)}),{resize:function(t,e){var i=this.canvas,n=this.devicePixelRatio;null!=t?(i.style.width=t+"px",i.style.height=e+"px",i.width=t*n,i.height=e*n,this._width=t,this._height=e):(this._width=i.width/n,this._height=i.height/n),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,i,n,r){if("object"==typeof t){var a=t;t=a.x,e=a.y,i=a.width,n=a.height,r=a.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,i*r,n*r),this.viewport={x:t,y:e,width:i,height:n,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,i,n){var r=this.gl,a=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var o=this.viewport,s=!1,l=o.devicePixelRatio;(o.width!==this._width||o.height!==this._height||l&&l!==this.devicePixelRatio||o.x||o.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(o.x*l,o.y*l,o.width*l,o.height*l)),r.clearColor(a[0],a[1],a[2],a[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(i||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var h=u.opaque,c=u.transparent,g=t.material;t.trigger("beforerender",this,t,e,u),n?(this.renderPreZ(h,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var m=p(),v=f.a.create(),_=0;_0){var s=t[r-1],l=s.joints?s.joints.length:0;if((a.joints?a.joints.length:0)===l&&a.material===s.material&&a.lightGroup===s.lightGroup){a.__program=s.__program;continue}}var u=this._programMgr.getProgram(a,o,e);this.validateProgram(u),a.__program=u}},renderPass:function(t,e,i){this.trigger("beforerenderpass",this,t,e,i),(i=i||{}).getMaterial=i.getMaterial||m,i.getUniform=i.getUniform||v,i.isMaterialChanged=i.isMaterialChanged||_,i.beforeRender=i.beforeRender||x,i.afterRender=i.afterRender||x;var n=i.ifRender||y;this.updatePrograms(t,this._sceneRendering,i),i.sortCompare&&t.sort(i.sortCompare);var r=this.viewport,a=r.devicePixelRatio,o=[r.x*a,r.y*a,r.width*a,r.height*a],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[o[2],o[3]],h=Date.now();e?(d.a.copy(M.VIEW,e.viewMatrix.array),d.a.copy(M.PROJECTION,e.projectionMatrix.array),d.a.copy(M.VIEWINVERSE,e.worldTransform.array)):(d.a.identity(M.VIEW),d.a.identity(M.PROJECTION),d.a.identity(M.VIEWINVERSE)),d.a.multiply(M.VIEWPROJECTION,M.PROJECTION,M.VIEW),d.a.invert(M.PROJECTIONINVERSE,M.PROJECTION),d.a.invert(M.VIEWPROJECTIONINVERSE,M.VIEWPROJECTION);for(var c,f,p,g,b,w,T,S,A,C,I,L,E=this.gl,P=this._sceneRendering,D=this.getGLExtension("OES_vertex_array_object"),O=0;Othis._glinfo.getMaxJointNumber()){var a=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,a,i),e.setUniform(n,"1i","skinMatricesTexture",i),e.setUniform(n,"1f","skinMatricesTextureSize",a.width)}else{var o=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(n,"SKIN_MATRIX",o)}},_renderObject:function(t,e){var i=this.gl,n=t.geometry,r=t.mode;if(null==r&&(r=4),e.indicesBuffer){var a=this.getGLExtension("OES_element_index_uint")&&n.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;i.drawElements(r,e.indicesBuffer.count,a,0)}else i.drawArrays(r,0,n.vertexCount)},_bindMaterial:function(t,e,i,n,r,a,o){for(var s=this.gl,l=a===i,u=i.currentTextureSlot(),h=e.getEnabledUniforms(),c=e.getTextureUniforms(),d=this._placeholderTexture,f=0;fh)){var c=Math.sqrt(h-s),d=o-c,f=o+c;return n||(n=new l.a),d<0?f<0?null:(u.a.scaleAndAdd(n.array,r,a,f),n):(u.a.scaleAndAdd(n.array,r,a,d),n)}}}(),intersectBoundingBox:function(t,e){var i,n,r,a,o,s,h=this.direction.array,c=this.origin.array,d=t.min.array,f=t.max.array,p=1/h[0],g=1/h[1],m=1/h[2];if(p>=0?(i=(d[0]-c[0])*p,n=(f[0]-c[0])*p):(n=(d[0]-c[0])*p,i=(f[0]-c[0])*p),g>=0?(r=(d[1]-c[1])*g,a=(f[1]-c[1])*g):(a=(d[1]-c[1])*g,r=(f[1]-c[1])*g),i>a||r>n)return null;if((r>i||i!=i)&&(i=r),(a=0?(o=(d[2]-c[2])*m,s=(f[2]-c[2])*m):(s=(d[2]-c[2])*m,o=(f[2]-c[2])*m),i>s||o>n)return null;if((o>i||i!=i)&&(i=o),(s=0?i:n;return e||(e=new l.a),u.a.scaleAndAdd(e.array,c,h,v),e},intersectTriangle:(n=u.a.create(),r=u.a.create(),a=u.a.create(),o=u.a.create(),function(t,e,i,s,h,c){var d=this.direction.array,f=this.origin.array;t=t.array,e=e.array,i=i.array,u.a.sub(n,e,t),u.a.sub(r,i,t),u.a.cross(o,r,d);var p=u.a.dot(n,o);if(s){if(p>-1e-5)return null}else if(p>-1e-5&&p<1e-5)return null;u.a.sub(a,f,t);var g=u.a.dot(o,a)/p;if(g<0||g>1)return null;u.a.cross(o,n,a);var m=u.a.dot(d,o)/p;if(m<0||m>1||g+m>1)return null;u.a.cross(o,n,r);var v=-u.a.dot(a,o)/p;return v<0?null:(h||(h=new l.a),c&&l.a.set(c,1-g-m,g,m),u.a.scaleAndAdd(h.array,f,d,v),h)}),applyTransform:function(t){l.a.add(this.direction,this.direction,this.origin),l.a.transformMat4(this.origin,this.origin,t),l.a.transformMat4(this.direction,this.direction,t),l.a.sub(this.direction,this.direction,this.origin),l.a.normalize(this.direction,this.direction)},copy:function(t){l.a.copy(this.origin,t.origin),l.a.copy(this.direction,t.direction)},clone:function(){var t=new h;return t.copy(this),t}},e.a=h},function(t,e,i){"use strict";var n,r,a,o,s=i(20),l=i(12),u=i(33),h=i(34),c={create:function(){var t=new s.a(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}};c.rotationTo=(n=l.a.create(),r=l.a.fromValues(1,0,0),a=l.a.fromValues(0,1,0),function(t,e,i){var o=l.a.dot(e,i);return o<-.999999?(l.a.cross(n,r,e),l.a.length(n)<1e-6&&l.a.cross(n,a,e),l.a.normalize(n,n),c.setAxisAngle(t,n,Math.PI),t):o>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(l.a.cross(n,e,i),t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=1+o,c.normalize(t,t))}),c.setAxes=(o=h.a.create(),function(t,e,i,n){return o[0]=i[0],o[3]=i[1],o[6]=i[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],c.normalize(t,c.fromMat3(t,o))}),c.clone=u.a.clone,c.fromValues=u.a.fromValues,c.copy=u.a.copy,c.set=u.a.set,c.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},c.setAxisAngle=function(t,e,i){i*=.5;var n=Math.sin(i);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(i),t},c.add=u.a.add,c.multiply=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=i[0],l=i[1],u=i[2],h=i[3];return t[0]=n*h+o*s+r*u-a*l,t[1]=r*h+o*l+a*s-n*u,t[2]=a*h+o*u+n*l-r*s,t[3]=o*h-n*s-r*l-a*u,t},c.mul=c.multiply,c.scale=u.a.scale,c.rotateX=function(t,e,i){i*=.5;var n=e[0],r=e[1],a=e[2],o=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l+o*s,t[1]=r*l+a*s,t[2]=a*l-r*s,t[3]=o*l-n*s,t},c.rotateY=function(t,e,i){i*=.5;var n=e[0],r=e[1],a=e[2],o=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l-a*s,t[1]=r*l+o*s,t[2]=a*l+n*s,t[3]=o*l-r*s,t},c.rotateZ=function(t,e,i){i*=.5;var n=e[0],r=e[1],a=e[2],o=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=n*l+r*s,t[1]=r*l-n*s,t[2]=a*l+o*s,t[3]=o*l-a*s,t},c.calculateW=function(t,e){var i=e[0],n=e[1],r=e[2];return t[0]=i,t[1]=n,t[2]=r,t[3]=Math.sqrt(Math.abs(1-i*i-n*n-r*r)),t},c.dot=u.a.dot,c.lerp=u.a.lerp,c.slerp=function(t,e,i,n){var r,a,o,s,l,u=e[0],h=e[1],c=e[2],d=e[3],f=i[0],p=i[1],g=i[2],m=i[3];return(a=u*f+h*p+c*g+d*m)<0&&(a=-a,f=-f,p=-p,g=-g,m=-m),1-a>1e-6?(r=Math.acos(a),o=Math.sin(r),s=Math.sin((1-n)*r)/o,l=Math.sin(n*r)/o):(s=1-n,l=n),t[0]=s*u+l*f,t[1]=s*h+l*p,t[2]=s*c+l*g,t[3]=s*d+l*m,t},c.invert=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=i*i+n*n+r*r+a*a,s=o?1/o:0;return t[0]=-i*s,t[1]=-n*s,t[2]=-r*s,t[3]=a*s,t},c.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},c.length=u.a.length,c.len=c.length,c.squaredLength=u.a.squaredLength,c.sqrLen=c.squaredLength,c.normalize=u.a.normalize,c.fromMat3=function(t,e){var i,n=e[0]+e[4]+e[8];if(n>0)i=Math.sqrt(n+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var a=(r+1)%3,o=(r+2)%3;i=Math.sqrt(e[3*r+r]-e[3*a+a]-e[3*o+o]+1),t[r]=.5*i,i=.5/i,t[3]=(e[3*a+o]-e[3*o+a])*i,t[a]=(e[3*a+r]+e[3*r+a])*i,t[o]=(e[3*o+r]+e[3*r+o])*i}return t},e.a=c},function(t,e,i){"use strict";var n,r=i(55),a=i(34),o=function(t,e,i,n){t=t||0,e=e||0,i=i||0,n=void 0===n?1:n,this.array=r.a.fromValues(t,e,i,n),this._dirty=!0};o.prototype={constructor:o,add:function(t){return r.a.add(this.array,this.array,t.array),this._dirty=!0,this},calculateW:function(){return r.a.calculateW(this.array,this.array),this._dirty=!0,this},set:function(t,e,i,n){return this.array[0]=t,this.array[1]=e,this.array[2]=i,this.array[3]=n,this._dirty=!0,this},setArray:function(t){return this.array[0]=t[0],this.array[1]=t[1],this.array[2]=t[2],this.array[3]=t[3],this._dirty=!0,this},clone:function(){return new o(this.x,this.y,this.z,this.w)},conjugate:function(){return r.a.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(t){return r.a.copy(this.array,t.array),this._dirty=!0,this},dot:function(t){return r.a.dot(this.array,t.array)},fromMat3:function(t){return r.a.fromMat3(this.array,t.array),this._dirty=!0,this},fromMat4:(n=a.a.create(),function(t){return a.a.fromMat4(n,t.array),a.a.transpose(n,n),r.a.fromMat3(this.array,n),this._dirty=!0,this}),identity:function(){return r.a.identity(this.array),this._dirty=!0,this},invert:function(){return r.a.invert(this.array,this.array),this._dirty=!0,this},len:function(){return r.a.len(this.array)},length:function(){return r.a.length(this.array)},lerp:function(t,e,i){return r.a.lerp(this.array,t.array,e.array,i),this._dirty=!0,this},mul:function(t){return r.a.mul(this.array,this.array,t.array),this._dirty=!0,this},mulLeft:function(t){return r.a.multiply(this.array,t.array,this.array),this._dirty=!0,this},multiply:function(t){return r.a.multiply(this.array,this.array,t.array),this._dirty=!0,this},multiplyLeft:function(t){return r.a.multiply(this.array,t.array,this.array),this._dirty=!0,this},normalize:function(){return r.a.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(t){return r.a.rotateX(this.array,this.array,t),this._dirty=!0,this},rotateY:function(t){return r.a.rotateY(this.array,this.array,t),this._dirty=!0,this},rotateZ:function(t){return r.a.rotateZ(this.array,this.array,t),this._dirty=!0,this},rotationTo:function(t,e){return r.a.rotationTo(this.array,t.array,e.array),this._dirty=!0,this},setAxes:function(t,e,i){return r.a.setAxes(this.array,t.array,e.array,i.array),this._dirty=!0,this},setAxisAngle:function(t,e){return r.a.setAxisAngle(this.array,t.array,e),this._dirty=!0,this},slerp:function(t,e,i){return r.a.slerp(this.array,t.array,e.array,i),this._dirty=!0,this},sqrLen:function(){return r.a.sqrLen(this.array)},squaredLength:function(){return r.a.squaredLength(this.array)},fromEuler:function(t,e){return o.fromEuler(this,t,e)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var s=Object.defineProperty;if(s){var l=o.prototype;s(l,"x",{get:function(){return this.array[0]},set:function(t){this.array[0]=t,this._dirty=!0}}),s(l,"y",{get:function(){return this.array[1]},set:function(t){this.array[1]=t,this._dirty=!0}}),s(l,"z",{get:function(){return this.array[2]},set:function(t){this.array[2]=t,this._dirty=!0}}),s(l,"w",{get:function(){return this.array[3]},set:function(t){this.array[3]=t,this._dirty=!0}})}o.add=function(t,e,i){return r.a.add(t.array,e.array,i.array),t._dirty=!0,t},o.set=function(t,e,i,n,a){r.a.set(t.array,e,i,n,a),t._dirty=!0},o.copy=function(t,e){return r.a.copy(t.array,e.array),t._dirty=!0,t},o.calculateW=function(t,e){return r.a.calculateW(t.array,e.array),t._dirty=!0,t},o.conjugate=function(t,e){return r.a.conjugate(t.array,e.array),t._dirty=!0,t},o.identity=function(t){return r.a.identity(t.array),t._dirty=!0,t},o.invert=function(t,e){return r.a.invert(t.array,e.array),t._dirty=!0,t},o.dot=function(t,e){return r.a.dot(t.array,e.array)},o.len=function(t){return r.a.length(t.array)},o.lerp=function(t,e,i,n){return r.a.lerp(t.array,e.array,i.array,n),t._dirty=!0,t},o.slerp=function(t,e,i,n){return r.a.slerp(t.array,e.array,i.array,n),t._dirty=!0,t},o.multiply=o.mul=function(t,e,i){return r.a.multiply(t.array,e.array,i.array),t._dirty=!0,t},o.rotateX=function(t,e,i){return r.a.rotateX(t.array,e.array,i),t._dirty=!0,t},o.rotateY=function(t,e,i){return r.a.rotateY(t.array,e.array,i),t._dirty=!0,t},o.rotateZ=function(t,e,i){return r.a.rotateZ(t.array,e.array,i),t._dirty=!0,t},o.setAxisAngle=function(t,e,i){return r.a.setAxisAngle(t.array,e.array,i),t._dirty=!0,t},o.normalize=function(t,e){return r.a.normalize(t.array,e.array),t._dirty=!0,t},o.squaredLength=o.sqrLen=function(t){return r.a.sqrLen(t.array)},o.fromMat3=function(t,e){return r.a.fromMat3(t.array,e.array),t._dirty=!0,t},o.setAxes=function(t,e,i,n){return r.a.setAxes(t.array,e.array,i.array,n.array),t._dirty=!0,t},o.rotationTo=function(t,e,i){return r.a.rotationTo(t.array,e.array,i.array),t._dirty=!0,t},o.fromEuler=function(t,e,i){t._dirty=!0,e=e.array;var n=t.array,r=Math.cos(e[0]/2),a=Math.cos(e[1]/2),o=Math.cos(e[2]/2),s=Math.sin(e[0]/2),l=Math.sin(e[1]/2),u=Math.sin(e[2]/2);switch(i=(i||"XYZ").toUpperCase()){case"XYZ":n[0]=s*a*o+r*l*u,n[1]=r*l*o-s*a*u,n[2]=r*a*u+s*l*o,n[3]=r*a*o-s*l*u;break;case"YXZ":n[0]=s*a*o+r*l*u,n[1]=r*l*o-s*a*u,n[2]=r*a*u-s*l*o,n[3]=r*a*o+s*l*u;break;case"ZXY":n[0]=s*a*o-r*l*u,n[1]=r*l*o+s*a*u,n[2]=r*a*u+s*l*o,n[3]=r*a*o-s*l*u;break;case"ZYX":n[0]=s*a*o-r*l*u,n[1]=r*l*o+s*a*u,n[2]=r*a*u-s*l*o,n[3]=r*a*o+s*l*u;break;case"YZX":n[0]=s*a*o+r*l*u,n[1]=r*l*o+s*a*u,n[2]=r*a*u-s*l*o,n[3]=r*a*o-s*l*u;break;case"XZY":n[0]=s*a*o-r*l*u,n[1]=r*l*o-s*a*u,n[2]=r*a*u+s*l*o,n[3]=r*a*o+s*l*u}},e.a=o},function(t,e,i){"use strict";var n=function(){this._contextId=0,this._caches=[],this._context={}};(n.prototype={use:function(t,e){var i=this._caches;i[t]||(i[t]={},e&&(i[t]=e())),this._contextId=t,this._context=i[t]},put:function(t,e){this._context[t]=e},get:function(t){return this._context[t]},dirty:function(t){var e="__dt__"+(t=t||"");this.put(e,!0)},dirtyAll:function(t){for(var e="__dt__"+(t=t||""),i=this._caches,n=0;n=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 r(e),s.key=t,i.insertEntry(s),n[t]=s}return a},o.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;t.exports=s},function(t,e,i){"use strict";var n=i(5),r=i(27),a=i(14),o=i(62),s=i(75),l=i(36),u=i(122),h=i(123),c={loadTexture:function(t,e,i,a){var o;if("function"==typeof e?(a=i=e,e={}):e=e||{},"string"==typeof t){if(t.match(/.hdr$/)||"hdr"===e.fileType)return o=new n.a({width:0,height:0,sRGB:!1}),c._fetchTexture(t,(function(t){h.a.parseRGBE(t,o,e.exposure),o.dirty(),i&&i(o)}),a),o;t.match(/.dds$/)||"dds"===e.fileType?(o=new n.a({width:0,height:0}),c._fetchTexture(t,(function(t){u.a.parse(t,o),o.dirty(),i&&i(o)}),a)):((o=new n.a).load(t),o.success(i),o.error(a))}else"object"==typeof t&&void 0!==t.px&&((o=new r.a).load(t),o.success(i),o.error(a));return o},loadPanorama:function(t,e,i,n,r,a){var o=this;"function"==typeof n?(a=r=n,n={}):n=n||{},c.loadTexture(e,n,(function(e){e.flipY=n.flipY||!1,o.panoramaToCubeMap(t,e,i,n),e.dispose(t),r&&r(i)}),a)},panoramaToCubeMap:function(t,e,i,n){var r=new o.a,a=new s.a({scene:new l.a});return a.setEnvironmentMap(e),(n=n||{}).encodeRGBM&&a.material.define("fragment","RGBM_ENCODE"),i.sRGB=e.sRGB,r.texture=i,r.render(t,a.scene),r.texture=null,r.dispose(t),i},heightToNormal:function(t,e){var i=document.createElement("canvas"),n=i.width=t.width,r=i.height=t.height,a=i.getContext("2d");a.drawImage(t,0,0,n,r),e=e||!1;for(var o=a.getImageData(0,0,n,r),s=a.createImageData(n,r),l=0;l20)return console.warn("Given image is not a height map"),t}var d,f,p,g;l%(4*n)==0?(d=o.data[l],p=o.data[l+4]):l%(4*n)==4*(n-1)?(d=o.data[l-4],p=o.data[l]):(d=o.data[l-4],p=o.data[l+4]),l<4*n?(f=o.data[l],g=o.data[l+4*n]):l>n*(r-1)*4?(f=o.data[l-4*n],g=o.data[l]):(f=o.data[l-4*n],g=o.data[l+4*n]),s.data[l]=d-p+127,s.data[l+1]=f-g+127,s.data[l+2]=255,s.data[l+3]=255}return a.putImageData(s,0,0),i},isHeightImage:function(t,e,i){if(!t||!t.width||!t.height)return!1;var n=document.createElement("canvas"),r=n.getContext("2d"),a=e||32;i=i||20,n.width=n.height=a,r.drawImage(t,0,0,a,a);for(var o=r.getImageData(0,0,a,a),s=0;si)return!1}return!0},_fetchTexture:function(t,e,i){a.a.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:i})},createChessboard:function(t,e,i,r){t=t||512,e=e||64,i=i||"black",r=r||"white";var a=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var s=o.getContext("2d");s.fillStyle=r,s.fillRect(0,0,t,t),s.fillStyle=i;for(var l=0;l65535?new Uint32Array(3*s):new Uint16Array(3*s),f.material.shader!==e&&f.material.attachShader(e,!0),a.a.setMaterialFromModel(e.__shading,f.material,t,i),l>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(l),this._linesMesh.geometry.setTriangleCount(u)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-n))},_updateRegionMesh:function(t,e,i,n){for(var r=t.getData(),o=0,s=0,u=!1,h=this._polygonMesh,c=this._linesMesh,d=i;d0;S&&(T*=e.getDevicePixelRatio(),this._updateLinesGeometry(c.geometry,t,d,x,T,t.coordinateSystem.transform)),c.invisible=!S,c.material.set({color:_})}(h=this._polygonMesh).material.transparent=u,h.material.depthMask=!u,h.geometry.updateBoundingBox(),h.frontFace=this.extrudeY?a.a.Mesh.CCW:a.a.Mesh.CW,h.material.get("normalMap")&&h.geometry.generateTangents(),h.seriesIndex=t.seriesIndex,h.on("mousemove",this._onmousemove,this),h.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var i=a.a.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),n=l.a.firstNotNull(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",i),r.material.set("wireframeLineWidth",n)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,i){var n=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!n.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(console.warn("Unkown shading "+r),o=this._groundMaterials.lambert),a.a.setMaterialFromModel(r,o,n,i),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",a.a.parseColor(n.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,i){this._triangulationResults=[];for(var n=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],a=t.coordinateSystem,s=e;s1?n:0,P[G][v]=C.points[U+2],l.set(r+G,P[G]),s?(N[0]=(C.points[U]*_[0]-y[0])/b,N[1]=(C.points[U+2]*_[v]-y[v])/b):(N[0]=(H?k:k+V)/b,N[1]=(P[G][m]*_[m]-y[m])/b),h.set(r+G,N)}for(f.sub(D,P[1],P[0]),f.sub(O,P[3],P[0]),f.cross(R,D,O),f.normalize(R,R),G=0;G<4;G++)u.set(r+G,R),p&&c.set(r+G,o);for(G=0;G<6;G++)g[3*a+G]=E[G]+r;r+=4,a+=2,k+=V}}return e.dirty(),{vertexOffset:r,triangleOffset:a}},_getRegionLinesInfo:function(t,e,i){var n=0,r=0;return e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,a=t.interiors;n+=i.getPolylineVertexCount(e),r+=i.getPolylineTriangleCount(e);for(var o=0;othis._endIndex)){e-=this._startIndex;for(var n=this._vertexRangeOfDataIndex[2*e];n=2e4},doSortTriangles:function(t,e){var i=this.indices;if(0===e){var n=this.attributes.position;t=t.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new i.constructor(i.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var l,u=0,h=0;h0,i={},n=0;n2?(m=this._updateSymbolSprite(t,p,d,f),u.enableTexture("sprite")):u.disableTexture("sprite"),c.position.init(r-n);var v=[];if(g){u.undefine("VERTEX_SIZE"),u.undefine("VERTEX_COLOR");var _=l.getVisual("color"),y=l.getVisual("opacity");a.a.parseColor(_,v),v[3]*=y,u.set({color:v,u_Size:d.maxSize*this._sizeScale})}else u.set({color:[1,1,1,1]}),u.define("VERTEX_SIZE"),u.define("VERTEX_COLOR"),c.size.init(r-n),c.color.init(r-n),this._originalOpacity=new Float32Array(r-n);for(var x=l.getLayout("points"),b=c.position.value,w=0;w1?(s[0]=i.maxSize,s[1]=i.maxSize/i.aspect):(s[1]=i.maxSize,s[0]=i.maxSize*i.aspect),s[0]=s[0]||1,s[1]=s[1]||1,this._symbolType===i.type&&(r=this._symbolSize,a=s,r&&a&&r[0]===a[0]&&r[1]===a[1])&&this._lineWidth===e.lineWidth||(o.a.createSymbolSprite(i.type,s,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(s[0]/2,10)},this._spriteImageCanvas),o.a.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=i.type,this._symbolSize=s,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/i.maxSize*n},_updateMaterial:function(t,e){var i="lighter"===t.get("blendMode")?a.a.additiveBlend:null,n=this._mesh.material;n.blend=i,n.set("lineWidth",e.lineWidth/20);var r=a.a.parseColor(e.stroke);n.set("strokeColor",r),n.transparent=!0,n.depthMask=!1,n.depthTest=!this.is2D,n.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,i){var n=t.getData(),r=this._mesh.geometry,a=r.attributes.position.value,o=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(n,e,i),this._labelsBuilder.getLabelPosition=function(t,i,n){var r=3*(t-e);return[a[r],a[r+1],a[r+2]]},this._labelsBuilder.getLabelDistance=function(t,i,n){return r.attributes.size.get(t-e)/o/2+n},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){a.a.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,i){var n,r=t.getData(),a=this._mesh,o=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(n=t.coordinateSystem.model),a.seriesIndex=t.seriesIndex,a.off("mousemove"),a.off("mouseout"),a.on("mousemove",(function(e){var u=e.vertexIndex+o._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&i.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:n.componentIndex})),a.dataIndex=u,s=u}),this),a.on("mouseout",(function(t){var e=t.vertexIndex+o._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,a.dataIndex=-1,l&&i.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:n.componentIndex})}),this)},updateLayout:function(t,e,i){var n=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,a=n.getLayout("points");if(this.is2D)for(var o=0;othis._endDataIndex||ethis._endDataIndex||e.05&&(a=!0),f!==o&&(s=!0),o=f,n=c}return a&&console.warn("Different symbol width / height ratio will be ignored."),s&&console.warn("Different symbol type will be ignored."),{maxSize:l,type:o,aspect:n}}},e.a=c},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";var n=i(114),r=function(t){this._list=new n.a,this._map={},this._maxSize=t||10};r.prototype.setMaxSize=function(t){this._maxSize=t},r.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var i=this._list.length();if(i>=this._maxSize&&i>0){var n=this._list.head;this._list.remove(n),delete this._map[n.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},r.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},r.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},r.prototype.clear=function(){this._list.clear(),this._map={}},e.a=r},function(t,e,i){"use strict";var n,r=i(20),a={create:function(){var t=new r.a(2);return t[0]=0,t[1]=0,t},clone:function(t){var e=new r.a(2);return e[0]=t[0],e[1]=t[1],e},fromValues:function(t,e){var i=new r.a(2);return i[0]=t,i[1]=e,i},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},set:function(t,e,i){return t[0]=e,t[1]=i,t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},subtract:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}};a.sub=a.subtract,a.multiply=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},a.mul=a.multiply,a.divide=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},a.div=a.divide,a.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},a.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},a.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},a.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},a.distance=function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)},a.dist=a.distance,a.squaredDistance=function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n},a.sqrDist=a.squaredDistance,a.length=function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},a.len=a.length,a.squaredLength=function(t){var e=t[0],i=t[1];return e*e+i*i},a.sqrLen=a.squaredLength,a.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},a.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},a.normalize=function(t,e){var i=e[0],n=e[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},a.cross=function(t,e,i){var n=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=n,t},a.lerp=function(t,e,i,n){var r=e[0],a=e[1];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t},a.random=function(t,e){e=e||1;var i=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t},a.transformMat2=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r,t[1]=i[1]*n+i[3]*r,t},a.transformMat2d=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},a.transformMat3=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[3]*r+i[6],t[1]=i[1]*n+i[4]*r+i[7],t},a.transformMat4=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t},a.forEach=(n=a.create(),function(t,e,i,r,a,o){var s,l;for(e||(e=2),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=r.a.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(n=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=r.a.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}};e.a=n},function(t,e,i){"use strict";var n,r,a,o,s=i(3),l=i(21),u=i(12),h=i(33),c=function(t,e){this.normal=t||new s.a(0,1,0),this.distance=e||0};c.prototype={constructor:c,distanceToPoint:function(t){return u.a.dot(t.array,this.normal.array)-this.distance},projectPoint:function(t,e){e||(e=new s.a);var i=this.distanceToPoint(t);return u.a.scaleAndAdd(e.array,t.array,this.normal.array,-i),e._dirty=!0,e},normalize:function(){var t=1/u.a.len(this.normal.array);u.a.scale(this.normal.array,t),this.distance*=t},intersectFrustum:function(t){for(var e=t.vertices,i=this.normal.array,n=u.a.dot(e[0].array,i)>this.distance,r=1;r<8;r++)if(u.a.dot(e[r].array,i)>this.distance!=n)return!0},intersectLine:(o=u.a.create(),function(t,e,i){var n=this.distanceToPoint(t),r=this.distanceToPoint(e);if(n>0&&r>0||n<0&&r<0)return null;var a=this.normal.array,l=this.distance,h=t.array;u.a.sub(o,e.array,t.array),u.a.normalize(o,o);var c=u.a.dot(a,o);if(0===c)return null;i||(i=new s.a);var d=(u.a.dot(a,h)-l)/c;return u.a.scaleAndAdd(i.array,h,o,-d),i._dirty=!0,i}),applyTransform:(n=l.a.create(),r=h.a.create(),a=h.a.create(),a[3]=1,function(t){t=t.array,u.a.scale(a,this.normal.array,this.distance),h.a.transformMat4(a,a,t),this.distance=u.a.dot(a,this.normal.array),l.a.invert(n,t),l.a.transpose(n,n),r[3]=0,u.a.copy(r,this.normal.array),h.a.transformMat4(r,r,n),u.a.copy(this.normal.array,r)}),copy:function(t){u.a.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new c;return t.copy(this),t}},e.a=c},function(t,e,i){"use strict";var n=i(42);e.a=n.a},function(t,e,i){"use strict";var n=i(15),r=i(43),a=i(9),o=i(3),s=i(18),l=i(14),u=new a.a,h=n.a.extend({dynamic:!1,widthSegments:1,heightSegments:1,depthSegments:1,inside:!1},(function(){this.build()}),{build:function(){var t={px:c("px",this.depthSegments,this.heightSegments),nx:c("nx",this.depthSegments,this.heightSegments),py:c("py",this.widthSegments,this.depthSegments),ny:c("ny",this.widthSegments,this.depthSegments),pz:c("pz",this.widthSegments,this.heightSegments),nz:c("nz",this.widthSegments,this.heightSegments)},e=["position","texcoord0","normal"],i=0,n=0;for(var r in t)i+=t[r].vertexCount,n+=t[r].indices.length;for(var a=0;a>>16)>>>0;c=(((16711935&(c=((252645135&(c=((858993459&(c=((1431655765&c)<<1|(2863311530&c)>>>1)>>>0))<<2|(3435973836&c)>>>2)>>>0))<<4|(4042322160&c)>>>4)>>>0))<<8|(4278255360&c)>>>8)>>>0)/4294967296;var d=Math.sqrt((1-c)/(1+(u*u-1)*c));o[h]=d}for(h=0;ho&&(r=this._x=0,a+=this._rowHeight+l,this._y=a,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,i),a+i+l>s)return null;t.position[0]+=this.offsetX*this.dpr+r,t.position[1]+=this.offsetY*this.dpr+a,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/o+u[0],a/s+u[1]],[(r+e)/o+u[0],(a+i)/s+u[1]]]},_fitElement:function(t,e,i){var n=t.getBoundingRect(),r=e/n.width,a=i/n.height;t.position=[-n.x*r,-n.y*a],t.scale=[r,a],t.update()}},s.prototype={clear:function(){for(var t=0;t=t)){var r=(i+this._nodeWidth)*this._dpr,a=(n+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:a})}catch(t){this._canvas.width=r,this._canvas.height=a}var s=new o(this._zr,i,n,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(s),s}console.error("Too much labels. Some will be ignored.")},add:function(t,e,i){if(this._coords[t.id])return console.warn("Element already been add"),this._coords[t.id];var n=this._getCurrentNode().add(t,e,i);if(!n){var r=this._expand();if(!r)return;n=r.add(t,e,i)}return this._coords[t.id]=n,n},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]}},e.a=s},function(t,e,i){var n,r,a,o,s=i(83),l=i(84),u=s.applyTransform,h=Math.min,c=Math.max;function d(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}d.prototype={constructor:d,union:function(t){var e=h(t.x,this.x),i=h(t.y,this.y);this.width=c(t.x+t.width,this.x+this.width)-e,this.height=c(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(n=[],r=[],a=[],o=[],function(t){if(t){n[0]=a[0]=this.x,n[1]=o[1]=this.y,r[0]=o[0]=this.x+this.width,r[1]=a[1]=this.y+this.height,u(n,n,t),u(r,r,t),u(a,a,t),u(o,o,t),this.x=h(n[0],r[0],a[0],o[0]),this.y=h(n[1],r[1],a[1],o[1]);var e=c(n[0],r[0],a[0],o[0]),i=c(n[1],r[1],a[1],o[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=l.create();return l.translate(r,r,[-e.x,-e.y]),l.scale(r,r,[i,n]),l.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof d||(t=d.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(t){return new d(t.x,t.y,t.width,t.height)};var f=d;t.exports=f},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array;function n(t){return Math.sqrt(a(t))}var r=n;function a(t){return t[0]*t[0]+t[1]*t[1]}var o=a;function s(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var l=s;function u(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var h=u;e.create=function(t,e){var n=new i(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new i(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,i){return t[0]=e,t[1]=i,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},e.sub=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},e.len=n,e.length=r,e.lenSquare=a,e.lengthSquare=o,e.mul=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},e.div=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},e.normalize=function(t,e){var i=n(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},e.distance=s,e.dist=l,e.distanceSquare=u,e.distSquare=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},e.applyTransform=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}},function(t,e){var i="undefined"==typeof Float32Array?Array:Float32Array;function n(){var t=new i(6);return r(t),t}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}e.create=n,e.identity=r,e.copy=a,e.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},e.translate=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},e.rotate=function(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t},e.scale=function(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t},e.invert=function(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null},e.clone=function(t){var e=n();return a(e,t),e}},function(t,e,i){var n=i(13),r=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function a(t){return Math.floor(Math.log(t)/Math.LN10)}e.linearMap=function(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]},e.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},e.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},e.asc=function(t){return t.sort((function(t,e){return t-e})),t},e.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},e.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},e.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},e.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var r=n.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var a=Math.pow(10,i),o=n.map(t,(function(t){return(isNaN(t)?0:t)/r*a*100})),s=100*a,l=n.map(o,(function(t){return Math.floor(t)})),u=n.reduce(l,(function(t,e){return t+e}),0),h=n.map(o,(function(t,e){return t-l[e]}));uc&&(c=h[f],d=f);++l[d],h[d]=0,++u}return l[e]/a},e.MAX_SAFE_INTEGER=9007199254740991,e.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},e.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},e.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=r.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},e.quantity=function(t){return Math.pow(10,a(t))},e.nice=function(t,e){var i=a(t),n=Math.pow(10,i),r=t/n;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},e.reformIntervals=function(t){t.sort((function(t,e){return function t(e,i,n){return e.interval[n]=0}},function(t,e,i){"use strict";var n=i(5),r=i(11),a=i(23),o=function(){this._pool={},this._allocatedTextures=[]};o.prototype={constructor:o,get:function(t){var e=u(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]);var i=this._pool[e];if(!i.length){var r=new n.a(t);return this._allocatedTextures.push(r),r}return i.pop()},put:function(t){var e=u(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]),this._pool[e].push(t)},clear:function(t){for(var e=0;ec&&u.push({pivot:Math.floor((h+c)/2),left:c,right:h}),c=s[l].pivot+1,(h=s[l].right)>c&&u.push({pivot:Math.floor((h+c)/2),left:c,right:h})}s=this._parts=u}else for(l=0;l50&&(o=1e3);var s=[];n.perspective(s,r,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(s),this.viewGL.camera.decomposeProjectionMatrix(),s=n.identity([]);var l=this.dataToPoint(this.center);n.scale(s,s,[1,-1,1]),n.translate(s,s,[0,0,-t]),n.rotateX(s,s,e),n.rotateZ(s,s,-this.bearing/180*Math.PI),n.translate(s,s,[-l[0]*this.getScale()*.1,-l[1]*this.getScale()*.1,0]),this.viewGL.camera.viewMatrix.array=s;var u=[];n.invert(u,s),this.viewGL.camera.worldTransform.array=u,this.viewGL.camera.decomposeWorldTransform();var h,c=512*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var d=this.altitudeExtent[1]-this.altitudeExtent[0];h=this.boxHeight/d*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else h=c/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*.1;this.viewGL.rootNode.scale.set(.1*this.getScale(),.1*this.getScale(),h)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,512*this.getScale(),e)},projectOnTileWithScale:function(t,e,i){var n=t[0],r=t[1]*a/180,o=e*(n*a/180+a)/(2*a),s=e*(a-Math.log(Math.tan(a/4+.5*r)))/(2*a);return(i=i||[])[0]=o,i[1]=s,i},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,512*this.getScale(),e)},unprojectOnTileWithScale:function(t,e,i){var n=t[0],r=t[1],o=n/e*(2*a)-a,s=2*(Math.atan(Math.exp(a-r/e*(2*a)))-a/4);return(i=i||[])[0]=180*o/a,i[1]=180*s/a,i},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,512,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}},e.a=o},function(t,e,i){"use strict";var n=i(2),r=i(1),a=i(22);e.a=function(t,e,i){function o(t,e){var i=e.getWidth(),n=e.getHeight(),r=e.getDevicePixelRatio();this.viewGL.setViewport(0,0,i,n,r),this.width=i,this.height=n,this.altitudeScale=t.get("altitudeScale"),this.boxHeight=t.get("boxHeight")}function s(t,e){if("auto"!==this.model.get("boxHeight")){var i=[1/0,-1/0];t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),n=t.coordDimToDataDim("alt")[0];if(n){var r=e.getDataExtent(n,!0);i[0]=Math.min(i[0],r[0]),i[1]=Math.max(i[1],r[1])}}}),this),i&&isFinite(i[1]-i[0])&&(this.altitudeExtent=i)}}return{dimensions:e.prototype.dimensions,create:function(l,u){var h=[];return l.eachComponent(t,(function(t){var i=t.__viewGL;i||(i=t.__viewGL=new a.a).setRootNode(new r.a.Node);var n=new e;n.viewGL=t.__viewGL,n.resize=o,n.resize(t,u),h.push(n),t.coordinateSystem=n,n.model=t,n.update=s})),l.eachSeries((function(e){if(e.get("coordinateSystem")===t){var i=e.getReferringComponents(t)[0];if(i||(i=l.getComponent(t)),!i)throw new Error(t+' "'+n.a.firstNotNull(e.get(t+"Index"),e.get(t+"Id"),0)+'" not found');e.coordinateSystem=i.coordinateSystem}})),i&&i(h,l,u),h}}}},function(t,e,i){"use strict";e.a="\n@export ecgl.displayShadow.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_WorldPosition;\n\nvarying vec3 v_Normal;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n\n v_WorldPosition = (world * vec4(position, 1.0)).xyz;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n\n@end\n\n\n@export ecgl.displayShadow.fragment\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform float roughness: 0.2;\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.ssaoMap.header\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n float shadow = 1.0;\n\n @import ecgl.common.ssaoMap.main\n\n#if defined(DIRECTIONAL_LIGHT_COUNT) && defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n for (int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++) {\n shadow = min(shadow, shadowContribsDir[i] * 0.5 + 0.5);\n }\n#endif\n\n shadow *= 0.5 + ao * 0.5;\n shadow = clamp(shadow, 0.0, 1.0);\n\n gl_FragColor = vec4(vec3(0.0), 1.0 - shadow);\n}\n\n@end"},function(t,e,i){"use strict";var n=i(84),r=i.n(n),a=i(83),o=i.n(a);function s(t){this.viewGL=t}s.prototype.reset=function(t,e){this._updateCamera(e.getWidth(),e.getHeight(),e.getDevicePixelRatio()),this._viewTransform=r.a.create(),this.updateTransform(t,e)},s.prototype.updateTransform=function(t,e){var i=t.coordinateSystem;i.getRoamTransform&&(r.a.invert(this._viewTransform,i.getRoamTransform()),this._setCameraTransform(this._viewTransform),e.getZr().refresh())},s.prototype.dataToPoint=function(t,e,i){i=t.dataToPoint(e,null,i);var n=this._viewTransform;n&&o.a.applyTransform(i,i,n)},s.prototype.removeTransformInPoint=function(t){return this._viewTransform&&o.a.applyTransform(t,t,this._viewTransform),t},s.prototype.getZoom=function(){if(this._viewTransform){var t=this._viewTransform;return 1/Math.max(Math.sqrt(t[0]*t[0]+t[1]*t[1]),Math.sqrt(t[2]*t[2]+t[3]*t[3]))}return 1},s.prototype._setCameraTransform=function(t){var e=this.viewGL.camera;e.position.set(t[4],t[5],0),e.scale.set(Math.sqrt(t[0]*t[0]+t[1]*t[1]),Math.sqrt(t[2]*t[2]+t[3]*t[3]),1)},s.prototype._updateCamera=function(t,e,i){this.viewGL.setViewport(0,0,t,e,i);var n=this.viewGL.camera;n.left=n.top=0,n.bottom=e,n.right=t,n.near=0,n.far=100},e.a=s},function(t,e,i){(function(t){var i;"undefined"!=typeof window?i=window.__DEV__:void 0!==t&&(i=t.__DEV__),void 0===i&&(i=!0);var n=i;e.__DEV__=n}).call(e,i(68))},function(t,e,i){"use strict";var n,r,a,o,s,l,u,h=i(15),c=i(0),d=i.n(c),f=i(38),p=i(6).a.vec2,g=[[0,0],[1,1]],m=h.a.extend((function(){return{segmentScale:4,dynamic:!0,useNativeLine:!0,attributes:{position:new h.a.Attribute("position","float",2,"POSITION"),normal:new h.a.Attribute("normal","float",2),offset:new h.a.Attribute("offset","float",1),color:new h.a.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.offset.init(t),e.normal.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,i,n){return 1/(p.dist(t,e)+p.dist(i,e)+p.dist(n,i)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?2*a:2*a+2},getCubicCurveTriangleCount:function(t,e,i,n){var r=this._getCubicCurveApproxStep(t,e,i,n),a=Math.ceil(1/r);return this.useNativeLine?0:2*a},getLineVertexCount:function(){return this.getPolylineVertexCount(g)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(g)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,i,n,r,a){null==a&&(a=1);var o=t[0],s=t[1],l=e[0],u=e[1],h=i[0],c=i[1],d=n[0],f=n[1],p=this._getCubicCurveApproxStep(t,e,i,n),g=p*p,m=g*p,v=3*p,_=3*g,y=6*g,x=6*m,b=o-2*l+h,w=s-2*u+c,T=3*(l-h)-o+d,S=3*(u-c)-s+f,M=o,A=s,C=(l-o)*v+b*_+T*m,I=(u-s)*v+w*_+S*m,L=b*y+T*x,E=w*y+S*x,P=T*x,D=S*x,O=0,R=0,N=Math.ceil(1/p),k=new Float32Array(3*(N+1)),z=(k=[],0);for(R=0;R1&&(M=C>0?Math.min(M,d):Math.max(M,d),A=I>0?Math.min(A,f):Math.max(A,f));this.addPolyline(k,r,a)},addLine:function(t,e,i,n){this.addPolyline([t,e],i,n)},addPolyline:(n=p.create(),r=p.create(),a=p.create(),o=p.create(),s=[],l=[],u=[],function(t,e,i,h,c){if(t.length){var d="number"!=typeof t[0];if(null==c&&(c=d?t.length:t.length/2),!(c<2)){null==h&&(h=0),null==i&&(i=1),this._itemVertexOffsets.push(this._vertexOffset);for(var f,g=d?"number"!=typeof e[0]:e.length/4===c,m=this.attributes.position,v=this.attributes.color,_=this.attributes.offset,y=this.attributes.normal,x=this.indices,b=this._vertexOffset,w=0;w1&&(m.copy(b,b-1),v.copy(b,b-1),b++);else{var M;if(w0){p.sub(n,s,u),p.sub(r,l,s),p.normalize(n,n),p.normalize(r,r),p.add(o,n,r),p.normalize(o,o);var A=i/2*Math.min(1/p.dot(n,o),2);a[0]=-o[1],a[1]=o[0],M=A}else p.sub(n,l,s),p.normalize(n,n),a[0]=-n[1],a[1]=n[0],M=i/2;else p.sub(n,s,u),p.normalize(n,n),a[0]=-n[1],a[1]=n[0],M=i/2;y.set(b,a),y.set(b+1,a),_.set(b,M),_.set(b+1,-M),p.copy(u,s),m.set(b,s),m.set(b+1,s),v.set(b,f),v.set(b+1,f),b+=2}if(this.useNativeLine)v.set(b,f),m.set(b,s),b++;else if(w>0){var C=3*this._faceOffset;(x=this.indices)[C]=b-4,x[C+1]=b-3,x[C+2]=b-2,x[C+3]=b-3,x[C+4]=b-1,x[C+5]=b-2,this._faceOffset+=2}}this._vertexOffset=b}}}),setItemColor:function(t,e){for(var i=this._itemVertexOffsets[t],n=tt&&o=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var i=this.zr;t.scene.traverse((function(t){t.__zr=i,t.addAnimatorsToZr&&t.addAnimatorsToZr(i)}))}},d.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(f,this),t.layer=null,this._viewsToDispose.push(t))}},d.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(f,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},d.prototype.resize=function(t,e){this.renderer.resize(t,e)},d.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},d.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},d.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},d.prototype.needsRefresh=function(){this.zr.refresh()},d.prototype.refresh=function(t){this._backgroundColor=t?l.a.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var n=this.pickObject(t.offsetX,t.offsetY);n&&(this._dispatchEvent(t.type,t,n),this._dispatchDataEvent(t.type,t,n));var r=this._clickToSetFocusPoint(t);r&&r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},d.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,i=e.viewport,n=this.views.length-1;n>=0;n--){var r=this.views[n];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var a=this._picking.pick(t.offsetX,t.offsetY,!0);if(a)return a.view=r,a}}e.viewport=i},d.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},d.prototype.pickObject=function(t,e){for(var i=[],n=this.renderer,r=n.viewport,a=0;a=0&&(l.dataIndex=this._lastDataIndex,l.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0):null!=o&&o!==this._lastEventData&&(null!=this._lastEventData&&(l.eventData=this._lastEventData,this.zr.handler.dispatchToElement(u,"mouseout",e)),s=!0),this._lastEventData=o,this._lastDataIndex=r,this._lastSeriesIndex=a),l.eventData=o,l.dataIndex=r,l.seriesIndex=a,(null!=o||parseInt(r,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(u,t,e),s&&this.zr.handler.dispatchToElement(u,"mouseover",e))},d.prototype._dispatchToView=function(t,e){for(var i=0;i=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}}},function(t,e,i){"use strict";var n=i(69),r={},a={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function s(t){return t<0?0:t>1?1:t}function l(t){return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100*255):o(parseInt(t,10))}function u(t){return t.length&&"%"===t.charAt(t.length-1)?s(parseFloat(t)/100):s(parseFloat(t))}function h(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function c(t,e,i){return t+(e-t)*i}function d(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new n.a(20),g=null;function m(t,e){g&&f(g,e),g=p.put(t,g||e.slice())}function v(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=u(t[1]),r=u(t[2]),a=r<=.5?r*(n+1):r+n-r*n,s=2*r-a;return d(e=e||[],o(255*h(s,a,i+1/3)),o(255*h(s,a,i)),o(255*h(s,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}r.parse=function(t,e){if(t){e=e||[];var i=p.get(t);if(i)return f(e,i);var n,r=(t+="").replace(/ /g,"").toLowerCase();if(r in a)return f(e,a[r]),m(t,e),e;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(d(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),m(t,e),e):void d(e,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(d(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),m(t,e),e):void d(e,0,0,0,1):void 0;var o=r.indexOf("("),s=r.indexOf(")");if(-1!==o&&s+1===r.length){var h=r.substr(0,o),c=r.substr(o+1,s-(o+1)).split(","),g=1;switch(h){case"rgba":if(4!==c.length)return void d(e,0,0,0,1);g=u(c.pop());case"rgb":return 3!==c.length?void d(e,0,0,0,1):(d(e,l(c[0]),l(c[1]),l(c[2]),g),m(t,e),e);case"hsla":return 4!==c.length?void d(e,0,0,0,1):(c[3]=u(c[3]),v(c,e),m(t,e),e);case"hsl":return 3!==c.length?void d(e,0,0,0,1):(v(c,e),m(t,e),e);default:return}}d(e,0,0,0,1)}},r.parseToFloat=function(t,e){if(e=r.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},r.lift=function(t,e){var i=r.parse(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return r.stringify(i,4===i.length?"rgba":"rgb")}},r.toHex=function(t){var e=r.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},r.fastLerp=function(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),l=e[r],u=e[a],h=n-r;return i[0]=o(c(l[0],u[0],h)),i[1]=o(c(l[1],u[1],h)),i[2]=o(c(l[2],u[2],h)),i[3]=s(c(l[3],u[3],h)),i}},r.fastMapToColor=r.fastLerp,r.lerp=function(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),a=Math.floor(n),l=Math.ceil(n),u=r.parse(e[a]),h=r.parse(e[l]),d=n-a,f=r.stringify([o(c(u[0],h[0],d)),o(c(u[1],h[1],d)),o(c(u[2],h[2],d)),s(c(u[3],h[3],d))],"rgba");return i?{color:f,leftIndex:a,rightIndex:l,value:n}:f}},r.mapToColor=r.lerp,r.modifyHSL=function(t,e,i,n){if(t=r.parse(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(a=e,(a=Math.round(a))<0?0:a>360?360:a)),null!=i&&(t[1]=u(i)),null!=n&&(t[2]=u(n)),r.stringify(v(t),"rgba");var a},r.modifyAlpha=function(t,e){if((t=r.parse(t))&&null!=e)return t[3]=s(e),r.stringify(t,"rgba")},r.stringify=function(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}},e.a=r},function(t,e,i){"use strict";var n=function(){this.head=null,this.tail=null,this._length=0};n.prototype.insert=function(t){var e=new n.Entry(t);return this.insertEntry(e),e},n.prototype.insertAt=function(t,e){if(!(t<0)){for(var i=this.head,r=0;i&&r!=t;)i=i.next,r++;if(i){var a=new n.Entry(e),o=i.prev;o?(o.next=a,a.prev=o):this.head=a,a.next=i,i.prev=a}else this.insert(e)}},n.prototype.insertBeforeEntry=function(t,e){var i=new n.Entry(t),r=e.prev;r?(r.next=i,i.prev=r):this.head=i,i.next=e,e.prev=i,this._length++},n.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},n.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._length--},n.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,i=0;e&&i!=t;)e=e.next,i++;return e?(this.remove(e),e.value):void 0}},n.prototype.getHead=function(){if(this.head)return this.head.value},n.prototype.getTail=function(){if(this.tail)return this.tail.value},n.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,i=0;e&&i!=t;)e=e.next,i++;return e.value}},n.prototype.indexOf=function(t){for(var e=this.head,i=0;e;){if(e.value===t)return i;e=e.next,i++}},n.prototype.length=function(){return this._length},n.prototype.isEmpty=function(){return 0===this._length},n.prototype.forEach=function(t,e){for(var i=this.head,n=0,r=void 0!==e;i;)r?t.call(e,i.value,n):t(i.value,n),i=i.next,n++},n.prototype.clear=function(){this.tail=this.head=null,this._length=0},n.Entry=function(t){this.value=t,this.next=null,this.prev=null},e.a=n},function(t,e,i){"use strict";var n=i(116),r=/for\s*?\(int\s*?_idx_\s*\=\s*([\w-]+)\;\s*_idx_\s*<\s*([\w-]+);\s*_idx_\s*\+\+\s*\)\s*\{\{([\s\S]+?)(?=\}\})\}\}/g;function a(t,e,i){var n={};for(var a in i)n[a+"_COUNT"]=i[a];return t.replace(r,(function(t,i,r,a){var o="";isNaN(i)&&(i=i in e?e[i]:n[i]),isNaN(r)&&(r=r in e?e[r]:n[r]);for(var s=parseInt(i);s0&&n.push("#define "+r.toUpperCase()+"_COUNT "+a)}if(i)for(var o=0;oh.getMaxJointNumber()&&(p.USE_SKIN_MATRICES_TEXTURE=null),f="\n"+o(p)+"\n"}var g=f+o(e.vertexDefines,u,d),m=f+o(e.fragmentDefines,u,d),v=g+"\n"+e.shader.vertex,_=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=h.getGLExtension(t)}));_.indexOf("EXT_shader_texture_lod")>=0&&(m+="\n#define SUPPORT_TEXTURE_LOD"),_.indexOf("OES_standard_derivatives")>=0&&(m+="\n#define SUPPORT_STANDARD_DERIVATIVES");var y,x,b=function(t){for(var e=[],i=0;i=0&&A[S]>1e-4&&(g.a.transformMat4(L,M,w[C[S]]),g.a.scaleAndAdd(I,I,L,A[S]));E.set(T,I)}}for(T=0;T<_.length;T+=3){var P=_[T],D=_[T+1],O=_[T+2],R=i?l.attributes.skinnedPosition:y;if(R.get(P,n.array),R.get(D,r.array),R.get(O,a.array),h=v?o.intersectTriangle(n,r,a,t.culling):o.intersectTriangle(n,a,r,t.culling)){var N=new c.a;i?c.a.copy(N,h):c.a.transformMat4(N,h,t.worldTransform),e.push(new m.Intersection(h,N,t,[P,D,O],T/3,c.a.dist(N,this._ray.origin)))}}}}}),_intersectionCompareFunc:function(t,e){return t.distance-e.distance}});m.Intersection=function(t,e,i,n,r,a){this.point=t,this.pointWorld=e,this.target=i,this.triangle=n,this.triangleIndex=r,this.distance=a},e.a=m},function(t,e,i){"use strict";var n=i(7),r=i(11),a=i(57),o=i(14);function s(t){return{byte:o.a.Int8Array,ubyte:o.a.Uint8Array,short:o.a.Int16Array,ushort:o.a.Uint16Array}[t]||o.a.Float32Array}function l(t){return"attr_"+t}function u(t,e,i,n){switch(this.name=t,this.type=e,this.size=i,this.semantic=n||"",this.value=null,i){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var i=this.value;return e[0]=i[2*t],e[1]=i[2*t+1],e},this.set=function(t,e){var i=this.value;i[2*t]=e[0],i[2*t+1]=e[1]},this.copy=function(t,e){var i=this.value;e*=2,i[t*=2]=i[e],i[t+1]=i[e+1]};break;case 3:this.get=function(t,e){var i=3*t,n=this.value;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e},this.set=function(t,e){var i=3*t,n=this.value;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2]},this.copy=function(t,e){var i=this.value;e*=3,i[t*=3]=i[e],i[t+1]=i[e+1],i[t+2]=i[e+2]};break;case 4:this.get=function(t,e){var i=this.value,n=4*t;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e[3]=i[n+3],e},this.set=function(t,e){var i=this.value,n=4*t;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2],i[n+3]=e[3]},this.copy=function(t,e){var i=this.value;e*=4,i[t*=4]=i[e],i[t+1]=i[e+1],i[t+2]=i[e+2],i[t+3]=i[e+3]}}}function h(t,e,i,n,r){this.name=t,this.type=e,this.buffer=i,this.size=n,this.semantic=r,this.symbol="",this.needsRemove=!1}function c(t){this.buffer=t,this.count=0}u.prototype.init=function(t){if(!this.value||this.value.length!=t*this.size){var e=s(this.type);this.value=new e(t*this.size)}},u.prototype.fromArray=function(t){var e,i=s(this.type);if(t[0]&&t[0].length){var n=0,r=this.size;e=new i(t.length*r);for(var a=0;a=0){e||(e=[]);var i=this.indices;return e[0]=i[3*t],e[1]=i[3*t+1],e[2]=i[3*t+2],e}},setTriangleIndices:function(t,e){var i=this.indices;i[3*t]=e[0],i[3*t+1]=e[1],i[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,i=this.vertexCount>65535?o.a.Uint32Array:o.a.Uint16Array;if(t[0]&&t[0].length){var n=0;e=new i(3*t.length);for(var r=0;r=0&&(e.splice(i,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var i=[],n=this.vertexCount,r=0;r0){var r=Math.pow(2,t[3]-128-8+n);e[i+0]=t[0]*r,e[i+1]=t[1]*r,e[i+2]=t[2]*r}else e[i+0]=0,e[i+1]=0,e[i+2]=0;return e[i+3]=1,e}function s(t,e,i,n){for(var r,a,o=0,s=0,l=n;l>0;)if(t[s][0]=e[i++],t[s][1]=e[i++],t[s][2]=e[i++],t[s][3]=e[i++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(a=t[s])[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],s++,l--;o+=8}else s++,l--,o=0;return i}function l(t,e,i,n){if(n<8|n>32767)return s(t,e,i,n);if(2!=(r=e[i++]))return s(t,e,i-1,n);if(t[0][1]=e[i++],t[0][2]=e[i++],r=e[i++],(t[0][2]<<8>>>0|r)>>>0!==n)return null;for(var r=0;r<4;r++)for(var a=0;a128){o=(127&o)>>>0;for(var l=e[i++];o--;)t[a++][r]=l}else for(;o--;)t[a++][r]=e[i++]}return i}var u={parseRGBE:function(t,e,i){null==i&&(i=0);var s=new Uint8Array(t),u=s.length;if("#?"===function(t,e,i){for(var n="",r=e;r=u)){h+=2;for(var c="";h=0||(o.forEach((function(e){t.on(e,this[s(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),o.forEach((function(e){t.off(e,this[s(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}},e.a=m},function(t,e,i){"use strict";var n=i(24),r=i(77),a=n.a.extend({cubemap:null,castShadow:!1,_normalDistribution:null,_brdfLookup:null},{type:"AMBIENT_CUBEMAP_LIGHT",prefilter:function(t,e){if(t.getGLExtension("EXT_shader_texture_lod")){this._brdfLookup||(this._normalDistribution=r.a.generateNormalDistribution(),this._brdfLookup=r.a.integrateBRDF(t,this._normalDistribution));var i=this.cubemap;if(!i.__prefiltered){var n=r.a.prefilterEnvironmentMap(t,i,{encodeRGBM:!0,width:e,height:e},this._normalDistribution,this._brdfLookup);this.cubemap=n.environmentMap,this.cubemap.__prefiltered=!0,i.dispose(t)}}else console.warn("Device not support textureCubeLodEXT")},getBRDFLookup:function(){return this._brdfLookup},uniformTemplates:{ambientCubemapLightColor:{type:"3f",value:function(t){var e=t.color,i=t.intensity;return[e[0]*i,e[1]*i,e[2]*i]}},ambientCubemapLightCubemap:{type:"t",value:function(t){return t.cubemap}},ambientCubemapLightBRDFLookup:{type:"t",value:function(t){return t._brdfLookup}}}});e.a=a},function(t,e,i){"use strict";e.a="\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end"},function(t,e,i){"use strict";e.a="#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform sampler2D normalDistribution;\nuniform vec2 viewportSize : [512, 256];\nconst vec3 N = vec3(0.0, 0.0, 1.0);\nconst float fSampleNumber = float(SAMPLE_NUMBER);\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"},function(t,e,i){"use strict";e.a="#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"},function(t,e,i){"use strict";var n=i(24),r=i(14),a=n.a.extend({castShadow:!1,coefficients:[]},(function(){this._coefficientsTmpArr=new r.a.Float32Array(27)}),{type:"AMBIENT_SH_LIGHT",uniformTemplates:{ambientSHLightColor:{type:"3f",value:function(t){var e=t.color,i=t.intensity;return[e[0]*i,e[1]*i,e[2]*i]}},ambientSHLightCoefficients:{type:"3f",value:function(t){for(var e=t._coefficientsTmpArr,i=0;i65535?Uint32Array:Uint16Array,y=this.indices=new _(e*t*6),x=this.radius,b=this.phiStart,w=this.phiLength,T=this.thetaStart,S=this.thetaLength,M=[],A=[],C=0,I=1/(x=this.radius);for(f=0;f<=t;f++)for(d=0;d<=e;d++)h=d/e,c=f/t,s=-x*Math.cos(b+h*w)*Math.sin(T+c*S),l=x*Math.cos(T+c*S),u=x*Math.sin(b+h*w)*Math.sin(T+c*S),M[0]=s,M[1]=l,M[2]=u,A[0]=h,A[1]=c,i.set(C,M),n.set(C,A),M[0]*=I,M[1]*=I,M[2]*=I,a.set(C,M),C++;var L=e+1,E=0;for(f=0;f=0&&l.splice(t,1)})),l.push(u),this.__zr&&this.__zr.animation.addAnimator(u),u},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,i=e.length,n=0;n.5?e:t}function c(t,e,i,n,r){var a=t.length;if(1==r)for(var o=0;or)t.length=r;else for(var a=n;a=0&&!(C[i]<=e);i--);i=Math.min(i,x-2)}else{for(i=V;ie);i++);i=Math.min(i-1,x-2)}V=i,G=e;var n=C[i+1]-C[i];if(0!==n)if(N=(e-C[i])/n,y)if(z=I[i],k=I[0===i?i:i-1],B=I[i>x-2?x-1:i+1],F=I[i>x-3?x-1:i+2],T)p(k,z,B,F,N,N*N,N*N*N,m(t,s),A);else{if(S)r=p(k,z,B,F,N,N*N,N*N*N,H,1),r=v(H);else{if(M)return h(z,B,N);r=g(k,z,B,F,N,N*N,N*N*N)}_(t,s,r)}else if(T)c(I[i],I[i+1],N,m(t,s),A);else{var r;if(S)c(I[i],I[i+1],N,H,1),r=v(H);else{if(M)return h(I[i],I[i+1],N);r=u(I[i],I[i+1],N)}_(t,s,r)}},ondestroy:i});return e&&"spline"!==e&&(U.easing=e),U}}}var y=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||s,this._setter=n||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};y.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:m(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t255?255:t}function o(t){return t<0?0:t>1?1:t}function s(t){return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function l(t){return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100):o(parseFloat(t))}function u(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function h(t,e,i){return t+(e-t)*i}function c(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var f=new n(20),p=null;function g(t,e){p&&d(p,e),p=f.put(t,p||e.slice())}function m(t,e){if(t){e=e||[];var i=f.get(t);if(i)return d(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in r)return d(e,r[a]),g(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(c(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),g(t,e),e):void c(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(c(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),g(t,e),e):void c(e,0,0,0,1):void 0;var o=a.indexOf("("),u=a.indexOf(")");if(-1!==o&&u+1===a.length){var h=a.substr(0,o),p=a.substr(o+1,u-(o+1)).split(","),m=1;switch(h){case"rgba":if(4!==p.length)return void c(e,0,0,0,1);m=l(p.pop());case"rgb":return 3!==p.length?void c(e,0,0,0,1):(c(e,s(p[0]),s(p[1]),s(p[2]),m),g(t,e),e);case"hsla":return 4!==p.length?void c(e,0,0,0,1):(p[3]=l(p[3]),v(p,e),g(t,e),e);case"hsl":return 3!==p.length?void c(e,0,0,0,1):(v(p,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=l(t[1]),r=l(t[2]),o=r<=.5?r*(n+1):r+n-r*n,s=2*r-o;return c(e=e||[],a(255*u(s,o,i+1/3)),a(255*u(s,o,i)),a(255*u(s,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function _(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=e[r],u=e[s],c=n-r;return i[0]=a(h(l[0],u[0],c)),i[1]=a(h(l[1],u[1],c)),i[2]=a(h(l[2],u[2],c)),i[3]=o(h(l[3],u[3],c)),i}}var y=_;function x(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),s=Math.ceil(n),l=m(e[r]),u=m(e[s]),c=n-r,d=w([a(h(l[0],u[0],c)),a(h(l[1],u[1],c)),a(h(l[2],u[2],c)),o(h(l[3],u[3],c))],"rgba");return i?{color:d,leftIndex:r,rightIndex:s,value:n}:d}}var b=x;function w(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}e.parse=m,e.lift=function(t,e){var i=m(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return w(i,4===i.length?"rgba":"rgb")}},e.toHex=function(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},e.fastLerp=_,e.fastMapToColor=y,e.lerp=x,e.mapToColor=b,e.modifyHSL=function(t,e,i,n){if(t=m(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(t[1]=l(i)),null!=n&&(t[2]=l(n)),w(v(t),"rgba");var r},e.modifyAlpha=function(t,e){if((t=m(t))&&null!=e)return t[3]=o(e),w(t,"rgba")},e.stringify=w},function(t,e,i){"use strict";e.a="\n@export clay.util.rand\nhighp float rand(vec2 uv) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(uv.xy, vec2(a,b)), sn = mod(dt, 3.141592653589793);\n return fract(sin(sn) * c);\n}\n@end\n@export clay.util.calculate_attenuation\nuniform float attenuationFactor : 5.0;\nfloat lightAttenuation(float dist, float range)\n{\n float attenuation = 1.0;\n attenuation = dist*dist/(range*range+1.0);\n float att_s = attenuationFactor;\n attenuation = 1.0/(attenuation*att_s+1.0);\n att_s = 1.0/(att_s+1.0);\n attenuation = attenuation - att_s;\n attenuation /= 1.0 - att_s;\n return clamp(attenuation, 0.0, 1.0);\n}\n@end\n@export clay.util.edge_factor\n#ifdef SUPPORT_STANDARD_DERIVATIVES\nfloat edgeFactor(float width)\n{\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * width, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#else\nfloat edgeFactor(float width)\n{\n return 1.0;\n}\n#endif\n@end\n@export clay.util.encode_float\nvec4 encodeFloat(const in float depth)\n{\n const vec4 bitShifts = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\n const vec4 bit_mask = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\n vec4 res = fract(depth * bitShifts);\n res -= res.xxyz * bit_mask;\n return res;\n}\n@end\n@export clay.util.decode_float\nfloat decodeFloat(const in vec4 color)\n{\n const vec4 bitShifts = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);\n return dot(color, bitShifts);\n}\n@end\n@export clay.util.float\n@import clay.util.encode_float\n@import clay.util.decode_float\n@end\n@export clay.util.rgbm_decode\nvec3 RGBMDecode(vec4 rgbm, float range) {\n return range * rgbm.rgb * rgbm.a;\n}\n@end\n@export clay.util.rgbm_encode\nvec4 RGBMEncode(vec3 color, float range) {\n if (dot(color, color) == 0.0) {\n return vec4(0.0);\n }\n vec4 rgbm;\n color /= range;\n rgbm.a = clamp(max(max(color.r, color.g), max(color.b, 1e-6)), 0.0, 1.0);\n rgbm.a = ceil(rgbm.a * 255.0) / 255.0;\n rgbm.rgb = color / rgbm.a;\n return rgbm;\n}\n@end\n@export clay.util.rgbm\n@import clay.util.rgbm_decode\n@import clay.util.rgbm_encode\nvec4 decodeHDR(vec4 color)\n{\n#if defined(RGBM_DECODE) || defined(RGBM)\n return vec4(RGBMDecode(color, 8.12), 1.0);\n#else\n return color;\n#endif\n}\nvec4 encodeHDR(vec4 color)\n{\n#if defined(RGBM_ENCODE) || defined(RGBM)\n return RGBMEncode(color.xyz, 8.12);\n#else\n return color;\n#endif\n}\n@end\n@export clay.util.srgb\nvec4 sRGBToLinear(in vec4 value) {\n return vec4(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))), value.w);\n}\nvec4 linearTosRGB(in vec4 value) {\n return vec4(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))), value.w);\n}\n@end\n@export clay.chunk.skinning_header\n#ifdef SKINNING\nattribute vec3 weight : WEIGHT;\nattribute vec4 joint : JOINT;\n#ifdef USE_SKIN_MATRICES_TEXTURE\nuniform sampler2D skinMatricesTexture : ignore;\nuniform float skinMatricesTextureSize: ignore;\nmat4 getSkinMatrix(sampler2D tex, float idx) {\n float j = idx * 4.0;\n float x = mod(j, skinMatricesTextureSize);\n float y = floor(j / skinMatricesTextureSize) + 0.5;\n vec2 scale = vec2(skinMatricesTextureSize);\n return mat4(\n texture2D(tex, vec2(x + 0.5, y) / scale),\n texture2D(tex, vec2(x + 1.5, y) / scale),\n texture2D(tex, vec2(x + 2.5, y) / scale),\n texture2D(tex, vec2(x + 3.5, y) / scale)\n );\n}\nmat4 getSkinMatrix(float idx) {\n return getSkinMatrix(skinMatricesTexture, idx);\n}\n#else\nuniform mat4 skinMatrix[JOINT_COUNT] : SKIN_MATRIX;\nmat4 getSkinMatrix(float idx) {\n return skinMatrix[int(idx)];\n}\n#endif\n#endif\n@end\n@export clay.chunk.skin_matrix\nmat4 skinMatrixWS = getSkinMatrix(joint.x) * weight.x;\nif (weight.y > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end"},function(t,e,i){"use strict";e.a="\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"},function(t,e,i){"use strict";e.a="@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"},function(t,e,i){"use strict";e.a="/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(t,e,i){"use strict";e.a="@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"},function(t,e,i){"use strict";e.a="@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"},function(t,e,i){"use strict";e.a="@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end"},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=["bar3D","line3D","map3D","scatter3D","surface","lines3D","scatterGL","scatter3D"];function o(t,e){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,n=t[e].emphasis;i&&(t[e]=i),n&&(t.emphasis=t.emphasis||{},t.emphasis[e]=n)}}function s(t){t&&(t instanceof Array||(t=[t]),r.a.util.each(t,(function(t){if(t.axisLabel){var e=t.axisLabel;r.a.util.extend(e,e.textStyle),e.textStyle=null}})))}e.a=function(t){r.a.util.each(t.series,(function(e){r.a.util.indexOf(a,e.type)>=0&&(function(t){o(t,"itemStyle"),o(t,"lineStyle"),o(t,"areaStyle"),o(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),s(t.xAxis3D),s(t.yAxis3D),s(t.zAxis3D),s(t.grid3D),o(t.geo3D)}},function(t,e,i){"use strict";i(155),i(159),i(160),i(167);var n=i(0),r=i.n(n);r.a.registerAction({type:"grid3DChangeCamera",event:"grid3dcamerachanged",update:"series:updateCamera"},(function(t,e){e.eachComponent({mainType:"grid3D",query:t},(function(e){e.setView(t)}))})),r.a.registerAction({type:"grid3DShowAxisPointer",event:"grid3dshowaxispointer",update:"grid3D:showAxisPointer"},(function(t,e){})),r.a.registerAction({type:"grid3DHideAxisPointer",event:"grid3dhideaxispointer",update:"grid3D:hideAxisPointer"},(function(t,e){}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(156),o=r.a.extendComponentModel({type:"cartesian3DAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid3D",index:this.option.gridIndex,id:this.option.gridId})[0]}});function s(t,e){return e.type||(e.data?"category":"value")}r.a.helper.mixinAxisModelCommonMethods(o),Object(a.a)("x",o,s,{name:"X"}),Object(a.a)("y",o,s,{name:"Y"}),Object(a.a)("z",o,s,{name:"Z"})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(157),o=i(158),s=i.n(o),l=["value","category","time","log"];e.a=function(t,e,i,n){r.a.util.each(l,(function(o){e.extend({type:t+"Axis3D."+o,__ordinalMeta:null,mergeDefaultAndTheme:function(e,n){var a=n.getTheme();r.a.util.merge(e,a.get(o+"Axis3D")),r.a.util.merge(e,this.getDefaultOption()),e.type=i(t,e)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=s.a.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r.a.util.merge(r.a.util.clone(a.a[o+"Axis3D"]),n||{},!0)})})),e.superClass.registerSubTypeDefaulter(t+"Axis3D",r.a.util.curry(i,t))}},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a={show:!0,grid3DIndex:0,inverse:!1,name:"",nameLocation:"middle",nameTextStyle:{fontSize:16},nameGap:20,axisPointer:{},axisLine:{},axisTick:{},axisLabel:{},splitArea:{}},o=r.a.util.merge({boundaryGap:!0,axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"},axisPointer:{label:{show:!1}}},a),s=r.a.util.merge({boundaryGap:[0,0],splitNumber:5,axisPointer:{label:{}}},a),l=r.a.util.defaults({scale:!0,min:"dataMin",max:"dataMax"},s),u=r.a.util.defaults({logBase:10},s);u.scale=!0,e.a={categoryAxis3D:o,valueAxis3D:s,timeAxis3D:l,logAxis3D:u}},function(t,e,i){var n=i(13),r=n.createHashMap,a=n.isObject,o=n.map;function s(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}s.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&o(i,h);return new s({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var l=s.prototype;function u(t){return t._map||(t._map=r(t.categories))}function h(t){return a(t)&&null!=t.value?t.value:t+""}l.getOrdinal=function(t){return u(this).get(t)},l.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=u(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var c=s;t.exports=c},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(44),o=i(28),s=i(29),l=r.a.extendComponentModel({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});r.a.util.merge(l.prototype,a.a),r.a.util.merge(l.prototype,o.a),r.a.util.merge(l.prototype,s.a)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(45),s=i(25),l=i(2),u=i(81),h=i(30),c=i(162),d=i(164),f=i(63),p=i(46),g=l.a.firstNotNull;a.a.Shader.import(p.a),["x","y","z"].forEach((function(t){r.a.extendComponentView({type:t+"Axis3D"})}));var m={x:0,y:2,z:1};r.a.extendComponentView({type:"grid3D",__ecgl__:!0,init:function(t,e){var i=new a.a.Material({shader:a.a.createShader("ecgl.color"),depthMask:!1,transparent:!0}),n=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});i.define("fragment","DOUBLE_SIDED"),i.define("both","VERTEX_COLOR"),this.groupGL=new a.a.Node,this._control=new o.a({zr:e.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(t){var e=new c.a(t,n,i);return this.groupGL.add(e.rootNode),e}),this),this._axes=["x","y","z"].map((function(t){var e=new d.a(t,n);return this.groupGL.add(e.rootNode),e}),this);var r=e.getDevicePixelRatio();this._axisLabelSurface=new u.a({width:256,height:256,devicePixelRatio:r}),this._axisLabelSurface.onupdate=function(){e.getZr().refresh()},this._axisPointerLineMesh=new a.a.Mesh({geometry:new s.a({useNativeLine:!1}),material:n,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new u.a({width:128,height:128,devicePixelRatio:r}),this._axisPointerLabelsMesh=new f.a({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new a.a.Node,this._sceneHelper=new h.a,this._sceneHelper.initLight(this._lightRoot)},render:function(t,e,i){this._model=t,this._api=i;var n=t.coordinateSystem;n.viewGL.add(this._lightRoot),t.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(n.viewGL);var a=t.getModel("viewControl");r.setFromViewControlModel(a,0),this._axisLabelSurface.clear(),r.off("update"),t.get("show")&&(this._faces.forEach((function(n){n.update(t,e,i)}),this),this._axes.forEach((function(e){e.update(t,this._axisLabelSurface,i)}),this)),r.on("update",this._onCameraChange.bind(this,t,i),this),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(t),n.viewGL.setPostEffect(t.getModel("postEffect"),i),n.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._initMouseHandler(t)},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i)},showAxisPointer:function(t,e,i,n){this._doShowAxisPointer(),this._updateAxisPointer(n.value)},hideAxisPointer:function(t,e,i,n){this._doHideAxisPointer()},_initMouseHandler:function(t){var e=t.coordinateSystem.viewGL;t.get("show")&&t.get("axisPointer.show")?e.on("mousemove",this._updateAxisPointerOnMousePosition,this):e.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(t){if(!t.target){for(var e,i=this._model.coordinateSystem,n=i.viewGL,r=n.castRay(t.offsetX,t.offsetY,new a.a.Ray),o=0;on[1]?0:1,s=this._faces[2*i+o],l=this._faces[2*i+1-o];s.rootNode.invisible=!0,l.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),i=t.getAxis("y"),n=t.getAxis("z"),r=n.getExtentMax(),a=n.getExtentMin(),o=e.getExtentMin(),s=e.getExtentMax(),l=i.getExtentMax(),u=i.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,f=this._faces,p=f[4].rootNode.invisible?u:l,g=f[2].rootNode.invisible?r:a,m=f[0].rootNode.invisible?o:s,v=f[2].rootNode.invisible?r:a,_=f[0].rootNode.invisible?s:o,y=f[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),f[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),f[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),f[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,g,p),c.position.set(m,v,0),d.position.set(_,0,y),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new a.a.Vector4,new a.a.Vector4],i=new a.a.Vector4;this.groupGL.getWorldPosition(i),i.w=1,i.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),i.x/=i.w,i.y/=i.w,this._axes.forEach((function(n){for(var r=n.axisLineCoords,a=(n.labelsMesh.geometry,0);ai.y?"bottom":"top"):(s="middle",o=h>i.x?"left":"right"),n.setSpriteAlign(o,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,i=e.dataToPoint(t),n=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function s(t){return l.a.firstNotNull(t.model.get("axisPointer.show"),r.get("show"))}function u(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),i=a.a.parseColor(e.get("color")),n=g(e.get("width"),1),o=g(e.get("opacity"),1);return i[3]*=o,{color:i,lineWidth:n}}n.convertToDynamicArray(!0);for(var h=0;h0&&t.rotation.rotateY(Math.PI),e.normal.z=-n)}(this.rootNode,this.plane,s,this.faceInfo[3])},c.prototype._updateSplitLines=function(t,e,i,n){var o=n.getDevicePixelRatio();e.forEach((function(n,s){var l=n.model,h=e[1-s].getExtent();if(!n.scale.isBlank()){var c=l.getModel("splitLine",i.getModel("splitLine"));if(c.get("show")){var d=c.getModel("lineStyle"),f=d.get("color"),p=u(d.get("opacity"),1),g=u(d.get("width"),1);f=r.a.util.isArray(f)?f:[f];for(var m=n.getTicksCoords({tickModel:c}),v=0,_=0;_65535?new Uint32Array(3*n):new Uint16Array(3*n))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:(n=c.create(),r=c.create(),a=c.create(),o=[0,3,1,3,2,1],function(t,e){var i=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;c.sub(n,t[1],t[0]),c.sub(r,t[2],t[1]),c.cross(a,n,r),c.normalize(a,a);for(var u=0;u<4;u++)i.set(this._vertexOffset+u,t[u]),l.set(this._vertexOffset+u,e),s.set(this._vertexOffset+u,a);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=o[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2})});u.a.util.defaults(d.prototype,h.a),e.a=d},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(25),s=i(2),l=i(63),u=s.a.firstNotNull,h={x:0,y:2,z:1};function c(t,e){var i=new a.a.Mesh({geometry:new o.a({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,renderOrder:2}),n=new l.a;n.material.depthMask=!1;var r=new a.a.Node;r.add(i),r.add(n),this.rootNode=r,this.dim=t,this.linesMesh=i,this.labelsMesh=n,this.axisLineCoords=null,this.labelElements=[]}var d={x:"y",y:"x",z:"y"};c.prototype.update=function(t,e,i){var n=t.coordinateSystem.getAxis(this.dim),o=this.linesMesh.geometry,s=this.labelsMesh.geometry;o.convertToDynamicArray(!0),s.convertToDynamicArray(!0);var l=n.model,c=n.getExtent(),f=i.getDevicePixelRatio(),p=l.getModel("axisLine",t.getModel("axisLine")),g=l.getModel("axisTick",t.getModel("axisTick")),m=l.getModel("axisLabel",t.getModel("axisLabel")),v=p.get("lineStyle.color");if(p.get("show")){var _=p.getModel("lineStyle"),y=[0,0,0];(L=[0,0,0])[E=h[n.dim]]=c[0],y[E]=c[1],this.axisLineCoords=[L,y];var x=a.a.parseColor(v),b=u(_.get("width"),1),w=u(_.get("opacity"),1);x[3]*=w,o.addLine(L,y,x,b*f)}if(g.get("show")){var T=g.getModel("lineStyle"),S=a.a.parseColor(u(T.get("color"),v));b=u(T.get("width"),1),S[3]*=u(T.get("opacity"),1);for(var M=n.getTicksCoords(),A=g.get("length"),C=0;C65535?new Uint32Array(3*i):new Uint16Array(3*i))},setSpriteAlign:function(t,e,i,n,r){var a,o,s,l;switch(null==i&&(i="left"),null==n&&(n="top"),r=r||0,i){case"left":a=r,s=e[0]+r;break;case"center":case"middle":a=-e[0]/2,s=e[0]/2;break;case"right":a=-e[0]-r,s=-r}switch(n){case"bottom":o=r,l=e[1]+r;break;case"middle":o=-e[1]/2,l=e[1]/2;break;case"top":o=-e[1]-r,l=-r}var u=4*t,h=this.attributes.offset;h.set(u,[a,l]),h.set(u+1,[s,l]),h.set(u+2,[s,o]),h.set(u+3,[a,o])},addSprite:function(t,e,i,n,r,a){var o=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,i,n,r,a);for(var l=0;l"'])/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"};function u(t){return null==t?"":(t+"").replace(s,(function(t,e){return l[e]}))}var h=["a","b","c","d","e","f","g"],c=function(t,e){return"{"+t+(null==e?"":e)+"}"};function d(t,e){return"0000".substr(0,e-(t+="").length)+t}var f=r.truncateText,p=r.getBoundingRect;e.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},e.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},e.normalizeCssArray=o,e.encodeHTML=u,e.formatTpl=function(t,e,i){n.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var a=e[0].$vars||[],o=0;o':'':""},e.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=a.parseDate(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),s=n["get"+r+"Month"]()+1,l=n["get"+r+"Date"](),u=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),c=n["get"+r+"Seconds"](),f=n["get"+r+"Milliseconds"]();return t=t.replace("MM",d(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",d(l,2)).replace("d",l).replace("hh",d(u,2)).replace("h",u).replace("mm",d(h,2)).replace("m",h).replace("ss",d(c,2)).replace("s",c).replace("SSS",d(f,3))},e.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},e.truncateText=f,e.getTextRect=p},function(t,e,i){var n=i(82),r=i(173),a=i(13),o=a.getContext,s=a.extend,l=a.retrieve2,u=a.retrieve3,h=a.trim,c={},d=0,f=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function g(t,e){var i=t+":"+(e=e||"12px sans-serif");if(c[i])return c[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a5e3&&(d=0,c={}),d++,c[i]=r,r}function m(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function v(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function _(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=y(e,i,n,r);for(var o=0,s=a.length;o=a;u++)o-=a;var h=g(i);return h>o&&(i="",h=0),o=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=o,n.containerWidth=t,n}function x(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=g(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?b(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=g(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function b(t,e,i,n){for(var r=0,a=0,o=t.length;al)t="",a=[];else if(null!=u)for(var h=y(u-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=a.length;ca&&A(i,t.substring(a,o)),A(i,n[2],n[1]),a=f.lastIndex}ay)return{lines:[],width:0,height:0};z.textWidth=g(z.text,L);var P=C.textWidth,D=null==P||"auto"===P;if("string"==typeof P&&"%"===P.charAt(P.length-1))z.percentWidth=P,d.push(z),P=0;else{if(D){P=z.textWidth;var O=C.textBackgroundColor,R=O&&O.image;R&&(R=r.findExistImage(R),r.isImageReady(R)&&(P=Math.max(P,R.width*E/R.height)))}var N=I?I[1]+I[3]:0;P+=N;var k=null!=v?v-S:null;null!=k&&k4){console.warn("Support at most 4 cascade");continue}p.shadowCascade>1&&(o=p),this.renderDirectionalLightShadow(t,e,i,p,c,h,u)}else"SPOT_LIGHT"===p.type?this.renderSpotLightShadow(t,e,p,l,s):"POINT_LIGHT"===p.type&&this.renderPointLightShadow(t,e,p,d);this._shadowMapNumber[p.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(f=0;f0?_.define("fragment",v,m):_.isDefined("fragment",v)&&_.undefine("fragment",v))}for(f=0;f0){var x=u.map(S);if(y.directionalLightShadowMaps={value:u,type:"tv"},y.directionalLightMatrices={value:h,type:"m4v"},y.directionalLightShadowMapSizes={value:x,type:"1fv"},o){var b=c.slice(),w=c.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),h.reverse(),y.shadowCascadeClipsNear={value:b,type:"1fv"},y.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var T=s.map(S);(y=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},y.spotLightMatrices={value:l,type:"m4v"},y.spotLightShadowMapSizes={value:T,type:"1fv"}}d.length>0&&(y.pointLightShadowMaps={value:d,type:"tv"})}function S(t){return t.height}},renderDirectionalLightShadow:(M=new s.a,A=new l.a,C=new o.a,I=new l.a,L=new l.a,E=new l.a,P=new l.a,function(t,e,i,n,r,a,o){var s=this._getDepthMaterial(n),h={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:S,getUniform:T,ifRender:function(t){return t.castShadow},sortCompare:u.a.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var c=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(c).applyTransform(i.viewMatrix)}var d=Math.min(-e.viewBoundingBoxLastFrame.min.z,i.far),f=Math.max(-e.viewBoundingBoxLastFrame.max.z,i.near),p=this._getDirectionalLightCamera(n,e,i),g=E.array;P.copy(p.projectionMatrix),x.a.invert(L.array,p.worldTransform.array),x.a.multiply(L.array,L.array,i.worldTransform.array),x.a.multiply(g,P.array,L.array);for(var v=[],_=i instanceof m.a,y=(i.near+i.far)/(i.near-i.far),b=2*i.near*i.far/(i.near-i.far),w=0;w<=n.shadowCascade;w++){var O=f*Math.pow(d/f,w/n.shadowCascade),R=f+(d-f)*w/n.shadowCascade,N=O*n.cascadeSplitLogFactor+R*(1-n.cascadeSplitLogFactor);v.push(N),r.push(-(-N*y+b)/-N)}var k=this._getTexture(n,n.shadowCascade);o.push(k);var z=t.viewport,B=t.gl;for(this._frameBuffer.attach(k),this._frameBuffer.bind(t),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT),w=0;wl?s>u?v[r>0?"px":"nx"]=!0:v[o>0?"pz":"nz"]=!0:l>u?v[a>0?"py":"ny"]=!0:v[o>0?"pz":"nz"]=!0}for(i=0;i=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=i.COLOR_ATTACHMENT0&&c<=i.COLOR_ATTACHMENT0+8&&h.push(c);u.drawBuffersEXT(h)}t.saveClear(),t.clearBit=r.a.DEPTH_BUFFER_BIT|r.a.COLOR_BUFFER_BIT,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),n.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}});e.a=o},function(t,e,i){"use strict";var n=i(48).a.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}});e.a=n},function(t,e,i){"use strict";var n=i(16),r=i(48),a=r.a.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new n.a({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var i=t.gl;for(var n in this.inputLinks){var r=(c=this.inputLinks[n]).node.getOutput(t,c.pin);this.pass.setUniform(n,r)}if(this.outputs){this.pass.outputs={};var a={};for(var o in this.outputs){var s=this.updateParameter(o,t);isNaN(s.width)&&this.updateParameter(o,t);var l=this.outputs[o],u=this._compositor.allocateTexture(s);this._outputTextures[o]=u,"string"==typeof(h=l.attachment||i.COLOR_ATTACHMENT0)&&(h=i[h]),a[h]=u}for(var h in this._compositor.getFrameBuffer().bind(t),a)this._compositor.getFrameBuffer().attach(a[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var n in this.inputLinks){var c;(c=this.inputLinks[n]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var i,n,r=this.outputs[t],a=r.parameters,o=r._parametersCopy;if(o||(o=r._parametersCopy={}),a)for(var s in a)"width"!==s&&"height"!==s&&(o[s]=a[s]);return i=a.width instanceof Function?a.width.call(this,e):a.width,n=a.height instanceof Function?a.height.call(this,e):a.height,i=Math.ceil(i),n=Math.ceil(n),o.width===i&&o.height===n||this._outputTextures[t]&&this._outputTextures[t].dispose(e),o.width=i,o.height=n,o},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){this._outputReferences[t]--,0===this._outputReferences[t]&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){r.a.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});e.a=a},function(t,e,i){"use strict";e.a=function(t){t.import(n.a),t.import(r.a),t.import(a.a),t.import(o.a),t.import(s.a),t.import(l.a),t.import(u.a),t.import(h.a),t.import(c.a),t.import(d.a),t.import(f.a),t.import(p.a),t.import(g.a)};var n=i(185),r=i(87),a=i(186),o=i(88),s=i(187),l=i(89),u=i(90),h=i(91),c=i(92),d=i(93),f=i(188),p=i(94),g=i(95)},function(t,e,i){"use strict";e.a="@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"},function(t,e,i){"use strict";e.a="@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"},function(t,e,i){"use strict";e.a="@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"},function(t,e,i){"use strict";e.a="@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"},function(t,e,i){"use strict";var n=i(9),r=i(3),a=i(5),o=i(4),s=i(16),l=i(8),u=i(10),h=i(49),c=i(190);function d(t){for(var e=new Uint8Array(t*t*4),i=0,n=new r.a,a=0;a=1?.95:0,weight2:r>=1?.05:1}),p.render(t)),h.attach(l),d.setUniform("texture",this._physicallyCorrect?this._currentTexture:s),d.render(t),h.attach(u),f.setUniform("texture",l),f.render(t),h.unbind(t),this._physicallyCorrect){var _=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=_}},c.prototype.getTargetTexture=function(){return this._texture3},c.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},c.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=u.a.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},c.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},c.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},c.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)},e.a=c},function(t,e,i){"use strict";e.a="@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"},function(t,e,i){"use strict";e.a=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925]},function(t,e,i){"use strict";var n=i(5),r=i(4),a=i(8),o=i(10),s=i(19),l=i(16),u=i(61),h=i(195);function c(t,e,i,n,r){var a=t.gl;e.setUniform(a,"1i",i,r),a.activeTexture(a.TEXTURE0+r),n.isRenderable()?n.bind(t):n.unbind(t)}function d(t,e,i,n,r){var a,o,s,l,u=t.gl;return function(r,h,d){if(!l||l.material!==r.material){var f=r.material,p=r.__program,g=f.get("roughness");null==g&&(g=1);var m=f.get("normalMap")||e,v=f.get("roughnessMap"),_=f.get("bumpMap"),y=f.get("uvRepeat"),x=f.get("uvOffset"),b=f.get("detailUvRepeat"),w=f.get("detailUvOffset"),T=!!_&&f.isTextureEnabled("bumpMap"),S=!!v&&f.isTextureEnabled("roughnessMap"),M=f.isDefined("fragment","DOUBLE_SIDED");_=_||i,v=v||n,d!==h?(h.set("normalMap",m),h.set("bumpMap",_),h.set("roughnessMap",v),h.set("useBumpMap",T),h.set("useRoughnessMap",S),h.set("doubleSide",M),null!=y&&h.set("uvRepeat",y),null!=x&&h.set("uvOffset",x),null!=b&&h.set("detailUvRepeat",b),null!=w&&h.set("detailUvOffset",w),h.set("roughness",g)):(p.setUniform(u,"1f","roughness",g),a!==m&&c(t,p,"normalMap",m,0),o!==_&&_&&c(t,p,"bumpMap",_,1),s!==v&&v&&c(t,p,"roughnessMap",v,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=x&&p.setUniform(u,"2f","uvOffset",x),null!=b&&p.setUniform(u,"2f","detailUvRepeat",b),null!=w&&p.setUniform(u,"2f","detailUvOffset",w),p.setUniform(u,"1i","useBumpMap",+T),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+M)),a=m,o=_,s=v,l=r}}}function f(t){t=t||{},this._depthTex=new n.a({format:r.a.DEPTH_COMPONENT,type:r.a.UNSIGNED_INT}),this._normalTex=new n.a({type:r.a.HALF_FLOAT}),this._framebuffer=new o.a,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,o.a.DEPTH_ATTACHMENT),this._normalMaterial=new s.a({shader:new a.a(a.a.source("ecgl.normal.vertex"),a.a.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=u.a.createBlank("#000"),this._defaultBumpMap=u.a.createBlank("#000"),this._defaultRoughessMap=u.a.createBlank("#000"),this._debugPass=new l.a({fragment:a.a.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}a.a.import(h.a),f.prototype.getDepthTexture=function(){return this._depthTex},f.prototype.getNormalTexture=function(){return this._normalTex},f.prototype.update=function(t,e,i){var n=t.getWidth(),r=t.getHeight(),a=this._depthTex,o=this._normalTex,s=this._normalMaterial;a.width=n,a.height=r,o.width=n,o.height=r;var l=e.getRenderList(i).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,i,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:d(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},f.prototype.renderDebug=function(t){this._debugPass.render(t)},f.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)},e.a=f},function(t,e,i){"use strict";e.a="@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"},function(t,e,i){"use strict";i(9),i(3);var n=i(5),r=i(4),a=i(16),o=i(8),s=i(10);function l(t){t=t||{},this._edgePass=new a.a({fragment:o.a.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new n.a({type:r.a.HALF_FLOAT}),this._frameBuffer=new s.a,this._frameBuffer.attach(this._targetTexture)}l.prototype.update=function(t,e,i,n){var r=t.getWidth(),a=t.getHeight(),o=this._targetTexture;o.width=r,o.height=a;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,a]),this._edgePass.setUniform("texture",i),this._edgePass.render(t),s.unbind(t)},l.prototype.getTargetTexture=function(){return this._targetTexture},l.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},l.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)},e.a=l},function(t,e,i){"use strict";e.a={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]}},function(t,e,i){"use strict";e.a="@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"},function(t,e,i){"use strict";e.a="@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end"},function(t,e,i){"use strict";var n=i(49),r=i(16),a=i(10),o=i(5),s=i(8),l=i(9);function u(t){for(var e=[],i=0;i<30;i++)e.push([Object(n.a)(i,2),Object(n.a)(i,3)]);this._haltonSequence=e,this._frame=0,this._sourceTex=new o.a,this._sourceFb=new a.a,this._sourceFb.attach(this._sourceTex),this._prevFrameTex=new o.a,this._outputTex=new o.a;var l=this._blendPass=new r.a({fragment:s.a.source("clay.compositor.blend")});l.material.disableTexturesAll(),l.material.enableTexture(["texture1","texture2"]),this._blendFb=new a.a({depthBuffer:!1}),this._outputPass=new r.a({fragment:s.a.source("clay.compositor.output"),blendWithPrevious:!0}),this._outputPass.material.define("fragment","OUTPUT_ALPHA"),this._outputPass.material.blend=function(t){t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)}}u.prototype={constructor:u,jitterProjection:function(t,e){var i=t.viewport,n=i.devicePixelRatio||t.getDevicePixelRatio(),r=i.width*n,a=i.height*n,o=this._haltonSequence[this._frame%this._haltonSequence.length],s=new l.a;s.array[12]=(2*o[0]-1)/r,s.array[13]=(2*o[1]-1)/a,l.a.mul(e.projectionMatrix,s,e.projectionMatrix),l.a.invert(e.invProjectionMatrix,e.projectionMatrix)},resetFrame:function(){this._frame=0},getFrame:function(){return this._frame},getSourceFrameBuffer:function(){return this._sourceFb},getOutputTexture:function(){return this._outputTex},resize:function(t,e){this._prevFrameTex.width=t,this._prevFrameTex.height=e,this._outputTex.width=t,this._outputTex.height=e,this._sourceTex.width=t,this._sourceTex.height=e,this._prevFrameTex.dirty(),this._outputTex.dirty(),this._sourceTex.dirty()},isFinished:function(){return this._frame>=this._haltonSequence.length},render:function(t,e,i){var n=this._blendPass;0===this._frame?(n.setUniform("weight1",0),n.setUniform("weight2",1)):(n.setUniform("weight1",.9),n.setUniform("weight2",.1)),n.setUniform("texture1",this._prevFrameTex),n.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),n.render(t),this._blendFb.unbind(t),i||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}},e.a=u},function(t,e,i){"use strict";var n=i(0),r=i.n(n);i(202),i(203),i(98),r.a.registerAction({type:"geo3DChangeCamera",event:"geo3dcamerachanged",update:"series:updateCamera"},(function(t,e){e.eachComponent({mainType:"geo3D",query:t},(function(e){e.setView(t)}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(44),o=i(28),s=i(29),l=i(31),u=i(96),h=r.a.extendComponentModel({type:"geo3D",layoutMode:"box",coordinateSystem:null,optionUpdated:function(){var t=this.option;t.regions=this.getFilledRegions(t.regions,t.map);var e=r.a.helper.completeDimensions(["value"],t.data,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),i=new r.a.List(e,this);i.initData(t.regions);var n={};i.each((function(t){var e=i.getName(t),r=i.getItemModel(t);n[e]=r})),this._regionModelMap=n,this._data=i},getData:function(){return this._data},getRegionModel:function(t){var e=this.getData().getName(t);return this._regionModelMap[e]||new r.a.Model(null,this)},getRegionPolygonCoords:function(t){var e=this.getData().getName(t),i=this.coordinateSystem.getRegion(e);return i?i.geometries:[]},getFormattedLabel:function(t,e){var i=this._data.getName(t),n=this.getRegionModel(i),r=n.get("normal"===e?["label","formatter"]:["emphasis","label","formatter"]);null==r&&(r=n.get(["label","formatter"]));var a={name:i};if("function"==typeof r)return a.status=e,r(a);if("string"==typeof r){var o=a.seriesName;return r.replace("{a}",null!=o?o:"")}return i},defaultOption:{regions:[]}});r.a.util.merge(h.prototype,u.a),r.a.util.merge(h.prototype,a.a),r.a.util.merge(h.prototype,o.a),r.a.util.merge(h.prototype,s.a),r.a.util.merge(h.prototype,l.a)},function(t,e,i){"use strict";var n=i(64),r=i(0),a=i.n(r),o=i(1),s=i(45),l=i(30);a.a.extendComponentView({type:"geo3D",__ecgl__:!0,init:function(t,e){this._geo3DBuilder=new n.a(e),this.groupGL=new o.a.Node,this._lightRoot=new o.a.Node,this._sceneHelper=new l.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot),this._control=new s.a({zr:e.getZr()}),this._control.init()},render:function(t,e,i){this.groupGL.add(this._geo3DBuilder.rootNode);var n=t.coordinateSystem;if(n&&n.viewGL){n.viewGL.add(this._lightRoot),t.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(n.viewGL);var a=t.getModel("viewControl");r.setFromViewControlModel(a,0),this._sceneHelper.setScene(n.viewGL.scene),this._sceneHelper.updateLight(t),n.viewGL.setPostEffect(t.getModel("postEffect"),i),n.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._geo3DBuilder.update(t,e,i,0,t.getData().count());var o=n.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse((function(t){t.material&&t.material[o]("fragment","SRGB_DECODE")})),r.off("update"),r.on("update",(function(){i.dispatchAction({type:"geo3DChangeCamera",alpha:r.getAlpha(),beta:r.getBeta(),distance:r.getDistance(),center:r.getCenter(),from:this.uid,geo3DId:t.id})})),r.update()}},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i)},dispose:function(){this._control.dispose()}})},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,l,u,h,f,g,m=e&&e.length,v=m?e[0]*i:t.length,_=r(t,0,v,i,!0),y=[];if(!_)return y;if(m&&(_=function(t,e,i,n){var o,s,l,u,h,f=[];for(o=0,s=e.length;o80*i){n=l=t[0],s=u=t[1];for(var x=i;xl&&(l=h),f>u&&(u=f);g=Math.max(l-n,u-s)}return o(_,y,i,n,s,g),y}function r(t,e,i,n,r){var a,o;if(r===M(t,e,i,n)>0)for(a=e;a=e;a-=n)o=w(a,t[a],t[a+1],o);return o&&_(o,o.next)&&(T(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!_(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,r,c,d){if(t){!d&&c&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=f(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,a,o,s,l,u=1;do{for(i=t,t=null,a=null,o=0;i;){for(o++,n=i,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,l--),a?a.nextZ=r:t=r,r.prevZ=a,a=r;i=n}a.nextZ=null,u*=2}while(o>1)}(r)}(t,n,r,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?l(t,n,r,c):s(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?o(t=u(t,e,i),e,i,n,r,c,2):2===d&&h(t,e,i,n,r,c):o(a(t),e,i,n,r,c,1);break}}}function s(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&v(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function l(t,e,i,n){var r=t.prev,a=t,o=t.next;if(v(r,a,o)>=0)return!1;for(var s=r.xa.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,h=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,c=f(s,l,e,i,n),d=f(u,h,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var r=n.prev,a=n.next.next;!_(r,a)&&y(r,n,n.next,a)&&x(r,a)&&x(a,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(a.i/i),T(n),T(n.next),n=t=a),n=n.next}while(n!==t);return n}function h(t,e,i,n,r,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var h=b(l,u);return l=a(l,l.next),h=a(h,h.next),o(l,e,i,n,r,s),void o(h,e,i,n,r,s)}u=u.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,r=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>o){if(o=s,s===r){if(a===n.y)return n;if(a===n.next.y)return n.next}i=n.x=n.x&&n.x>=h&&r!==n.x&&g(ai.x)&&x(n,t)&&(i=n,d=l),n=n.next;return i}(t,e)){var i=b(e,t);a(i,i.next)}}function f(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-s)-(i-o)*(e-s)>=0&&(i-o)*(a-s)-(r-o)*(n-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&x(t,e)&&x(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,a=(t.y+e.y)/2;do{i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,n){return!!(_(t,e)&&_(i,n)||_(t,n)&&_(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),r=t.next,a=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,a.next=n,n.prev=a,n}function w(t,e,i,n){var r=new S(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(t,e,i,n){for(var r=0,a=e,o=i-n;a0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});r.a.util.merge(h.prototype,a.a),r.a.util.merge(h.prototype,o.a),r.a.util.merge(h.prototype,s.a),r.a.util.merge(h.prototype,l.a)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(45),s=i(30),l=i(210),u=i(2);r.a.extendComponentView({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new a.a.Node,this._sphereGeometry=new a.a.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new a.a.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new a.a.PlaneGeometry,this._earthMesh=new a.a.Mesh({renderNormal:!0}),this._lightRoot=new a.a.Node,this._sceneHelper=new s.a,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._earthMesh),this._control=new o.a({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,i){var n=t.coordinateSystem,r=t.get("shading");n.viewGL.add(this._lightRoot),t.get("show")?n.viewGL.add(this.groupGL):n.viewGL.remove(this.groupGL),this._sceneHelper.setScene(n.viewGL.scene),n.viewGL.setPostEffect(t.getModel("postEffect"),i),n.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var s="ecgl."+r;o.material&&o.material.shader.name===s||(o.material=a.a.createMaterial(s)),a.a.setMaterialFromModel(r,o.material,t,i),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",a.a.parseColor(t.get("baseColor")));var l=.99*n.radius;o.scale.set(l,l,l);var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),i,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",t.get("heightTexture"),i,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,i),this._displaceVertices(t,i),this._updateViewControl(t,i),this._updateLayers(t,i)},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i)},_updateLayers:function(t,e){var i=t.coordinateSystem,n=t.get("layers"),o=i.radius,s=[],l=[],h=[],c=[];r.a.util.each(n,(function(t){var n=new r.a.Model(t),d=n.get("type"),f=a.a.loadTexture(n.get("texture"),e,{flipY:!1,anisotropic:8});if(f.surface&&f.surface.attachToMesh(this._earthMesh),"blend"===d){var p=n.get("blendTo"),g=u.a.firstNotNull(n.get("intensity"),1);"emission"===p?(h.push(f),c.push(g)):(s.push(f),l.push(g))}else{var m=n.get("id"),v=this._layerMeshes[m];v||(v=this._layerMeshes[m]=new a.a.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===n.get("shading")?(v.material=v.__lambertMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),v.__lambertMaterial=v.material):(v.material=v.__colorMaterial||new a.a.Material({autoUpdateTextureStatus:!1,shader:a.a.createShader("ecgl.color"),transparent:!0,depthMask:!1}),v.__colorMaterial=v.material),v.material.enableTexture("diffuseMap");var _=n.get("distance"),y=o+(null==_?i.radius/100:_);v.scale.set(y,y,y),o=y;var x=this._blankTexture||(this._blankTexture=a.a.createBlankTexture("rgba(255, 255, 255, 0)"));v.material.set("diffuseMap",x),a.a.loadTexture(n.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(v),v.material.set("diffuseMap",t),e.getZr().refresh()})),n.get("show")?this.groupGL.add(v):this.groupGL.remove(v)}}),this);var d=this._earthMesh.material;d.define("fragment","LAYER_DIFFUSEMAP_COUNT",s.length),d.define("fragment","LAYER_EMISSIVEMAP_COUNT",h.length),d.set("layerDiffuseMap",s),d.set("layerDiffuseIntensity",l),d.set("layerEmissiveMap",h),d.set("layerEmissionIntensity",c);var f=t.getModel("debug.wireframe");if(f.get("show")){d.define("both","WIREFRAME_TRIANGLE");var p=a.a.parseColor(f.get("lineStyle.color")||"rgba(0,0,0,0.5)"),g=u.a.firstNotNull(f.get("lineStyle.width"),1);d.set("wireframeLineWidth",g),d.set("wireframeLineColor",p)}else d.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var i=t.coordinateSystem,n=t.getModel("viewControl"),r=(i.viewGL.camera,this),a=this._control;a.setViewGL(i.viewGL);var o,s,l=n.get("targetCoord");null!=l&&(s=l[0]+90,o=l[1]),a.setFromViewControlModel(n,{baseDistance:i.radius,alpha:o,beta:s}),a.off("update"),a.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:a.getAlpha(),beta:a.getBeta(),distance:a.getDistance()-i.radius,center:a.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var i=t.get("displacementQuality"),n=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||i!==this._displacementQuality||n!==this._showDebugWireframe){this._displacementQuality=i,this._showDebugWireframe=n;var a=this._sphereGeometry,o={low:100,medium:200,high:400,ultra:800}[i]||200,s=o/2;(a.widthSegments!==o||n)&&(a.widthSegments=o,a.heightSegments=s,a.build()),this._doDisplaceVertices(a,r),n&&a.generateBarycentric()}},_doDisplaceVertices:function(t,e){var i=t.attributes.position.value,n=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===i.length||((r=new Float32Array(i.length)).set(i),t.__originalPosition=r);for(var a=e.displacementWidth,o=e.displacementHeight,s=e.displacementData,l=0;lOpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return s.reduce((function(e,i){return e[i]=t.get(i),e}),{})},setMaptalksCameraOption:function(t){null!=t&&s.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});r.a.util.merge(l.prototype,a.a),r.a.util.merge(l.prototype,o.a)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(224),o=i(30),s=i(1),l=i(102);s.a.Shader.import(l.a),r.a.extendComponentView({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new s.a.Mesh({geometry:new s.a.PlaneGeometry,material:new s.a.Material({shader:new s.a.Shader({vertex:s.a.Shader.source("ecgl.displayShadow.vertex"),fragment:s.a.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var i=e.getZr();this._zrLayer=new a.a("maptalks3D",i,t.get("center"),t.get("zoom")),i.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new s.a.Node,this._sceneHelper=new o.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var n=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,n);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend"].forEach((function(t){n.on(t,r)}))},render:function(t,e,i){this._zrLayer||this._initMaptalksLayer(t,i);var n=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),a=n.getBaseLayer();r!==this._oldUrlTemplate&&(a?a.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(a=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),n.setBaseLayer(a))),this._oldUrlTemplate=r,n.setCenter(t.get("center")),n.setZoom(t.get("zoom"),{animation:!1}),n.setPitch(t.get("pitch")),n.setBearing(t.get("bearing")),t.setMaptalks(n);var o=t.coordinateSystem;o.viewGL.scene.add(this._lightRoot),o.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(o.viewGL.scene),this._sceneHelper.updateLight(t),o.viewGL.setPostEffect(t.getModel("postEffect"),i),o.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,i,n){var r=n.renderer;this._sceneHelper.updateAmbientCubemap(r,t,i),this._sceneHelper.updateSkybox(r,t,i),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,i,n){t.coordinateSystem.setCameraOption(n),this._updateGroundMesh(),i.getZr().refresh()},_dispatchInteractAction:function(t,e,i){t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:e.getZoom(),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var i=new s.a.Plane(new s.a.Vector3(0,0,1),0),n=t.viewGL.camera.castRay(new s.a.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new s.a.Vector2(1,1)),a=n.intersectPlane(i),o=r.intersectPlane(i),l=a.dist(o)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(l,l,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}})},function(t,e,i){"use strict";function n(t,e,i,n){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:i,zoom:n,fog:!1}),this._initEvents()}n.prototype.resize=function(){this._maptalks.checkSize()},n.prototype.getMaptalks=function(){return this._maptalks},n.prototype.clear=function(){},n.prototype.refresh=function(){this._maptalks.checkSize()};var r=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];n.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},r.forEach((function(e){this._handlers[e]=function(i){var n={};for(var r in i)n[r]=i[r];n.bubbles=!1;var a=new i.constructor(i.type,n);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(a):t.firstElementChild.dispatchEvent(a)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},n.prototype.dispose=function(){r.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()},e.a=n},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(226),i(229),i(231),i(17));r.a.registerVisual(Object(a.a)("bar3D")),r.a.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(3),o=i(6),s=i(227),l=i(228),u=o.a.vec3,h=r.a.helper.dataStack.isDimensionStacked;function c(t,e){var i=h(t,e[2]);return{dimension:i?t.getCalculationInfo("stackResultDimension"):e[2],isStacked:i}}r.a.registerLayout((function(t,e){t.eachSeriesByType("bar3D",(function(t){var e=t.coordinateSystem,i=e&&e.type;if("globe"===i)!function(t,e){var i=t.getData(),n=t.get("minHeight")||0,o=t.get("barSize"),s=["lng","lat","alt"].map((function(e){return t.coordDimToDataDim(e)[0]}));if(null==o){var h=e.radius*Math.PI,d=Object(l.a)(i,s[0],s[1]);o=[h/Math.sqrt(i.count()/d),h/Math.sqrt(i.count()/d)]}else r.a.util.isArray(o)||(o=[o,o]);var f=c(i,s);i.each(s,(function(t,r,a,s){var l=i.get(f.dimension,s),h=f.isStacked?l-a:e.altitudeAxis.scale.getExtent()[0],c=Math.max(e.altitudeAxis.dataToCoord(a),n),d=e.dataToPoint([t,r,h]),p=e.dataToPoint([t,r,l]),g=u.sub([],p,d);u.normalize(g,g);var m=[o[0],c,o[1]];i.setItemLayout(s,[d,g,m])})),i.setLayout("orient",a.a.UP.array)}(t,e);else if("cartesian3D"===i)Object(s.a)(t,e);else if("geo3D"===i)!function(t,e){var i=t.getData(),n=t.get("barSize"),a=t.get("minHeight")||0,o=["lng","lat","alt"].map((function(e){return t.coordDimToDataDim(e)[0]}));if(null==n){var s=Math.min(e.size[0],e.size[2]),u=Object(l.a)(i,o[0],o[1]);n=[s/Math.sqrt(i.count()/u),s/Math.sqrt(i.count()/u)]}else r.a.util.isArray(n)||(n=[n,n]);var h=[0,1,0],d=c(i,o);i.each(o,(function(t,r,o,s){var l=i.get(d.dimension,s),u=d.isStacked?l-o:e.altitudeAxis.scale.getExtent()[0],c=Math.max(e.altitudeAxis.dataToCoord(o),a),f=e.dataToPoint([t,r,u]),p=[n[0],c,n[1]];i.setItemLayout(s,[f,h,p])})),i.setLayout("orient",[1,0,0])}(t,e);else{if("mapbox3D"!==i&&"maptalks3D"!==i)throw e?new Error("bar3D doesn't support coordinate system "+e.type):new Error("bar3D doesn't have coordinate system.");!function(t,e){var i=t.getData(),n=t.coordDimToDataDim("lng")[0],a=t.coordDimToDataDim("lat")[0],o=t.coordDimToDataDim("alt")[0],s=t.get("barSize"),u=t.get("minHeight")||0;if(null==s){var h=i.getDataExtent(n),d=i.getDataExtent(a),f=e.dataToPoint([h[0],d[0]]),p=e.dataToPoint([h[1],d[1]]),g=Math.min(Math.abs(f[0]-p[0]),Math.abs(f[1]-p[1]))||1,m=Object(l.a)(i,n,a);s=[g/Math.sqrt(i.count()/m),g/Math.sqrt(i.count()/m)]}else r.a.util.isArray(s)||(s=[s,s]),s[0]/=e.getScale()/16,s[1]/=e.getScale()/16;var v=[0,0,1],_=[n,a,o],y=c(i,_);i.each(_,(function(t,n,r,a){var o=i.get(y.dimension,a),l=y.isStacked?o-r:0,h=e.dataToPoint([t,n,l]),c=e.dataToPoint([t,n,o]),d=Math.max(c[2]-h[2],u),f=[s[0],d,s[1]];i.setItemLayout(a,[h,v,f])})),i.setLayout("orient",[1,0,0])}(t,e)}}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(6).a.vec3,o=r.a.helper.dataStack.isDimensionStacked;e.a=function(t,e){var i=t.getData(),n=t.get("barSize");if(null==n){var s,l,u=e.size,h=e.getAxis("x"),c=e.getAxis("y");s="category"===h.type?.7*h.getBandWidth():.6*Math.round(u[0]/Math.sqrt(i.count())),l="category"===c.type?.7*c.getBandWidth():.6*Math.round(u[1]/Math.sqrt(i.count())),n=[s,l]}else r.a.util.isArray(n)||(n=[n,n]);var d,f,p,g=e.getAxis("z").scale.getExtent(),m=(f=(d=g)[0],p=d[1],!(f>0&&p>0||f<0&&p<0)),v=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),_=o(i,v[2]),y=_?i.getCalculationInfo("stackResultDimension"):v[2];i.each(v,(function(t,r,o,s){var l=i.get(y,s),u=_?l-o:m?0:g[0],h=e.dataToPoint([t,r,u]),c=e.dataToPoint([t,r,l]),d=a.dist(h,c),f=[0,c[1]0&&(p++,c[3]<.99&&(g=!0))}})),s.geometry.setBarCount(p);var m=i.getLayout("orient"),v=this._barIndexOfData=new Int32Array(i.count());p=0,i.each((function(t){if(i.hasValue(t)){var e=i.getItemLayout(t),n=e[0],r=e[1],a=e[2],s=4*t;c[0]=d[s++],c[1]=d[s++],c[2]=d[s++],c[3]=d[s++],c[3]>0&&(o._barMesh.geometry.addBar(n,r,m,a,c,t),v[t]=p++)}else v[t]=-1})),s.geometry.dirty(),s.geometry.updateBoundingBox();var _=s.material;_.transparent=g,_.depthMask=!g,s.geometry.sortTriangles=g,this._initHandler(t,e)},_initHandler:function(t,e){var i=t.getData(),n=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;n.seriesIndex=t.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",(function(t){var o=n.geometry.getDataIndexOfVertex(t.triangle[0]);o!==a&&(this._downplay(a),this._highlight(o),this._labelsBuilder.updateLabels([o]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[i.get("x",o),i.get("y",o),i.get("z",o,!0)]})),a=o,n.dataIndex=o}),this),n.on("mouseout",(function(t){this._downplay(a),this._labelsBuilder.updateLabels(),a=-1,n.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var i=this._barIndexOfData[t];if(!(i<0)){var n=e.getItemModel(t).getModel("emphasis.itemStyle"),o=n.get("color"),s=n.get("opacity");if(null==o){var l=e.getItemVisual(t,"color");o=r.a.color.lift(l,-.4)}null==s&&(s=e.getItemVisual(t,"opacity"));var u=a.a.parseColor(o);u[3]*=s,this._barMesh.geometry.setColor(i,u),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var i=this._barIndexOfData[t];if(!(i<0)){var n=e.getItemVisual(t,"color"),r=e.getItemVisual(t,"opacity"),o=a.a.parseColor(n);o[3]*=r,this._barMesh.geometry.setColor(i,o),this._api.getZr().refresh()}}},highlight:function(t,e,i,n){this._toggleStatus("highlight",t,e,i,n)},downplay:function(t,e,i,n){this._toggleStatus("downplay",t,e,i,n)},_toggleStatus:function(t,e,i,n,a){var l=e.getData(),u=o.a.queryDataIndex(l,a),h=this;null!=u?r.a.util.each(s.a.normalizeToArray(u),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):l.each((function(e){"highlight"===t?h._highlight(e):h._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(t,e,i){"use strict";var n,r,a,o,s,l,u,h,c=i(0),d=i.n(c),f=i(38),p=i(65),g=i(15),m=i(6),v=m.a.vec3,_=m.a.mat3,y=g.a.extend((function(){return{attributes:{position:new g.a.Attribute("position","float",3,"POSITION"),normal:new g.a.Attribute("normal","float",3,"NORMAL"),color:new g.a.Attribute("color","float",4,"COLOR"),prevPosition:new g.a.Attribute("prevPosition","float",3),prevNormal:new g.a.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,i=this.getBarVertexCount()*t,n=this.getBarTriangleCount()*t;this.vertexCount!==i&&(this.attributes.position.init(i),e?this.attributes.normal.init(i):this.attributes.normal.value=null,this.attributes.color.init(i)),this.triangleCount!==n&&(this.indices=i>65535?new Uint32Array(3*n):new Uint16Array(3*n),this._dataIndices=new Uint32Array(i))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var i=this.getBarVertexCount(),n=i*(t+1),r=i*t;r0&&this.bevelSegments>0)this._addBevelBar(t,c,g,m,this.bevelSize,this.bevelSegments,_);else{v.copy(r,c),v.normalize(r,r),v.cross(a,g,r),v.normalize(a,a),v.cross(n,r,a),v.normalize(a,a),v.negate(o,n),v.negate(s,r),v.negate(l,a),e(u[0],t,n,m[0]/2),e(u[0],u[0],a,m[2]/2),e(u[1],t,n,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,o,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,o,m[0]/2),e(u[3],u[3],a,m[2]/2),e(i,t,r,m[1]),e(u[4],i,n,m[0]/2),e(u[4],u[4],a,m[2]/2),e(u[5],i,n,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],i,o,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],i,o,m[0]/2),e(u[7],u[7],a,m[2]/2);var b=this.attributes;if(this.enableNormal){h[0]=n,h[1]=o,h[2]=r,h[3]=s,h[4]=a,h[5]=l;for(var w=this._vertexOffset,T=0;T=0){var _=3*l,y=new u.a(this._points[_],this._points[_+1],this._points[_+2]);a.push({dataIndex:l,point:y,pointWorld:y.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(y)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(t,e){e.containStroke=function(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||ot+s&&a>i+s||al?u.position[1]+=(h-l)/2:u.position[0]+=(h-s)/2;var c=u.getBoundingRect();return u.position[0]-=c.x,u.position[1]-=c.y,u.setStyle(i),u.update(),u.__size=h,u}(t,e,i),l=o.getMarginByStyle(i);return{image:a(s.__size,n,(function(t){s.brush(t)})),margin:l}},createSDFFromCanvas:function(t,e,i,n){return a(e,n,(function(e){var n=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,i){var n=e.width,r=e.height,a=t.canvas.width,o=t.canvas.height,s=n/a,l=r/o;function u(t){return t<128?1:-1}function h(t,a){var o=1/0;t=Math.floor(t*s);for(var h=(a=Math.floor(a*l))*n+t,c=u(e.data[4*h]),d=Math.max(a-i,0);d=0;c--){var d,f=s[2*(d=this.geometry.indices?this.geometry.indices[c]:c)],p=s[2*d+1],g=this.geometry.attributes.size.get(d)/this.sizeScale/2;if(t>f-g*u&&tp-g*h&&e=2e4},doSortVertices:function(t,e){var i=this.indices,n=r.create();if(!i){i=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var a=0;a.05);else for(a=0;a<3;a++)this._progressiveQuickSort(3*e+a);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,i=this.indices;function r(t,i){return e[i]-e[t]}t?Array.prototype.sort.call(i,r):n.a.sort(i,r,0,i.length-1)},_progressiveQuickSort:function(t){var e=this._zList,i=this.indices;this._quickSort=this._quickSort||new n.a,this._quickSort.step(i,(function(t,i){return e[i]-e[t]}),t)}}},function(t,e,i){"use strict";e.a="@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end"},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(244),i(245),i(248),i(17));r.a.registerVisual(Object(a.a)("lines3D")),r.a.registerAction({type:"lines3DPauseEffect",event:"lines3deffectpaused",update:"series.lines3D:pauseEffect"},(function(){})),r.a.registerAction({type:"lines3DResumeEffect",event:"lines3deffectresumed",update:"series.lines3D:resumeEffect"},(function(){})),r.a.registerAction({type:"lines3DToggleEffect",event:"lines3deffectchanged",update:"series.lines3D:toggleEffect"},(function(){}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(6),o=a.a.vec3,s=a.a.vec2,l=o.normalize,u=o.cross,h=o.sub,c=o.add,d=o.create,f=d(),p=d(),g=d(),m=d(),v=[],_=[];function y(t,e){s.copy(v,t[0]),s.copy(_,t[1]);var i=[],n=i[0]=d(),r=i[1]=d(),a=i[2]=d(),y=i[3]=d();e.dataToPoint(v,n),e.dataToPoint(_,y),l(f,n),h(p,y,n),l(p,p),u(g,p,f),l(g,g),u(p,f,g),c(r,f,p),l(r,r),l(f,y),h(p,n,y),l(p,p),u(g,p,f),l(g,g),u(p,f,g),c(a,f,p),l(a,a),c(m,n,y),l(m,m);var x=o.dot(n,m),b=o.dot(m,r),w=(Math.max(o.len(n),o.len(y))-x)/b*2;return o.scaleAndAdd(r,n,r,w),o.scaleAndAdd(a,y,a,w),i}function x(t,e){for(var i=new Float32Array(3*t.length),n=0,r=[],a=0;a0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");e.push(r)})),{coordsList:e}}function w(t,e,i){var n=t.getData(),r=t.get("polyline"),a=b(n);n.setLayout("lineType",r?"polyline":"cubicBezier"),n.each((function(t){var s=a.coordsList[t],l=r?x(s,e):function(t,e,i){var n=[],r=n[0]=o.create(),a=n[1]=o.create(),s=n[2]=o.create(),l=n[3]=o.create();e.dataToPoint(t[0],r),e.dataToPoint(t[1],l);var u=o.dist(r,l);return o.lerp(a,r,l,.3),o.lerp(s,r,l,.3),o.scaleAndAdd(a,a,i,Math.min(.1*u,10)),o.scaleAndAdd(s,s,i,Math.min(.1*u,10)),n}(s,e,i);n.setItemLayout(t,l)}))}r.a.registerLayout((function(t,e){t.eachSeriesByType("lines3D",(function(t){var e=t.coordinateSystem;"globe"===e.type?function(t,e){var i=t.getData(),n=t.get("polyline");i.setLayout("lineType",n?"polyline":"cubicBezier");var r=b(i);i.each((function(t){var a=r.coordsList[t],o=n?x:y;i.setItemLayout(t,o(a,e))}))}(t,e):"geo3D"===e.type?w(t,e,[0,1,0]):"mapbox3D"!==e.type&&"maptalks3D"!==e.type||w(t,e,[0,0,1])}))}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(25),s=i(246),l=i(46);a.a.Shader.import(l.a),r.a.extendChartView({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new a.a.Node,this._meshLinesMaterial=new a.a.Material({shader:a.a.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new a.a.Mesh({geometry:new o.a,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new s.a},render:function(t,e,i){this.groupGL.add(this._linesMesh);var n=t.coordinateSystem,r=t.getData();if(n&&n.viewGL){n.viewGL.add(this.groupGL),this._updateLines(t,e,i);var o=n.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var s=this._trailMesh;s.stopAnimation(),t.get("effect.show")?(this.groupGL.add(s),s.updateData(r,i,this._linesMesh.geometry),s.__time=s.__time||0,this._curveEffectsAnimator=s.animate("",{loop:!0}).when(36e5,{__time:36e5}).during((function(){s.setAnimationTime(s.__time)})).start()):(this.groupGL.remove(s),this._curveEffectsAnimator=null),this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?a.a.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,i){var n=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,s=t.get("polyline");o.expandLine=!0;var l=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=l/20;var u="lineStyle.width".split("."),h=i.getDevicePixelRatio(),c=0;n.each((function(t){var e=n.getItemModel(t).get(u);null==e&&(e=1),n.setItemVisual(t,"lineWidth",e),c=Math.max(e,c)})),o.useNativeLine=!1;var d=0,f=0;n.each((function(t){var e=n.getItemLayout(t);s?(d+=o.getPolylineVertexCount(e),f+=o.getPolylineTriangleCount(e)):(d+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),f+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(d),o.setTriangleCount(f),o.resetOffset();var p=[];n.each((function(t){var e=n.getItemLayout(t),i=n.getItemVisual(t,"color"),r=n.getItemVisual(t,"opacity"),l=n.getItemVisual(t,"lineWidth")*h;null==r&&(r=1),(p=a.a.parseColor(i,p))[3]*=r,s?o.addPolyline(e,p,l):o.addCubicCurve(e[0],e[1],e[2],e[3],p,l)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(t,e,i){"use strict";var n=i(0),r=(i.n(n),i(1)),a=i(6),o=i(25),s=i(247),l=a.a.vec3;r.a.Shader.import(s.a),e.a=r.a.Mesh.extend((function(){var t=new r.a.Material({shader:new r.a.Shader(r.a.Shader.source("ecgl.trail2.vertex"),r.a.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new o.a({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,i){var n=t.hostModel,a=this.geometry,o=n.getModel("effect"),s=o.get("trailWidth")*e.getDevicePixelRatio(),u=o.get("trailLength"),h=n.get("effect.constantSpeed"),c=1e3*n.get("effect.period"),d=null!=h;this.getScene()||console.error("TrailMesh must been add to scene before updateData"),d?this.material.set("speed",h/1e3):this.material.set("period",c),this.material[d?"define":"undefine"]("vertex","CONSTANT_SPEED");var f=n.get("polyline");a.trailLength=u,this.material.set("trailLength",u),a.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){a.attributes[t].value=i.attributes[t].value})),["dist","distAll","start","offset","color"].forEach((function(t){a.attributes[t].init(a.vertexCount)})),a.indices=i.indices;var p=[],g=o.get("trailColor"),m=o.get("trailOpacity"),v=null!=g,_=null!=m;this.updateWorldTransform();var y=this.worldTransform.x.len(),x=this.worldTransform.y.len(),b=this.worldTransform.z.len(),w=0,T=0;t.each((function(e){var n=t.getItemLayout(e),o=_?m:t.getItemVisual(e,"opacity"),u=t.getItemVisual(e,"color");null==o&&(o=1),(p=r.a.parseColor(v?g:u,p))[3]*=o;for(var h=f?i.getPolylineVertexCount(n):i.getCubicCurveVertexCount(n[0],n[1],n[2],n[3]),S=0,M=[],A=[],C=w;Cw&&(S+=l.dist(M,A)),a.attributes.dist.set(C,S),l.copy(A,M);T=Math.max(T,S);var I=Math.random()*(d?S:c);for(C=w;C0?1:-1)*s/2),a.attributes.color.set(C,p);w+=h})),this.material.set("spotSize",.1*T*u),this.material.set("spotIntensity",o.get("spotIntensity")),a.dirty()},setAnimationTime:function(t){this.material.set("time",t)}})},function(t,e,i){"use strict";e.a="@export ecgl.trail2.vertex\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute float dist;\nattribute float distAll;\nattribute float start;\n\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nuniform float speed : 0;\nuniform float trailLength: 0.3;\nuniform float time;\nuniform float period: 1000;\n\nuniform float spotSize: 1;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n\n#ifdef CONSTANT_SPEED\n float t = mod((speed * time + start) / distAll, 1. + trailLength) - trailLength;\n#else\n float t = mod((time + start) / period, 1. + trailLength) - trailLength;\n#endif\n\n float trailLen = distAll * trailLength;\n\n v_Percent = (dist - t * distAll) / trailLen;\n\n v_SpotPercent = spotSize / distAll;\n\n }\n@end\n\n\n@export ecgl.trail2.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform float spotIntensity: 5;\n\nvarying vec4 v_Color;\nvarying float v_Percent;\nvarying float v_SpotPercent;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n if (v_Percent > 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end"},function(t,e,i){"use strict";var n=i(0),r=i.n(n);r.a.extendSeriesModel({type:"series.lines3D",dependencies:["globe"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=new r.a.List(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,r){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[r]:a:void 0})),i},defaultOption:{coordinateSystem:"globe",globeIndex:0,geo3DIndex:0,zlevel:-10,polyline:!1,effect:{show:!1,period:4,trailWidth:4,trailLength:.2,spotIntensity:6},silent:!0,blendMode:"source-over",lineStyle:{width:1,opacity:.5}}})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(250),i(251),i(17));r.a.registerVisual(Object(a.a)("polygons3D"))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(31);function o(t,e){for(var i=[],n=0;n0;this._updateSurfaceMesh(this._surfaceMesh,t,c,p);var g=this._surfaceMesh.material;p?(g.define("WIREFRAME_QUAD"),g.set("wireframeLineWidth",f),g.set("wireframeLineColor",a.a.parseColor(d.get("lineStyle.color")))):g.undefine("WIREFRAME_QUAD"),this._initHandler(t,i),this._updateAnimation(t)},_updateAnimation:function(t){a.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new a.a.Mesh({geometry:new a.a.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new a.a.Material({shader:new a.a.Shader(a.a.Shader.source("ecgl.sm.depth.vertex"),a.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),r.a.util.extend(t.geometry,s.a),t},_initHandler:function(t,e){var i=t.getData(),n=this._surfaceMesh,r=t.coordinateSystem;n.seriesIndex=t.seriesIndex;var a=-1;n.off("mousemove"),n.off("mouseout"),n.on("mousemove",(function(t){var o=function(t,e){for(var i=1/0,r=-1,a=[],o=0;o=0){var s=[];n.geometry.attributes.position.get(o,s);for(var u=r.pointToData(s),h=1/0,c=-1,d=[],f=0;f65535?Uint32Array:Uint16Array)((m-1)*(v-1)*6),S=function(t,e,i){i[1]=t*v+e,i[0]=t*v+e+1,i[3]=(t+1)*v+e+1,i[2]=(t+1)*v+e},M=!1;if(h){var A=[],C=[],I=0;_?d.init(r.vertexCount):d.value=null;for(var L=[[],[],[]],E=[],P=[],D=l.create(),O=function(t,e,i){var n=3*e;return i[0]=t[n],i[1]=t[n+1],i[2]=t[n+2],i},R=new Float32Array(s.length),N=new Float32Array(s.length/3*4),k=0;k ")),a.value&&(h+=" : "+r.a.format.encodeHTML(a.value)),h}return s.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:r.a.util.extend({value:0},t)})),e=new r.a.List(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e "+v)),p++)}var _=r.a.helper.completeDimensions(["value"],t);(c=new r.a.List(_,i)).initData(t);var y=new r.a.List(["value"],i);return y.initData(f,d),a&&a(c,y),l()({mainData:c,struct:s,structAttr:"graph",datas:{node:c,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},function(t,e,i){i(104).__DEV__;var n=i(13),r=i(266).enableClassCheck;function a(t){return"_EC_"+t}var o=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},s=o.prototype;function l(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function u(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}s.type="graph",s.isDirected=function(){return this._directed},s.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[a(t)]){var n=new l(t,e);return n.hostGraph=this,this.nodes.push(n),i[a(t)]=n,n}},s.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},s.getNodeById=function(t){return this._nodesMap[a(t)]},s.addEdge=function(t,e,i){var n=this._nodesMap,r=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),l.isInstance(t)||(t=n[a(t)]),l.isInstance(e)||(e=n[a(e)]),t&&e){var o=t.id+"-"+e.id;if(!r[o]){var s=new u(t,e,i);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),r[o]=s,s}}},s.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},s.getEdge=function(t,e){l.isInstance(t)&&(t=t.id),l.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},s.eachNode=function(t,e){for(var i=this.nodes,n=i.length,r=0;r=0&&t.call(e,i[r],r)},s.eachEdge=function(t,e){for(var i=this.edges,n=i.length,r=0;r=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&t.call(e,i[r],r)},s.breadthFirstTraverse=function(t,e,i,n){if(l.isInstance(e)||(e=this._nodesMap[a(e)]),e){for(var r="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o=0&&i.node2.dataIndex>=0})),r=0,a=n.length;r=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};n.mixin(l,h("hostGraph","data")),n.mixin(u,h("hostGraph","edgeData")),o.Node=l,o.Edge=u,r(l),r(u);var c=o;t.exports=c},function(t,e,i){i(104).__DEV__;var n=i(13),r="___EC__COMPONENT__CONTAINER___";function a(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}var o=0;function s(t,e){var i=n.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function l(t,e,i){return this.superClass.prototype[e].apply(t,i)}e.parseClassType=a,e.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return n.extend(i.prototype,t),i.extend=this.extend,i.superCall=s,i.superApply=l,n.inherits(i,this),i.superClass=e,i}},e.enableClassCheck=function(t){var e=["__\0is_clz",o++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}},e.enableClassManagement=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(function(t){n.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=a(e)).sub?e.sub!==r&&((function(t){var e=i[t.main];return e&&e[r]||((e=i[t.main]={})[r]=!0),e}(e))[e.sub]=t):i[e.main]=t),t},t.getClass=function(t,e,n){var a=i[t];if(a&&a[r]&&(a=e?a[e]:null),n&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=a(t);var e=[],o=i[t.main];return o&&o[r]?n.each(o,(function(t,i){i!==r&&e.push(t)})):e.push(o),e},t.hasClass=function(t){return t=a(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return n.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=a(t);var e=i[t.main];return e&&e[r]},t.parseClassType=a,e.registerWhenExtend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t},e.setReadOnly=function(t,e){}},function(t,e,i){var n=i(13),r=n.each,a="\0__link_datas",o="\0__link_mainData";function s(t,e){if((r=this)[o]===r){var i=n.extend({},this[a]);i[this.dataType]=e,c(e,i,t)}else d(e,this.dataType,this[o],t);var r;return e}function l(t,e){return t.struct&&t.struct.update(this),e}function u(t,e){return r(e[a],(function(i,n){i!==e&&d(i.cloneShallow(),n,e,t)})),e}function h(t){var e=this[o];return null==t||null==e?e:e[a][t]}function c(t,e,i){t[a]={},r(e,(function(e,n){d(e,n,t,i)}))}function d(t,e,i,n){i[a][e]=t,t[o]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=h}var f=function(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,c(e,i,t),r(i,(function(i){r(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,n.curry(s,t))}))})),e.wrapMethod("cloneShallow",n.curry(u,t)),r(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,n.curry(l,t))})),n.assert(i[e.dataType]===e)};t.exports=f},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(47),o=i.n(a),s=i(1),l=i(22),u=i(105),h=i(2),c=i(269),d=i(271),f=i(80),p=i.n(f),g=i(6),m=i(273),v=i(67),_=i(274),y=g.a.vec2;s.a.Shader.import(_.a);var x,b=1;r.a.extendChartView({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new s.a.Node,this.viewGL=new l.a("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new v.a(!0,e),this._forceEdgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new s.a.Geometry({attributes:{node:new s.a.Geometry.Attribute("node","float",2),color:new s.a.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:s.a.Mesh.LINES}),this._edgesMesh=new s.a.Mesh({material:new s.a.Material({shader:s.a.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new u.a({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new m.a({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,i){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=i,this._initLayout(t,e,i),this._pointsBuilder.update(t,e,i),this._forceLayoutInstance instanceof c.a||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,i),this._control.off("update"),this._control.on("update",(function(){i.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(h.a.firstNotNull(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var n=this._pointsBuilder.getPointsMesh();if(n.off("mousemove",this._mousemoveHandler),n.off("mouseout",this._mouseOutHandler,this),i.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?i.getZr().on("click",this._clickHandler):"mouseover"===r?(n.on("mousemove",this._mousemoveHandler,this),n.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1):console.warn("Unkown focusNodeAdjacencyOn value s"+r)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var i=this._forceEdgesMesh.geometry,n=e.getEdgeData(),r=0,a=this._forceLayoutInstance,o=2*n.count();i.attributes.node.init(o),i.attributes.color.init(o),n.each((function(e){var o=t[e];i.attributes.node.set(r,a.getNodeUV(o.node1)),i.attributes.node.set(r+1,a.getNodeUV(o.node2));var l=n.getItemVisual(o.dataIndex,"color"),u=s.a.parseColor(l);u[3]*=h.a.firstNotNull(n.getItemVisual(o.dataIndex,"opacity"),1),i.attributes.color.set(r,u),i.attributes.color.set(r+1,u),r+=2})),i.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,i=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var n=[],r=[],a=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(o){var l=t.graph.getEdgeByIndex(o),u=2*l.node1.dataIndex,c=2*l.node2.dataIndex;n[0]=i[u],n[1]=i[u+1],r[0]=i[c],r[1]=i[c+1];var d=t.getItemVisual(l.dataIndex,"color"),f=s.a.parseColor(d);f[3]*=h.a.firstNotNull(t.getItemVisual(l.dataIndex,"opacity"),1);var p=t.getItemModel(l.dataIndex),g=h.a.firstNotNull(p.get(a),1)*this._api.getDevicePixelRatio();e.addLine(n,r,f,g);for(var m=0;m<4;m++)this._originalEdgeColors[4*l.dataIndex+m]=f[m];this._edgeIndicesMap[l.dataIndex]=o}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),i=[],n=0;n=f&&(l._syncNodePosition(t),d=0),i.getZr().refresh(),p()((function(){g(e)}))}))};p()((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),g(u)})),this._layouting=!0}}else console.error("None layout don't have startLayout action")}},stopLayout:function(t,e,i,n){n&&null!=n.from&&n.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(n&&n.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,i)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,i){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,i),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,i,n){var r=this._model.getData();this._downplayAll();var a=n.dataIndex,o=r.graph,s=[],l=o.getNodeByIndex(a);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,i,n){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),i=s.a.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),n=h.a.firstNotNull(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);i[3]*=n,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],i)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:(x=[],function(t,e){this._getColor(t,x),x[3]*=e,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],x)}),_getColor:function(t,e){for(var i=0;i<4;i++)e[i]=this._originalEdgeColors[4*t+i];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var i=this.viewGL.camera,n=t.getData().getLayout("points"),r=y.create(1/0,1/0),a=y.create(-1/0,-1/0),o=[],s=0;si.left&&ui.top)){var h=Math.max(a[0]-r[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,r[0]-=.2*h,i.left=r[0],i.top=l-c/2,i.bottom=l+c/2,i.right=h+r[0],i.near=0,i.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1},remove:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(16),s=i(10),l=i(270);a.a.Shader.import(l.a);var u={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function h(t){var e={type:a.a.Texture.FLOAT,minFilter:a.a.Texture.NEAREST,magFilter:a.a.Texture.NEAREST};this._positionSourceTex=new a.a.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new a.a.Texture2D(e),this._positionPrevTex=new a.a.Texture2D(e),this._forceTex=new a.a.Texture2D(e),this._forcePrevTex=new a.a.Texture2D(e),this._weightedSumTex=new a.a.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new a.a.Texture2D(e),this._globalSpeedPrevTex=new a.a.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new o.a({fragment:a.a.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new o.a({fragment:a.a.Shader.source("clay.compositor.output")});var i=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new a.a.Mesh({geometry:new a.a.Geometry({attributes:{node1:new a.a.Geometry.Attribute("node1","float",2),node2:new a.a.Geometry.Attribute("node2","float",2),weight:new a.a.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new a.a.Material({transparent:!0,shader:a.a.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:i,depthMask:!1,depthText:!1}),mode:a.a.Mesh.POINTS}),this._weightedSumMesh=new a.a.Mesh({geometry:new a.a.Geometry({attributes:{node:new a.a.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new a.a.Material({transparent:!0,shader:a.a.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:i,depthMask:!1,depthText:!1}),mode:a.a.Mesh.POINTS}),this._framebuffer=new s.a({depthBuffer:!1}),this._dummyCamera=new a.a.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}h.prototype.updateOption=function(t){for(var e in u)this[e]=u[e];var i=this._nodes.length;if(this.jitterTolerence=i>5e4?10:i>5e3?1:.1,this.scaling=i>100?2:10,t)for(var e in u)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var n=this._positionSourceTex.pixels,r=0;rt},h.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t,t=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=t,t=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},h.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},h.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(i){this[i].width=t,this[i].height=e,this[i].dirty()}),this)},h.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)},r.a.ForceAtlas2GPU=h,e.a=h},function(t,e,i){"use strict";e.a="@export ecgl.forceAtlas2.updateNodeRepulsion\n\n#define NODE_COUNT 0\n\nuniform sampler2D positionTex;\n\nuniform vec2 textureSize;\nuniform float gravity;\nuniform float scaling;\nuniform vec2 gravityCenter;\n\nuniform bool strongGravityMode;\nuniform bool preventOverlap;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, v_Texcoord);\n\n vec2 force = vec2(0.0);\n for (int i = 0; i < NODE_COUNT; i++) {\n vec2 uv = vec2(\n mod(float(i), textureSize.x) / (textureSize.x - 1.0),\n floor(float(i) / textureSize.x) / (textureSize.y - 1.0)\n );\n vec4 n1 = texture2D(positionTex, uv);\n\n vec2 dir = n0.xy - n1.xy;\n float d2 = dot(dir, dir);\n\n if (d2 > 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end"},function(t,e,i){"use strict";var n=i(5),r=i(4),a=i(272).a.toString();a=a.slice(a.indexOf("{")+1,a.lastIndexOf("}"));var o={barnesHutOptimize:!0,barnesHutTheta:1.5,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null},s=function(t){for(var e in o)this[e]=o[e];if(t)for(var e in t)this[e]=t[e];this._nodes=[],this._edges=[],this._disposed=!1,this._positionTex=new n.a({type:r.a.FLOAT,flipY:!1,minFilter:r.a.NEAREST,magFilter:r.a.NEAREST})};s.prototype.initData=function(t,e){var i=new Blob([a]),n=window.URL.createObjectURL(i);this._worker=new Worker(n),this._worker.onmessage=this._$onupdate.bind(this),this._nodes=t,this._edges=e,this._frame=0;for(var r=t.length,o=e.length,s=new Float32Array(2*r),l=new Float32Array(r),u=new Float32Array(r),h=new Float32Array(2*o),c=new Float32Array(o),d=0;d5e4?10:a>5e3?1:.1,e.scaling=a>100?2:10,e.barnesHutOptimize=a>1e3,t)for(var i in o)null!=t[i]&&(e[i]=t[i]);if(!e.gravityCenter){for(var s=[1/0,1/0],l=[-1/0,-1/0],u=0;ut},s.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var i=0;i=t&&this.bbox[1]<=e&&this.bbox[3]>=e},u.setBBox=function(t,e,i,n){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=i,this.bbox[3]=n,this.size=(i-t+n-e)/2},u._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new l,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},u._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),i=this.bbox;if(!e){var n=(i[0]+i[2])/2,r=(i[1]+i[3])/2,a=(i[2]-i[0])/2,o=(i[3]-i[1])/2,s=t.position[0]>=n?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*a+i[0],l*o+i[1],(s+1)*a+i[0],(l+1)*o+i[1])}e.addNode(t)},u._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,i=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,i+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=i/this.mass};var f,p=d.prototype;p.initNodes=function(t,e,i){var n=e.length;this.nodes.length=0;for(var r=void 0!==i,a=0;a0&&(this.strongGravityMode?this.applyNodeStrongGravity(h):this.applyNodeGravity(h))}for(l=0;l0&&(m=Math.min(m/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=m,l=0;l0&&(_=Math.min(y*_,10)/y,n(u.position,u.position,u.force,_))}},p.applyRegionToNodeRepulsion=(f=t(),function(t,e){if(t.node)this.applyNodeToNodeRepulsion(t.node,e,!0);else{a(f,e.position,t.centerOfMass);var i=f[0]*f[0]+f[1]*f[1];if(i>this.barnesHutTheta*t.size*t.size){var r=this.scaling*e.mass*t.mass/i;n(e.force,e.force,f,r)}else for(var o=0;o0)s=this.scaling*t.mass*i.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*i.mass}}else s=this.scaling*t.mass*i.mass/o;n(t.force,t.force,e,s),n(i.force,i.force,e,-s)}}}}(),p.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,o=t.target;a(e,r.position,o.position);var s,l,u=i(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-o.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,n(r.force,r.force,e,l),n(o.force,o.force,e,-l))}}(),p.applyNodeGravity=function(){var e=t();return function(t){a(e,this.gravityCenter,t.position);var r=i(e);n(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),p.applyNodeStrongGravity=function(){var e=t();return function(t){a(e,this.gravityCenter,t.position),n(t.force,t.force,e,this.gravity*t.mass)}}(),p.updateBBox=function(){for(var t=1/0,e=1/0,i=-1/0,n=-1/0,r=0;r0?1.1:.9,a=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=a/this._zoom;var o=this._convertPos(i,n),s=(o.x-this._dx)*(r-1),l=(o.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=a,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}}));e.a=r},function(t,e,i){"use strict";e.a="@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end"},function(t,e,i){"use strict";var n=i(0);i.n(n),i(276),i(280)},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(2),s=i(22),l=i(277);r.a.extendChartView({type:"flowGL",__ecgl__:!0,init:function(t,e){this.viewGL=new s.a("orthographic"),this.groupGL=new a.a.Node,this.viewGL.add(this.groupGL),this._particleSurface=new l.a;var i=new a.a.Mesh({geometry:new a.a.PlaneGeometry,material:new a.a.Material({shader:new a.a.Shader({vertex:a.a.Shader.source("ecgl.color.vertex"),fragment:a.a.Shader.source("ecgl.color.fragment")}),transparent:!0})});i.material.enableTexture("diffuseMap"),this.groupGL.add(i),this._planeMesh=i},render:function(t,e,i){var n=this._particleSurface;n.setParticleType(t.get("particleType")),n.setSupersampling(t.get("supersampling")),this._updateData(t,i),this._updateCamera(i.getWidth(),i.getHeight(),i.getDevicePixelRatio());var r=o.a.firstNotNull(t.get("particleDensity"),128);n.setParticleDensity(r,r);var s=this._planeMesh,l=+new Date,u=this,h=!0;s.__percent=0,s.stopAnimation(),s.animate("",{loop:!0}).when(1e5,{__percent:1}).during((function(){var t=+new Date,e=Math.min(t-l,20);l+=e,u._renderer&&(n.update(u._renderer,i,e/1e3,h),s.material.set("diffuseMap",n.getSurfaceTexture())),h=!1})).start();var c=t.getModel("itemStyle"),d=a.a.parseColor(c.get("color"));d[3]*=o.a.firstNotNull(c.get("opacity"),1),s.material.set("color",d),n.setColorTextureImage(t.get("colorTexture"),i),n.setParticleSize(t.get("particleSize")),n.particleSpeedScaling=t.get("particleSpeed"),n.motionBlurFactor=1-Math.pow(.1,t.get("particleTrail"))},updateTransform:function(t,e,i){this._updateData(t,i)},afterRender:function(t,e,i,n){var r=n.renderer;this._renderer=r},_updateData:function(t,e){var i=t.coordinateSystem,n=i.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]})),r=t.getData(),a=r.getDataExtent(n[0]),o=r.getDataExtent(n[1]),s=t.get("gridWidth"),l=t.get("gridHeight");if(null==s||"auto"===s){var u=(a[1]-a[0])/(o[1]-o[0]);s=Math.round(Math.sqrt(u*r.count()))}null!=l&&"auto"!==l||(l=Math.ceil(r.count()/s));var h=this._particleSurface.vectorFieldTexture,c=h.pixels;if(c&&c.length===l*s*4)for(var d=0;d=359&&(r[0]>0&&(r[0]=0),a[0]0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new l.a),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var i=e.getContext("2d");return i.fillStyle="#fff",i.arc(t/2,t/2,t/2,0,2*Math.PI),i.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var i=this._downsampleTextures,n=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,a=this._width*this._supersampling,o=this._height*this._supersampling,s=0;s65535?new Uint32Array(3*n):new Uint16Array(3*n))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}}));e.a=a},function(t,e,i){"use strict";e.a="@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n"},function(t,e,i){"use strict";var n=i(0),r=i.n(n);r.a.extendSeriesModel({type:"series.flowGL",dependencies:["geo","grid","bmap"],visualColorAccessPath:"itemStyle.color",getInitialData:function(t,e){var i=r.a.getCoordinateSystemDimensions(this.get("coordinateSystem"))||["x","y"];if(i.length>2)throw new Error("flowGL can only be used on 2d coordinate systems.");i.push("vx","vy");var n=r.a.helper.completeDimensions(i,this.getSource(),{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),a=new r.a.List(n,this);return a.initData(this.getSource()),a},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,supersampling:1,particleType:"point",particleDensity:128,particleSize:1,particleSpeed:1,particleTrail:2,colorTexture:null,gridWidth:"auto",gridHeight:"auto",itemStyle:{color:"#fff",opacity:.8}}})},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=(i(282),i(283),i(17));r.a.registerVisual(Object(a.a)("linesGL"))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(13),o=(i.n(a),r.a.extendSeriesModel({type:"series.linesGL",dependencies:["grid","geo"],visualColorAccessPath:"lineStyle.color",streamEnabled:!0,init:function(t){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),o.superApply(this,"init",arguments)},mergeOption:function(t){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),o.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Object(a.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Object(a.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),i=e.option instanceof Array?e.option:e.getShallow("coords");if(!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],r=0;ri)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,o),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){var i=new r.a.List(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,r){if(t instanceof Array)return NaN;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[r]:a:void 0})),i},defaultOption:{coordinateSystem:"geo",zlevel:10,progressive:1e4,progressiveThreshold:5e4,blendMode:"source-over",lineStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}}))},function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(1),o=i(22),s=i(105),l=i(103),u=i(2);r.a.extendChartView({type:"linesGL",__ecgl__:!0,init:function(t,e){this.groupGL=new a.a.Node,this.viewGL=new o.a("orthographic"),this.viewGL.add(this.groupGL),this._glViewHelper=new l.a(this.viewGL),this._nativeLinesShader=a.a.createShader("ecgl.lines3D"),this._meshLinesShader=a.a.createShader("ecgl.meshLines3D"),this._linesMeshes=[],this._currentStep=0},render:function(t,e,i){this.groupGL.removeAll(),this._glViewHelper.reset(t,i);var n=this._linesMeshes[0];n||(n=this._linesMeshes[0]=this._createLinesMesh(t)),this._linesMeshes.length=1,this.groupGL.add(n),this._updateLinesMesh(t,n,0,t.getData().count()),this.viewGL.setPostEffect(t.getModel("postEffect"),i)},incrementalPrepareRender:function(t,e,i){this.groupGL.removeAll(),this._glViewHelper.reset(t,i),this._currentStep=0,this.viewGL.setPostEffect(t.getModel("postEffect"),i)},incrementalRender:function(t,e,i,n){var r=this._linesMeshes[this._currentStep];r||(r=this._createLinesMesh(e),this._linesMeshes[this._currentStep]=r),this._updateLinesMesh(e,r,t.start,t.end),this.groupGL.add(r),n.getZr().refresh(),this._currentStep++},updateTransform:function(t,e,i){t.coordinateSystem.getRoamTransform&&this._glViewHelper.updateTransform(t,i)},_createLinesMesh:function(t){return new a.a.Mesh({$ignorePicking:!0,material:new a.a.Material({shader:a.a.createShader("ecgl.lines3D"),transparent:!0,depthMask:!1,depthTest:!1}),geometry:new s.a({segmentScale:10,useNativeLine:!0,dynamic:!1}),mode:a.a.Mesh.LINES,culling:!1})},_updateLinesMesh:function(t,e,i,n){var r=t.getData();e.material.blend="lighter"===t.get("blendMode")?a.a.additiveBlend:null;var o=t.get("lineStyle.curveness")||0,s=t.get("polyline"),l=e.geometry,h=t.coordinateSystem,c=u.a.firstNotNull(t.get("lineStyle.width"),1);c>1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=a.a.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=a.a.Mesh.LINES),i=i||0,n=n||r.count(),l.resetOffset();var d=0,f=0,p=[],g=[],m=[],v=[],_=[],y=.3;function x(){g[0]=.7*p[0]+v[0]*y-(p[1]-v[1])*o,g[1]=.7*p[1]+v[1]*y-(v[0]-p[0])*o,m[0]=p[0]*y+.7*v[0]-(p[1]-v[1])*o,m[1]=p[1]*y+.7*v[1]-(v[0]-p[0])*o}if(s||0!==o)for(var b=i;bn)return!1;return!0}(s,e))){var l=e.mapDimension(s.dim),u={};return n.each(s.getViewLabels(),(function(t){u[t.tickValue]=1})),function(t){return!u.hasOwnProperty(e.get(l,t))}}}}function M(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),r=_(t,e,i);if(!i.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);n?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return y(t,e,i)}var A=f.extend({type:"line",init:function(){var t=new l.Group,e=new a;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var r=t.coordinateSystem,a=this.group,o=t.getData(),s=t.getModel("lineStyle"),u=t.getModel("areaStyle"),h=o.mapArray(o.getItemLayout),c="polar"===r.type,d=this._coordSys,f=this._symbolDraw,p=this._polyline,v=this._polygon,_=this._lineGroup,y=t.get("animation"),b=!u.isEmpty(),A=u.get("origin"),C=function(t,e,i){if(!i.valueDim)return[];for(var n=[],r=0,a=e.count();r=0;o--){var s=i[o].dimension,u=t.dimensions[s],h=t.getDimensionInfo(u);if("x"===(r=h&&h.coordDim)||"y"===r){a=i[o];break}}if(a){var c=e.getAxis(r),d=n.map(a.stops,(function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}})),f=d.length,p=a.outerColors.slice();f&&d[0].coord>d[f-1].coord&&(d.reverse(),p.reverse());var g=d[0].coord-10,m=d[f-1].coord+10,v=m-g;if(v<.001)return"transparent";n.each(d,(function(t){t.offset=(t.coord-g)/v})),d.push({offset:f?d[f-1].offset:.5,color:p[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:p[0]||"transparent"});var _=new l.LinearGradient(0,0,0,0,d,!0);return _[r]=g,_[r+"2"]=m,_}}}(o,r)||o.getVisual("color");p.useStyle(n.defaults(s.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"}));var R=t.get("smooth");if(R=w(t.get("smooth")),p.setShape({smooth:R,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var N=o.getCalculationInfo("stackedOnSeries"),k=0;v.useStyle(n.defaults(u.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel"})),N&&(k=w(N.get("smooth"))),v.setShape({smooth:R,stackedOnSmooth:k,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=r,this._stackedOnPoints=C,this._points=h,this._step=D,this._valueOrigin=A},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),a=u.queryDataIndex(r,n);if(!(a instanceof Array)&&null!=a&&a>=0){var s=r.getItemGraphicEl(a);if(!s){var l=r.getItemLayout(a);if(!l)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l[0],l[1]))return;(s=new o(r,a)).position=l,s.setZ(t.get("zlevel"),t.get("z")),s.ignore=isNaN(l[0])||isNaN(l[1]),s.__temp=!0,r.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else f.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),a=u.queryDataIndex(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else f.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new c({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new d({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,r,a){var o=this._polyline,u=this._polygon,h=t.hostModel,c=s(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),d=c.current,f=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(r&&(d=T(c.current,i,r),f=T(c.stackedOnCurrent,i,r),p=T(c.next,i,r),g=T(c.stackedOnNext,i,r)),b(d,p)>3e3||u&&b(f,g)>3e3)return o.setShape({points:p}),void(u&&u.setShape({points:p,stackedOnPoints:g}));o.shape.__points=c.current,o.shape.points=d,l.updateProps(o,{shape:{points:p}},h),u&&(u.setShape({points:d,stackedOnPoints:f}),l.updateProps(u,{shape:{points:p,stackedOnPoints:g}},h));for(var m=[],v=c.status,_=0;_e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i1)"string"==typeof o?l=i[o]:"function"==typeof o&&(l=o),l&&t.setData(a.downSample(a.mapDimension(h.dim),1/f,l,n))}}}}},function(t,e,i){var n=i(0),r=i(11),a=i(320);function o(t){a.call(this,t)}o.prototype={constructor:o,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),a=Math.max(t[0],t[1])-i,o=Math.max(e[0],e[1])-n;return new r(i,n,a,o)}},n.inherits(o,a);var s=o;t.exports=s},function(t,e,i){var n=i(0);function r(t){return this._axes[t]}var a=function(t){this._axes={},this._dimList=[],this.name=t||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return n.map(this._dimList,r,this)},getAxesByScale:function(t){return t=t.toLowerCase(),n.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;re[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){i(192);var n=i(16).extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});t.exports=n},function(t,e,i){i(192),i(324)},function(t,e,i){var n=i(0),r=i(3),a=i(37),o=i(45),s=i(181),l=i(194),u=l.rectCoordAxisBuildSplitArea,h=l.rectCoordAxisHandleRemove,c=["axisLine","axisTickLabel","axisName"],d=["splitArea","splitLine","minorSplitLine"],f=o.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,o){this.group.removeAll();var l=this._axisGroup;if(this._axisGroup=new r.Group,this.group.add(this._axisGroup),t.get("show")){var u=t.getCoordSysModel(),h=s.layout(u,t),p=new a(t,h);n.each(c,p.add,p),this._axisGroup.add(p.getGroup()),n.each(d,(function(e){t.get(e+".show")&&this["_"+e](t,u)}),this),r.groupTransition(l,this._axisGroup,t),f.superCall(this,"render",t,e,i,o)}},remove:function(){h(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=n.isArray(s)?s:[s];for(var l=e.coordinateSystem.getRect(),u=i.isHorizontal(),h=0,c=i.getTicksCoords({tickModel:a}),d=[],f=[],p=o.getLineStyle(),g=0;gt&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});t.exports=n},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(0),a=i(3),o=i(196).setLabel,s=i(15),l=i(328),u=i(12),h=i(40),c=i(34).throttle,d=i(70).createClipPath,f=i(329),p=["itemStyle","barBorderWidth"],g=[0,0];r.extend(s.prototype,l);var m=n.extendChartView({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,r=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?n=u.isHorizontal():"polar"===l.type&&(n="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,d=t.get("clip",!0),f=function(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var r=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=r,i.width+=2*r):(i.y-=r,i.height+=2*r)}}return i}(l,o);r.removeClipPath();var p=t.get("roundCap",!0),g=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),v=m.get("barBorderRadius")||0,_=[],S=this._backgroundEls||[],A=function(t){var e=T[l.type](o,t),i=function(t,e,i){return new("polar"===t.type?a.Sector:a.Rect)({shape:L(e,i,t),silent:!0,z2:0})}(l,n,e);return i.useStyle(m.getBarItemStyle()),"cartesian2d"===l.type&&i.setShape("r",v),_[t]=i,i};o.diff(s).add((function(e){var i=o.getItemModel(e),a=T[l.type](o,e,i);if(g&&A(e),o.hasValue(e)){if(d)if(y[l.type](f,a))return void r.remove(s);var s=x[l.type](e,a,n,c,!1,p);o.setItemGraphicEl(e,s),r.add(s),M(s,o,e,i,a,t,n,"polar"===l.type)}})).update((function(e,i){var u=o.getItemModel(e),h=T[l.type](o,e,u);if(g){var b;0===S.length?b=A(i):((b=S[i]).useStyle(m.getBarItemStyle()),"cartesian2d"===l.type&&b.setShape("r",v),_[e]=b);var w=T[l.type](o,e),C=L(n,w,l);a.updateProps(b,{shape:C},c,e)}var I=s.getItemGraphicEl(i);if(o.hasValue(e)){if(d)if(y[l.type](f,h))return void r.remove(I);I?a.updateProps(I,{shape:h},c,e):I=x[l.type](e,h,n,c,!0,p),o.setItemGraphicEl(e,I),r.add(I),M(I,o,e,u,h,t,n,"polar"===l.type)}else r.remove(I)})).remove((function(t){var e=s.getItemGraphicEl(t);"cartesian2d"===l.type?e&&b(t,c,e):e&&w(t,c,e)})).execute();var C=this._backgroundGroup||(this._backgroundGroup=new h);C.removeAll();for(var I=0;I<_.length;++I)C.add(_[I]);r.add(C),this._backgroundEls=_,this._data=o},_renderLarge:function(t,e,i){this._clear(),C(t,this.group);var n=t.get("clip",!0)?d(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),C(e,this.group,!0)},dispose:r.noop,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(e){"sector"===e.type?w(e.dataIndex,t,e):b(e.dataIndex,t,e)}))):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}}),v=Math.max,_=Math.min,y={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var r=v(e.x,t.x),a=_(e.x+e.width,t.x+t.width),o=v(e.y,t.y),s=_(e.y+e.height,t.y+t.height);e.x=r,e.y=o,e.width=a-r,e.height=s-o;var l=e.width<0||e.height<0;return i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(i<0){var n=e.r;e.r=e.r0,e.r0=n}n=_(e.r,t.r);var r=v(e.r0,t.r0);e.r=n,e.r0=r;var a=n-r<0;if(i<0){n=e.r;e.r=e.r0,e.r0=n}return a}},x={cartesian2d:function(t,e,i,n,o){var s=new a.Rect({shape:r.extend({},e),z2:1});if(s.name="item",n){var l=i?"height":"width",u={};s.shape[l]=0,u[l]=e[l],a[o?"updateProps":"initProps"](s,{shape:u},n,t)}return s},polar:function(t,e,i,n,o,s){var l=e.startAngle0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*r/2,y:n.y+o*r/2,width:n.width-a*r,height:n.height-o*r}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function S(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function M(t,e,i,n,s,l,u,h){var c=e.getItemVisual(i,"color"),d=e.getItemVisual(i,"opacity"),f=e.getVisual("borderColor"),p=n.getModel("itemStyle"),g=n.getModel("emphasis.itemStyle").getBarItemStyle();h||t.setShape("r",p.get("barBorderRadius")||0),t.useStyle(r.defaults({stroke:S(s)?"none":f,fill:S(s)?"none":c,opacity:d},p.getBarItemStyle()));var m=n.getShallow("cursor");m&&t.attr("cursor",m);var v=u?s.height>0?"bottom":"top":s.width>0?"left":"right";h||o(t.style,g,n,c,l,i,v),S(s)&&(g.fill=g.stroke="none"),a.setHoverStyle(t,g)}var A=u.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,r=this.__baseDimIdx,a=0;a=c&&v<=d&&(l<=_?h>=l&&h<=_:h>=_&&h<=l))return o[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=e>=0?e:null}),30,!1);function L(t,e,i){var n,r="polar"===i.type;return n=r?i.getArea():i.grid.getRect(),r?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}t.exports=m},function(t,e,i){var n=i(49)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),r={getBarItemStyle:function(t){var e=n(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}};t.exports=r},function(t,e,i){var n=(0,i(3).extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-r),s=r+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+i,d*r+n),t.arc(c*s+i,d*s+n,o,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,o,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(i,n,r,u,l,h),t.moveTo(c*r+i,p*r+n)),t.closePath()}});t.exports=n},function(t,e,i){var n=i(2),r=i(0);i(331),i(332);var a=i(197),o=i(90),s=i(333),l=i(73);a("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),n.registerVisual(o("pie")),n.registerLayout(r.curry(s,"pie")),n.registerProcessor(l("pie"))},function(t,e,i){var n=i(2),r=i(57),a=i(0),o=i(5),s=i(4).getPercentWithPrecision,l=i(118),u=i(42).retrieveRawAttr,h=i(31).makeSeriesEncodeForNameBased,c=i(66),d=n.extendSeriesModel({type:"series.pie",init:function(t){d.superApply(this,"init",arguments),this.legendVisualProvider=new c(a.bind(this.getData,this),a.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){d.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return r(this,{coordDimensions:["value"],encodeDefaulter:a.curry(h,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,r=t.count();n0&&(c?"scale"!==d:"transition"!==f)){for(var m=a.getItemLayout(0),v=1;isNaN(m.startAngle)&&v=i.r0}}});t.exports=h},function(t,e,i){var n=i(4),r=n.parsePercent,a=n.linearMap,o=i(8),s=i(334),l=i(0),u=2*Math.PI,h=Math.PI/180;t.exports=function(t,e,i,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),n=e.mapDimension("value"),c=function(t,e){return o.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,i),d=t.get("center"),f=t.get("radius");l.isArray(f)||(f=[0,f]),l.isArray(d)||(d=[d,d]);var p=r(c.width,i.getWidth()),g=r(c.height,i.getHeight()),m=Math.min(p,g),v=r(d[0],p)+c.x,_=r(d[1],g)+c.y,y=r(f[0],m/2),x=r(f[1],m/2),b=-t.get("startAngle")*h,w=t.get("minAngle")*h,T=0;e.each(n,(function(t){!isNaN(t)&&T++}));var S=e.getSum(n),M=Math.PI/(S||T)*2,A=t.get("clockwise"),C=t.get("roseType"),I=t.get("stillShowZeroSum"),L=e.getDataExtent(n);L[0]=0;var E=u,P=0,D=b,O=A?1:-1;if(e.each(n,(function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:v,cy:_,r0:y,r:C?NaN:x,viewRect:c});else{(n="area"!==C?0===S&&I?M:t*M:u/T)l+o);a++)if(t[a].y+=n,a>e&&a+1t[a].y+t[a].height)return void c(a,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;n>=0&&!(t[n].y-i0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=o&&(d=o-10),!e&&d<=o&&(d=o+10),t[s].x=i+d*a,o=d}}t.sort((function(t,e){return t.y-e.y}));for(var f,p=0,g=t.length,m=[],v=[],_=0;_=i?v.push(t[_]):m.push(t[_]);d(m,!1,e,i,n,r),d(v,!0,e,i,n,r)}function s(t){return"center"===t.position}t.exports=function(t,e,i,l,u,h){var c,d,f=t.getData(),p=[],g=!1,m=(t.get("minShowLabelAngle")||0)*a;f.each((function(a){var o=f.getItemLayout(a),s=f.getItemModel(a),l=s.getModel("label"),h=l.get("position")||s.get("emphasis.label.position"),v=l.get("distanceToLabelLine"),_=l.get("alignTo"),y=r(l.get("margin"),i),x=l.get("bleedMargin"),b=l.getFont(),w=s.getModel("labelLine"),T=w.get("length");T=r(T,i);var S=w.get("length2");if(S=r(S,i),!(o.angle0?"right":"left":E>0?"left":"right"}var G=l.get("rotate");D="number"==typeof G?G*(Math.PI/180):G?E<0?-L+Math.PI:-L:0,g=!!D,o.label={x:M,y:A,position:h,height:R.height,len:T,len2:S,linePoints:C,textAlign:I,verticalAlign:"middle",rotation:D,inside:N,labelDistance:v,labelAlignTo:_,labelMargin:y,bleedMargin:x,textRect:R,text:O,font:b},N||p.push(o.label)}})),!g&&t.get("avoidLabelOverlap")&&function(t,e,i,r,a,l,u,h){for(var c=[],d=[],f=Number.MAX_VALUE,p=-Number.MAX_VALUE,g=0;g1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=o().reset(t);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new a:new r,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},function(t,e,i){var n=i(3),r=i(23).createSymbol,a=i(99),o=n.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,r=this.symbolProxy,a=r.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-o/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+o)return s}return-1}});function s(){this.group=new n.Group}var l=s.prototype;l.isPersistent=function(){return!this._incremental},l.updateData=function(t,e){this.group.removeAll();var i=new o({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},l.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild((function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)}))}},l.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new a({silent:!0})),this.group.add(this._incremental)):this._incremental=null},l.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new o,this._incremental.addDisplayable(n,!0)):((n=new o({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},l._setCommon=function(t,e,i,n){var a=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=r(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var s=t.shape.size[0]<4;t.useStyle(a.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var l=e.getVisual("color");l&&t.setColor(l),i||(t.seriesIndex=a.seriesIndex,t.on("mousemove",(function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))})))},l.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},l._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var u=s;t.exports=u},function(t,e,i){var n=i(2);i(340),i(345),i(346);var r=i(90),a=i(44),o=i(347),s=i(73),l=i(348);n.registerVisual(r("radar")),n.registerVisual(a("radar","circle")),n.registerLayout(o),n.registerProcessor(s("radar")),n.registerPreprocessor(l)},function(t,e,i){i(341),i(343),i(344)},function(t,e,i){var n=i(0),r=i(342),a=i(82),o=i(4),s=i(25),l=s.getScaleExtent,u=s.niceScaleExtent,h=i(24),c=i(161);function d(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=n.map(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new r(i,"log"===t.get("axisType")?new c:new a);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}d.prototype.getIndicatorAxes=function(){return this._indicatorAxes},d.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},d.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},d.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var r,a=Math.atan2(-i,e),o=1/0,s=-1,l=0;li[0]&&isFinite(p)&&isFinite(i[0]))}else{r.getTicks().length-1>a&&(d=s(d));var f=Math.ceil(i[1]/d)*d,p=o.round(f-d*a);r.setExtent(p,f),r.setInterval(d)}}))},d.dimensions=[],d.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var r=new d(n,t,e);i.push(r),n.coordinateSystem=r})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},h.register("radar",d);var f=d;t.exports=f},function(t,e,i){var n=i(0),r=i(36);function a(t,e,i){r.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(2),r=i(0),a=i(193),o=i(15),s=i(53),l=a.valueAxis;function u(t,e){return r.defaults({show:e},t)}var h=n.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),a=this.get("axisTick"),l=this.get("axisType"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),f=this.get("nameGap"),p=this.get("triggerEvent"),g=r.map(this.get("indicator")||[],(function(g){null!=g.max&&g.max>0&&!g.min?g.min=0:null!=g.min&&g.min<0&&!g.max&&(g.max=0);var m=h;if(null!=g.color&&(m=r.defaults({color:g.color},h)),g=r.merge(r.clone(g),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:a,axisType:l,axisLabel:u,name:g.text,nameLocation:"end",nameGap:f,nameTextStyle:m,triggerEvent:p},!1),c||(g.name=""),"string"==typeof d){var v=g.name;g.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(g.name=d(g.name,g));var _=r.extend(new o(g,null,this.ecModel),s);return _.mainType="radar",_.componentIndex=this.componentIndex,_}),this);this.getIndicatorModels=function(){return g}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:r.merge({lineStyle:{color:"#bbb"}},l.axisLine),axisLabel:u(l.axisLabel,!1),axisTick:u(l.axisTick,!1),axisType:"interval",splitLine:u(l.splitLine,!0),splitArea:u(l.splitArea,!0),indicator:[]}});t.exports=h},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(0),a=i(37),o=i(3),s=["axisLine","axisTickLabel","axisName"],l=n.extendComponentView({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=r.map(i,(function(t){return new a(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));r.each(n,(function(t){r.each(s,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),d=l.get("color"),f=u.get("color");d=r.isArray(d)?d:[d],f=r.isArray(f)?f:[f];var p=[],g=[];if("circle"===n)for(var m=i[0].getTicksCoords(),v=e.cx,_=e.cy,y=0;y":"\n";return o(""===l?this.name:l)+u+a.map(s,(function(e,i){var n=r.get(r.mapDimension(e.dim),t);return o(e.name+" : "+n)})).join(u)},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(a.map(i.dimensions,(function(t){return e.mapDimension(t)})),t,!0),r=0,o=n.length;r":"\n";return h.join(", ")+p+s(o+" : "+a)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});n.mixin(f,u);var p=f;t.exports=p},function(t,e,i){var n=i(0).each,r=i(162),a=i(5).makeInner,o=i(352),s=i(353),l=i(354),u=i(355),h=a(),c={load:function(t,e,i){var a=h(e).parsed;if(a)return a;var c,f=e.specialAreas||{},p=e.geoJSON;try{c=p?r(p,i):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return o(t,c),n(c,(function(e){var i=e.name;s(t,e),l(t,e),u(t,e);var n=f[i];n&&e.transformTo(n.left,n.top,n.width,n.height)})),h(e).parsed={regions:c,boundingRect:d(c)}}};function d(t){for(var e,i=0;is&&(s=t.depth)}));var l=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:s;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l})),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),r=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return a(o+(isNaN(r)||null==r?"":" : "+r))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});t.exports=s},function(t,e,i){var n=i(0),r=i(3),a=i(85),o=i(200).radialCoordinate,s=i(2),l=i(61),u=i(109),h=i(106),c=i(68),d=i(86).onIrrelevantElement,f=(i(7).__DEV__,i(4).parsePercent),p=r.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,r=e.parentPoint,a=i[0],o=i[n-1];if(1===n)return t.moveTo(r[0],r[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=f(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(o[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=o[l],t.lineTo(c[0],c[1]),t.lineTo(o[0],o[1]);for(var d=1;dM.x)||(w-=Math.PI);var I=T?"left":"right",L=l.labelModel.get("rotate"),E=L*(Math.PI/180);b.setStyle({textPosition:l.labelModel.get("position")||I,textRotation:null==L?-w:E,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,a,o,s,l,u,h){var c=h.edgeShape,d=a.__edge;if("curve"===c)e.parentNode&&e.parentNode!==i&&(d||(d=a.__edge=new r.BezierCurve({shape:x(h,o,o),style:n.defaults({opacity:0,strokeNoScale:!0},h.lineStyle)})),r.updateProps(d,{shape:x(h,s,l),style:n.defaults({opacity:1},h.lineStyle)},t));else if("polyline"===c&&"orthogonal"===h.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var f=e.children,g=[],m=0;m_.getLayout().x&&(_=t),t.depth>y.depth&&(y=t)}));var x=v===_?1:p(v,_)/2,b=x-v.getLayout().x,w=0,T=0,S=0,M=0;if("radial"===n)w=o/(_.getLayout().x+x+b),T=f/(y.depth-1||1),a(m,(function(t){S=(t.getLayout().x+b)*w,M=(t.depth-1)*T;var e=c(S,M);t.setLayout({x:e.x,y:e.y,rawX:S,rawY:M},!0)}));else{var A=t.getOrient();"RL"===A||"LR"===A?(T=f/(_.getLayout().x+x+b),w=o/(y.depth-1||1),a(m,(function(t){M=(t.getLayout().x+b)*T,S="LR"===A?(t.depth-1)*w:o-(t.depth-1)*w,t.setLayout({x:S,y:M},!0)}))):"TB"!==A&&"BT"!==A||(w=o/(_.getLayout().x+x+b),T=f/(y.depth-1||1),a(m,(function(t){S=(t.getLayout().x+b)*w,M="TB"===A?(t.depth-1)*T:f-(t.depth-1)*T,t.setLayout({x:S,y:M},!0)})))}}}(t,e)}))}},function(t,e){e.eachAfter=function(t,e,i){for(var n,r=[t],a=[];n=r.pop();)if(a.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;a--)n.push(r[a])}}},function(t,e,i){var n=i(2);i(370),i(371),i(374);var r=i(375),a=i(376);n.registerVisual(r),n.registerLayout(a)},function(t,e,i){var n=i(0),r=i(17),a=i(120),o=i(15),s=i(9),l=s.encodeHTML,u=s.addCommas,h=i(46).wrapTreePathInfo,c=r.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function t(e){var i=0;n.each(e.children,(function(e){t(e);var r=e.value;n.isArray(r)&&(r=r[0]),i+=r}));var r=e.value;n.isArray(r)&&(r=r[0]);(null==r||isNaN(r))&&(r=i);r<0&&(r=0);n.isArray(e.value)?e.value[0]=r:e.value=r}(i);var r=t.levels||[],s=this.designatedVisualItemStyle={},l=new o({itemStyle:s},this,e);r=t.levels=function(t,e){var i,r=e.get("color");if(!r)return;if(t=t||[],n.each(t,(function(t){var e=new o(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)})),!i){(t[0]||(t[0]={})).color=r.slice()}return t}(r,e);var u=n.map(r||[],(function(t){return new o(t,l,e)}),this),h=a.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=h.getNodeByDataIndex(e),n=u[i.depth];return t.parentModel=n||l,t}))}));return h.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),r=n.isArray(i)?u(i[0]):u(i),a=e.getName(t);return l(a+": "+r)},getDataParams:function(t){var e=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=h(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},n.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=n.createHashMap(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});t.exports=c},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(43),s=i(46),l=i(372),u=i(68),h=i(11),c=i(20),d=i(373),f=i(49),p=i(9).windowOpen,g=r.bind,m=a.Group,v=a.Rect,_=r.each,y=["label"],x=["emphasis","label"],b=["upperLabel"],w=["emphasis","upperLabel"],T=f([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),S=function(t){var e=T(t);return e.stroke=e.fill=e.lineWidth=null,e},M=n.extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(r.indexOf(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=s.retrieveTargetInfo(n,["treemapZoomToNode","treemapRootToNode"],t),l=n&&n.type,u=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===l&&o&&c?{rootNodeGroup:c.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(u),p=this._doRender(f,t,d);h||l&&"treemapZoomToNode"!==l&&"treemapRootToNode"!==l?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new m,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,a=this._oldTree,s={nodeGroup:[],background:[],content:[]},l={nodeGroup:[],background:[],content:[]},u=this._storage,h=[],c=r.curry(A,e,l,u,i,s,h);!function t(e,i,n,a,s){a?(i=e,_(e,(function(t,e){!t.isRemoved()&&u(e,e)}))):new o(i,e,l,l).add(u).update(u).remove(r.curry(u,null)).execute();function l(t){return t.getId()}function u(r,o){var l=null!=r?e[r]:null,u=null!=o?i[o]:null,h=c(l,u,n,s);h&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],h,a,s+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var d=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&_(t,(function(t,i){var n=e[i];_(t,(function(t){t&&(n.push(t),t.__tmWillDelete=1)}))})),e}(u);return this._oldTree=n,this._storage=l,{lastsForAnimation:s,willDeleteEls:d,renderFinally:function(){_(d,(function(t){_(t,(function(t){t.parent&&t.parent.remove(t)}))})),_(h,(function(t){t.invisible=!0,t.dirty()}))}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=d.createWrap();_(e.willDeleteEls,(function(t,e){_(t,(function(t,i){if(!t.invisible){var r,l=t.parent;if(n&&"drillDown"===n.direction)r=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),r="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}r&&s.add(t,r,a,o)}}))})),_(this._storage,(function(t,i){_(t,(function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r.extend({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))}))}),this),this._state="animating",s.done(g((function(){this._state="ready",e.renderFinally()}),this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new u(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",g(this._onPan,this)),e.on("zoom",g(this._onZoom,this)));var i=new h(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var a=new h(r.x,r.y,r.width,r.height),o=this.seriesModel.layoutInfo;e-=o.x,i-=o.y;var s=c.create();c.translate(s,s,[-e,-i]),c.scale(s,s,[t.scale,t.scale]),c.translate(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var r=n.hostTree.data.getItemModel(n.dataIndex),a=r.get("link",!0),o=r.get("target",!0)||"blank";a&&p(a,o)}}}}}),this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(t,e,i.node,g((function(e){"animating"!==this._state&&(s.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var r=this._storage.background[n.getRawIndex()];if(r){var a=r.transformCoordToLocal(t,e),o=r.shape;if(!(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}}),this),i}});function A(t,e,i,n,o,s,l,u,h,c){if(l){var d=l.getLayout(),f=t.getData();if(f.setItemGraphicEl(l.dataIndex,null),d&&d.isInView){var p=d.width,g=d.height,_=d.borderWidth,M=d.invisible,A=l.getRawIndex(),I=u&&u.getRawIndex(),L=l.viewChildren,E=d.upperHeight,P=L&&L.length,D=l.getModel("itemStyle"),O=l.getModel("emphasis.itemStyle"),R=G("nodeGroup",m);if(R){if(h.add(R),R.attr("position",[d.x||0,d.y||0]),R.__tmNodeWidth=p,R.__tmNodeHeight=g,d.isAboveViewRoot)return R;var N=l.getModel(),k=G("background",v,c,1);if(k&&function(e,i,n){if(i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:p,height:g}),M)B(i);else{i.invisible=!1;var r=l.getVisual("borderColor",!0),o=O.get("borderColor"),s=S(D);s.fill=r;var u=T(O);if(u.fill=o,n){var h=p-2*_;F(s,u,r,h,E,{x:_,y:0,width:h,height:E})}else s.text=u.text=null;i.setStyle(s),a.setElementHoverStyle(i,u)}e.add(i)}(R,k,P&&d.upperLabelHeight),P)a.isHighDownDispatcher(R)&&a.setAsHighDownDispatcher(R,!1),k&&(a.setAsHighDownDispatcher(k,!0),f.setItemGraphicEl(l.dataIndex,k));else{var z=G("content",v,c,2);z&&function(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(p-2*_,0),r=Math.max(g-2*_,0);if(i.culling=!0,i.setShape({x:_,y:_,width:n,height:r}),M)B(i);else{i.invisible=!1;var o=l.getVisual("color",!0),s=S(D);s.fill=o;var u=T(O);F(s,u,o,n,r),i.setStyle(s),a.setElementHoverStyle(i,u)}e.add(i)}(R,z),k&&a.isHighDownDispatcher(k)&&a.setAsHighDownDispatcher(k,!1),a.setAsHighDownDispatcher(R,!0),f.setItemGraphicEl(l.dataIndex,R)}return R}}}function B(t){!t.invisible&&s.push(t)}function F(e,i,n,o,s,u){var h=N.get("name"),c=N.getModel(u?b:y),f=N.getModel(u?w:x),p=c.getShallow("show");a.setLabelStyle(e,i,c,f,{defaultText:p?h:null,autoColor:n,isRectText:!0,labelFetcher:t,labelDataIndex:l.dataIndex,labelProp:u?"upperLabel":"label"}),V(e,u,d),V(i,u,d),u&&(e.textRect=r.clone(u)),e.truncate=p&&c.get("ellipsis")?{outerWidth:o,outerHeight:s,minChar:2}:null}function V(e,i,n){var r=e.text;if(!i&&n.isLeafRoot&&null!=r){var a=t.get("drillDownIcon",!0);e.text=a?a+" "+r:r}}function G(t,a,s,u){var h=null!=I&&i[t][I],c=o[t];return h?(i[t][I]=null,function(t,e,i){(t[A]={}).old="nodeGroup"===i?e.position.slice():r.extend({},e.shape)}(c,h,t)):M||((h=new a({z:C(s,u)})).__tmDepth=s,h.__tmStorageName=t,function(t,e,i){var r=t[A]={},a=l.parentNode;if(a&&(!n||"drillDown"===n.direction)){var s=0,u=0,h=o.background[a.getRawIndex()];!n&&h&&h.old&&(s=h.old.width,u=h.old.height),r.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}r.fadein="nodeGroup"!==i}(c,0,t)),e[t][A]=h}}function C(t,e){var i=10*t+e;return(i-1)/i}t.exports=M},function(t,e,i){var n=i(3),r=i(8),a=i(0),o=i(46).wrapTreePathInfo;function s(t){this.group=new n.Group,t.add(this.group)}function l(t,e,i,n,r,a){var o=[[r?t:t-5,e],[t+i,e],[t+i,e+n],[r?t:t-5,e+n]];return!a&&o.splice(2,0,[t+i+5,e+n/2]),!r&&o.push([t,e+n/2]),o}function u(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&o(i,e)}}s.prototype={constructor:s,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var s=a.getModel("itemStyle"),l=s.getModel("textStyle"),u={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,u,l),this._renderContent(t,u,s,l,n),r.positionElement(o,u.pos,u.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var r=n.getModel().get("name"),a=i.getTextRect(r),o=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=o+8,e.renderList.push({node:n,text:r,width:o})}},_renderContent:function(t,e,i,o,s){for(var h=0,c=e.emptyItemWidth,d=t.get("breadcrumb.height"),f=r.getAvailableSize(e.pos,e.box),p=e.totalWidth,g=e.renderList,m=g.length-1;m>=0;m--){var v=g[m],_=v.node,y=v.width,x=v.text;p>f.width&&(p-=y-c,y=c,x=null);var b=new n.Polygon({shape:{points:l(h,0,y,d,m===g.length-1,0===m)},style:a.defaults(i.getItemStyle(),{lineJoin:"bevel",text:x,textFill:o.getTextColor(),textFont:o.getFont()}),z:10,onclick:a.curry(s,_)});this.group.add(b),u(b,t,_),h+=y+8}},remove:function(){this.group.removeAll()}};var h=s;t.exports=h},function(t,e,i){var n=i(0);e.createWrap=function(){var t,e=[],i={};return{add:function(t,r,a,o,s){return n.isString(o)&&(s=o,o=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:r,time:a,delay:o,easing:s}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,r=0,a=e.length;rc[1]&&(c[1]=u);var d=e.get("colorMappingBy"),f={type:s.name,dataExtent:c,visual:s.range};"color"!==f.type||"index"!==d&&"id"!==d?f.mappingMethod="linear":(f.mappingMethod="category",f.loop=!0);var p=new n(f);return p.__drColorMappingBy=d,p}(0,u,c,0,p,v);a.each(v,(function(e,i){if(e.depth>=o.length||e===o[e.depth]){var n=function(t,e,i,n,r,o){var s=a.extend({},e);if(r){var l=r.type,u="color"===l&&r.__drColorMappingBy,h="index"===u?n:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=r.mapValueToVisual(h)}return s}(u,p,e,i,_,s);t(e,n,o,s)}}))}else d=l(p),e.setVisual("color",d)}(s,{},t.getViewRoot().getAncestors(),t)}};function l(t){var e=u(t,"color");if(e){var i=u(t,"colorAlpha"),n=u(t,"colorSaturation");return n&&(e=r.modifyHSL(e,null,null,n)),i&&(e=r.modifyAlpha(e,i)),e}}function u(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function h(t,e){var i=t.get(e);return o(i)&&i.length?{name:e,range:i}:null}t.exports=s},function(t,e,i){var n=i(0),r=i(11),a=i(4),o=a.parsePercent,s=a.MAX_SAFE_INTEGER,l=i(8),u=i(46),h=Math.max,c=Math.min,d=n.retrieve,f=n.each,p=["itemStyle","borderWidth"],g=["itemStyle","gapWidth"],m=["upperLabel","show"],v=["upperLabel","height"],_={seriesType:"treemap",reset:function(t,e,i,a){var m=i.getWidth(),v=i.getHeight(),_=t.option,T=l.getLayoutRect(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),S=_.size||[],M=o(d(T.width,S[0]),m),A=o(d(T.height,S[1]),v),C=a&&a.type,I=u.retrieveTargetInfo(a,["treemapZoomToNode","treemapRootToNode"],t),L="treemapRender"===C||"treemapMove"===C?a.rootRect:null,E=t.getViewRoot(),P=u.getPathToRoot(E);if("treemapMove"!==C){var D="treemapZoomToNode"===C?function(t,e,i,n,r){var a,o=(e||{}).node,l=[n,r];if(!o||o===i)return l;var u=n*r,h=u*t.option.zoomToNodeRatio;for(;a=o.parentNode;){for(var c=0,d=a.children,f=0,g=d.length;fs&&(h=s),o=a}hs[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,s,l);if(0===h.sum)return t.viewChildren=[];if(h.sum=function(t,e,i,n,r){if(!n)return i;for(var a=t.get("visibleMin"),o=r.length,s=o,l=o-1;l>=0;l--){var u=r["asc"===n?o-l-1:l].getValue();u/i*er&&(r=n));var l=t.area*t.area,u=e*e*i;return l?h(u*r/l,l/(u*a)):1/0}function b(t,e,i,n,r){var a=e===i.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],d=e?t.area/e:0;(r||d>i[l[o]])&&(d=i[l[o]]);for(var f=0,p=t.length;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(y.get("show")&&E!==b){for(var z=0;z<=w;z++){P=Math.cos(M),D=Math.sin(M);var B=new r.Line({shape:{x1:P*g+f,y1:D*g+p,x2:P*(g-S)+f,y2:D*(g-S)+p},silent:!0,style:L});"auto"===L.stroke&&B.setStyle({stroke:n((E+z/w)/b)}),d.add(B),M+=C}M-=C}else M+=A}},_renderPointer:function(t,e,i,a,o,l,h,c){var d=this.group,f=this._data;if(t.get("pointer.show")){var p=[+t.get("min"),+t.get("max")],g=[l,h],m=t.getData(),v=m.mapDimension("value");m.diff(f).add((function(e){var i=new n({shape:{angle:l}});r.initProps(i,{shape:{angle:u(m.get(v,e),p,g,!0)}},t),d.add(i),m.setItemGraphicEl(e,i)})).update((function(e,i){var n=f.getItemGraphicEl(i);r.updateProps(n,{shape:{angle:u(m.get(v,e),p,g,!0)}},t),d.add(n),m.setItemGraphicEl(e,n)})).remove((function(t){var e=f.getItemGraphicEl(t);d.remove(e)})).execute(),m.eachItemGraphicEl((function(t,e){var i=m.getItemModel(e),n=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:s(n.get("width"),o.r),r:s(n.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",a(u(m.get(v,e),p,[0,1],!0))),r.setHoverStyle(t,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=m}else f&&f.eachItemGraphicEl((function(t){d.remove(t)}))},_renderTitle:function(t,e,i,n,a){var o=t.getData(),l=o.mapDimension("value"),h=t.getModel("title");if(h.get("show")){var c=h.get("offsetCenter"),d=a.cx+s(c[0],a.r),f=a.cy+s(c[1],a.r),p=+t.get("min"),g=+t.get("max"),m=t.getData().get(l,0),v=n(u(m,[p,g],[0,1],!0));this.group.add(new r.Text({silent:!0,style:r.setTextStyle({},h,{x:d,y:f,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:v,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),l=+t.get("min"),c=+t.get("max");if(o.get("show")){var d=o.get("offsetCenter"),f=a.cx+s(d[0],a.r),p=a.cy+s(d[1],a.r),g=s(o.get("width"),a.r),m=s(o.get("height"),a.r),v=t.getData(),_=v.get(v.mapDimension("value"),0),y=n(u(_,[l,c],[0,1],!0));this.group.add(new r.Text({silent:!0,style:r.setTextStyle({},o,{x:f,y:p,text:h(_,o.get("formatter")),textWidth:isNaN(g)?null:g,textHeight:isNaN(m)?null:m,textAlign:"center",textVerticalAlign:"middle"},{autoColor:y,forceRich:!0})}))}}});t.exports=d},function(t,e,i){var n=i(12).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,r=e.r,a=e.width,o=e.angle,s=e.x-i(o)*a*(a>=r/3?1:2),l=e.y-n(o)*a*(a>=r/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(o)*a,e.y+n(o)*a),t.lineTo(e.x+i(e.angle)*r,e.y+n(e.angle)*r),t.lineTo(e.x-i(o)*a,e.y-n(o)*a),t.lineTo(s,l)}});t.exports=n},function(t,e,i){var n=i(2);i(382),i(383);var r=i(90),a=i(384),o=i(73);n.registerVisual(r("funnel")),n.registerLayout(a),n.registerProcessor(o("funnel"))},function(t,e,i){var n=i(2),r=i(0),a=i(57),o=i(5).defaultEmphasis,s=i(31).makeSeriesEncodeForNameBased,l=i(66),u=n.extendSeriesModel({type:"series.funnel",init:function(t){u.superApply(this,"init",arguments),this.legendVisualProvider=new l(r.bind(this.getData,this),r.bind(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return a(this,{coordDimensions:["value"],encodeDefaulter:r.curry(s,this)})},_defaultLabelLine:function(t){o(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=u.superCall(this,"getDataParams",t),n=e.mapDimension("value"),r=e.getSum(n);return i.percent=r?+(e.get(n,t)/r*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}),h=u;t.exports=h},function(t,e,i){var n=i(3),r=i(0),a=i(28);function o(t,e){n.Group.call(this);var i=new n.Polygon,r=new n.Polyline,a=new n.Text;this.add(i),this.add(r),this.add(a),this.highDownOnUpdate=function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(t,e,!0)}var s=o.prototype,l=["itemStyle","opacity"];s.updateData=function(t,e,i){var a=this.childAt(0),o=t.hostModel,s=t.getItemModel(e),u=t.getItemLayout(e),h=t.getItemModel(e).get(l);h=null==h?1:h,a.useStyle({}),i?(a.setShape({points:u.points}),a.setStyle({opacity:0}),n.initProps(a,{style:{opacity:h}},o,e)):n.updateProps(a,{style:{opacity:h},shape:{points:u.points}},o,e);var c=s.getModel("itemStyle"),d=t.getItemVisual(e,"color");a.setStyle(r.defaults({lineJoin:"round",fill:d},c.getItemStyle(["opacity"]))),a.hoverStyle=c.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),n.setHoverStyle(this)},s._updateLabel=function(t,e){var i=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");n.updateProps(i,{shape:{points:s.linePoints||s.linePoints}},a,e),n.updateProps(r,{style:{x:s.x,y:s.y}},a,e),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");n.setLabelStyle(r.style,r.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),r.ignore=r.normalIgnore=!u.get("show"),r.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},r.inherits(o,n.Group);var u=a.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),r=this._data,a=this.group;n.diff(r).add((function(t){var e=new o(n,t);n.setItemGraphicEl(t,e),a.add(e)})).update((function(t,e){var i=r.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=r.getItemGraphicEl(t);a.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});t.exports=u},function(t,e,i){i(7).__DEV__;var n=i(8),r=i(4),a=r.parsePercent,o=r.linearMap;t.exports=function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),r=i.mapDimension("value"),s=t.get("sort"),l=function(t,e){return n.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),u=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,(function(t){return t})),r=[],a="ascending"===e,o=0,s=t.count();o=i&&a<=i+e.axisLength&&o>=n&&o<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();c(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),o.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=a.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],r=["width","height"],a=e.get("layout"),o="horizontal"===a?0:1,s=i[r[o]],l=[0,s],u=this.dimensions.length,h=y(e.get("axisExpandWidth"),l),c=y(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=y(f[1]-f[0],l),f[1]=f[0]+t):(t=y(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||p(u/2))-t/2])[1]=f[0]+t);var v=(s-t)/(u-c);v<3&&(v=0);var _=[p(m(f[0]/h,1))+1,g(m(f[1]/h,1))-1],x=v/h*f[0];return{layout:a,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[r[1-o]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:v,axisExpandWindow:f,axisCount:u,winInnerIndices:_,axisExpandWindow0Pos:x}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),c(i,(function(e,i){var o=(n.axisExpandable?b:x)(i,n),s={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},l={horizontal:v/2,vertical:0},u=[s[a].x+t.x,s[a].y+t.y],h=l[a],c=r.create();r.rotate(c,c,h),r.translate(c,c,u),this._axesLayout[e]={position:u,rotation:h,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,r){null==i&&(i=0),null==r&&(r=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];n.each(o,(function(e){s.push(t.mapDimension(e)),l.push(a.get(e).model)}));for(var u=this.hasAxisBrushed(),h=i;hr*(1-c[0])?(l="jump",o=s-r*(1-c[2])):(o=s-r*c[1])>=0&&(o=s-r*(1-c[1]))<=0&&(o=0),(o*=e.axisExpandWidth/u)?h(o,n,a,"all"):l="none";else{r=n[1]-n[0];(n=[f(0,a[1]*s/r-r/2)])[1]=d(a[1],n[0]+r),n[0]=n[1]-r}return{axisExpandWindow:n,behavior:l}}};var w=_;t.exports=w},function(t,e,i){var n=i(0),r=i(36),a=function(t,e,i,n,a){r.call(this,t,e,i),this.type=n||"value",this.axisIndex=a};a.prototype={constructor:a,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(16);i(390);var a=r.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&n.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){n.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=n.filter(this.dependentModels.parallelAxis,(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);n.each(i,(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))}});t.exports=a},function(t,e,i){var n=i(0),r=i(16),a=i(49),o=i(89),s=i(4),l=i(53),u=r.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return a([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n.clone(t);if(e)for(var i=e.length-1;i>=0;i--)s.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,r=e.length;n=0&&(s[a[l].depth]=new o(a[l],this,e));if(n&&i)return r(n,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var i=this.parentModel,n=i.getData().getItemLayout(e).depth;return i.levelModels[n]||this.parentModel})),t})),e.wrapMethod("getItemModel",(function(t,e){return t.customizeGetParent((function(t){var i=this.parentModel,n=i.getGraph().getEdgeByIndex(e).node1.getLayout().depth;return i.levelModels[n]||this.parentModel})),t}))})).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),r=n.data,o=r.source+" -- "+r.target;return n.value&&(o+=" : "+n.value),a(o)}if("node"===i){var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,i).data.name;if(l)o=u+" : "+l;return a(o)}return s.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=s.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=n}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}})),l=s;t.exports=l},function(t,e,i){var n=i(3),r=i(2),a=i(0),o=["itemStyle","opacity"],s=["emphasis","itemStyle","opacity"],l=["lineStyle","opacity"],u=["emphasis","lineStyle","opacity"];function h(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function c(t,e,i){var n=t.getGraphicEl(),r=h(t,e);null!=i&&(null==r&&(r=1),r*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",r)}))}function d(t,e){var i=h(t,e),n=t.getGraphicEl();n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)})),n.highlight&&n.highlight()}var f=n.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}}),p=r.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var r=this,a=t.getGraph(),o=this.group,s=t.layoutInfo,l=s.width,u=s.height,h=t.getData(),c=t.getData("edge"),d=t.get("orient");this._model=t,o.removeAll(),o.attr("position",[s.x,s.y]),a.eachEdge((function(e){var i=new f;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var r,a,s,h,p,g,m,v,_=e.getModel("lineStyle"),y=_.get("curveness"),x=e.node1.getLayout(),b=e.node1.getModel(),w=b.get("localX"),T=b.get("localY"),S=e.node2.getLayout(),M=e.node2.getModel(),A=M.get("localX"),C=M.get("localY"),I=e.getLayout();switch(i.shape.extent=Math.max(1,I.dy),i.shape.orient=d,"vertical"===d?(r=(null!=w?w*l:x.x)+I.sy,a=(null!=T?T*u:x.y)+x.dy,s=(null!=A?A*l:S.x)+I.ty,p=r,g=a*(1-y)+(h=null!=C?C*u:S.y)*y,m=s,v=a*y+h*(1-y)):(r=(null!=w?w*l:x.x)+x.dx,a=(null!=T?T*u:x.y)+I.sy,p=r*(1-y)+(s=null!=A?A*l:S.x)*y,g=a,m=r*y+s*(1-y),v=h=(null!=C?C*u:S.y)+I.ty),i.setShape({x1:r,y1:a,x2:s,y2:h,cpx1:p,cpy1:g,cpx2:m,cpy2:v}),i.setStyle(_.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}n.setHoverStyle(i,e.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),c.setItemGraphicEl(e.dataIndex,i)})),a.eachNode((function(e){var i=e.getLayout(),r=e.getModel(),a=r.get("localX"),s=r.get("localY"),c=r.getModel("label"),d=r.getModel("emphasis.label"),f=new n.Rect({shape:{x:null!=a?a*l:i.x,y:null!=s?s*u:i.y,width:i.dx,height:i.dy},style:r.getModel("itemStyle").getItemStyle()}),p=e.getModel("emphasis.itemStyle").getItemStyle();n.setLabelStyle(f.style,p,c,d,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),f.setStyle("fill",e.getVisual("color")),n.setHoverStyle(f,p),o.add(f),h.setItemGraphicEl(e.dataIndex,f),f.dataType="node"})),h.eachItemGraphicEl((function(e,n){var a=h.getItemModel(n);a.get("draggable")&&(e.drift=function(e,a){r._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(n),localX:this.shape.x/l,localY:this.shape.y/u})},e.ondragend=function(){r._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),e.highlight=function(){this.trigger("emphasis")},e.downplay=function(){this.trigger("normal")},e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))})),c.eachItemGraphicEl((function(e,n){var a=c.getItemModel(n);e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))})),!this._data&&t.get("animation")&&o.setClipPath(function(t,e,i){var r=new n.Rect({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return n.initProps(r,{shape:{width:t.width+20}},e,i),r}(o.getBoundingRect(),t,(function(){o.removeClipPath()}))),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var r=t.getData(),h=r.graph,f=n.dataIndex,p=r.getItemModel(f),g=n.edgeDataIndex;if(null!=f||null!=g){var m=h.getNodeByIndex(f),v=h.getEdgeByIndex(g);if(h.eachNode((function(t){c(t,o,.1)})),h.eachEdge((function(t){c(t,l,.1)})),m){d(m,s);var _=p.get("focusNodeAdjacency");"outEdges"===_?a.each(m.outEdges,(function(t){t.dataIndex<0||(d(t,u),d(t.node2,s))})):"inEdges"===_?a.each(m.inEdges,(function(t){t.dataIndex<0||(d(t,u),d(t.node1,s))})):"allEdges"===_&&a.each(m.edges,(function(t){t.dataIndex<0||(d(t,u),t.node1!==m&&d(t.node1,s),t.node2!==m&&d(t.node2,s))}))}v&&(d(v,u),d(v.node1,s),d(v.node2,s))}},unfocusNodeAdjacency:function(t,e,i,n){var r=t.getGraph();r.eachNode((function(t){c(t,o)})),r.eachEdge((function(t){c(t,l)}))}});t.exports=p},function(t,e,i){var n=i(2);i(169),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},function(t,e,i){var n=i(8),r=i(0),a=i(5).groupData;function o(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function s(t,e,i,n,a){var o="vertical"===a?"x":"y";r.each(t,(function(t){var r,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===a?"dx":"dy",d=0;d0&&(r=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===a?n:i))>0)for(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0),u=r,d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]}))}function l(t,e,i){r.each(t.slice().reverse(),(function(t){r.each(t,(function(t){if(t.outEdges.length){var n=g(t.outEdges,u,i)/g(t.outEdges,p,i);if(isNaN(n)){var r=t.outEdges.length;n=r?g(t.outEdges,h,i)/r:0}if("vertical"===i){var a=t.getLayout().x+(n-f(t,i))*e;t.setLayout({x:a},!0)}else{var o=t.getLayout().y+(n-f(t,i))*e;t.setLayout({y:o},!0)}}}))}))}function u(t,e){return f(t.node2,e)*t.getValue()}function h(t,e){return f(t.node2,e)}function c(t,e){return f(t.node1,e)*t.getValue()}function d(t,e){return f(t.node1,e)}function f(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function p(t){return t.getValue()}function g(t,e,i){for(var n=0,r=t.length,a=-1;++a=0;y&&_.depth>g&&(g=_.depth),v.setLayout({depth:y?_.depth:f},!0),"vertical"===s?v.setLayout({dy:i},!0):v.setLayout({dx:i},!0);for(var x=0;xf-1?g:f-1;l&&"left"!==l&&function(t,e,i,n){if("right"===e){for(var a=[],s=t,l=0;s.length;){for(var u=0;u0;u--)l(c,d*=.99,h),s(c,o,i,n,h),m(c,d,h),s(c,o,i,n,h)}(t,e,h,u,n,c,d),function(t,e){var i="vertical"===e?"x":"y";r.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),r.each(t,(function(t){var e=0,i=0;r.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),r.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,d)}(v,_,i,u,c,d,0!==r.filter(v,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}},function(t,e,i){var n=i(47),r=i(0);t.exports=function(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph().nodes;if(e.length){var i=1/0,a=-1/0;r.each(e,(function(t){var e=t.getLayout().value;ea&&(a=e)})),r.each(e,(function(e){var r=new n({type:"color",mappingMethod:"linear",dataExtent:[i,a],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get("itemStyle.color");null!=o?e.setVisual("color",o):e.setVisual("color",r)}))}}))}},function(t,e,i){var n=i(2);i(404),i(405);var r=i(406),a=i(407);n.registerVisual(r),n.registerLayout(a)},function(t,e,i){var n=i(0),r=i(17),a=i(203).seriesModelMixin,o=r.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});n.mixin(o,a,!0);var s=o;t.exports=s},function(t,e,i){var n=i(0),r=i(28),a=i(3),o=i(12),s=["itemStyle"],l=["emphasis","itemStyle"],u=r.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),r=this.group,a=this._data;this._data||r.removeAll();var o="horizontal"===t.get("layout")?1:0;n.diff(a).add((function(t){if(n.hasValue(t)){var e=c(n.getItemLayout(t),n,t,o,!0);n.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?d(s,i,n,t):i=c(s,n,t,o),r.add(i),n.setItemGraphicEl(t,i)}else r.remove(i)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(t){t&&e.remove(t)}))},dispose:n.noop}),h=o.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n0?"P":"N",a=n.getVisual("borderColor"+r)||n.getVisual("color"+r),o=i.getModel(l).getItemStyle(h);e.useStyle(o),e.style.fill=null,e.style.stroke=a}var x=c;t.exports=x},function(t,e,i){var n=i(0);t.exports=function(t){t&&n.isArray(t.series)&&n.each(t.series,(function(t){n.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}},function(t,e,i){var n=i(51),r=["itemStyle","borderColor"],a=["itemStyle","borderColor0"],o=["itemStyle","color"],s=["itemStyle","color0"],l={seriesType:"candlestick",plan:n(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){var r;for(;null!=(r=t.next());){var a=e.getItemModel(r),o=e.getItemLayout(r).sign;e.setItemVisual(r,{color:i(o,a),borderColor:n(o,a)})}}};function i(t,e){return e.get(t>0?o:s)}function n(t,e){return e.get(t>0?r:a)}}};t.exports=l},function(t,e,i){var n=i(3).subPixelOptimize,r=i(51),a=i(4).parsePercent,o=i(0).retrieve2,s="undefined"!=typeof Float32Array?Float32Array:Array,l={seriesType:"candlestick",plan:r(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),r=function(t,e){var i,n=t.getBaseAxis(),r="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),s=a(o(t.get("barMaxWidth"),r),r),l=a(o(t.get("barMinWidth"),1),r),u=t.get("barWidth");return null!=u?a(u,r):Math.max(Math.min(r/2,s),l)}(t,i),l=["x","y"],h=i.mapDimension(l[0]),c=i.mapDimension(l[1],!0),d=c[0],f=c[1],p=c[2],g=c[3];if(i.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(null==h||c.length<4))return{progress:t.pipelineContext.large?function(t,i){var n,r,a=new s(4*t.count),o=0,l=[],c=[];for(;null!=(r=t.next());){var m=i.get(h,r),v=i.get(d,r),_=i.get(f,r),y=i.get(p,r),x=i.get(g,r);isNaN(m)||isNaN(y)||isNaN(x)?(a[o++]=NaN,o+=3):(a[o++]=u(i,r,v,_,f),l[0]=m,l[1]=y,n=e.dataToPoint(l,null,c),a[o++]=n?n[0]:NaN,a[o++]=n?n[1]:NaN,l[1]=x,n=e.dataToPoint(l,null,c),a[o++]=n?n[1]:NaN)}i.setLayout("largePoints",a)}:function(t,i){var a;for(;null!=(a=t.next());){var o=i.get(h,a),s=i.get(d,a),l=i.get(f,a),c=i.get(p,a),m=i.get(g,a),v=Math.min(s,l),_=Math.max(s,l),y=S(v,o),x=S(_,o),b=S(c,o),w=S(m,o),T=[];M(T,x,0),M(T,y,1),T.push(C(w),C(x),C(b),C(y)),i.setItemLayout(a,{sign:u(i,a,s,l,f),initBaseline:s>l?x[1]:y[1],ends:T,brushRect:A(c,m,o)})}function S(t,i){var n=[];return n[0]=i,n[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function M(t,e,i){var a=e.slice(),o=e.slice();a[0]=n(a[0]+r/2,1,!1),o[0]=n(o[0]-r/2,1,!0),i?t.push(a,o):t.push(o,a)}function A(t,e,i){var n=S(t,i),a=S(e,i);return n[0]-=r/2,a[0]-=r/2,{x:n[0],y:n[1],width:r,height:a[1]-n[1]}}function C(t){return t[0]=n(t[0],1),t}}}}};function u(t,e,i,n,r){return i>n?-1:i0?t.get(r,e-1)<=n?1:-1:1}t.exports=l},function(t,e,i){i(415),i(416)},function(t,e,i){var n=i(17),r=i(32),a=i(24),o=n.extend({type:"series.heatmap",getInitialData:function(t,e){return r(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=a.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});t.exports=o},function(t,e,i){i(7).__DEV__;var n=i(2),r=i(3),a=i(417),o=i(0);var s=n.extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(r)&&this._renderOnGeo(r,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,a){var s,l,u=t.coordinateSystem;if("cartesian2d"===u.type){var h=u.getAxis("x"),c=u.getAxis("y");s=h.getBandWidth(),l=c.getBandWidth()}for(var d=this.group,f=t.getData(),p=t.getModel("itemStyle").getItemStyle(["color"]),g=t.getModel("emphasis.itemStyle").getItemStyle(),m=t.getModel("label"),v=t.getModel("emphasis.label"),_=u.type,y="cartesian2d"===_?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],x=i;x=e[0]&&t<=e[1]}}(b,i.option.range):function(t,e,i){var n=t[1]-t[0],r=(e=o.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,a=0;return function(t){for(var n=a;n=0;n--){var o;if((o=e[n].interval)[0]<=t&&t<=o[1]){a=n;break}}return n>=0&&n0){var M=a(v)?s:l;v>0&&(v=v*T+w),y[x++]=M[S],y[x++]=M[S+1],y[x++]=M[S+2],y[x++]=M[S+3]*v*256}else x+=4}return c.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=n.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var r=t.getContext("2d");return r.clearRect(0,0,i,i),r.shadowOffsetX=i,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-e,e,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,r=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[i](s/255,!0,a),r[o++]=a[0],r[o++]=a[1],r[o++]=a[2],r[o++]=a[3];return r}};var a=r;t.exports=a},function(t,e,i){var n=i(2),r=i(0);i(117),i(419),i(420);var a=i(83).layout,o=i(44);i(72),n.registerLayout(r.curry(a,"pictorialBar")),n.registerVisual(o("pictorialBar","roundRect"))},function(t,e,i){var n=i(195).extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,n.superApply(this,"getInitialData",arguments)}}),r=n;t.exports=r},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(23).createSymbol,s=i(4),l=s.parsePercent,u=s.isNumeric,h=i(196).setLabel,c=["itemStyle","borderWidth"],d=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],f=new a.Circle;function p(t,e,i,n){var a=t.getItemLayout(e),o=i.get("symbolRepeat"),s=i.get("symbolClip"),h=i.get("symbolPosition")||"start",d=(i.get("symbolRotate")||0)*Math.PI/180||0,p=i.get("symbolPatternSize")||2,m=i.isAnimationEnabled(),v={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:s,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:p,rotation:d,animationModel:m?i:null,hoverAnimation:m&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,a){var o,s=n.valueDim,l=t.get("symbolBoundingData"),u=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),h=u.toGlobalCoord(u.dataToCoord(0)),c=1-+(i[s.wh]<=0);if(r.isArray(l)){var d=[g(u,l[0])-h,g(u,l[1])-h];d[1]0?1:o<0?-1:0}(i,o,a,n,v),function(t,e,i,n,a,o,s,u,h,c){var d=h.valueDim,f=h.categoryDim,p=Math.abs(i[f.wh]),g=t.getItemVisual(e,"symbolSize");r.isArray(g)?g=g.slice():(null==g&&(g="100%"),g=[g,g]);g[f.index]=l(g[f.index],p),g[d.index]=l(g[d.index],n?p:Math.abs(o)),c.symbolSize=g,(c.symbolScale=[g[0]/u,g[1]/u])[d.index]*=(h.isHorizontal?-1:1)*s}(t,e,a,o,0,v.boundingLength,v.pxSign,p,n,v),function(t,e,i,n,r){var a=t.get(c)||0;a&&(f.attr({scale:e.slice(),rotation:i}),f.updateTransform(),a/=f.getLineScale(),a*=e[n.valueDim.index]);r.valueLineWidth=a}(i,v.symbolScale,d,n,v);var _=v.symbolSize,y=i.get("symbolOffset");return r.isArray(y)&&(y=[l(y[0],_[0]),l(y[1],_[1])]),function(t,e,i,n,a,o,s,h,c,d,f,p){var g=f.categoryDim,m=f.valueDim,v=p.pxSign,_=Math.max(e[m.index]+h,0),y=_;if(n){var x=Math.abs(c),b=r.retrieve(t.get("symbolMargin"),"15%")+"",w=!1;b.lastIndexOf("!")===b.length-1&&(w=!0,b=b.slice(0,b.length-1)),b=l(b,e[m.index]);var T=Math.max(_+2*b,0),S=w?0:2*b,M=u(n),A=M?n:P((x+S)/T);T=_+2*(b=(x-A*_)/2/(w?A:A-1)),S=w?0:2*b,M||"fixed"===n||(A=d?P((Math.abs(d)+S)/T):0),y=A*T-S,p.repeatTimes=A,p.symbolMargin=b}var C=v*(y/2),I=p.pathPosition=[];I[g.index]=i[g.wh]/2,I[m.index]="start"===s?C:"end"===s?c-C:c/2,o&&(I[0]+=o[0],I[1]+=o[1]);var L=p.bundlePosition=[];L[g.index]=i[g.xy],L[m.index]=i[m.xy];var E=p.barRectShape=r.extend({},i);E[m.wh]=v*Math.max(Math.abs(i[m.wh]),Math.abs(I[m.index]+C)),E[g.wh]=i[g.wh];var D=p.clipShape={};D[g.xy]=-i[g.xy],D[g.wh]=f.ecSize[g.wh],D[m.xy]=0,D[m.wh]=i[m.wh]}(i,_,a,o,0,y,h,v.valueLineWidth,v.boundingLength,v.repeatCutLength,n,v),v}function g(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function m(t){var e=t.symbolPatternSize,i=o(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function v(t,e,i,n){var r=t.__pictorialBundle,a=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,u=i.repeatTimes||0,h=0,c=a[e.valueDim.index]+o+2*i.symbolMargin;for(I(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:n<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){I(t,(function(t){t.trigger("emphasis")}))}function v(){I(t,(function(t){t.trigger("normal")}))}}function _(t,e,i,n){var r=t.__pictorialBundle,a=t.__pictorialMainPath;a?L(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=m(i),r.add(a),L(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),S(a,i)}function y(t,e,i){var n=r.extend({},e.barRectShape),o=t.__pictorialBarRect;o?L(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new a.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function x(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,s=r.extend({},i.clipShape),l=e.valueDim,u=i.animationModel,h=i.dataIndex;if(o)a.updateProps(o,{shape:s},u,h);else{s[l.wh]=0,o=new a.Rect({shape:s}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var c={};c[l.wh]=i.clipShape[l.wh],a[n?"updateProps":"initProps"](o,{shape:c},u,h)}}}function b(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=w,i.isAnimationEnabled=T,i}function w(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function T(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function S(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function M(t,e,i,n){var r=new a.Group,o=new a.Group;return r.add(o),r.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?v(r,e,i):_(r,0,i),y(r,i,n),x(r,e,i,n),r.__pictorialShapeStr=C(t,i),r.__pictorialSymbolMeta=i,r}function A(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var s=[];I(n,(function(t){s.push(t)})),n.__pictorialMainPath&&s.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),r.each(s,(function(t){a.updateProps(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function C(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function I(t,e,i){r.each(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function L(t,e,i,n,r,o){e&&t.attr(e),n.symbolClip&&!r?i&&t.attr(i):i&&a[r?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function E(t,e,i){var n=i.color,o=i.dataIndex,s=i.itemModel,l=s.getModel("itemStyle").getItemStyle(["color"]),u=s.getModel("emphasis.itemStyle").getItemStyle(),c=s.getShallow("cursor");I(t,(function(t){t.setColor(n),t.setStyle(r.defaults({fill:n,opacity:i.opacity},l)),a.setHoverStyle(t,u),c&&(t.cursor=c),t.z2=i.z2}));var d={},f=e.valueDim.posDesc[+(i.boundingLength>0)],p=t.__pictorialBarRect;h(p.style,d,s,n,e.seriesModel,o,f),a.setHoverStyle(p,d)}function P(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var D=n.extendChartView({type:"pictorialBar",render:function(t,e,i){var n=this.group,r=t.getData(),o=this._data,s=t.coordinateSystem,l=!!s.getBaseAxis().isHorizontal(),u=s.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:s,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:d[+l],categoryDim:d[1-l]};return r.diff(o).add((function(t){if(r.hasValue(t)){var e=b(r,t),i=p(r,t,e,h),a=M(r,h,i);r.setItemGraphicEl(t,a),n.add(a),E(a,h,i)}})).update((function(t,e){var i=o.getItemGraphicEl(e);if(r.hasValue(t)){var s=b(r,t),l=p(r,t,s,h),u=C(r,l);i&&u!==i.__pictorialShapeStr&&(n.remove(i),r.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,r=i.dataIndex,o=t.__pictorialBundle;a.updateProps(o,{position:i.bundlePosition.slice()},n,r),i.symbolRepeat?v(t,e,i,!0):_(t,e,i,!0);y(t,i,!0),x(t,e,i,!0)}(i,h,l):i=M(r,h,l,!0),r.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=l,n.add(i),E(i,h,l)}else n.remove(i)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&A(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=r,this.group},dispose:r.noop,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){A(n,e.dataIndex,t,e)})):i.removeAll()}});t.exports=D},function(t,e,i){var n=i(2);i(204),i(428),i(429);var r=i(430),a=i(431),o=i(73);n.registerLayout(r),n.registerVisual(a),n.registerProcessor(o("themeRiver"))},function(t,e,i){var n=i(423);i(24).register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(r,a){var o=new n(r,t,e);o.name="single_"+a,o.resize(r,e),r.coordinateSystem=o,i.push(o)})),t.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:n.prototype.dimensions})},function(t,e,i){var n=i(424),r=i(25),a=i(8).getLayoutRect,o=i(0).each;function s(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}s.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:s,_init:function(t,e,i){var a=this.dimension,o=new n(a,r.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),s="category"===o.type;o.onBand=s&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();o(e.mapDimension(this.dimension,!0),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),r.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=a({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(n[r],n[1-r]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2,n}};var l=s;t.exports=l},function(t,e,i){var n=i(0),r=i(36),a=function(t,e,i,n,a){r.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(37),a=i(3),o=i(205),s=i(45),l=i(194),u=l.rectCoordAxisBuildSplitArea,h=l.rectCoordAxisHandleRemove,c=["axisLine","axisTickLabel","axisName"],d=["splitArea","splitLine"],f=s.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,s){var l=this.group;l.removeAll();var u=this._axisGroup;this._axisGroup=new a.Group;var h=o.layout(t),p=new r(t,h);n.each(c,p.add,p),l.add(this._axisGroup),l.add(p.getGroup()),n.each(d,(function(e){t.get(e+".show")&&this["_"+e](t)}),this),a.groupTransition(u,this._axisGroup,t),f.superCall(this,"render",t,e,i,s)},remove:function(){h(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),r=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var s=t.coordinateSystem.getRect(),l=e.isHorizontal(),u=[],h=0,c=e.getTicksCoords({tickModel:i}),d=[],f=[],p=0;pa&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return o.y0=r,o.max=a,o}(u),c=h.y0,d=i/h.max,f=o.length,p=o[0].indices.length,g=0;g0){s.virtualPiece?s.virtualPiece.updateData(!1,i,"normal",t,e):(s.virtualPiece=new a(i,t,e),c.add(s.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var r=function(t){s._rootToNode(n.parentNode)};n.piece._onclickEvent=r,s.virtualPiece.on("click",r)}else s.virtualPiece&&(c.remove(s.virtualPiece),s.virtualPiece=null)}(u,h),r&&r.highlight&&r.highlight.piece){var g=t.getShallow("highlightPolicy");r.highlight.piece.onEmphasis(g)}else if(r&&r.unhighlight){var m=this.virtualPiece;!m&&u.children.length&&(m=u.children[0].piece),m&&m.onNormal()}this._initEvents(),this._oldChildren=f},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var r=n.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(n);else if("link"===r){var a=n.getModel(),o=a.get("link");if(o){var l=a.get("target",!0)||"_blank";s(o,l)}}i=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,r=t[1]-i.cy,a=Math.sqrt(n*n+r*r);return a<=i.r&&a>=i.r0}}});t.exports=l},function(t,e,i){var n=i(0),r=i(3),a="none",o="ancestor",s="self";function l(t,e,i){r.Group.call(this);var n=new r.Sector({z2:2});n.seriesIndex=e.seriesIndex;var a=new r.Text({z2:4,silent:t.getModel("label").get("silent")});function o(){a.ignore=a.hoverIgnore}function s(){a.ignore=a.normalIgnore}this.add(n),this.add(a),this.updateData(!0,t,"normal",e,i),this.on("emphasis",o).on("normal",s).on("mouseover",o).on("mouseout",s)}var u=l.prototype;u.updateData=function(t,e,i,a,o){this.node=e,e.piece=this,a=a||this._seriesModel,o=o||this._ecModel;var s=this.childAt(0);s.dataIndex=e.dataIndex;var l=e.getModel(),u=e.getLayout(),h=n.extend({},u);h.label=null;var c=function(t,e,i){var r=t.getVisual("color"),a=t.getVisual("visualMeta");a&&0!==a.length||(r=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(r)return r;if(0===t.depth)return i.option.color[0];var s=i.option.color.length;o=i.option.color[function(t){var e=t;for(;e.depth>1;)e=e.parentNode;var i=t.getAncestors()[0];return n.indexOf(i.children,e)}(t)%s];return o}(e,0,o);!function(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}(e,a,c);var d,f=l.getModel("itemStyle").getItemStyle();if("normal"===i)d=f;else{var p=l.getModel(i+".itemStyle").getItemStyle();d=n.merge(p,f)}d=n.defaults({lineJoin:"bevel",fill:d.fill||c},d),t?(s.setShape(h),s.shape.r=u.r0,r.updateProps(s,{shape:{r:u.r}},a,e.dataIndex),s.useStyle(d)):"object"==typeof d.fill&&d.fill.type||"object"==typeof s.style.fill&&s.style.fill.type?(r.updateProps(s,{shape:h},a),s.useStyle(d)):r.updateProps(s,{shape:h,style:d},a),this._updateLabel(a,c,i);var g=l.getShallow("cursor");if(g&&s.attr("cursor",g),t){var m=a.getShallow("highlightPolicy");this._initEvents(s,e,a,m)}this._seriesModel=a||this._seriesModel,this._ecModel=o||this._ecModel,r.setHoverStyle(this)},u.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode((function(i){var n,r,l;i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):(n=i,r=e.node,(l=t)!==a&&(l===s?n===r:l===o?n===r||n.isAncestorOf(r):n===r||n.isDescendantOf(r))?i.piece.childAt(0).trigger("highlight"):t!==a&&i.piece.childAt(0).trigger("downplay")))}))},u.onNormal=function(){this.node.hostTree.root.eachNode((function(t){t.piece&&t.piece.updateData(!1,t,"normal")}))},u.onHighlight=function(){this.updateData(!1,this.node,"highlight")},u.onDownplay=function(){this.updateData(!1,this.node,"downplay")},u._updateLabel=function(t,e,i){var a=this.node.getModel(),o=a.getModel("label"),s="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),l=a.getModel("emphasis.label"),u=s.get("formatter")?i:"normal",h=n.retrieve(t.getFormattedLabel(this.node.dataIndex,u,null,null,"label"),this.node.name);!1===A("show")&&(h="");var c=this.node.getLayout(),d=s.get("minAngle");null==d&&(d=o.get("minAngle")),d=d/180*Math.PI;var f=c.endAngle-c.startAngle;null!=d&&Math.abs(f)Math.PI/2?"right":"left"):b&&"center"!==b?"left"===b?(g=c.r0+x,m>Math.PI/2&&(b="right")):"right"===b&&(g=c.r-x,m>Math.PI/2&&(b="left")):(g=(c.r+c.r0)/2,b="center"),p.attr("style",{text:h,textAlign:b,textVerticalAlign:A("verticalAlign")||"middle",opacity:A("opacity")});var w=g*v+c.cx,T=g*_+c.cy;p.attr("position",[w,T]);var S=A("rotate"),M=0;function A(t){var e=s.get(t);return null==e?o.get(t):e}"radial"===S?(M=-m)<-Math.PI/2&&(M+=Math.PI):"tangential"===S?(M=Math.PI/2-m)>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI):"number"==typeof S&&(M=S*Math.PI/180),p.attr("rotation",M)},u._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,a=function(){r.onEmphasis(n)},o=function(){r.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",(function(){r.onDownplay()})).on("highlight",(function(){r.onHighlight()}))},n.inherits(l,r.Group);var h=l;t.exports=h},function(t,e,i){var n=i(2),r=i(46);n.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=r.retrieveTargetInfo(t,["sunburstRootToNode"],e);if(n){var a=e.getViewRoot();a&&(t.direction=r.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}));n.registerAction({type:"sunburstHighlight",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=r.retrieveTargetInfo(t,["sunburstHighlight"],e);n&&(t.highlight=n.node)}))}));n.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){t.unhighlight=!0}))}))},function(t,e,i){var n=i(4).parsePercent,r=i(0),a=Math.PI/180;function o(t,e){var i=t.children||[];t.children=function(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort((function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n}))}(i,e),i.length&&r.each(t.children,(function(t){o(t,e)}))}t.exports=function(t,e,i,s){e.eachSeriesByType(t,(function(t){var e=t.get("center"),s=t.get("radius");r.isArray(s)||(s=[0,s]),r.isArray(e)||(e=[e,e]);var l=i.getWidth(),u=i.getHeight(),h=Math.min(l,u),c=n(e[0],l),d=n(e[1],u),f=n(s[0],h/2),p=n(s[1],h/2),g=-t.get("startAngle")*a,m=t.get("minAngle")*a,v=t.getData().tree.root,_=t.getViewRoot(),y=_.depth,x=t.get("sort");null!=x&&o(_,x);var b=0;r.each(_.children,(function(t){!isNaN(t.getValue())&&b++}));var w=_.getValue(),T=Math.PI/(w||b)*2,S=_.depth>0,M=_.height-(S?-1:1),A=(p-f)/(M||1),C=t.get("clockwise"),I=t.get("stillShowZeroSum"),L=C?1:-1,E=function(t,e){if(t){var i=e;if(t!==v){var a=t.getValue(),o=0===w&&I?T:a*T;oa[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:n.bind((function(n){var r=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),o=t.coordToPoint([r,a]);return o.push(r,a*Math.PI/180),o})),size:n.bind(r,t)}}}},function(t,e){t.exports=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}},function(t,e,i){i(72),i(180),i(71)},function(t,e,i){var n=i(2),r=i(0),a=i(446);i(121),i(452),i(454),i(71),i(456),n.registerLayout(r.curry(a,"bar")),n.extendComponentView({type:"polar"})},function(t,e,i){var n=i(0),r=i(4).parsePercent,a=i(29).isDimensionStacked;function o(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function s(t,e){return e.dim+t.model.componentIndex}var l=function(t,e,i){var l={},u=function(t,e){var i={};n.each(t,(function(t,e){var n=t.getData(),a=t.coordinateSystem,l=a.getBaseAxis(),u=s(a,l),h=l.getExtent(),c="category"===l.type?l.getBandWidth():Math.abs(h[1]-h[0])/n.count(),d=i[u]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=d.stacks;i[u]=d;var p=o(t);f[p]||d.autoWidthCount++,f[p]=f[p]||{width:0,maxWidth:0};var g=r(t.get("barWidth"),c),m=r(t.get("barMaxWidth"),c),v=t.get("barGap"),_=t.get("barCategoryGap");g&&!f[p].width&&(g=Math.min(d.remainedWidth,g),f[p].width=g,d.remainedWidth-=g),m&&(f[p].maxWidth=m),null!=v&&(d.gap=v),null!=_&&(d.categoryGap=_)}));var a={};return n.each(i,(function(t,e){a[e]={};var i=t.stacks,o=t.bandWidth,s=r(t.categoryGap,o),l=r(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),n.each(i,(function(t,e){var i=t.maxWidth;i&&i=0?"p":"n",O=T;if(b&&(l[h][P]||(l[h][P]={p:T,n:T}),O=l[h][P][D]),"radius"===p.dim){var R=p.dataToRadius(E)-T,N=n.dataToAngle(P);Math.abs(R)o;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,r=i*i+n*n,a=this.r,o=this.r0;return r<=a*a&&r>=o*o}}}};var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(36);function a(t,e){r.call(this,"radius",t,e),this.type="category"}a.prototype={constructor:a,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:r.prototype.dataToCoord,radiusToData:r.prototype.coordToData},n.inherits(a,r);var o=a;t.exports=o},function(t,e,i){var n=i(0),r=i(21),a=i(36),o=(0,i(5).makeInner)();function s(t,e){e=e||[0,360],a.call(this,"angle",t,e),this.type="category"}s.prototype={constructor:s,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:a.prototype.dataToCoord,angleToData:a.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,i=e.getExtent(),n=e.count();if(i[1]-i[0]<1)return 0;var a=i[0],s=this.dataToCoord(a+1)-this.dataToCoord(a),l=Math.abs(s),u=r.getBoundingRect(a,t.getFont(),"center","top"),h=Math.max(u.height,7)/l;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),d=o(this.model),f=d.lastAutoInterval,p=d.lastTickCount;return null!=f&&null!=p&&Math.abs(f-c)<=1&&Math.abs(p-n)<=1&&f>c?c=f:(d.lastTickCount=n,d.lastAutoInterval=c),c}},n.inherits(s,a);var l=s;t.exports=l},function(t,e,i){var n=i(2);i(451);var r=n.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});t.exports=r},function(t,e,i){var n=i(0),r=i(16),a=i(89),o=i(53),s=r.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n.merge(s.prototype,o);var l={splitNumber:5};function u(t,e){return e.type||(e.data?"category":"value")}a("angle",s,u,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),a("radius",s,u,l)},function(t,e,i){i(121),i(453)},function(t,e,i){var n=i(0),r=i(3),a=i(15),o=i(45),s=i(37),l=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function u(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),r=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:r[0],y2:r[1]}}function h(t){return t.getRadiusAxis().inverse?0:1}function c(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}var d=o.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,r=i.polar,a=r.getRadiusAxis().getExtent(),o=i.getTicksCoords(),s=i.getMinorTicksCoords(),u=n.map(i.getViewLabels(),(function(t){return(t=n.clone(t)).coord=i.dataToCoord(t.tickValue),t}));c(u),c(o),n.each(l,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,r,o,s,a,u)}),this)}},_axisLine:function(t,e,i,n,a){var o,s=t.getModel("axisLine.lineStyle"),l=h(e),u=l?0:1;(o=0===a[u]?new r.Circle({shape:{cx:e.cx,cy:e.cy,r:a[l]},style:s.getLineStyle(),z2:1,silent:!0}):new r.Ring({shape:{cx:e.cx,cy:e.cy,r:a[l],r0:a[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,a,o){var s=t.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),c=o[h(e)],d=n.map(i,(function(t){return new r.Line({shape:u(e,[c,c+l],t.coord)})}));this.group.add(r.mergePath(d,{style:n.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,a,o){if(a.length){for(var s=t.getModel("axisTick"),l=t.getModel("minorTick"),c=(s.get("inside")?-1:1)*l.get("length"),d=o[h(e)],f=[],p=0;pv?"left":"right",x=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";c&&c[u]&&c[u].textStyle&&(o=new a(c[u].textStyle,d,d.ecModel));var b=new r.Text({silent:s.isLabelSilent(t)});this.group.add(b),r.setTextStyle(b.style,o,{x:m[0],y:m[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:y,textVerticalAlign:x}),p&&(b.eventData=s.makeAxisEventDataBase(t),b.eventData.targetType="axisLabel",b.eventData.value=i.rawLabel)}),this)},_splitLine:function(t,e,i,a,o){var s=t.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),h=0;l=l instanceof Array?l:[l];for(var c=[],d=0;dy?"left":"right",f=Math.abs(c[1]-x)/_<.3?"middle":c[1]>x?"top":"bottom"}return{position:c,align:d,verticalAlign:f}}(e,i,0,f,r.get("label.margin"));o.buildLabelElOption(t,i,r,u,_)}});var c={line:function(t,e,i,n,r){return"angle"===t.dim?{type:"Line",shape:o.makeLineShape(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,r){var a=Math.max(1,t.getBandWidth()),s=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:o.makeSectorShape(e.cx,e.cy,n[0],n[1],(-i-a/2)*s,(a/2-i)*s)}:{type:"Sector",shape:o.makeSectorShape(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};u.registerAxisPointerClass("PolarAxisPointer",h);var d=h;t.exports=d},function(t,e,i){var n=i(2),r=i(0);function a(t,e){e.update="updateView",n.registerAction(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name);var a=i.coordinateSystem;r.each(a.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}i(458),i(119),i(459),i(199),a("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a("select",{type:"geoSelect",event:"geoselected"}),a("unSelect",{type:"geoUnSelect",event:"geounselected"})},function(t,e,i){var n=i(0),r=i(5),a=i(16),o=i(15),s=i(118),l=i(119),u=a.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){a.prototype.init.apply(this,arguments),r.defaultEmphasis(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=l.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=n.reduce(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new o(i,e)),t}),n.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new o(null,this,this.ecModel)},getFormattedLabel:function(t,e){e=e||"normal";var i=this.getRegionModel(t).get(("normal"===e?"":e+".")+"label.formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});n.mixin(u,s);var h=u;t.exports=h},function(t,e,i){var n=i(198),r=i(2).extendComponentView({type:"geo",init:function(t,e){var i=new n(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});t.exports=r},function(t,e,i){i(461),i(462),i(463)},function(t,e,i){var n=i(0),r=i(8),a=i(4),o=i(24);function s(t,e,i){this._model=t}function l(t,e,i,n){var r=i.calendarModel,a=i.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem:null;return o===this?o[t](n):null}s.prototype={constructor:s,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=a.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var r=t.getDay();return{y:e,m:i,d:n,day:r=Math.abs((r+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),s=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[i,7]:[7,i];n.each([0,1],(function(t){c(o,t)&&(s[a[t]]=o[t]*l[t])}));var u={width:e.getWidth(),height:e.getHeight()},h=this._rect=r.getLayoutRect(s,u);function c(t,e){return null!=t[e]&&"auto"!==t[e]}n.each([0,1],(function(t){c(o,t)||(o[t]=h[a[t]]/l[t])})),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){n.isArray(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),r=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=r.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),r=n.getDate(),a=t[1].date.getDate();n.setDate(r+i-1);var o=n.getDate();if(o!==a)for(var s=n.getTime()-t[1].time>0?1:-1;(o=n.getDate())!==a&&(n.getTime()-t[1].time)*s>0;)i-=s,n.setDate(o-s);var l=Math.floor((i+t[0].day+6)/7),u=e?1-l:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var r=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+r),this.getDateInfo(a)}},s.dimensions=s.prototype.dimensions,s.getDimensionsInfo=s.prototype.getDimensionsInfo,s.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(n){var r=new s(n,t,e);i.push(r),n.coordinateSystem=r})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},o.register("calendar",s);var u=s;t.exports=u},function(t,e,i){var n=i(0),r=i(16),a=i(8),o=a.getLayoutParams,s=a.sizeCalculable,l=a.mergeLayoutParam,u=r.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var r=o(t);u.superApply(this,"init",arguments),h(t,r)},mergeOption:function(t,e){u.superApply(this,"mergeOption",arguments),h(this.option,t)}});function h(t,e){var i=t.cellSize;n.isArray(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var r=n.map([0,1],(function(t){return s(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));l(t,e,{type:"box",ignoreSize:r})}var c=u;t.exports=c},function(t,e,i){var n=i(2),r=i(0),a=i(3),o=i(9),s=i(4),l={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},u={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},h=n.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var r=t.coordinateSystem,a=r.getRangeInfo(),o=r.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,o,n),this._renderYearText(t,a,o,n),this._renderMonthText(t,o,n),this._renderWeekText(t,a,o,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),s=n.getCellHeight(),l=e.start.time;l<=e.end.time;l=n.getNextNDay(l,1).time){var u=n.dataToRect([l],!1).tl,h=new a.Rect({shape:{x:u[0],y:u[1],width:o,height:s},cursor:"default",style:r});i.add(h)}},_renderLines:function(t,e,i,n){var r=this,a=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=a.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=a.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(a.getDateInfo(e)),r._firstDayPoints.push(a.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,i);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,o,n)}d(a.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,i),o,n),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,i),o,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===i?0:1;return n[0][r]=n[0][r]-e/2,n[1][r]=n[1][r]+e/2,n},_drawSplitline:function(t,e,i){var n=new a.Polyline({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var r=[],a=0;a<7;a++){var o=n.getNextNDay(e.time,a),s=n.dataToRect([o.time],!1);r[2*o.day]=s.tl,r[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"==typeof t&&t?o.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,r){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=r,a=["center","top"]):"left"===n?e[0]-=r:"right"===n?(e[0]+=r,a=["center","top"]):e[1]-=r;var o=0;return"left"!==n&&"right"!==n||(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),s=r.get("position");s||(s="horizontal"!==i?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],u=(l[0][0]+l[1][0])/2,h=(l[0][1]+l[1][1])/2,c="horizontal"===i?0:1,d={top:[u,l[c][1]],bottom:[u,l[1-c][1]],left:[l[1-c][0],h],right:[l[c][0],h]},f=e.start.y;+e.end.y>+e.start.y&&(f=f+"-"+e.end.y);var p=r.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:f},m=this._formatterLabel(p,g),v=new a.Text({z2:30});a.setTextStyle(v.style,r,{text:m}),v.attr(this._yearTextPositionControl(v,d[s],i,s,o)),n.add(v)}},_monthTextPositionControl:function(t,e,i,n,r){var a="left",o="top",s=t[0],l=t[1];return"horizontal"===i?(l+=r,e&&(a="center"),"start"===n&&(o="bottom")):(s+=r,e&&(o="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),s=n.get("margin"),u=n.get("position"),h=n.get("align"),c=[this._tlpoints,this._blpoints];r.isString(o)&&(o=l[o.toUpperCase()]||[]);var d="start"===u?0:1,f="horizontal"===e?0:1;s="start"===u?-s:s;for(var p="center"===h,g=0;g=0;c--)null==o[c]?o.splice(c,1):delete o[c].$action},_flatten:function(t,e,i){r.each(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function c(t,e,i,n){var r=i.type,a=new(u.hasOwnProperty(r)?u[r]:o.getShapeClass(r))(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function d(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){d(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function f(t,e){var i;return r.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}n.extendComponentView({type:"graphic",init:function(t,e){this._elMap=r.createHashMap(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;r.each(e,(function(e){var a=e.$action,o=e.id,l=i.get(o),u=e.parentId,h=null!=u?i.get(u):n,f=e.style;"text"===e.type&&f&&(e.hv&&e.hv[1]&&(f.textVerticalAlign=f.textBaseline=null),!f.hasOwnProperty("textFill")&&f.fill&&(f.textFill=f.fill),!f.hasOwnProperty("textStroke")&&f.stroke&&(f.textStroke=f.stroke));var p=function(t){return t=r.extend({},t),r.each(["id","parentId","$action","hv","bounding"].concat(s.LOCATION_PARAMS),(function(e){delete t[e]})),t}(e);a&&"merge"!==a?"replace"===a?(d(l,i),c(o,h,p,i)):"remove"===a&&d(l,i):l?l.attr(p):c(o,h,p,i);var g=i.get(o);g&&(g.__ecGraphicWidthOption=e.width,g.__ecGraphicHeightOption=e.height,function(t,e,i){var n=t.eventData;t.silent||t.ignore||n||(n=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});n&&(n.info=t.info)}(g,t))}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,r=this._elMap,a=e.getWidth(),o=e.getHeight(),u=0;u=0;u--){var d;h=i[u];if(d=r.get(h.id)){var f,p=(f=d.parent)===n?{width:a,height:o}:{width:f.__ecGraphicWidth,height:f.__ecGraphicHeight};s.positionElement(d,h,p,null,{hv:h.hv,boundingMode:h.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){d(e,t)})),this._elMap=r.createHashMap()},dispose:function(){this._clear()}})},function(t,e,i){var n=i(2),r=i(466);i(206),i(468),i(469),i(470),i(471),n.registerPreprocessor(r)},function(t,e,i){var n=i(0),r=["rect","polygon","keep","clear"];t.exports=function(t,e){var i=t&&t.brush;if(n.isArray(i)||(i=i?[i]:[]),i.length){var a=[];n.each(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(a=a.concat(e))}));var o=t&&t.toolbox;n.isArray(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var s,l,u=o.feature||(o.feature={}),h=u.brush||(u.brush={}),c=h.type||(h.type=[]);c.push.apply(c,a),s=c,l={},n.each(s,(function(t){l[t]=1})),s.length=0,n.each(l,(function(t,e){s.push(e)})),e&&!c.length&&c.push.apply(c,r)}}},function(t,e,i){var n=i(164),r=i(11),a=i(3).linePolygonIntersect;function o(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var r=n.range;return s(e[t],r)}},rect:function(n,r,a){if(n){var o=a.range,l=[n[e[t]],n[e[t]]+n[i[t]]];return l[1]=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,r=this._names=[];if("category"===i){var s=[];n.each(e,(function(t,e){var i,a=o.getDataItemValue(t);n.isObject(t)?(i=n.clone(t)).value=e:i=e,s.push(i),n.isString(a)||null!=a&&!isNaN(a)||(a=""),r.push(a+"")})),e=s}var l={category:"ordinal",time:"time"}[i]||"number";(this._data=new a([{name:"value",type:l}],this)).initData(e,r)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),l=s;t.exports=l},function(t,e,i){var n=i(0),r=i(11),a=i(20),o=i(3),s=i(8),l=i(479),u=i(480),h=i(23).createSymbol,c=i(25),d=i(4),f=i(9).encodeHTML,p=n.bind,g=n.each,m=Math.PI,v=l.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var r=this._layout(t,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(r,t);t.formatTooltip=function(t){return f(s.scale.getLabel(t))},g(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](r,a,s,t)}),this),this._renderAxisLabel(r,o,s,t),this._position(r,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),r=function(t,e){return s.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?r.y+r.height/2=0||"+"===i?"left":"right"},c={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:m/2},f="vertical"===n?r.height:r.width,p=t.getModel("controlStyle"),g=p.get("show",!0),v=g?p.get("itemSize"):0,_=g?p.get("itemGap"):0,y=v+_,x=t.get("label.rotate")||0;x=x*m/180;var b=p.get("position",!0),w=g&&p.get("showPlayBtn",!0),T=g&&p.get("showPrevBtn",!0),S=g&&p.get("showNextBtn",!0),M=0,A=f;return"left"===b||"bottom"===b?(w&&(a=[0,0],M+=y),T&&(o=[M,0],M+=y),S&&(l=[A-v,0],A-=y)):(w&&(a=[A-v,0],A-=y),T&&(o=[0,0],M+=y),S&&(l=[A-v,0],A-=y)),u=[M,A],t.get("inverse")&&u.reverse(),{viewRect:r,mainLength:f,orient:n,rotation:d[n],labelRotation:x,labelPosOpt:i,labelAlign:t.get("label.align")||h[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||c[n],playPosition:a,prevBtnPosition:o,nextBtnPosition:l,axisExtent:u,controlSize:v,controlGap:_}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=a.create(),s=r.x,l=r.y+r.height;a.translate(o,o,[-s,-l]),a.rotate(o,o,-m/2),a.translate(o,o,[s,l]),(r=r.clone()).applyTransform(o)}var u=_(r),h=_(i.getBoundingRect()),c=_(n.getBoundingRect()),d=i.position,f=n.position;f[0]=d[0]=u[0][0];var p,g=t.labelPosOpt;isNaN(g)?(y(d,h,u,1,p="+"===g?0:1),y(f,c,u,1,1-p)):(y(d,h,u,1,p=g>=0?0:1),f[1]=d[1]+g);function v(t){var e=t.position;t.origin=[u[0][0]-e[0],u[1][0]-e[1]]}function _(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,i,n,r){t[n]+=i[n][r]-e[n][r]}i.attr("position",d),n.attr("position",f),i.rotation=n.rotation=t.rotation,v(i),v(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),r=c.createScaleByModel(e,n);r.getTicks=function(){return i.mapArray(["value"],(function(t){return t}))};var a=i.getDataExtent("value");r.setExtent(a[0],a[1]),r.niceTicks();var o=new u("value",r,t.axisExtent,n);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new o.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,r){var a=i.getExtent();r.get("lineStyle.show")&&e.add(new o.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:n.extend({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var r=n.getData(),a=i.scale.getTicks();g(a,(function(t){var a=i.dataToCoord(t),s=r.getItemModel(t),l=s.getModel("itemStyle"),u=s.getModel("emphasis.itemStyle"),h={position:[a,0],onclick:p(this._changeTimeline,this,t)},c=_(s,l,e,h);o.setHoverStyle(c,u.getItemStyle()),s.get("tooltip")?(c.dataIndex=t,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var r=n.getData(),a=i.getViewLabels();g(a,(function(n){var a=n.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel("emphasis.label"),h=i.dataToCoord(n.tickValue),c=new o.Text({position:[h,0],rotation:t.labelRotation-t.rotation,onclick:p(this._changeTimeline,this,a),silent:!1});o.setTextStyle(c.style,l,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(c),o.setHoverStyle(c,o.setTextStyle({},u))}),this)}},_renderControl:function(t,e,i,n){var a=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel("emphasis.controlStyle").getItemStyle(),h=[0,-a/2,a,a],c=n.getPlayState(),d=n.get("inverse",!0);function f(t,i,c,d){if(t){var f=function(t,e,i,n){var a=n.style,s=o.createIcon(t.get(e),n||{},new r(i[0],i[1],i[2],i[3]));a&&s.setStyle(a);return s}(n,i,h,{position:t,origin:[a/2,0],rotation:d?-s:0,rectHover:!0,style:l,onclick:c});e.add(f),o.setHoverStyle(f,u)}}f(t.nextBtnPosition,"controlStyle.nextIcon",p(this._changeTimeline,this,d?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",p(this._changeTimeline,this,d?"+":"-")),f(t.playPosition,"controlStyle."+(c?"stopIcon":"playIcon"),p(this._handlePlayClick,this,!c),!0)},_renderCurrentPointer:function(t,e,i,n){var r=n.getData(),a=n.getCurrentIndex(),o=r.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=p(s._handlePointerDrag,s),t.ondragend=p(s._handlePointerDragend,s),y(t,a,i,n,!0)},onUpdate:function(t){y(t,a,i,n)}};this._currentPointer=_(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,r=d.asc(n.getExtent().slice());i>r[1]&&(i=r[1]),i=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,r=[g,m,{type:s,valueIndex:r.valueIndex,value:h}]}return(r=[o.dataTransform(t,r[0]),o.dataTransform(t,r[1]),n.extend({},r[2])])[2].type=r[2].type||"",n.merge(r[2],r[0]),n.merge(r[2],r[1]),r};function c(t){return!isNaN(t)&&!isFinite(t)}function d(t,e,i,n){var r=1-t,a=n.dimensions[t];return c(e[r])&&c(i[r])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function f(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(d(1,i,n,t)||d(0,i,n,t)))return!0}return o.dataFilter(t,e[0])&&o.dataFilter(t,e[1])}function p(t,e,i,n,r){var o,s=n.coordinateSystem,l=t.getItemModel(e),u=a.parsePercent(l.get("x"),r.getWidth()),h=a.parsePercent(l.get("y"),r.getHeight());if(isNaN(u)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var d=s.dimensions,f=t.get(d[0],e),p=t.get(d[1],e);o=s.dataToPoint([f,p])}if("cartesian2d"===s.type){var g=s.getAxis("x"),m=s.getAxis("y");d=s.dimensions;c(t.get(d[0],e))?o[0]=g.toGlobalCoord(g.getExtent()[i?0:1]):c(t.get(d[1],e))&&(o[1]=m.toGlobalCoord(m.getExtent()[i?0:1]))}isNaN(u)||(o[0]=u),isNaN(h)||(o[1]=h)}else o=[u,h];t.setItemLayout(e,o)}var g=l.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,a=e.__to;r.each((function(e){p(r,e,!0,t,i),p(a,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[r.getItemLayout(t),a.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,a){var l=t.coordinateSystem,u=t.id,c=t.getData(),d=this.markerGroupMap,g=d.get(u)||d.set(u,new s);this.group.add(g.group);var m=function(t,e,i){var a;a=t?n.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return n.defaults({name:t},i)})):[{name:"value",type:"float"}];var s=new r(a,i),l=new r(a,i),u=new r([],i),c=n.map(i.get("data"),n.curry(h,e,t,i));t&&(c=n.filter(c,n.curry(f,t)));var d=t?o.dimValueGetter:function(t){return t.value};return s.initData(n.map(c,(function(t){return t[0]})),null,d),l.initData(n.map(c,(function(t){return t[1]})),null,d),u.initData(n.map(c,(function(t){return t[2]}))),u.hasItemOption=!0,{from:s,to:l,line:u}}(l,t,e),v=m.from,_=m.to,y=m.line;e.__from=v,e.__to=_,e.setData(y);var x=e.get("symbol"),b=e.get("symbolSize");function w(e,i,n){var r=e.getItemModel(i);p(e,i,n,t,a),e.setItemVisual(i,{symbolRotate:r.get("symbolRotate"),symbolSize:r.get("symbolSize")||b[n?0:1],symbol:r.get("symbol",!0)||x[n?0:1],color:r.get("itemStyle.color")||c.getVisual("color")})}n.isArray(x)||(x=[x,x]),"number"==typeof b&&(b=[b,b]),m.from.each((function(t){w(v,t,!0),w(_,t,!1)})),y.each((function(t){var e=y.getItemModel(t).get("lineStyle.color");y.setItemVisual(t,{color:e||v.getItemVisual(t,"color")}),y.setItemLayout(t,[v.getItemLayout(t),_.getItemLayout(t)]),y.setItemVisual(t,{fromSymbolRotate:v.getItemVisual(t,"symbolRotate"),fromSymbolSize:v.getItemVisual(t,"symbolSize"),fromSymbol:v.getItemVisual(t,"symbol"),toSymbolRotate:_.getItemVisual(t,"symbolRotate"),toSymbolSize:_.getItemVisual(t,"symbolSize"),toSymbol:_.getItemVisual(t,"symbol")})})),g.updateData(y),m.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),g.__keep=!0,g.group.silent=e.get("silent")||t.get("silent")}});t.exports=g},function(t,e,i){var n=i(2);i(488),i(489),n.registerPreprocessor((function(t){t.markArea=t.markArea||{}}))},function(t,e,i){var n=i(122).extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});t.exports=n},function(t,e,i){var n=i(0),r=i(27),a=i(22),o=i(4),s=i(3),l=i(123),u=i(124),h=function(t,e,i,r){var a=l.dataTransform(t,r[0]),o=l.dataTransform(t,r[1]),s=n.retrieve,u=a.coord,h=o.coord;u[0]=s(u[0],-1/0),u[1]=s(u[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var c=n.mergeAll([{},a,o]);return c.coord=[a.coord,o.coord],c.x0=a.x,c.y0=a.y,c.x1=o.x,c.y1=o.y,c};function c(t){return!isNaN(t)&&!isFinite(t)}function d(t,e,i,n){var r=1-t;return c(e[r])&&c(i[r])}function f(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!d(1,i,n)&&!d(0,i,n))||(l.dataFilter(t,{coord:i,x:e.x0,y:e.y0})||l.dataFilter(t,{coord:n,x:e.x1,y:e.y1}))}function p(t,e,i,n,r){var a,s=n.coordinateSystem,l=t.getItemModel(e),u=o.parsePercent(l.get(i[0]),r.getWidth()),h=o.parsePercent(l.get(i[1]),r.getHeight());if(isNaN(u)||isNaN(h)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var d=[g=t.get(i[0],e),m=t.get(i[1],e)];s.clampData&&s.clampData(d,d),a=s.dataToPoint(d,!0)}if("cartesian2d"===s.type){var f=s.getAxis("x"),p=s.getAxis("y"),g=t.get(i[0],e),m=t.get(i[1],e);c(g)?a[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):c(m)&&(a[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(u)||(a[0]=u),isNaN(h)||(a[1]=h)}else a=[u,h];return a}var g=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];u.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var r=e.getData();r.each((function(e){var a=n.map(g,(function(n){return p(r,e,n,t,i)}));r.setItemLayout(e,a),r.getItemGraphicEl(e).setShape("points",a)}))}}),this)},renderSeries:function(t,e,i,o){var l=t.coordinateSystem,u=t.id,d=t.getData(),m=this.markerGroupMap,v=m.get(u)||m.set(u,{group:new s.Group});this.group.add(v.group),v.__keep=!0;var _=function(t,e,i){var r,o;t?(r=n.map(t&&t.dimensions,(function(t){var i=e.getData(),r=i.getDimensionInfo(i.mapDimension(t))||{};return n.defaults({name:t},r)})),o=new a(n.map(["x0","y0","x1","y1"],(function(t,e){return{name:t,type:r[e%2].type}})),i)):o=new a(r=[{name:"value",type:"float"}],i);var s=n.map(i.get("data"),n.curry(h,e,t,i));t&&(s=n.filter(s,n.curry(f,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(s,null,l),o.hasItemOption=!0,o}(l,t,e);e.setData(_),_.each((function(e){var i=n.map(g,(function(i){return p(_,e,i,t,o)})),r=!0;n.each(g,(function(t){if(r){var i=_.get(t[0],e),n=_.get(t[1],e);(c(i)||l.getAxis("x").containData(i))&&(c(n)||l.getAxis("y").containData(n))&&(r=!1)}})),_.setItemLayout(e,{points:i,allClipped:r}),_.setItemVisual(e,{color:d.getVisual("color")})})),_.diff(v.__data).add((function(t){var e=_.getItemLayout(t);if(!e.allClipped){var i=new s.Polygon({shape:{points:e.points}});_.setItemGraphicEl(t,i),v.group.add(i)}})).update((function(t,i){var n=v.__data.getItemGraphicEl(i),r=_.getItemLayout(t);r.allClipped?n&&v.group.remove(n):(n?s.updateProps(n,{shape:{points:r.points}},e,t):n=new s.Polygon({shape:{points:r.points}}),_.setItemGraphicEl(t,n),v.group.add(n))})).remove((function(t){var e=v.__data.getItemGraphicEl(t);v.group.remove(e)})).execute(),_.eachItemGraphicEl((function(t,i){var a=_.getItemModel(i),o=a.getModel("label"),l=a.getModel("emphasis.label"),u=_.getItemVisual(i,"color");t.useStyle(n.defaults(a.getModel("itemStyle").getItemStyle(),{fill:r.modifyAlpha(u,.4),stroke:u})),t.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),s.setLabelStyle(t.style,t.hoverStyle,o,l,{labelFetcher:e,labelDataIndex:i,defaultText:_.getName(i)||"",isRectText:!0,autoColor:u}),s.setHoverStyle(t,{}),t.dataModel=e})),v.__data=_,v.group.silent=e.get("silent")||t.get("silent")}})},function(t,e,i){i(116),i(491),i(492),i(493)},function(t,e,i){var n=i(188),r=i(8),a=r.mergeLayoutParam,o=r.getLayoutParams,s=n.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var r=o(t);s.superCall(this,"init",t,e,i,n),l(this,t,r)},mergeOption:function(t,e){s.superCall(this,"mergeOption",t,e),l(this,this.option,t)}});function l(t,e,i){var n=[1,1];n[t.getOrient().index]=0,a(e,i,{type:"box",ignoreSize:n})}var u=s;t.exports=u},function(t,e,i){var n=i(0),r=i(3),a=i(8),o=i(189),s=r.Group,l=["width","height"],u=["x","y"],h=o.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){h.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new s),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new s),this._showController},resetInner:function(){h.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,a,o,s,l){var u=this;h.superCall(this,"renderInner",t,e,i,a,o,s,l);var c=this._controllerGroup,d=e.get("pageIconSize",!0);n.isArray(d)||(d=[d,d]),p("pagePrev",0);var f=e.getModel("pageTextStyle");function p(t,i){var o=t+"DataIndex",s=r.createIcon(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:n.bind(u._pageGo,u,o,e,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});s.name=t,c.add(s)}c.add(new r.Text({name:"pageText",style:{textFill:f.getTextColor(),font:f.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),p("pageNext",1)},layoutInner:function(t,e,i,r,o,s){var h=this.getSelectorGroup(),c=t.getOrient().index,d=l[c],f=u[c],p=l[1-c],g=u[1-c];o&&a.box("horizontal",h,t.get("selectorItemGap",!0));var m=t.get("selectorButtonGap",!0),v=h.getBoundingRect(),_=[-v.x,-v.y],y=n.clone(i);o&&(y[d]=i[d]-v[d]-m);var x=this._layoutContentAndController(t,r,y,c,d,p,g);if(o){if("end"===s)_[c]+=x[d]+m;else{var b=v[d]+m;_[c]-=b,x[f]-=b}x[d]+=v[d]+m,_[1-c]+=x[g]+x[p]/2-v[p]/2,x[p]=Math.max(x[p],v[p]),x[g]=Math.min(x[g],v[g]+_[1-c]),h.attr("position",_)}return x},_layoutContentAndController:function(t,e,i,o,s,l,u){var h=this.getContentGroup(),c=this._containerGroup,d=this._controllerGroup;a.box(t.get("orient"),h,t.get("itemGap"),o?i.width:null,o?null:i.height),a.box("horizontal",d,t.get("pageButtonItemGap",!0));var f=h.getBoundingRect(),p=d.getBoundingRect(),g=this._showController=f[s]>i[s],m=[-f.x,-f.y];e||(m[o]=h.position[o]);var v=[0,0],_=[-p.x,-p.y],y=n.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));g&&("end"===t.get("pageButtonPosition",!0)?_[o]+=i[s]-p[s]:v[o]+=p[s]+y);_[1-o]+=f[l]/2-p[l]/2,h.attr("position",m),c.attr("position",v),d.attr("position",_);var x={x:0,y:0};if(x[s]=g?i[s]:f[s],x[l]=Math.max(f[l],p[l]),x[u]=Math.min(0,p[u]+_[1-o]),c.__rectSize=i[s],g){var b={x:0,y:0};b[s]=Math.max(i[s]-p[s]-y,0),b[l]=x[l],c.setClipPath(new r.Rect({shape:b})),c.__rectSize=b[s]}else d.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(t);return null!=w.pageIndex&&r.updateProps(h,{position:w.contentPosition},!!g&&t),this._updatePageInfoView(t,w),x},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;n.each(["pagePrev","pageNext"],(function(n){var r=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")}));var r=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,s=null!=o?o+1:0,l=e.pageCount;r&&a&&r.setStyle("text",n.isString(a)?a.replace("{current}",s).replace("{total}",l):a({current:s,total:l}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,r=t.getOrient().index,a=l[r],o=u[r],s=this._findTargetItemIndex(e),h=i.children(),c=h[s],d=h.length,f=d?1:0,p={contentPosition:i.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=x(c);p.contentPosition[r]=-g.s;for(var m=s+1,v=g,_=g,y=null;m<=d;++m)(!(y=x(h[m]))&&_.e>v.s+n||y&&!b(y,v.s))&&(v=_.i>v.i?_:y)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount),_=y;for(m=s-1,v=g,_=g,y=null;m>=-1;--m)(y=x(h[m]))&&b(_,y.s)||!(v.i<_.i)||(_=v,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=v.i),++p.pageCount,++p.pageIndex),v=y;return p;function x(t){if(t){var e=t.getBoundingRect(),i=e[o]+t.position[r];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function b(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(t){return this._showController?(this.getContentGroup().eachChild((function(n,r){var a=n.__legendDataIndex;null==i&&null!=a&&(i=r),a===t&&(e=r)})),null!=e?e:i):0;var e,i}}),c=h;t.exports=c},function(t,e,i){i(2).registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))},function(t,e,i){i(207),i(208)},function(t,e,i){var n=i(55).extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});t.exports=n},function(t,e,i){var n=i(0),r=i(26),a=i(3),o=i(34),s=i(56),l=i(4),u=i(8),h=i(54),c=a.Rect,d=l.linearMap,f=l.asc,p=n.bind,g=n.each,m=["line","bar","candlestick","scatter"],v=s.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){v.superApply(this,"render",arguments),o.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){v.superApply(this,"remove",arguments),o.clear(this,"_dispatchZoomAction")},dispose:function(){v.superApply(this,"dispose",arguments),o.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},a="horizontal"===this._orient?{right:r.width-i.x-i.width,top:r.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=u.getLayoutParams(t.option);n.each(["right","top","width","height"],(function(t){"ph"===o[t]&&(o[t]=a[t])}));var s=u.getLayoutRect(o,r,t.padding);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr("horizontal"!==i||r?"horizontal"===i&&r?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new c({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new c({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:n.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var s=r.getDataExtent(o),l=.3*(s[1]-s[0]);s=[s[0]-l,s[1]+l];var u,h=[0,e[1]],c=[0,e[0]],f=[[e[0],0],[0,0]],p=[],g=c[1]/(r.count()-1),m=0,v=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(v>0&&e%v)m+=g;else{var i=null==t||isNaN(t)||""===t,n=i?0:d(t,s,h,!0);i&&!u&&e?(f.push([f[f.length-1][0],0]),p.push([p[p.length-1][0],0])):!i&&u&&(f.push([m,0]),p.push([m,0])),f.push([m,n]),p.push([m,n]),m+=g,u=i}}));var _=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:f},style:n.defaults({fill:_.get("dataBackgroundColor")},_.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new a.Polyline({shape:{points:p},style:_.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,r=this.ecModel;return t.eachTargetAxis((function(a,o){var s=t.getAxisProxy(a.name,o).getTargetSeriesModels();n.each(s,(function(t){if(!(i||!0!==e&&n.indexOf(m,t.get("type"))<0)){var s,l=r.getComponent(a.axis,o).axis,u={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(s=h.getOtherAxis(l).inverse),u=t.getData().mapDimension(u),i={thisAxis:l,series:t,thisDim:a.name,otherDim:u,otherAxisInverse:s}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new c({draggable:!0,cursor:_(this._orient),drift:p(this._onDragMove,this,"all"),ondragstart:p(this._showDataInfo,this,!0),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new c({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),g([0,1],(function(t){var r=a.createIcon(o.get("handleIcon"),{cursor:_(this._orient),draggable:!0,drift:p(this._onDragMove,this,t),ondragend:p(this._onDragEnd,this),onmouseover:p(this._showDataInfo,this,!0),onmouseout:p(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),s=r.getBoundingRect();this._handleHeight=l.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=s.width/s.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var u=o.get("handleColor");null!=u&&(r.style.fill=u),n.add(e[t]=r);var h=o.textStyleModel;this.group.add(i[t]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[d(t[0],[0,100],e,!0),d(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];h(e,n,r,i.get("zoomLock")?"all":t,null!=a.minSpan?d(a.minSpan,o,r,!0):null,null!=a.maxSpan?d(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=f([d(n[0],r,o,!0),d(n[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=f(i.slice()),r=this._size;g([0,1],(function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],r[1]/2-a/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,o=["",""];if(e.get("showDetail")){var s=e.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();o=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=f(this._handleEnds.slice());function d(t){var e=a.getTransform(i.handles[t].parent,this.group),s=a.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+5,u=a.applyTransform([c[t]+(0===t?-l:l),this._size[1]/2],e);n[t].setStyle({x:u[0],y:u[1],textVerticalAlign:"horizontal"===r?"middle":s,textAlign:"horizontal"===r?s:"center",text:o[t]})}d.call(this,0),d.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,r=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return n.isFunction(r)?r(t,o):n.isString(r)?r.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,r.stop(n.event);var o=this._displayables.barGroup.getLocalTransform(),s=a.applyTransform([e,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(g(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}})),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});function _(t){return"vertical"===t?"ns-resize":"ew-resize"}var y=v;t.exports=y},function(t,e,i){var n=i(55).extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});t.exports=n},function(t,e,i){var n=i(0),r=i(56),a=i(54),o=i(499),s=n.bind,l=r.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,r){l.superApply(this,"render",arguments),this._range=t.getPercentRange(),n.each(this.getTargetCoordInfo(),(function(e,r){var a=n.map(e,(function(t){return o.generateCoordId(t.model)}));n.each(e,(function(e){var l=e.model,h={};n.each(["pan","zoom","scrollMove"],(function(t){h[t]=s(u[t],this,e,r)}),this),o.register(i,{coordId:o.generateCoordId(l),allCoordIds:a,containsPoint:function(t,e,i){return l.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:h})}),this)}),this)},dispose:function(){o.unregister(this.api,this.dataZoomModel.id),l.superApply(this,"dispose",arguments),this._range=null}}),u={zoom:function(t,e,i,n){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s){var l=c[e](null,[n.originX,n.originY],s,i,t),u=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0],h=Math.max(1/n.scale,0);o[0]=(o[0]-u)*h+u,o[1]=(o[1]-u)*h+u;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return a(0,o,[0,100],0,d.minSpan,d.maxSpan),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:h((function(t,e,i,n,r,a){var o=c[n]([a.oldX,a.oldY],[a.newX,a.newY],e,r,i);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength})),scrollMove:h((function(t,e,i,n,r,a){return c[n]([0,0],[a.scrollDelta,a.scrollDelta],e,r,i).signal*(t[1]-t[0])*a.scrollDelta}))};function h(t){return function(e,i,n,r){var o=this._range,s=o.slice(),l=e.axisModels[0];if(l){var u=t(s,l,e,i,n,r);return a(u,s,[0,100],"all"),this._range=s,o[0]!==s[0]||o[1]!==s[1]?s:void 0}}}var c={grid:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,i,n,r){var a=i.axis,o=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},d=l;t.exports=d},function(t,e,i){var n=i(0),r=i(68),a=i(34),o="\0_ec_dataZoom_roams";function s(t){var e=t.getZr();return e[o]||(e[o]={})}function l(t){n.each(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function u(t,e){t.dispatchAction({type:"dataZoom",batch:e})}e.register=function(t,e){var i=s(t),o=e.dataZoomId,h=e.coordId;n.each(i,(function(t,i){var r=t.dataZoomInfos;r[o]&&n.indexOf(e.allCoordIds,h)<0&&(delete r[o],t.count--)})),l(i);var c=i[h];c||((c=i[h]={coordId:h,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new r(t.getZr());return n.each(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(i){var r=[];n.each(e.dataZoomInfos,(function(n){if(i.isAvailableBehavior(n.dataZoomModel.option)){var a=(n.getRange||{})[t],o=a&&a(e.controller,i);!n.dataZoomModel.get("disabled",!0)&&o&&r.push({dataZoomId:n.dataZoomId,start:o[0],end:o[1]})}})),r.length&&e.dispatchAction(r)}))})),i}(t,c),c.dispatchAction=n.curry(u,t)),!c.dataZoomInfos[o]&&c.count++,c.dataZoomInfos[o]=e;var d,f,p,g,m=(d=c.dataZoomInfos,p={type_true:2,type_move:1,type_false:0,type_undefined:-1},g=!0,n.each(d,(function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");p["type_"+i]>p["type_"+f]&&(f=i),g&=e.get("preventDefaultMouseMove",!0)})),{controlType:f,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!g}});c.controller.enable(m.controlType,m.opt),c.controller.setPointerChecker(e.containsPoint),a.createOrUpdate(c,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")},e.unregister=function(t,e){var i=s(t);n.each(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),l(i)},e.generateCoordId=function(t){return t.type+"\0_"+t.id}},function(t,e,i){i(209),i(218)},function(t,e,i){var n=i(0),r=i(213),a=i(4),o=[20,140],s=r.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){s.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=o[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=o[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):n.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){r.prototype.completeVisualOption.apply(this,arguments),n.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)}),this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=a.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=l(this,"outOfRange",this.getExtent()),i=l(this,"inRange",this.option.range.slice()),n=[];function r(e,i){n.push({value:e,color:t(e,i)})}for(var a=0,o=0,s=i.length,u=e.length;ot[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:r/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new s.Group("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,a=i.handleLabels;f([0,1],(function(o){var l=r[o];l.setStyle("fill",e.handlesColor[o]),l.position[1]=t[o];var u=s.applyTransform(i.handleLabelPoints[o],s.getTransform(l,this.group));a[o].setStyle({x:u[0],y:u[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,a=r.getExtent(),o=r.itemSize,l=[0,o[1]],u=d(t,a,l,!0),h=this._shapes,c=h.indicator;if(c){c.position[1]=u,c.attr("invisible",!1),c.setShape("points",function(t,e,i,n){return t?[[0,-p(e,g(i,0))],[6,0],[0,p(e,g(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,u,o[1]));var f=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",f);var m=s.applyTransform(h.indicatorLabelPoint,s.getTransform(c,this.group)),v=h.indicatorLabel;v.attr("invisible",!1);var _=this._applyTransform("left",h.barGroup),y=this._orient;v.setStyle({text:(i||"")+r.formatValueText(e),textVerticalAlign:"horizontal"===y?_:"middle",textAlign:"horizontal"===y?"center":_,x:m[0],y:m[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=p(g(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],a=i.getExtent();t=p(g(r[0],t),r[1]);var o=function(t,e,i){var n=6,r=t.get("hoverLinkDataSize");r&&(n=d(r,e,i,!0)/2);return n}(i,a,r),s=[t-o,t+o],l=d(t,r,a,!0),u=[d(s[0],r,a,!0),d(s[1],r,a,!0)];s[0]r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var f=this._hoverLinkDataIndices,m=[];(e||_(i))&&(m=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var v=c.compressBatches(f,m);this._dispatchHighDown("downplay",h.makeHighDownBatch(v[0],i)),this._dispatchHighDown("highlight",h.makeHighDownBatch(v[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var r=n.getData(e.dataType),a=r.get(i.getDataDimension(r),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",h.makeHighDownBatch(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,r){var a=s.getTransform(e,r?null:this.group);return s[n.isArray(t)?"applyTransform":"transformDirection"](t,a,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function v(t,e,i,n){return new s.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){a.stop(t.event)},ondragend:n})}function _(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function y(t){return"vertical"===t?"ns-resize":"ew-resize"}var x=m;t.exports=x},function(t,e,i){i(7).__DEV__;var n=i(0),r=i(213),a=i(47),o=i(214),s=i(4).reformIntervals,l=r.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){l.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();u[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n.clone(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=n.map(this._pieceList,(function(t){t=n.clone(t);return"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=a.listVisualTypes(),s=this.isCategory();function l(t,e,i){return t&&t[e]&&(n.isObject(t[e])?t[e].hasOwnProperty(i):t[e]===i)}n.each(t.pieces,(function(t){n.each(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),n.each(e,(function(e,i){var r=0;n.each(this.stateList,(function(e){r|=l(t,e,i)||l(t.target,e,i)}),this),!r&&n.each(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=o.get(i,"inRange"===e?"active":"inactive",s)}))}),this),r.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,r=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,n.each(r,(function(t,e){var i=this.getSelectedMapKey(t);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var o=!1;n.each(r,(function(t,e){var i=this.getSelectedMapKey(t);a[i]&&(o?a[i]=!1:o=!0)}),this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n.clone(t)},getValueState:function(t){var e=a.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),(function(e,i){a.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],i=[],r=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return n.each(a,(function(t){var e=t.interval;e&&(e[0]>s&&l([s,e[0]],"outOfRange"),l(e.slice()),s=e[1])}),this),{stops:e,outerColors:i}}function l(n,a){var o=r.getRepresentValue({interval:n});a||(a=r.getValueState(o));var s=t(o,a);n[0]===-1/0?i[0]=s:n[1]===1/0?i[1]=s:e.push({value:n[0],color:s},{value:n[1],color:s})}}}),u={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),r=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(r[1]-r[0])/a;+o.toFixed(i)!==o&&i<5;)i++;t.precision=i,o=+o.toFixed(i),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var l=0,u=r[0];l","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function h(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var c=l;t.exports=c},function(t,e,i){var n=i(0),r=i(215),a=i(3),o=i(23).createSymbol,s=i(8),l=i(216),u=r.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),r=e.textStyleModel,o=r.getFont(),l=r.getTextColor(),u=this._getItemAlign(),h=e.itemSize,c=this._getViewData(),d=c.endsText,f=n.retrieve(e.get("showLabel",!0),!d);d&&this._renderEndsText(t,d[0],h,f,u),n.each(c.viewPieceList,(function(r){var s=r.piece,c=new a.Group;c.onclick=n.bind(this._onItemClick,this,s),this._enableHoverLink(c,r.indexInModelPieceList);var d=e.getRepresentValue(s);if(this._createItemSymbol(c,d,[0,0,h[0],h[1]]),f){var p=this.visualMapModel.getValueState(d);c.add(new a.Text({style:{x:"right"===u?-i:h[0]+i,y:h[1]/2,text:s.text,textVerticalAlign:"middle",textAlign:u,textFont:o,textFill:l,opacity:"outOfRange"===p?.5:1}}))}t.add(c)}),this),d&&this._renderEndsText(t,d[1],h,f,u),s.box(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:l.makeHighDownBatch(i.findTargetDataIndices(e),i)})}t.on("mouseover",n.bind(i,this,"highlight")).on("mouseout",n.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return l.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,r){if(e){var o=new a.Group,s=this.visualMapModel.textStyleModel;o.add(new a.Text({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:e,textFont:s.getFont(),textFill:s.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=n.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),r=t.get("orient"),a=t.get("inverse");return("horizontal"===r?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(o(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,r=n.clone(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(r[a]=!0,n.each(r,(function(t,e){r[e]=e===a}))):r[a]=!r[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}});t.exports=u},function(t,e,i){i(506),(0,i(74).registerPainter)("vml",i(507))},function(t,e,i){var n=i(14),r=i(10).applyTransform,a=i(11),o=i(27),s=i(21),l=i(78),u=i(137),h=i(60),c=i(48),d=i(41),f=i(12),p=i(50),g=i(79),m=i(219),v=p.CMD,_=Math.round,y=Math.sqrt,x=Math.abs,b=Math.cos,w=Math.sin,T=Math.max;if(!n.canvasSupported){var S=21600,M=S/2,A=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=S+","+S,t.coordorigin="0,0"},C=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},I=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},L=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},E=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},P=l.parsePercent,D=function(t,e,i){var n=o.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=C(n[0],n[1],n[2]),t.opacity=i*n[3])},O=function(t,e,i,n){var a="fill"===e,s=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof g&&L(t,s),s||(s=m.createNode(e)),a?function(t,e,i){var n,a,s=e.fill;if(null!=s)if(s instanceof g){var l,u=0,h=[0,0],c=0,d=1,f=i.getBoundingRect(),p=f.width,m=f.height;if("linear"===s.type){l="gradient";var v=i.transform,_=[s.x*p,s.y*m],y=[s.x2*p,s.y2*m];v&&(r(_,_,v),r(y,y,v));var x=y[0]-_[0],b=y[1]-_[1];(u=180*Math.atan2(x,b)/Math.PI)<0&&(u+=360),u<1e-6&&(u=0)}else{l="gradientradial";_=[s.x*p,s.y*m],v=i.transform;var w=i.scale,M=p,A=m;h=[(_[0]-f.x)/M,(_[1]-f.y)/A],v&&r(_,_,v),M/=w[0]*S,A/=w[1]*S;var I=T(M,A);c=0/I,d=2*s.r/I-c}var L=s.colorStops.slice();L.sort((function(t,e){return t.offset-e.offset}));for(var E=L.length,P=[],O=[],R=0;R=2){var z=P[0][0],B=P[1][0],F=P[0][1]*e.opacity,V=P[1][1]*e.opacity;t.type=l,t.method="none",t.focus="100%",t.angle=u,t.color=z,t.color2=B,t.colors=O.join(","),t.opacity=V,t.opacity2=F}"radial"===l&&(t.focusposition=h.join(","))}else D(t,s,e.opacity)}(s,i,n):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof g||D(t,e.stroke,e.opacity)}(s,i),I(t,s)):(t[a?"filled":"stroked"]="false",L(t,s))},R=[[],[],[]];f.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=m.createNode("shape"),A(i),this._vmlEl=i),O(i,"fill",e,this),O(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var s=e.lineWidth;if(a&&!e.strokeNoScale){var l=n[0]*n[3]-n[1]*n[2];s*=y(x(l))}o.weight=s+"px"}var u=this.path||(this.path=new p);this.__dirtyPath&&(u.beginPath(),u.subPixelOptimize=!1,this.buildPath(u,this.shape),u.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,a,o,s,l,u=v.M,h=v.C,c=v.L,d=v.A,f=v.Q,p=[],g=t.data,m=t.len();for(o=0;o.01?H&&(U+=.0125):Math.abs(W-z)<1e-4?H&&Uk?C-=.0125:C+=.0125:H&&Wz?A+=.0125:A-=.0125),p.push(j,_(((k-B)*D+E)*S-M),",",_(((z-F)*O+P)*S-M),",",_(((k+B)*D+E)*S-M),",",_(((z+F)*O+P)*S-M),",",_((U*D+E)*S-M),",",_((W*O+P)*S-M),",",_((A*D+E)*S-M),",",_((C*O+P)*S-M)),s=A,l=C;break;case v.R:var Z=R[0],X=R[1];Z[0]=g[o++],Z[1]=g[o++],X[0]=Z[0]+g[o++],X[1]=Z[1]+g[o++],e&&(r(Z,Z,e),r(X,X,e)),Z[0]=_(Z[0]*S-M),X[0]=_(X[0]*S-M),Z[1]=_(Z[1]*S-M),X[1]=_(X[1]*S-M),p.push(" m ",Z[0],",",Z[1]," l ",X[0],",",Z[1]," l ",X[0],",",X[1]," l ",Z[0],",",X[1]);break;case v.Z:p.push(" x ")}if(i>0){p.push(n);for(var Y=0;Y100&&(z=0,k={});var i,n=B.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},k[t]=e,z++}return e}(a.font),b=x.style+" "+x.variant+" "+x.weight+" "+x.size+'px "'+x.family+'"';i=i||s.getBoundingRect(o,b,v,y,a.textPadding,a.textLineHeight);var w=this.transform;if(w&&!n&&(F.copy(e),F.applyTransform(w),e=F),n)p=e.x,g=e.y;else{var T=a.textPosition;if(T instanceof Array)p=e.x+P(T[0],e.width),g=e.y+P(T[1],e.height),v=v||"left";else{var S=this.calculateTextPosition?this.calculateTextPosition({},a,e):s.calculateTextPosition({},a,e);p=S.x,g=S.y,v=v||S.textAlign,y=y||S.textVerticalAlign}}p=s.adjustTextX(p,i.width,v),g=s.adjustTextY(g,i.height,y),g+=i.height/2;var M,C,L,D=m.createNode,R=this._textVmlEl;R?C=(M=(L=R.firstChild).nextSibling).nextSibling:(R=D("line"),M=D("path"),C=D("textpath"),L=D("skew"),C.style["v-text-align"]="left",A(R),M.textpathok=!0,C.on=!0,R.from="0 0",R.to="1000 0.05",I(R,L),I(R,M),I(R,C),this._textVmlEl=R);var N=[p,g],V=R.style;w&&n?(r(N,N,w),L.on=!0,L.matrix=w[0].toFixed(3)+","+w[2].toFixed(3)+","+w[1].toFixed(3)+","+w[3].toFixed(3)+",0,0",L.offset=(_(N[0])||0)+","+(_(N[1])||0),L.origin="0 0",V.left="0px",V.top="0px"):(L.on=!1,V.left=_(p)+"px",V.top=_(g)+"px"),C.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{C.style.font=b}catch(t){}O(R,"fill",{fill:a.textFill,opacity:a.opacity},this),O(R,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),R.style.zIndex=E(this.zlevel,this.z,this.z2),I(t,R)}},G=function(t){L(t,this._textVmlEl),this._textVmlEl=null},H=function(t){I(t,this._textVmlEl)},U=[u,h,c,f,d],W=0;W=0;--n)if(i[n]===t)return!0;return!1}),e):null:e[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=i.style;r.width=t+"px",r.height=e+"px";var a=this._svgDom;a.setAttribute("width",t),a.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||v(s[i])||v(o.style[i]))-(v(s[r])||0)-(v(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<"))}},r.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(t){var e;S.prototype[t]=(e=t,function(){a('In SVG mode painter not support method "'+e+'"')})}));var M=S;t.exports=M},function(t,e){function i(){}function n(t,e,i,n){for(var r=0,a=e.length,o=0,s=0;r=a&&h+1>=o){for(var c=[],d=0;d=a&&d+1>=o)return n(r,l.components,e,t);u[i]=l}else u[i]=void 0}var g;s++}for(;s<=l;){var p=f();if(p)return p}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,a=i.length,o=t.newPos,s=o-n,l=0;o+1-1){var u=o.parse(l)[3],h=o.toHex(l);s.setAttribute("stop-color","#"+h),s.setAttribute("stop-opacity",u)}else s.setAttribute("stop-color",i[n].color);e.appendChild(s)}t._dom=e},s.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&n.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&n.prototype.markUsed.call(this,e._dom)}};var l=s;t.exports=l},function(t,e,i){var n=i(127),r=i(0),a=i(20);function o(t,e){n.call(this,t,e,"clipPath","__clippath_in_use__")}r.inherits(o,n),o.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},o.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,r,o=this.getDefs(!0),s=e[0],l=i?"_textDom":"_dom";s[l]?(r=s[l].getAttribute("id"),n=s[l],o.contains(n)||o.appendChild(n)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(n),s[l]=n);var u=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!i){var h=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),u.brush(s),s.transform=h}else u.brush(s);var c=this.getSvgElement(s);n.innerHTML="",n.appendChild(c.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},o.prototype.markUsed=function(t){var e=this;t.__clipPaths&&r.each(t.__clipPaths,(function(t){t._dom&&n.prototype.markUsed.call(e,t._dom),t._textDom&&n.prototype.markUsed.call(e,t._textDom)}))};var s=o;t.exports=s},function(t,e,i){var n=i(127);function r(t,e){n.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function a(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}i(0).inherits(r,n),r.prototype.addWithoutUpdate=function(t,e){if(e&&a(e.style)){var i;if(e._shadowDom)i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i);else i=this.add(e);this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},r.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},r.prototype.update=function(t,e){if(a(e.style)){var i=this;n.prototype.update.call(this,e,(function(){i.updateDom(e,e._shadowDom)}))}else this.remove(t,e)},r.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},r.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,r,a,o,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,r=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",r/u),i.setAttribute("flood-color",o);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),t._shadowDom=e},r.prototype.markUsed=function(t){t._shadowDom&&n.prototype.markUsed.call(this,t._shadowDom)};var o=r;t.exports=o},function(t,e,i){"use strict";i.r(e);var n={...{metadata:!0,svgRender:!1,echartsOption:{title:{text:"NetJSONGraph",link:"",textStyle:{color:"grey",fontWeight:"bold",fontSize:30},left:"center",top:"5%"},aria:{show:!0,description:"This is a force-oriented graph chart that depicts the relationship between ip nodes."},toolbox:{show:!0,feature:{restore:{show:!0,title:"Restore view"},saveAsImage:{show:!0,title:"Save image"}}},color:["#d66b30","#a3c7dd","#5c9660","#d66b30"]},graphConfig:{layout:"force",label:{show:!0,color:"#000000",position:"top"},force:{gravity:.1,edgeLength:[20,60],repulsion:120},roam:!0,draggable:!0,focusNodeAdjacency:!1,hoverAnimation:!0,legendHoverLink:!0},mapOptions:{roam:!0},mapTileConfig:[],mapLinkConfig:[{}],mapNodeConfig:{label:{show:!0,color:"#000000",position:"top",formatter:"{b}"}},nodeSize:25,nodeStyleProperty:(()=>{const t=[{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#a3c7dd"},{offset:.7,color:"#a3c7dd"},{offset:.71,color:"#e3edf6"},{offset:1,color:"#e3edf6"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#5c9660"},{offset:.7,color:"#5c9660"},{offset:.71,color:"#aecbb0"},{offset:1,color:"#aecbb0"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}}];let e=0;return()=>(e+=1,t[e%t.length])})(),linkStyleProperty:()=>({width:5,color:"#999",shadowColor:"rgba(0, 0, 0, 0.5)",shadowBlur:10}),prepareData(t){},onClickElement(t,e){const i=document.getElementsByClassName("njg-overlay")[0];i.style.visibility="visible",i.innerHTML=`\n
\n ${"link"===t?this.utils.linkInfo(e):this.utils.nodeInfo(e)}\n
\n `;const n=document.createElement("a");n.setAttribute("class","njg-close"),n.setAttribute("id","nodelinkOverlay-close"),n.onclick=()=>{i.style.visibility="hidden"},i.appendChild(n)}}};var r=class{JSONParamParse(t){return"string"==typeof t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(t=>t.json?t.json():t).catch(t=>{console.error(t)}):Promise.resolve(t)}dateParse({dateString:t,parseRegular:e=/^([1-9]\d{3})-(\d{1,2})-(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})(?:\.(\d{1,3}))?Z$/,hourDiffer:i=(new Date).getTimezoneOffset()/60}){const n=e.exec(t);if(!n||n.length<7)return console.error("Date doesn't meet the specifications."),"";const r=["dateYear","dateMonth","dateDay","dateHour"],a={},o=n[1]%4==0&&n[1]%100!=0||n[1]%400==0,s=new Map([["dateMonth",12],["dateDay",[31,o?29:28,31,30,31,30,31,31,30,31,30,31]],["dateHour",24]]);for(let t=r.length;t>0;t-=1)a[r[t-1]]=parseInt(n[t],10);let l,u=-i;for(let t=r.length;t>0;t-=1){if("dateYear"===r[t-1]){a[r[t-1]]+=u;break}l="dateDay"===r[t-1]?s.get("dateDay")[a.dateMonth-1]:s.get(r[t-1]);let e=a[r[t-1]]+u;u="dateHour"===r[t-1]?e<0?-1:e>=l?1:0:e<=0?-1:e>l?1:0,1===u?e-=l:u<0&&("dateDay"===r[t-1]&&(l=s.get("dateDay")[(a[r[t-1]]+10)%11]),e+=l),a[r[t-1]]=e}return`${a.dateYear}.${this.numberMinDigit(a.dateMonth)}.${this.numberMinDigit(a.dateDay)} ${this.numberMinDigit(a.dateHour)}:${this.numberMinDigit(n[5])}:${this.numberMinDigit(n[6])}${n[7]?"."+this.numberMinDigit(n[7],3):""}`}numberMinDigit(t,e=2,i="0"){return(Array(e).join(i)+t).slice(-e)}isObject(t){return"Object"===Object.prototype.toString.call(t).slice(8,14)}isArray(t){return"Array"===Object.prototype.toString.call(t).slice(8,13)}isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}deepMergeObj(...t){const e=[...t].reverse(),i=e.length;for(let t=0;t{n[t]&&this.isObject(n[t])&&this.isObject(i[t])?this.deepMergeObj(n[t],i[t]):n[t]=i[t]}):n||(e[t+1]=i)}return e[i-1]}NetJSONMetadata(){const t=document.createElement("div"),e=document.createElement("div"),i=document.createElement("a");return t.setAttribute("class","njg-metadata njg-container"),t.setAttribute("style","display: block"),e.setAttribute("class","njg-inner"),e.setAttribute("id","metadata-innerDiv"),i.setAttribute("class","njg-close"),i.setAttribute("id","metadata-close"),i.onclick=()=>{t.style.visibility="hidden"},e.innerHTML=this.utils.getMetadata.call(this),t.appendChild(e),t.appendChild(i),t}updateMetadata(){this.config.metadata&&(document.getElementsByClassName("njg-metadata")[0].style.visibility="visible",document.getElementById("metadata-innerDiv").innerHTML=this.utils.getMetadata.call(this))}getMetadata(){const t=this.data;let e="";return t.label&&(e+=`

${t.label}

`),["protocol","version","revision","metric","router_id","topology_id"].forEach(i=>{t[i]&&(e+=`

${i}: ${t[i]}

`)}),e+=`\n

nodes: ${t.nodes.length}

\n

links: ${t.links.length}

\n `,e}nodeInfo(t){let e=`

id: ${t.id}

`;return t.label&&"string"==typeof t.label&&(e+=`

label: ${t.label}

`),t.properties&&Object.keys(t.properties).forEach(i=>{e+="location"===i?`

location:
lat: ${t.properties.location.lat}
lng: ${t.properties.location.lng}

`:"time"===i?`

time: ${this.dateParse({dateString:t.properties[i]})}

`:`

${i.replace(/_/g," ")}: ${t.properties[i]}

`}),t.linkCount&&(e+=`

links: ${t.linkCount}

`),t.local_addresses&&(e+=`

local addresses:
${t.local_addresses.join("
")}

`),e}linkInfo(t){let e=`

source: ${t.source}

target: ${t.target}

cost: ${t.cost}

`;return t.properties&&Object.keys(t.properties).forEach(i=>{e+="time"===i?`

time: ${this.dateParse({dateString:t.properties[i]})}

`:`

${i.replace(/_/g," ")}: ${t.properties[i]}

`}),e}showLoading(){let t=document.getElementById("loadingContainer");return t?t.style.visibility="visible":(t=document.createElement("div"),t.setAttribute("id","loadingContainer"),t.innerHTML='\n
\n
\n

Loading...

\n
\n ',this.el.appendChild(t)),t}hideLoading(){const t=document.getElementById("loadingContainer");return t&&(t.style.visibility="hidden"),t}createEvent(){const t=new Map,e=new Map;return{on(e,...i){t.set(e,[...t.get(e)||[],...i])},once(t,...i){e.set(t,[...e.get(t)||[],...i])},emit(i){const n=t.get(i)||[],r=e.get(i)||[],a=n.map(t=>t()),o=r.map(t=>t());return e.delete(i),[...a,...o]},delete(i){t.delete(i),e.delete(i)}}}};var a=class extends r{searchElements(t){const e=this,i={"":{data:{...e.data},param:[...e.JSONParam]}};return window.history.pushState({searchValue:""},""),window.onpopstate=n=>{i[n.state.searchValue]?e.utils.JSONDataUpdate.call(e,i[n.state.searchValue].data).then(()=>{e.JSONParam=i[n.state.searchValue].param}):e.utils.JSONDataUpdate.call(e,t+n.state.searchValue)},function(n,r=!0,a=!0){const o=n.trim();if(!window.history.state||window.history.state&&window.history.state.searchValue!==o)return window.history.pushState({searchValue:o},""),e.utils.JSONDataUpdate.call(e,t+o,r,a).then(()=>{i[o]={data:{...e.data},param:[...e.JSONParam]}})}}JSONDataUpdate(t,e=!0,i=!0){const n=this;return n.config.onUpdate.call(n),n.utils.JSONParamParse(t).then(r=>{function a(){e?(n.JSONParam=[t],n.utils.overrideData(r,n)):(n.JSONParam.push(t),n.config.render===n.utils.mapRender?n.utils.appendData(r,n):n.utils.addData(r,n)),n.utils.updateMetadata.call(n)}return i?(n.config.prepareData.call(n,r),n.config.dealDataByWorker?n.utils.dealDataByWorker.call(n,r,n.config.dealDataByWorker,a):a()):a(),r}).catch(t=>{console.error(t)})}dealDataByWorker(t,e,i){const n=new Worker(e),r=this;n.postMessage(t),n.addEventListener("error",t=>{console.error(t),console.error("Error in dealing JSONData!")}),n.addEventListener("message",t=>{i?i():(r.utils.overrideData(t.data,r),r.utils.updateMetadata.call(r))})}overrideData(t,e){e.data=t,e.utils.render(),e.config.afterUpdate.call(e)}};var o=class{constructor(t,e){this.utils=new a,this.config={...n},this.setConfig(e),this.JSONParam=this.utils.isArray(t)?t:[t]}setConfig(t){return this.utils.deepMergeObj(this.config,t),this.el?t&&t.el&&console.error("Can't change el again!"):(this.config.el?this.utils.isElement(this.config.el)?this.el=this.config.el:this.el=document.getElementById(this.config.el):this.el=document.body,this.el&&(this.el.classList.add("njg-relativePosition"),this.el.setAttribute("id","graphChartContainer"))),this.config}render(){const[t,...e]=this.JSONParam;if(this.config.onRender.call(this),this.event.once("onLoad",this.config.onLoad.bind(this)),this.utils.JSONParamParse(t).then(t=>{this.config.prepareData.call(this,t),this.data=t,function(t){const e=document.createElement("div");e.setAttribute("class","njg-overlay njg-container"),t.el.appendChild(e)}(this),this.config.metadata&&this.el.appendChild(this.utils.NetJSONMetadata.call(this)),this.config.dealDataByWorker?this.utils.dealDataByWorker.call(this,t,this.config.dealDataByWorker):(this.data=t,this.utils.render())}).catch(t=>{console.error(t)}),e.length){const i=function(){e.map(t=>this.utils.JSONDataUpdate.call(this,t,!1))};this.JSONParam=[t],this.event.once("renderArray",i.bind(this))}}setUtils(t={}){const e=this;return e.utils=Object.assign(e.utils,{...t},{render(){if(!e.config.render)throw new Error("No render function!");e.config.render(e.data,e)}}),e.utils}},s=i(2),l=(i(165),i(172),i(173),i(177),i(182),i(183),i(116),i(13)),u=i(1),h=function(t,e){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}Object.create;Object.create;function d(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}var f=function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))};var p=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function g(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function m(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function v(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var _=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},y=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)}return t.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 _(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.handler.dispatchToElement(new _(e,t),"drag",t.event);var o=this.handler.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.handler.dispatchToElement(new _(s,t),"dragleave",t.event),o&&o!==s&&this.handler.dispatchToElement(new _(o,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new _(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new _(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),x=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(n=i,i=e,e=null),!i||!t)return this;var a=this._$eventProcessor;null!=e&&a&&a.normalizeQuery&&(e=a.normalizeQuery(e)),r[t]||(r[t]=[]);for(var o=0;o>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(e,a),a,r);if(o)return o(t,i,n),!0}return!1}function M(t){return"CANVAS"===t.nodeName.toUpperCase()}var A=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,C=[],I=l.default.browser.firefox&&+l.default.browser.version.split(".")[0]<39;function L(t,e,i,n){return i=i||{},n?E(t,e,i):I&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):E(t,e,i),i}function E(t,e,i){if(l.default.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(M(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(S(C,t,n,r))return i.zrX=C[0],void(i.zrY=C[1])}i.zrX=i.zrY=0}function P(t){return t||window.event}function D(t,e,i){if(null!=(e=P(e)).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&L(t,r,e,i)}else{L(t,e,e,i);var a=function(t){var e=t.wheelDelta;if(e)return e;var i=t.deltaX,n=t.deltaY;if(null==i||null==n)return e;return 3*(0!==n?Math.abs(n):Math.abs(i))*(n>0?-1:n<0?1:i>0?-1:1)}(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var o=e.button;return null==e.which&&void 0!==o&&A.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function O(t,e,i,n){t.removeEventListener(e,i,n)}var R=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,o=n.length;a1&&r&&r.length>1){var o=N(r)/N(a);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function z(){var t;(t=this.event).preventDefault(),t.stopPropagation(),t.cancelBubble=!0}var B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return c(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(x),F=function(t,e){this.x=t,this.y=e},V=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],G=function(t){function e(e,i,n,r){var a=t.call(this)||this;return a._hovered=new F(0,0),a.storage=e,a.painter=i,a.painterRoot=r,n=n||new B,a.proxy=null,a.setHandlerProxy(n),a._draggingMgr=new y(a),a}return c(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(u.each(V,(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,i=t.zrY,n=U(this,e,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?new F(e,i):this.findHover(e,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new F(0,0)},e.prototype.dispatch=function(t,e){var i=this[t];i&&i.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,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:z}}(e,t,i);n&&(n[r]&&(a.cancelBubble=!!n[r].call(n,a)),n.trigger(e,a),n=n.__hostTarget?n.__hostTarget:n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)})))}},e.prototype.findHover=function(t,e,i){for(var n=this.storage.getDisplayList(),r=new F(t,e),a=n.length-1;a>=0;a--){var o=void 0;if(n[a]!==i&&!n[a].ignore&&(o=H(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),"silent"!==o)){r.target=n[a];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new R);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r;var a=new F;a.target=n.target,this.dispatchToElement(a,r,n.event)}},e}(x);function H(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n=t,r=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,i))return!1;n.silent&&(r=!0)}var s=n.__hostTarget;n=s||n.parent}return!r||"silent"}return!1}function U(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}u.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){G.prototype[t]=function(e){var i,n,r=e.zrX,a=e.zrY,o=U(this,r,a);if("mouseup"===t&&o||(n=(i=this.findHover(r,a)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||f(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}));var W=G;function j(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function Z(t,e,i,n,r){for(n===e&&n++;n>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function X(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o>>1);a(t,e[i+h])>0?o=h+1:l=h}return l}function Y(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o>>1);a(t,e[i+h])<0?l=h:o=h+1}return l}function q(t,e){var i,n,r,a=7,o=0;i=t.length;var s=[];function l(i){var l=n[i],u=r[i],h=n[i+1],c=r[i+1];r[i]=u+c,i===o-3&&(n[i+1]=n[i+2],r[i+1]=r[i+2]),o--;var d=Y(t[h],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(c=X(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(i,n,r,o){var l=0;for(l=0;l=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l=0;l--)t[f+l]=t[d+l];return void(t[c]=s[h])}var p=a;for(;;){var g=0,m=0,v=!1;do{if(e(s[h],t[u])<0){if(t[c--]=t[u--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=s[h--],m++,g=0,1==--o){v=!0;break}}while((g|m)=0;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=s[h--],1==--o){v=!0;break}if(0!==(m=o-X(t[u],s,0,o,o-1,e))){for(o-=m,f=(c-=m)+1,d=(h-=m)+1,l=0;l=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(a=p)<1&&(a=1);if(1===o){for(f=(c-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=s[h]}else{if(0===o)throw new Error;for(d=c-(o-1),l=0;l1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;l(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((a=j(t,i,n,e))s&&(l=s),Z(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}}(i,$)},t.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():[];for(var r=n,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.getClipPath()}if(t.childrenRef){for(var o=t.childrenRef(),s=0;s0&&(u.__clipPaths=[]),isNaN(u.z)&&(J(),u.z=0),isNaN(u.z2)&&(J(),u.z2=0),isNaN(u.zlevel)&&(J(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,i);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e=0&&this._roots.splice(n,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),tt=l.default.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},et={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.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){return(t*=2)<1?.5*t*t*t*t:-.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){return(t*=2)<1?.5*t*t*t*t*t:.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 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.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=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-et.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*et.bounceIn(2*t):.5*et.bounceOut(2*t-1)+.5}},it=et,nt=Math.pow,rt=Math.sqrt,at=rt(3),ot=d(),st=d(),lt=d();function ut(t){return t>-1e-8&&t<1e-8}function ht(t){return t>1e-8||t<-1e-8}function ct(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function dt(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(ut(h)&&ut(c)){if(ut(s))a[0]=0;else(S=-l/s)>=0&&S<=1&&(a[f++]=S)}else{var p=c*c-4*h*d;if(ut(p)){var g=c/h,m=-g/2;(S=-s/o+g)>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=rt(p),_=h*s+1.5*o*(-c+v),y=h*s+1.5*o*(-c-v);(S=(-s-((_=_<0?-nt(-_,1/3):nt(_,1/3))+(y=y<0?-nt(-y,1/3):nt(y,1/3))))/(3*o))>=0&&S<=1&&(a[f++]=S)}else{var x=(2*h*s-3*o*c)/(2*rt(h*h*h)),b=Math.acos(x)/3,w=rt(h),T=Math.cos(b),S=(-s-2*w*T)/(3*o),M=(m=(-s+w*(T+at*Math.sin(b)))/(3*o),(-s+w*(T-at*Math.sin(b)))/(3*o));S>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m),M>=0&&M<=1&&(a[f++]=M)}}return f}function ft(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(ut(o)){if(ht(a))(h=-s/a)>=0&&h<=1&&(r[l++]=h)}else{var u=a*a-4*o*s;if(ut(u))r[0]=-a/(2*o);else if(u>0){var h,c=rt(u),d=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}function pt(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function gt(t,e,i,n,r,a,o,s,l){for(var u=t,h=e,c=0,d=1/l,f=1;f<=l;f++){var p=f*d,g=ct(t,i,r,o,p),m=ct(e,n,a,s,p),v=g-u,_=m-h;c+=Math.sqrt(v*v+_*_),u=g,h=m}return c}function mt(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function vt(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function _t(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function yt(t,e,i,n,r,a,o){for(var s=t,l=e,u=0,h=1/o,c=1;c<=o;c++){var d=c*h,f=mt(t,i,r,d),p=mt(e,n,a,d),g=f-s,m=p-l;u+=Math.sqrt(g*g+m*m),s=f,l=p}return u}var xt=/cubic-bezier\(([0-9,\.e ]+)\)/;function bt(t){var e=t&&xt.exec(t);if(e){var i=e[1].split(","),n=+Object(u.trim)(i[0]),r=+Object(u.trim)(i[1]),a=+Object(u.trim)(i[2]),o=+Object(u.trim)(i[3]);if(isNaN(n+r+a+o))return;var s=[];return function(t){return t<=0?0:t>=1?1:dt(0,n,a,1,t,s)&&ct(0,r,o,1,s[0])}}}var wt=function(){function t(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||u.noop,this.ondestroy=t.ondestroy||u.noop,this.onrestart=t.onrestart||u.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,n=t-this._startTime-this._pausedTime,r=n/i;r<0&&(r=0),r=Math.min(r,1);var a=this.easingFunc,o=a?a(r):r;if(this.onframe(o),1===r){if(!this.loop)return!0;var s=n%i;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Object(u.isFunction)(t)?t:it[t]||bt(t)},t}(),Tt=i(19),St=i(6),Mt=Array.prototype.slice;function At(t,e,i){return(e-t)*i+t}function Ct(t,e,i,n){for(var r=e.length,a=0;an?e:t,a=Math.min(i,n),o=r[a-1]||{color:[0,0,0,0],offset:0},s=a;so)n.length=o;else for(var s=a;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,r=n.length,a=!1,o=6,s=e;if(Object(u.isArrayLike)(e)){var l=function(t){return Object(u.isArrayLike)(t&&t[0])?2:1}(e);o=l,(1===l&&!Object(u.isNumber)(e[0])||2===l&&!Object(u.isNumber)(e[0][0]))&&(a=!0)}else if(Object(u.isNumber)(e)&&!Object(u.eqNaN)(e))o=0;else if(Object(u.isString)(e))if(isNaN(+e)){var h=Tt.parse(e);h&&(s=h,o=3)}else o=0;else if(Object(u.isGradientObject)(e)){var c=Object(u.extend)({},s);c.colorStops=Object(u.map)(e.colorStops,(function(t){return{offset:t.offset,color:Tt.parse(t.color)}})),Object(St.m)(e)?o=4:Object(St.o)(e)&&(o=5),s=c}0===r?this.valType=o:o===this.valType&&6!==o||(a=!0),this.discrete=this.discrete||a;var d={time:t,value:s,rawValue:e,percent:0};return i&&(d.easing=i,d.easingFunc=Object(u.isFunction)(i)?i:it[i]||bt(i)),n.push(d),d},t.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort((function(t,e){return t.time-e.time}));for(var n=this.valType,r=i.length,a=i[r-1],o=this.discrete,s=Nt(n),l=Rt(n),u=0;u=0&&!(l[i].percent<=e);i--);i=p(i,h-2)}else{for(i=f;ie);i++);i=p(i-1,h-2)}r=l[i+1],n=l[i]}if(n&&r){this._lastFr=i,this._lastFrP=e;var g=r.percent-n.percent,m=0===g?1:p((e-n.percent)/g,1);r.easingFunc&&(m=r.easingFunc(m));var v=a?this._additiveValue:d?kt:t[c];if(!Nt(s)&&!d||v||(v=this._additiveValue=[]),this.discrete)t[c]=m<1?n.rawValue:r.rawValue;else if(Nt(s))1===s?Ct(v,n[o],r[o],m):function(t,e,i,n){for(var r=e.length,a=r&&e[0].length,o=0;o0&&s.addKeyframe(0,Dt(l),n),this._trackKeys.push(o)}s.addKeyframe(t,Dt(e[o]),n)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,r=0;r1){var o=a.pop();r.addKeyframe(o.time,t[n]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function Ft(){return(new Date).getTime()}var Vt,Gt,Ht=function(t){function e(e){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return c(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){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=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Ft()-this._pausedTime,i=e-this._time,n=this._head;n;){var r=n.next;n.step(e,i)?(n.ondestroy(),this.removeClip(n),n=r):n=r}this._time=e,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,tt((function e(){t._running&&(tt(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Ft(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ft(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ft()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var i=new Bt(t,e.loop);return this.addAnimator(i),i},e}(x),Ut=l.default.domSupported,Wt=(Gt={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Vt=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(Vt,(function(t){var e=t.replace("mouse","pointer");return Gt.hasOwnProperty(e)?e:t}))}),jt=["mousemove","mouseup"],Zt=["pointermove","pointerup"],Xt=!1;function Yt(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qt(t){t&&(t.zrByTouch=!0)}function Kt(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}var Jt=function(t,e){this.stopPropagation=u.noop,this.stopImmediatePropagation=u.noop,this.preventDefault=u.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},$t={mousedown:function(t){t=D(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=D(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=D(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Kt(this,(t=D(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Xt=!0,t=D(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Xt||(t=D(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){qt(t=D(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),$t.mousemove.call(this,t),$t.mousedown.call(this,t)},touchmove:function(t){qt(t=D(this.dom,t)),this.handler.processGesture(t,"change"),$t.mousemove.call(this,t)},touchend:function(t){qt(t=D(this.dom,t)),this.handler.processGesture(t,"end"),$t.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&$t.click.call(this,t)},pointerdown:function(t){$t.mousedown.call(this,t)},pointermove:function(t){Yt(t)||$t.mousemove.call(this,t)},pointerup:function(t){$t.mouseup.call(this,t)},pointerout:function(t){Yt(t)||$t.mouseout.call(this,t)}};u.each(["click","dblclick","contextmenu"],(function(t){$t[t]=function(e){e=D(this.dom,e),this.trigger(t,e)}}));var Qt={pointermove:function(t){Yt(t)||Qt.mousemove.call(this,t)},pointerup:function(t){Qt.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function te(t,e){var i=e.domHandlers;l.default.pointerEventsSupported?u.each(Wt.pointer,(function(n){ie(e,n,(function(e){i[n].call(t,e)}))})):(l.default.touchEventsSupported&&u.each(Wt.touch,(function(n){ie(e,n,(function(r){i[n].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),u.each(Wt.mouse,(function(n){ie(e,n,(function(r){r=P(r),e.touching||i[n].call(t,r)}))})))}function ee(t,e){function i(i){ie(e,i,(function(n){n=P(n),Kt(t,n.target)||(n=function(t,e){return D(t.dom,new Jt(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}l.default.pointerEventsSupported?u.each(Zt,i):l.default.touchEventsSupported||u.each(jt,i)}function ie(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,function(t,e,i,n){t.addEventListener(e,i,n)}(t.domTarget,e,i,n)}function ne(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&O(t.domTarget,i,e[i],t.listenerOpts[i]);t.mounted={}}var re=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},ae=function(t){function e(e,i){var n=t.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new re(e,$t),Ut&&(n._globalHandlerScope=new re(document,Qt)),te(n,n._localHandlerScope),n}return c(e,t),e.prototype.dispose=function(){ne(this._localHandlerScope),Ut&&ne(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Ut&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?ee(this,e):ne(e)}},e}(x),oe=1;l.default.hasGlobalWindow&&(oe=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var se=oe;function le(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ue(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function he(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}var ce=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t};function de(t){return t>5e-5||t<-5e-5}var fe=[],pe=[],ge=[1,0,0,1,0,0],me=Math.abs,ve=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return de(this.rotation)||de(this.x)||de(this.y)||de(this.scaleX-1)||de(this.scaleY-1)||de(this.skewX)||de(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;e||t?(i=i||[1,0,0,1,0,0],e?this.getLocalTransform(i):ce(i),t&&(e?ue(i,t,i):le(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&ce(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e,i,n,r,a,o,s,l,u,h=this.globalScaleRatio;if(null!=h&&1!==h){this.getGlobalScale(fe);var c=fe[0]<0?-1:1,d=fe[1]<0?-1:1,f=((fe[0]-c)*h+c)/fe[0]||0,p=((fe[1]-d)*h+d)/fe[1]||0;t[0]*=f,t[1]*=f,t[2]*=p,t[3]*=p}this.invTransform=this.invTransform||[1,0,0,1,0,0],e=this.invTransform,n=(i=t)[0],r=i[2],a=i[4],o=i[1],s=i[3],l=i[5],(u=n*s-o*r)&&(u=1/u,e[0]=s*u,e[1]=-o*u,e[2]=-r*u,e[3]=n*u,e[4]=(r*l-s*a)*u,e[5]=(o*a-n*l)*u)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),r=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ue(pe,t.invTransform,e),e=pe);var i=this.originX,n=this.originY;(i||n)&&(ge[4]=i,ge[5]=n,ue(pe,e,ge),pe[4]-=i,pe[5]-=n,e=pe),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&g(i,i,n),i},t.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&g(i,i,n),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&me(t[0]-1)>1e-10&&me(t[3]-1)>1e-10?Math.sqrt(me(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){ye(this,t)},t.getLocalTransform=function(t,e){e=e||[];var i,n,r,a,o,s,l,u,h,c,d,f=t.originX||0,p=t.originY||0,g=t.scaleX,m=t.scaleY,v=t.anchorX,_=t.anchorY,y=t.rotation||0,x=t.x,b=t.y,w=t.skewX?Math.tan(t.skewX):0,T=t.skewY?Math.tan(-t.skewY):0;if(f||p||v||_){var S=f+v,M=p+_;e[4]=-S*g-w*M*m,e[5]=-M*m-T*S*g}else e[4]=e[5]=0;return e[0]=g,e[3]=m,e[1]=T*g,e[2]=w*m,y&&(i=e,r=y,a=(n=e)[0],o=n[2],s=n[4],l=n[1],u=n[3],h=n[5],c=Math.sin(r),d=Math.cos(r),i[0]=a*d+l*c,i[1]=-a*c+l*d,i[2]=o*d+u*c,i[3]=-o*c+d*u,i[4]=d*s+c*h,i[5]=d*h-c*s),e[4]+=f+x,e[5]+=p+b,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),_e=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ye(t,e){for(var i=0;i<_e.length;i++){var n=_e[i];t[n]=e[n]}}var xe=ve,be=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,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){return this.x-=t.x,this.y-=t.y,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();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.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}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,i){t.x=e,t.y=i},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,i){t.x=e.x+i.x,t.y=e.y+i.y},t.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},t.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},t.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},t.lerp=function(t,e,i,n){var r=1-n;t.x=r*e.x+n*i.x,t.y=r*e.y+n*i.y},t}(),we=Math.min,Te=Math.max,Se=new be,Me=new be,Ae=new be,Ce=new be,Ie=new be,Le=new be,Ee=function(){function t(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return t.prototype.union=function(t){var e=we(t.x,this.x),i=we(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Te(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Te(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=[1,0,0,1,0,0];return he(r,r,[-e.x,-e.y]),function(t,e,i){var n=i[0],r=i[1];t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r}(r,r,[i,n]),he(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,i){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,r=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,d=!(ap&&(p=y,gp&&(p=x,v<_?be.set(Le,0,-v):be.set(Le,0,_)):y=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.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 0===this.width||0===this.height},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,i,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],a=n[3],o=n[4],s=n[5];return e.x=i.x*r+o,e.y=i.y*a+s,e.width=i.width*r,e.height=i.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Se.x=Ae.x=i.x,Se.y=Ce.y=i.y,Me.x=Ce.x=i.x+i.width,Me.y=Ae.y=i.y+i.height,Se.transform(n),Ce.transform(n),Me.transform(n),Ae.transform(n),e.x=we(Se.x,Me.x,Ae.x,Ce.x),e.y=we(Se.y,Me.y,Ae.y,Ce.y);var l=Te(Se.x,Me.x,Ae.x,Ce.x),u=Te(Se.y,Me.y,Ae.y,Ce.y);e.width=l-e.x,e.height=u-e.y}else e!==i&&t.copy(e,i)},t}(),Pe=i(58),De=i(18),Oe={};function Re(t,e){e=e||De.a;var i=Oe[e];i||(i=Oe[e]=new Pe.a(500));var n=i.get(t);return null==n&&(n=De.d.measureText(t,e).width,i.put(t,n)),n}function Ne(t,e,i,n){var r=Re(t,e),a=Be(e),o=ke(0,r,i),s=ze(0,a,n);return new Ee(o,s,r,a)}function ke(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ze(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Be(t){return Re("国",t)}function Fe(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}var Ve=_e.concat(["ignore"]),Ge=Object(u.reduce)(_e,(function(t,e){return t[e]=!0,t}),{ignore:!1}),He={},Ue=new Ee(0,0,0,0),We=function(){function t(t){this.id=Object(u.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,r=e.innerTransformable,a=void 0,o=void 0,s=!1;r.parent=n?this:null;var l=!1;if(r.copyTransform(e),null!=i.position){var u=Ue;i.layoutRect?u.copy(i.layoutRect):u.copy(this.getBoundingRect()),n||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(He,i,u):function(t,e,i){var n=e.position||"inside",r=null!=e.distance?e.distance:5,a=i.height,o=i.width,s=a/2,l=i.x,u=i.y,h="left",c="top";if(n instanceof Array)l+=Fe(n[0],i.width),u+=Fe(n[1],i.height),h=null,c=null;else switch(n){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+o,u+=s,c="middle";break;case"top":l+=o/2,u-=r,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+r,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=o-r,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=r,h="center";break;case"insideBottom":l+=o/2,u+=a-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=o-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=a-r,c="bottom";break;case"insideBottomRight":l+=o-r,u+=a-r,h="right",c="bottom"}(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c}(He,i,u),r.x=He.x,r.y=He.y,a=He.align,o=He.verticalAlign;var h=i.origin;if(h&&null!=i.rotation){var c=void 0,d=void 0;"center"===h?(c=.5*u.width,d=.5*u.height):(c=Fe(h[0],u.width),d=Fe(h[1],u.height)),l=!0,r.originX=-r.x+c+(n?0:u.x),r.originY=-r.y+d+(n?0:u.y)}}null!=i.rotation&&(r.rotation=i.rotation);var f=i.offset;f&&(r.x+=f[0],r.y+=f[1],l||(r.originX=-f[0],r.originY=-f[1]));var p=null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,_=void 0;p&&this.canBeInsideText()?(m=i.insideFill,v=i.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),_=!0)):(m=i.outsideFill,v=i.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),_=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&_===g.autoStroke&&a===g.align&&o===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=_,g.align=a,g.verticalAlign=o,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i="string"==typeof e&&Object(Tt.parse)(e);i||(i=[255,255,255,1]);for(var n=i[3],r=this.__zr.isDarkMode(),a=0;a<3;a++)i[a]=i[a]*n+(r?0:255)*(1-n);return i[3]=1,Object(Tt.stringify)(i,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},Object(u.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Object(u.isObject)(t))for(var i=t,n=Object(u.keys)(i),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState("__zr_normal__",!1,t)},t.prototype.useState=function(t,e,i,n){var r="__zr_normal__"===t;if(this.hasState()||!r){var a=this.currentStates,o=this.stateTransition;if(!(Object(u.indexOf)(a,t)>=0)||!e&&1!==a.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||n);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!i&&!this.__inHover&&o&&o.duration>0,o);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,l),c&&c.useState(t,e,i,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}Object(u.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,i){if(t.length){var n=[],r=this.currentStates,a=t.length,o=a===r.length;if(o)for(var s=0;s0,f);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},t.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),r=Object(u.indexOf)(n,t),a=Object(u.indexOf)(n,e)>=0;r>=0?a?n.splice(r,1):n[r]=e:i&&!a&&n.push(e),this.useStates(n)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,i={},n=0;n=0&&e.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,r=[],a=0;a0||a.force&&!s.length){var S,M=void 0,A=void 0,C=void 0;if(l){A={},p&&(M={});for(w=0;w0&&i.during&&a[0].during((function(t,e){i.during(e)}));for(var f=0;f=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var i=u.indexOf(this._children,t);return i>=0&&this.replaceAt(e,i),this},e.prototype.replaceAt=function(t,e){var i=this._children,n=i[e];if(t&&t!==this&&t.parent!==this&&t!==n){i[e]=t,n.parent=null;var r=this.__zr;r&&n.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,i=this._children,n=u.indexOf(i,t);return n<0||(i.splice(n,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,i=0;i>1,h=-7,c=i?r-1:0,d= * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt -*/!function(){function t(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var r=new Q,a=i.renderer||"canvas";Je[a]||(a=u.keys(Je)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var o=new Je[a](e,r,i,t),s=i.ssr||o.ssrOnly;this.storage=r,this.painter=o;var h=l.default.node||l.default.worker||s?null:new ae(o.getViewportRoot(),o.root);this.handler=new W(r,o,h,o.root),this.animation=new Ht({stage:{update:s?null:function(){return n._flush(!0)}}}),s||this.animation.start()}t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return Object(Tt.lum)(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,i=0,n=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,i){return this.handler.on(t,e,i),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(fi[0]=ci(r)*i+t,fi[1]=hi(r)*n+e,pi[0]=ci(a)*i+t,pi[1]=hi(a)*n+e,u(s,fi,pi),h(l,fi,pi),(r%=di)<0&&(r+=di),(a%=di)<0&&(a+=di),r>a&&!o?a+=di:rr&&(gi[0]=ci(f)*i+t,gi[1]=hi(f)*n+e,u(s,gi,s),h(l,gi,l))}var wi={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ti=[],Si=[],Mi=[],Ai=[],Ci=[],Ii=[],Li=Math.min,Ei=Math.max,Pi=Math.cos,Di=Math.sin,Oi=Math.abs,Ri=Math.PI,Ni=2*Ri,ki="undefined"!=typeof Float32Array,zi=[];function Bi(t){return Math.round(t/Ri*1e8)/1e8%2*Ri}var Fi=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var e;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,i){(i=i||0)>0&&(this._ux=Oi(i/se/t)||0,this._uy=Oi(i/se/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(wi.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var i=Oi(t-this._xi),n=Oi(e-this._yi),r=i>this._ux||n>this._uy;if(this.addData(wi.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var a=i*i+n*n;a>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=a)}return this},t.prototype.bezierCurveTo=function(t,e,i,n,r,a){return this._drawPendingPt(),this.addData(wi.C,t,e,i,n,r,a),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,r,a),this._xi=r,this._yi=a,this},t.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(wi.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},t.prototype.arc=function(t,e,i,n,r,a){this._drawPendingPt(),zi[0]=n,zi[1]=r,function(t,e){var i=Bi(t[0]);i<0&&(i+=Ni);var n=i-t[0],r=t[1];r+=n,!e&&r-i>=Ni?r=i+Ni:e&&i-r>=Ni?r=i-Ni:!e&&i>r?r=i+(Ni-Bi(i-r)):e&&iu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Mi[0]=Mi[1]=Ci[0]=Ci[1]=Number.MAX_VALUE,Ai[0]=Ai[1]=Ii[0]=Ii[1]=-Number.MAX_VALUE;var t,e=this.data,i=0,n=0,r=0,a=0;for(t=0;ti||Oi(m)>n||c===e-1)&&(p=Math.sqrt(L*L+m*m),r=g,a=y);break;case wi.C:var v=t[c++],_=t[c++],y=(g=t[c++],t[c++]),x=t[c++],b=t[c++];p=gt(r,a,v,_,g,y,x,b,10),r=x,a=b;break;case wi.Q:p=yt(r,a,v=t[c++],_=t[c++],g=t[c++],y=t[c++],10),r=g,a=y;break;case wi.A:var w=t[c++],T=t[c++],S=t[c++],M=t[c++],A=t[c++],C=t[c++],I=C+A;c+=1;t[c++];f&&(o=Pi(A)*S+w,s=Di(A)*M+T),p=Ei(S,M)*Li(Ni,Math.abs(C)),r=Pi(I)*S+w,a=Di(I)*M+T;break;case wi.R:o=r=t[c++],s=a=t[c++],p=2*t[c++]+2*t[c++];break;case wi.Z:var L=o-r;m=s-a;p=Math.sqrt(L*L+m*m),r=o,a=s}p>=0&&(l[h++]=p,u+=p)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var i,n,r,a,o,s,l,u,h,c,d=this.data,f=this._ux,p=this._uy,g=this._len,m=e<1,v=0,_=0,y=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(h,c),y=0),b){case wi.M:i=r=d[x++],n=a=d[x++],t.moveTo(r,a);break;case wi.L:o=d[x++],s=d[x++];var T=Oi(o-r),S=Oi(s-a);if(T>f||S>p){if(m){if(v+(Y=l[_++])>u){var M=(u-v)/Y;t.lineTo(r*(1-M)+o*M,a*(1-M)+s*M);break t}v+=Y}t.lineTo(o,s),r=o,a=s,y=0}else{var A=T*T+S*S;A>y&&(h=o,c=s,y=A)}break;case wi.C:var C=d[x++],I=d[x++],L=d[x++],E=d[x++],P=d[x++],D=d[x++];if(m){if(v+(Y=l[_++])>u){pt(r,C,L,P,M=(u-v)/Y,Ti),pt(a,I,E,D,M,Si),t.bezierCurveTo(Ti[1],Si[1],Ti[2],Si[2],Ti[3],Si[3]);break t}v+=Y}t.bezierCurveTo(C,I,L,E,P,D),r=P,a=D;break;case wi.Q:C=d[x++],I=d[x++],L=d[x++],E=d[x++];if(m){if(v+(Y=l[_++])>u){_t(r,C,L,M=(u-v)/Y,Ti),_t(a,I,E,M,Si),t.quadraticCurveTo(Ti[1],Si[1],Ti[2],Si[2]);break t}v+=Y}t.quadraticCurveTo(C,I,L,E),r=L,a=E;break;case wi.A:var O=d[x++],R=d[x++],N=d[x++],k=d[x++],z=d[x++],B=d[x++],F=d[x++],V=!d[x++],G=N>k?N:k,H=Oi(N-k)>.001,U=z+B,W=!1;if(m)v+(Y=l[_++])>u&&(U=z+B*(u-v)/Y,W=!0),v+=Y;if(H&&t.ellipse?t.ellipse(O,R,N,k,F,z,U,V):t.arc(O,R,G,z,U,V),W)break t;w&&(i=Pi(z)*N+O,n=Di(z)*k+R),r=Pi(U)*N+O,a=Di(U)*k+R;break;case wi.R:i=r=d[x],n=a=d[x+1],o=d[x++],s=d[x++];var j=d[x++],Z=d[x++];if(m){if(v+(Y=l[_++])>u){var X=u-v;t.moveTo(o,s),t.lineTo(o+Li(X,j),s),(X-=j)>0&&t.lineTo(o+j,s+Li(X,Z)),(X-=Z)>0&&t.lineTo(o+Ei(j-X,0),s+Z),(X-=j)>0&&t.lineTo(o,s+Ei(Z-X,0));break t}v+=Y}t.rect(o,s,j,Z);break;case wi.Z:if(m){var Y;if(v+(Y=l[_++])>u){M=(u-v)/Y;t.lineTo(r*(1-M)+i*M,a*(1-M)+n*M);break t}v+=Y}t.closePath(),r=i,a=n}}},t.prototype.clone=function(){var e=new t,i=this.data;return e.data=i.slice?i.slice():Array.prototype.slice.call(i),e._len=this._len,e},t.CMD=wi,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}();function Vi(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||ot+s&&a>i+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>i+c&&u>r+c&&u>o+c||u=0&&g<_?(c=d,_=g):(lt[0]=ct(t,i,r,o,f),lt[1]=ct(e,n,a,s,f),m=p(lt,ot),f<=1&&m<_?(c=f,_=m):v*=.5);return h&&(h[0]=ct(t,i,r,o,c),h[1]=ct(e,n,a,s,c)),rt(_)}(t,e,i,n,r,a,o,s,u,h,null)<=c/2}function Hi(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>e+u&&l>n+u&&l>a+u||lt+u&&s>i+u&&s>r+u||s=0&&vi||h+ur&&(r+=ji);var d=Math.atan2(l,s);return d<0&&(d+=ji),d>=n&&d<=r||d+ji>=n&&d+ji<=r}function Xi(t,e,i,n,r,a){if(a>e&&a>n||ar?s:0}var Yi=Fi.CMD,qi=2*Math.PI;var Ki=[-1,-1,-1],Ji=[-1,-1];function $i(t,e,i,n,r,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u1&&(h=void 0,h=Ji[0],Ji[0]=Ji[1],Ji[1]=h),p=ct(e,n,a,s,Ji[0]),f>1&&(g=ct(e,n,a,s,Ji[1]))),2===f?ve&&s>n&&s>a||s=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(ut(u))(h=-o/(2*a))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=rt(u),d=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,n,a,s,Ki);if(0===l)return 0;var u=vt(e,n,a);if(u>=0&&u<=1){for(var h=0,c=mt(e,n,a,u),d=0;di||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Ki[0]=-l,Ki[1]=l;var u=Math.abs(n-r);if(u<1e-4)return 0;if(u>=qi-1e-4){n=0,r=qi;var h=a?1:-1;return o>=Ki[0]+t&&o<=Ki[1]+t?h:0}if(n>r){var c=n;n=r,r=c}n<0&&(n+=qi,r+=qi);for(var d=0,f=0;f<2;f++){var p=Ki[f];if(p+t>o){var g=Math.atan2(s,p);h=a?1:-1;g<0&&(g=qi+g),(g>=n&&g<=r||g+qi>=n&&g+qi<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),d+=h)}}return d}function en(t,e,i,n,r){for(var a,o,s,l,u=t.data,h=t.len(),c=0,d=0,f=0,p=0,g=0,m=0;m1&&(i||(c+=Xi(d,f,p,g,n,r))),_&&(p=d=u[m],g=f=u[m+1]),v){case Yi.M:d=p=u[m++],f=g=u[m++];break;case Yi.L:if(i){if(Vi(d,f,u[m],u[m+1],e,n,r))return!0}else c+=Xi(d,f,u[m],u[m+1],n,r)||0;d=u[m++],f=u[m++];break;case Yi.C:if(i){if(Gi(d,f,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],e,n,r))return!0}else c+=$i(d,f,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],n,r)||0;d=u[m++],f=u[m++];break;case Yi.Q:if(i){if(Hi(d,f,u[m++],u[m++],u[m],u[m+1],e,n,r))return!0}else c+=Qi(d,f,u[m++],u[m++],u[m],u[m+1],n,r)||0;d=u[m++],f=u[m++];break;case Yi.A:var y=u[m++],x=u[m++],b=u[m++],w=u[m++],T=u[m++],S=u[m++];m+=1;var M=!!(1-u[m++]);a=Math.cos(T)*b+y,o=Math.sin(T)*w+x,_?(p=a,g=o):c+=Xi(d,f,a,o,n,r);var A=(n-y)*w/b+y;if(i){if(Zi(y,x,w,T,T+S,M,e,A,r))return!0}else c+=tn(y,x,w,T,T+S,M,A,r);d=Math.cos(T+S)*b+y,f=Math.sin(T+S)*w+x;break;case Yi.R:if(p=d=u[m++],g=f=u[m++],a=p+u[m++],o=g+u[m++],i){if(Vi(p,g,a,g,e,n,r)||Vi(a,g,a,o,e,n,r)||Vi(a,o,p,o,e,n,r)||Vi(p,o,p,g,e,n,r))return!0}else c+=Xi(a,g,a,o,n,r),c+=Xi(p,o,p,g,n,r);break;case Yi.Z:if(i){if(Vi(d,f,p,g,e,n,r))return!0}else c+=Xi(d,f,p,g,n,r);d=p,f=g}}return i||(s=f,l=g,Math.abs(s-l)<1e-4)||(c+=Xi(d,f,p,g,n,r)||0),0!==c}var nn=Object(u.defaults)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ti),rn={style:Object(u.defaults)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ei.style)},an=_e.concat(["invisible","culling","z","z2","zlevel","parent"]),on=function(t){function e(e){return t.call(this,e)||this}var i;return c(e,t),e.prototype.update=function(){var i=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){i.buildPath(t,i.shape)}),r.silent=!0;var a=r.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?"#333":e>.2?"#eee":"#ccc"}if(t)return"#ccc"}return"#333"},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(Object(u.isString)(e)){var i=this.__zr;if(!(!i||!i.isDarkMode())===Object(Tt.lum)(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,i){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Fi(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var r=this.path;(n||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return t},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path;if(this.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(t,e,i,n){return en(t,e,!0,i,n)}(a,o/s,t,e)))return!0}if(this.hasFill())return function(t,e,i){return en(t,0,!1,e,i)}(a,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,i){"shape"===e?this.setShape(i):t.prototype.attrKV.call(this,e,i)},e.prototype.setShape=function(t,e){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=e:Object(u.extend)(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return Object(u.createObject)(nn,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=Object(u.extend)({},this.shape))},e.prototype._applyStateObj=function(e,i,n,r,a,o){t.prototype._applyStateObj.call(this,e,i,n,r,a,o);var s,l=!(i&&r);if(i&&i.shape?a?r?s=i.shape:(s=Object(u.extend)({},n.shape),Object(u.extend)(s,i.shape)):(s=Object(u.extend)({},r?this.shape:n.shape),Object(u.extend)(s,i.shape)):l&&(s=n.shape),s)if(a){this.shape=Object(u.extend)({},this.shape);for(var h={},c=Object(u.keys)(s),d=0;d0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return Object(u.createObject)(cn,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var i=function(t,e,i,n){var r=((t||"")+"").split("\n");if(1===r.length)return Ne(r[0],e,i,n);for(var a=new Ee(0,0,0,0),o=0;o=vn:-l>=vn),d=l>0?l%vn:l%vn+vn,f=!1;f=!!c||!Object(St.j)(h)&&d>=mn==!!u;var p=t+i*gn(a),g=e+n*pn(a);this._start&&this._add("M",p,g);var m=Math.round(r*_n);if(c){var v=1/this._p,_=(u?1:-1)*(vn-v);this._add("A",i,n,m,1,+u,t+i*gn(a+_),e+n*pn(a+_)),v>.01&&this._add("A",i,n,m,0,+u,p,g)}else{var y=t+i*gn(o),x=e+n*pn(o);this._add("A",i,n,m,+f,+u,y,x)}},t.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,i,n,r,a,o,s,l){for(var u=[],h=this._p,c=1;c0&&(e=n.lineDash,i=n.lineWidth,e&&"solid"!==e&&i>0?"dashed"===e?[4*i,2*i]:"dotted"===e?[i]:Object(u.isNumber)(e)?[e]:Object(u.isArray)(e)?e:null:null),a=n.lineDashOffset;if(r){var o=n.strokeNoScale&&t.getLineScale?t.getLineScale():1;o&&1!==o&&(r=Object(u.map)(r,(function(t){return t/o})),a/=o)}return[r,a]}var bn=Math.round;var wn=["lineCap","miterLimit","lineJoin"],Tn=Object(u.map)(wn,(function(t){return"stroke-"+t.toLowerCase()}));var Sn="http://www.w3.org/2000/svg",Mn="http://www.w3.org/1999/xlink";function An(t){return document.createElementNS(Sn,t)}function Cn(t,e,i,n,r){return{tag:t,attrs:i||{},children:n,text:r,key:e}}function In(t,e){var i=(e=e||{}).newline?"\n":"";return function t(e){var n=e.children,r=e.tag;return function(t,e){var i=[];if(e)for(var n in e){var r=e[n],a=n;!1!==r&&(!0!==r&&null!=r&&(a+='="'+r+'"'),i.push(a))}return"<"+t+" "+i.join(" ")+">"}(r,e.attrs)+(e.text||"")+(n?""+i+Object(u.map)(n,(function(e){return t(e)})).join(i)+i:"")+function(t){return""}(r)}(t)}function Ln(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function En(t,e,i,n){return Cn("svg","root",{width:t,height:e,xmlns:Sn,"xmlns:xlink":Mn,version:"1.1",baseProfile:"full",viewBox:!!n&&"0 0 "+t+" "+e},i)}var Pn=new Pe.a(50);function Dn(t){if("string"==typeof t){var e=Pn.get(t);return e&&e.image}return t}function On(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=0&&(n=g)}}})),n){e.d=!1;var s=Vn(o,i);return n.replace(r,s)}}(t,e,i))o.push(v);else if(!a)return}else if(!a)return;for(var s={},l=0;l0})).length)return Vn(c,i)+" "+r[0]+" both"}for(var m in s){var v;(v=g(s[m]))&&o.push(v)}if(o.length){var _=i.zrId+"-cls-"+i.cssClassIdx++;i.cssNodes["."+_]={animation:o.join(",")},e.class=_}}var Un=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Wn(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=jn(e,i,n,r);for(var o=0,s=a.length;o=o;l++)s-=o;var h=Re(i,e);return h>s&&(i="",h=0),s=t-h,r.ellipsis=i,r.ellipsisWidth=h,r.contentWidth=s,r.containerWidth=t,r}function Zn(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Re(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Xn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Re(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Xn(t,e,i,n){for(var r=0,a=0,o=t.length;a0&&p+n.accumWidth>n.width&&(a=e.split("\n"),c=!0),n.accumWidth=p}else{var g=tr(e,h,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+f,o=g.linesWidths,a=g.lines}}else a=e.split("\n");for(var m=0;m=33&&e<=383}(t)||!!$n[t]}function tr(t,e,i,n,r){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;ci:r+h+f>i)?h?(s||l)&&(p?(s||(s=l,l="",h=u=0),a.push(s),o.push(h-u),l+=d,s="",h=u+=f):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=d,h=f)):p?(a.push(l),o.push(u),l=d,u=f):(a.push(d),o.push(f)):(h+=f,p?(l+=d,u+=f):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,h+=u),a.push(s),o.push(h),s="",l="",u=0,h=0}return a.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),1===a.length&&(h+=r),{accumWidth:h,lines:a,linesWidths:o}}var er=Math.round;function ir(t,e,i){if(!e)return t;var n=er(2*t);return(n+er(e))%2==0?n/2:(n+(i?1:-1))/2}var nr=function(){this.x=0,this.y=0,this.width=0,this.height=0},rr={},ar=function(t){function e(e){return t.call(this,e)||this}return c(e,t),e.prototype.getDefaultShape=function(){return new nr},e.prototype.buildPath=function(t,e){var i,n,r,a;if(this.subPixelOptimize){var o=function(t,e,i){if(e){var n=e.x,r=e.y,a=e.width,o=e.height;t.x=n,t.y=r,t.width=a,t.height=o;var s=i&&i.lineWidth;return s?(t.x=ir(n,s,!0),t.y=ir(r,s,!0),t.width=Math.max(ir(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(ir(r+o,s,!1)-t.y,0===o?0:1),t):t}}(rr,e,this.style);i=o.x,n=o.y,r=o.width,a=o.height,o.r=e.r,e=o}else i=e.x,n=e.y,r=e.width,a=e.height;e.r?function(t,e){var i,n,r,a,o,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=r=a=c:c instanceof Array?1===c.length?i=n=r=a=c[0]:2===c.length?(i=r=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],a=c[3]):i=n=r=a=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),n+r>h&&(n*=h/(o=n+r),r*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}(t,e):t.rect(i,n,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(on);ar.prototype.type="rect";var or=ar,sr={fill:"#000"},lr={style:Object(u.defaults)({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ei.style)},ur=function(t){function e(e){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=sr,i.attr(e),i}return c(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&c){var g=Math.floor(p/l);i=i.slice(0,g)}if(t&&o&&null!=d)for(var m=jn(d,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,A=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=n.calculatedLineHeight,I=0;Il&&Jn(i,t.substring(l,h),e,s),Jn(i,n[2],e,s,n[1]),l=Un.lastIndex}la){w>0?(y.tokens=y.tokens.slice(0,w),v(y,b,x),i.lines=i.lines.slice(0,_+1)):i.lines=i.lines.slice(0,_);break t}var I=T.width,L=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))O.percentWidth=I,c.push(O),O.contentWidth=Re(O.text,A);else{if(L){var E=T.backgroundColor,P=E&&E.image;P&&Rn(P=Dn(P))&&(O.width=Math.max(O.width,P.width*C/P.height))}var D=g&&null!=r?r-b:null;null!=D&&D=0&&"right"===(I=x[C]).align;)this._placeToken(I,t,w,g,A,"right",v),T-=I.width,A-=I.width,C--;for(M+=(i-(M-p)-(m-A)-T)/2;S<=C;)I=x[S],this._placeToken(I,t,w,g,M+I.width/2,"center",v),M+=I.width,S++;g+=w}},e.prototype._placeToken=function(t,e,i,n,r,a,o){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,h=n+i/2;"top"===l?h=n+t.height/2:"bottom"===l&&(h=n+i-t.height/2),!t.isLineHolder&&br(s)&&this._renderBackground(s,e,"right"===a?r-t.width:"center"===a?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!s.backgroundColor,d=t.textPadding;d&&(r=yr(r,a,d),h-=t.height/2-d[0]-t.innerHeight/2);var f=this._getOrCreateChild(fn),p=f.createStyle();f.useStyle(p);var g=this._defaultStyle,m=!1,v=0,_=_r("fill"in s?s.fill:"fill"in e?e.fill:(m=!0,g.fill)),y=vr("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||o||g.autoStroke&&!m?null:(v=2,g.stroke)),x=s.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=r,p.y=h,x&&(p.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,p.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=a,p.textBaseline="middle",p.font=t.font||De.a,p.opacity=Object(u.retrieve3)(s.opacity,e.opacity,1),pr(p,s),y&&(p.lineWidth=Object(u.retrieve3)(s.lineWidth,e.lineWidth,v),p.lineDash=Object(u.retrieve2)(s.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=y),_&&(p.fill=_);var b=t.contentWidth,w=t.contentHeight;f.setBoundingRect(new Ee(ke(p.x,b,p.textAlign),ze(p.y,w,p.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,i,n,r,a){var o,s,l,h=t.backgroundColor,c=t.borderWidth,d=t.borderColor,f=h&&h.image,p=h&&!f,g=t.borderRadius,m=this;if(p||t.lineHeight||c&&d){(o=this._getOrCreateChild(or)).useStyle(o.createStyle()),o.style.fill=null;var v=o.shape;v.x=i,v.y=n,v.width=r,v.height=a,v.r=g,o.dirtyShape()}if(p)(l=o.style).fill=h||null,l.fillOpacity=Object(u.retrieve2)(t.fillOpacity,1);else if(f){(s=this._getOrCreateChild(hn)).onload=function(){m.dirtyStyle()};var _=s.style;_.image=h.image,_.x=i,_.y=n,_.width=r,_.height=a}c&&d&&((l=o.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Object(u.retrieve2)(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,o.strokeContainThreshold=0,o.hasFill()&&o.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(o||s).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=Object(u.retrieve3)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return gr(t)&&(e=[t.fontStyle,t.fontWeight,fr(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&Object(u.trim)(e)||t.textFont||t.font},e}(si),hr={left:!0,right:1,center:1},cr={top:1,bottom:1,middle:1},dr=["fontStyle","fontWeight","fontSize","fontFamily"];function fr(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?De.c+"px":t+"px":t}function pr(t,e){for(var i=0;il?qr(t,null==i[c+1]?null:i[c+1].elm,i,s,c):Kr(t,e,o,l))}(i,n,r):jr(r)?(jr(t.text)&&Hr(i,""),qr(i,null,r,0,r.length-1)):jr(n)?Kr(i,n,0,n.length-1):jr(t.text)&&Hr(i,""):t.text!==e.text&&(jr(n)&&Kr(i,n,0,n.length-1),Hr(i,e.text)))}function Qr(t){return parseInt(t,10)}function ta(t,e,i){var n=["width","height"][e],r=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(null!=i[n]&&"auto"!==i[n])return parseFloat(i[n]);var s=document.defaultView.getComputedStyle(t);return(t[r]||Qr(s[n])||Qr(t.style[n]))-(Qr(s[a])||0)-(Qr(s[o])||0)|0}var ea=0;!function(t,e){Je[t]=e}("svg",function(){function t(t,e,i){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=i=Object(u.extend)({},i),this.root=t,this._id="zr"+ea++,this._oldVNode=En(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=An("svg");Jr(null,this._oldVNode),n.appendChild(r),t.appendChild(n)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Xr(t,e))$r(t,e);else{var i=t.elm,n=Vr(i);Yr(e),null!==n&&(zr(n,e.elm,Gr(i)),Kr(n,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return Rr(t,Ln(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._backgroundColor,n=this._width,r=this._height,a=Ln(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var o=[];if(i&&"none"!==i){var s=Object(St.p)(i),l=s.color,h=s.opacity;this._bgVNode=Cn("rect","bg",{width:n,height:r,x:"0",y:"0",id:"0",fill:l,"fill-opacity":h}),o.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=Cn("g","main",{},[]);this._paintList(e,a,c?c.children:o),c&&o.push(c);var d=Object(u.map)(Object(u.keys)(a.defs),(function(t){return a.defs[t]}));if(d.length&&o.push(Cn("defs","defs",{},d)),t.animation){var f=function(t,e,i){var n=(i=i||{}).newline?"\n":"",r=" {"+n,a=n+"}",o=Object(u.map)(Object(u.keys)(t),(function(e){return e+r+Object(u.map)(Object(u.keys)(t[e]),(function(i){return i+":"+t[e][i]+";"})).join(n)+a})).join(n),s=Object(u.map)(Object(u.keys)(e),(function(t){return"@keyframes "+t+r+Object(u.map)(Object(u.keys)(e[t]),(function(i){return i+r+Object(u.map)(Object(u.keys)(e[t][i]),(function(n){var r=e[t][i][n];return"d"===n&&(r='path("'+r+'")'),n+":"+r+";"})).join(n)+a})).join(n)+a})).join(n);return o||s?[""].join(n):""}(a.cssNodes,a.cssAnims,{newline:!0});if(f){var p=Cn("style","stl",{},[],f);o.push(p)}}return En(n,r,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},In(this.renderToVNode({animation:Object(u.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Object(u.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var i=Object(St.p)(t),n=i.color,r=i.opacity;e.elm.setAttribute("fill",n),r<1&&e.elm.setAttribute("fill-opacity",r)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,i){for(var n,r,a=t.length,o=[],s=0,l=0,u=0;u=0&&(!c||!r||c[p]!==r[p]);p--);for(var g=f-1;g>p;g--)n=o[--s-1];for(var m=p+1;m{const n=i.onClickElement.bind(e);if("graph"===t.componentSubType)n("edge"===t.dataType?"link":"node",t.data);else{if("graphGL"!==t.componentSubType)return"lines"===t.componentSubType?n("link",t.data.link):n("node",t.data.node);n("node",t.data)}},{passive:!0}),n}generateGraphOption(t,e){const i=[],n=e.config,r=t.nodes.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.itemStyle="function"==typeof n.nodeStyleProperty?n.nodeStyleProperty(t):n.nodeStyleProperty,e.symbolSize="function"==typeof n.nodeSize?n.nodeSize(t):n.nodeSize,e.name="string"==typeof t.label?t.label:t.id,t.properties&&t.properties.category&&(e.category=String(t.properties.category)),e.category&&-1===i.indexOf(e.category)&&i.push(e.category),e}),a=t.links.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.lineStyle="function"==typeof n.linkStyleProperty?n.linkStyleProperty(t):n.linkStyleProperty,e}),o=[Object.assign(n.graphConfig,{type:"graphGL"===n.graphConfig.type?"graphGL":"graph",layout:"graphGL"===n.graphConfig.type?"forceAtlas2":n.graphConfig.layout,nodes:r,links:a,categories:i.map(t=>({name:t}))})];return{legend:i.length?{data:i}:void 0,series:o}}generateMapOption(t,e){const i=e.config,{nodes:n,links:r}=t,a=t.flatNodes||{},o=[],s=[];n.forEach(e=>{if(e.properties){const{location:n}=e.properties;n&&n.lng&&n.lat?(s.push({name:"string"==typeof e.label?e.label:e.id,value:[n.lng,n.lat],symbolSize:"function"==typeof i.nodeSize?i.nodeSize(e):i.nodeSize,itemStyle:"function"==typeof i.nodeStyleProperty?i.nodeStyleProperty(e):i.nodeStyleProperty,node:e}),t.flatNodes||(a[e.id]=JSON.parse(JSON.stringify(e)))):console.error(`Node ${e.id} position is undefined!`)}else console.error(`Node ${e.id} position is undefined!`)}),r.forEach(t=>{a[t.source]?a[t.target]?o.push({coords:[[a[t.source].properties.location.lng,a[t.source].properties.location.lat],[a[t.target].properties.location.lng,a[t.target].properties.location.lat]],lineStyle:"function"==typeof i.linkStyleProperty?i.linkStyleProperty(t):i.linkStyleProperty,link:t}):console.error(`Node ${t.target} is not exist!`):console.error(`Node ${t.source} is not exist!`)});const l=[Object.assign(i.mapNodeConfig,{type:"effectScatter"===i.mapNodeConfig.type?"effectScatter":"scatter",coordinateSystem:"leaflet",data:s}),...i.mapLinkConfig.map(t=>Object.assign(t,{type:"lines",coordinateSystem:"leaflet",data:o}))];return{leaflet:{tiles:i.mapTileConfig,mapOptions:i.mapOptions},toolbox:{show:!1},series:l}}graphRender(t,e){e.utils.echartsSetOption(e.utils.generateGraphOption(t,e),e),window.onresize=()=>{e.echarts.resize()},e.event.emit("onLoad"),e.event.emit("renderArray")}mapRender(t,e){e.config.mapTileConfig[0]?(e.utils.echartsSetOption(e.utils.generateMapOption(t,e),e),e.leaflet=e.echarts._api.getCoordinateSystems()[0].getLeaflet(),e.event.emit("onLoad"),e.event.emit("renderArray")):console.error('You must add the tiles via the "mapTileConfig" param!')}_appendData(t,e){if(e.config.render!==e.utils.mapRender)return void console.error("AppendData function can only be used for map render!");e.utils.generateMapOption(t,e).series.forEach((t,i)=>{e.echarts.appendData({seriesIndex:i,data:t.data})}),e.utils._mergeData(t,e),e.config.afterUpdate.call(e)}_addData(t,e){e.utils._mergeData(t,e),e.utils._render(),e.config.afterUpdate.call(e)}_mergeData(t,e){const i=e.data.nodes.concat(t.nodes),n=e.data.links.concat(t.links);Object.assign(e.data,t,{nodes:i,links:n})}}var aa=function(t,e){const{util:i,graphic:n,matrix:r}=t,a=e.Layer.extend({initialize(t){this._container=t},onAdd(t){t.getPane(this.options.pane).appendChild(this._container)},onRemove(){e.DomUtil.remove(this._container)},_update(){}});function o(t,i){this._map=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=i,this._projection=e.Projection.Mercator}function s(t,e,i,n){const{leafletModel:r,seriesModel:a}=i,o=r?r.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("leaflet")[0]||{}).coordinateSystem:null;return o===this?o[t](n):null}return o.dimensions=o.prototype.dimensions=["lng","lat"],o.prototype.setZoom=function(t){this._zoom=t},o.prototype.setCenter=function(t){this._center=this._projection.project(new e.LatLng(t[1],t[0]))},o.prototype.setMapOffset=function(t){this._mapOffset=t},o.prototype.getLeaflet=function(){return this._map},o.prototype.getViewRect=function(){const t=this._api;return new n.BoundingRect(0,0,t.getWidth(),t.getHeight())},o.prototype.getRoamTransform=function(){return r.create()},o.prototype.dataToPoint=function(t){const i=new e.LatLng(t[1],t[0]),n=this._map.latLngToLayerPoint(i),r=this._mapOffset;return[n.x-r[0],n.y-r[1]]},o.prototype.pointToData=function(t){const e=this._mapOffset,i=this._map.layerPointToLatLng({x:t[0]+e[0],y:t[1]+e[1]});return[i.lng,i.lat]},o.prototype.convertToPixel=i.curry(s,"dataToPoint"),o.prototype.convertFromPixel=i.curry(s,"pointToData"),o.create=function(t,i){let n;const r=[],s=i.getDom();return t.eachComponent("leaflet",t=>{const l=i.getZr().painter.getViewportRoot();if(void 0===e)throw new Error("Leaflet api is not loaded");if(n)throw new Error("Only one leaflet component can exist");if(!t.__map){let i=s.querySelector(".ec-extension-leaflet");i&&(l.style.left="0px",l.style.top="0px",s.removeChild(i)),i=document.createElement("div"),i.style.cssText="width:100%;height:100%",i.classList.add("ec-extension-leaflet"),s.appendChild(i);const n=t.__map=e.map(i,t.get("mapOptions")),r=t.get("tiles"),o={};let u=!1;if(r.map(t=>{const i=e.tileLayer(t.urlTemplate,t.options);t.label?(u||(i.addTo(n),u=!0),o[t.label]=i):i.addTo(n)}),r.length>1){const i=t.get("layerControl");e.control.layers(o,{},i).addTo(n)}const h=document.createElement("div");h.style="position: absolute;left: 0;top: 0;z-index: 100",h.appendChild(l),new a(h).addTo(n)}const u=t.__map;n=new o(u,i),r.push(n),n.setMapOffset(t.__mapOffset||[0,0]);const{center:h,zoom:c}=t.get("mapOptions");h&&c&&(n.setZoom(c),n.setCenter(h)),t.coordinateSystem=n}),t.eachSeries(t=>{"leaflet"===t.get("coordinateSystem")&&(t.coordinateSystem=n)}),r},o};function oa(t,e){t.extendComponentView({type:"leaflet",render(t,i,n){let r=!0;const a=t.getLeaflet(),o=n.getZr().painter.getViewportRoot().parentNode,s=t.coordinateSystem,l={x:0,y:0};this._oldMoveStartHandler&&a.off("movestart",this._oldMoveStartHandler),this._oldMoveHandler&&a.off("move",this._oldMoveHandler),this._oldZoomEndHandler&&a.off("zoomend",this._oldZoomEndHandler),this._oldResizeHandler&&a.off("resize",this._oldResizeHandler),a.on("movestart",h),a.on("move",c),a.on("zoomend",d),a.on("resize",f),this._oldMoveStartHandler=h,this._oldMoveHandler=c,this._oldZoomEndHandler=d,this._oldResizeHandler=f;const{roam:u}=t.get("mapOptions");function h(){if(r)return;const t=p(a);t&&Object.assign(l,{x:t.x,y:t.y})}function c(){if(r)return;const i=function(){const i=p(a);if(i){const{x:n,y:r}=i,a=n-l.x,u=r-l.y;return Object.assign(l,{x:n,y:r}),e.DomUtil.setPosition(o,{x:-n,y:-r}),s.setMapOffset([-n,-r]),t.__mapOffset=[-n,-r],{dx:a,dy:u}}}();if(i){const{dx:t,dy:e}=i;n.dispatchAction({type:"leafletMove",dx:t,dy:e})}}function d(){r||n.dispatchAction({type:"leafletZoom"})}function f(){const t=n.getDom();g(o,t),function t(e){[...e.childNodes].map(i=>{g(i,e),i.childNodes.length&&t(i)})}(o),n.dispatchAction({type:"leafletZoom"})}function p(t){const i=e.DomUtil.getPosition(t.getPanes().mapPane);if(i)return i;console.error("Can't get the map offset!")}function g(t,e){const i=[parseFloat(getComputedStyle(e).width),parseFloat(getComputedStyle(e).height)];"CANVAS"===t.tagName&&(t.width=t.width/parseFloat(getComputedStyle(t).width)*i[0],t.height=t.height/parseFloat(getComputedStyle(t).height)*i[1]),t.style.width=i[0]+"px",t.style.height=i[1]+"px"}u&&"scale"!==u?a.dragging.enable():a.dragging.disable(),u&&"move"!==u?(a.scrollWheelZoom.enable(),a.doubleClickZoom.enable(),a.touchZoom.enable()):(a.scrollWheelZoom.disable(),a.doubleClickZoom.disable(),a.touchZoom.disable()),r=!1}})}function sa(t,e,i){!function(t){t.extendComponentModel({type:"leaflet",getLeaflet(){return this.__map},setCenterAndZoom(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged(t,e){const{option:i}=this;return n=t,r=i.center,!(n&&r&&n[0]===r[0]&&n[1]===r[1]&&e===i.zoom);var n,r},defaultOption:{mapOptions:{},tiles:[{urlTemplate:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'© OpenStreetMap contributors'}}],layerControl:{}}})}(t),oa(t,e),t.registerCoordinateSystem("leaflet",aa(t,e)),t.registerAction({type:"leafletMove",event:"leafletMove",update:"none"},(t,e)=>{e.scheduler.ecInstance._chartsViews.map(({group:e})=>{la({target:e},t.dx,t.dy)}),e.eachComponent("leaflet",t=>{const e=t.getLeaflet(),i=e.getCenter();t.setCenterAndZoom([i.lng,i.lat],e.getZoom())})}),t.registerAction({type:"leafletZoom",event:"leafletZoom",update:"none"},(t,e)=>{const n=e.scheduler.ecInstance;ua.call(n,t,i),n._chartsViews.map(({group:t})=>{la({target:t},-t.position[0],-t.position[1])}),e.eachComponent("leaflet",t=>{const e=t.getLeaflet(),i=e.getCenter();t.setCenterAndZoom([i.lng,i.lat],e.getZoom())})})}function la(t,e,i){const{target:n}=t,r=n.position;r[0]+=e,r[1]+=i,function(t){t.__dirty=!0,t.__zr&&t.__zr.refreshImmediately()}(n)}function ua(t,e){const i=this._model,n=this._api,r=this._zr,a=this._coordSysMgr,o=this._scheduler,{colorTool:s,aria:l,each:u,env:h}=e;if(!i)return;o.restoreData(i,t),o.performSeriesTasks(i),a.create(i,n),o.performDataProcessorTasks(i,t),function(t,e){const i=t._chartsMap,n=t._scheduler;e.eachSeries(t=>{n.updateStreamModes(t,i[t.__viewId])})}(this,i),a.update(i,n),function(t){t.clearColorPalette(),t.eachSeries(t=>{t.clearColorPalette()})}(i),o.performVisualTasks(i,t),function(t,e,i,n){(function(t,e,i,n,r){u(r||t._componentsViews,t=>{const r=t.__model;t.render(r,e,i,n),d(r,t)})})(t,e,i,n),u(t._chartsViews,t=>{t.__alive=!1}),function(t,e,i,n,r){const a=t._scheduler;let o;e.eachSeries(e=>{const i=t._chartsMap[e.__viewId];i.__alive=!0;const s=i.renderTask;a.updatePayload(s,n),r&&r.get(e.uid)&&s.dirty(),o|=s.perform(a.getPerformArgs(s)),i.group.silent=!!e.get("silent"),d(e,i),function(t,e){const i=t.get("blendMode")||null;e.group.traverse(t=>{t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(t=>{t.setStyle("blend",i)})})}(e,i)}),a.unfinished|=o,function(t,e){const i=t.storage;let n=0;i.traverse(t=>{t.isGroup||n++}),n>e.get("hoverLayerThreshold")&&!h.node&&i.traverse(t=>{t.isGroup||(t.useHoverLayer=!0)})}(t._zr,e),l(t._zr.dom,e)}(t,e,0,n),u(t._chartsViews,t=>{t.__alive||t.remove(e,i)})}(this,i,n,t),r.refreshImmediately();let c=i.get("backgroundColor")||"transparent";if(h.canvasSupported)r.setBackgroundColor(c);else{const t=s.parse(c);c=s.stringify(t,"rgb"),0===t[3]&&(c="transparent")}function d(t,e){const i=t.get("z"),n=t.get("zlevel");e.group.traverse(t=>{"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}}sa.version="1.0.0";var ha=sa;const ca=i(19),da=i(153),{each:fa}=i(1),pa=i(13);ha(s,na.a,{colorTool:ca,aria:da,each:fa,env:pa}),window.NetJSONGraph=class{constructor(t,e){e&&"map"===e.render?e.render=ra.prototype.mapRender:e&&e.render&&"graph"!==e.render||((e=e||{}).render=ra.prototype.graphRender);const i=new o(t);return Object.setPrototypeOf(ra.prototype,i.utils),i.utils=new ra,i.setUtils(),i.event=i.utils.createEvent(),i.setConfig({onInit(){return this.config},onRender(){return this.utils.showLoading.call(this),this.config},onUpdate(){return this.config},afterUpdate(){return this.config},onLoad(){return this.utils.hideLoading.call(this),this.config},...e}),i.echarts=s.init(i.el,null,{renderer:i.config.svgRender?"svg":"canvas"}),i.config.onInit.call(i),i}},window.echarts=s,window.L=na.a}]); \ No newline at end of file +*/!function(){function t(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var r=new Q,a=i.renderer||"canvas";Je[a]||(a=u.keys(Je)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var o=new Je[a](e,r,i,t),s=i.ssr||o.ssrOnly;this.storage=r,this.painter=o;var h=l.default.node||l.default.worker||s?null:new ae(o.getViewportRoot(),o.root);this.handler=new W(r,o,h,o.root),this.animation=new Ht({stage:{update:s?null:function(){return n._flush(!0)}}}),s||this.animation.start()}t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return Object(Tt.lum)(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,i=0,n=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,i){return this.handler.on(t,e,i),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(fi[0]=ci(r)*i+t,fi[1]=hi(r)*n+e,pi[0]=ci(a)*i+t,pi[1]=hi(a)*n+e,u(s,fi,pi),h(l,fi,pi),(r%=di)<0&&(r+=di),(a%=di)<0&&(a+=di),r>a&&!o?a+=di:rr&&(gi[0]=ci(f)*i+t,gi[1]=hi(f)*n+e,u(s,gi,s),h(l,gi,l))}var wi={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ti=[],Si=[],Mi=[],Ai=[],Ci=[],Ii=[],Li=Math.min,Ei=Math.max,Pi=Math.cos,Di=Math.sin,Oi=Math.abs,Ri=Math.PI,Ni=2*Ri,ki="undefined"!=typeof Float32Array,zi=[];function Bi(t){return Math.round(t/Ri*1e8)/1e8%2*Ri}var Fi=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var e;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,i){(i=i||0)>0&&(this._ux=Oi(i/se/t)||0,this._uy=Oi(i/se/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(wi.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var i=Oi(t-this._xi),n=Oi(e-this._yi),r=i>this._ux||n>this._uy;if(this.addData(wi.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var a=i*i+n*n;a>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=a)}return this},t.prototype.bezierCurveTo=function(t,e,i,n,r,a){return this._drawPendingPt(),this.addData(wi.C,t,e,i,n,r,a),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,r,a),this._xi=r,this._yi=a,this},t.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(wi.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},t.prototype.arc=function(t,e,i,n,r,a){this._drawPendingPt(),zi[0]=n,zi[1]=r,function(t,e){var i=Bi(t[0]);i<0&&(i+=Ni);var n=i-t[0],r=t[1];r+=n,!e&&r-i>=Ni?r=i+Ni:e&&i-r>=Ni?r=i-Ni:!e&&i>r?r=i+(Ni-Bi(i-r)):e&&iu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Mi[0]=Mi[1]=Ci[0]=Ci[1]=Number.MAX_VALUE,Ai[0]=Ai[1]=Ii[0]=Ii[1]=-Number.MAX_VALUE;var t,e=this.data,i=0,n=0,r=0,a=0;for(t=0;ti||Oi(m)>n||c===e-1)&&(p=Math.sqrt(L*L+m*m),r=g,a=y);break;case wi.C:var v=t[c++],_=t[c++],y=(g=t[c++],t[c++]),x=t[c++],b=t[c++];p=gt(r,a,v,_,g,y,x,b,10),r=x,a=b;break;case wi.Q:p=yt(r,a,v=t[c++],_=t[c++],g=t[c++],y=t[c++],10),r=g,a=y;break;case wi.A:var w=t[c++],T=t[c++],S=t[c++],M=t[c++],A=t[c++],C=t[c++],I=C+A;c+=1;t[c++];f&&(o=Pi(A)*S+w,s=Di(A)*M+T),p=Ei(S,M)*Li(Ni,Math.abs(C)),r=Pi(I)*S+w,a=Di(I)*M+T;break;case wi.R:o=r=t[c++],s=a=t[c++],p=2*t[c++]+2*t[c++];break;case wi.Z:var L=o-r;m=s-a;p=Math.sqrt(L*L+m*m),r=o,a=s}p>=0&&(l[h++]=p,u+=p)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var i,n,r,a,o,s,l,u,h,c,d=this.data,f=this._ux,p=this._uy,g=this._len,m=e<1,v=0,_=0,y=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(h,c),y=0),b){case wi.M:i=r=d[x++],n=a=d[x++],t.moveTo(r,a);break;case wi.L:o=d[x++],s=d[x++];var T=Oi(o-r),S=Oi(s-a);if(T>f||S>p){if(m){if(v+(Y=l[_++])>u){var M=(u-v)/Y;t.lineTo(r*(1-M)+o*M,a*(1-M)+s*M);break t}v+=Y}t.lineTo(o,s),r=o,a=s,y=0}else{var A=T*T+S*S;A>y&&(h=o,c=s,y=A)}break;case wi.C:var C=d[x++],I=d[x++],L=d[x++],E=d[x++],P=d[x++],D=d[x++];if(m){if(v+(Y=l[_++])>u){pt(r,C,L,P,M=(u-v)/Y,Ti),pt(a,I,E,D,M,Si),t.bezierCurveTo(Ti[1],Si[1],Ti[2],Si[2],Ti[3],Si[3]);break t}v+=Y}t.bezierCurveTo(C,I,L,E,P,D),r=P,a=D;break;case wi.Q:C=d[x++],I=d[x++],L=d[x++],E=d[x++];if(m){if(v+(Y=l[_++])>u){_t(r,C,L,M=(u-v)/Y,Ti),_t(a,I,E,M,Si),t.quadraticCurveTo(Ti[1],Si[1],Ti[2],Si[2]);break t}v+=Y}t.quadraticCurveTo(C,I,L,E),r=L,a=E;break;case wi.A:var O=d[x++],R=d[x++],N=d[x++],k=d[x++],z=d[x++],B=d[x++],F=d[x++],V=!d[x++],G=N>k?N:k,H=Oi(N-k)>.001,U=z+B,W=!1;if(m)v+(Y=l[_++])>u&&(U=z+B*(u-v)/Y,W=!0),v+=Y;if(H&&t.ellipse?t.ellipse(O,R,N,k,F,z,U,V):t.arc(O,R,G,z,U,V),W)break t;w&&(i=Pi(z)*N+O,n=Di(z)*k+R),r=Pi(U)*N+O,a=Di(U)*k+R;break;case wi.R:i=r=d[x],n=a=d[x+1],o=d[x++],s=d[x++];var j=d[x++],Z=d[x++];if(m){if(v+(Y=l[_++])>u){var X=u-v;t.moveTo(o,s),t.lineTo(o+Li(X,j),s),(X-=j)>0&&t.lineTo(o+j,s+Li(X,Z)),(X-=Z)>0&&t.lineTo(o+Ei(j-X,0),s+Z),(X-=j)>0&&t.lineTo(o,s+Ei(Z-X,0));break t}v+=Y}t.rect(o,s,j,Z);break;case wi.Z:if(m){var Y;if(v+(Y=l[_++])>u){M=(u-v)/Y;t.lineTo(r*(1-M)+i*M,a*(1-M)+n*M);break t}v+=Y}t.closePath(),r=i,a=n}}},t.prototype.clone=function(){var e=new t,i=this.data;return e.data=i.slice?i.slice():Array.prototype.slice.call(i),e._len=this._len,e},t.CMD=wi,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}();function Vi(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||ot+s&&a>i+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>i+c&&u>r+c&&u>o+c||u=0&&g<_?(c=d,_=g):(lt[0]=ct(t,i,r,o,f),lt[1]=ct(e,n,a,s,f),m=p(lt,ot),f<=1&&m<_?(c=f,_=m):v*=.5);return h&&(h[0]=ct(t,i,r,o,c),h[1]=ct(e,n,a,s,c)),rt(_)}(t,e,i,n,r,a,o,s,u,h,null)<=c/2}function Hi(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>e+u&&l>n+u&&l>a+u||lt+u&&s>i+u&&s>r+u||s=0&&vi||h+ur&&(r+=ji);var d=Math.atan2(l,s);return d<0&&(d+=ji),d>=n&&d<=r||d+ji>=n&&d+ji<=r}function Xi(t,e,i,n,r,a){if(a>e&&a>n||ar?s:0}var Yi=Fi.CMD,qi=2*Math.PI;var Ki=[-1,-1,-1],Ji=[-1,-1];function $i(t,e,i,n,r,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u1&&(h=void 0,h=Ji[0],Ji[0]=Ji[1],Ji[1]=h),p=ct(e,n,a,s,Ji[0]),f>1&&(g=ct(e,n,a,s,Ji[1]))),2===f?ve&&s>n&&s>a||s=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(ut(u))(h=-o/(2*a))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=rt(u),d=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,n,a,s,Ki);if(0===l)return 0;var u=vt(e,n,a);if(u>=0&&u<=1){for(var h=0,c=mt(e,n,a,u),d=0;di||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Ki[0]=-l,Ki[1]=l;var u=Math.abs(n-r);if(u<1e-4)return 0;if(u>=qi-1e-4){n=0,r=qi;var h=a?1:-1;return o>=Ki[0]+t&&o<=Ki[1]+t?h:0}if(n>r){var c=n;n=r,r=c}n<0&&(n+=qi,r+=qi);for(var d=0,f=0;f<2;f++){var p=Ki[f];if(p+t>o){var g=Math.atan2(s,p);h=a?1:-1;g<0&&(g=qi+g),(g>=n&&g<=r||g+qi>=n&&g+qi<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),d+=h)}}return d}function en(t,e,i,n,r){for(var a,o,s,l,u=t.data,h=t.len(),c=0,d=0,f=0,p=0,g=0,m=0;m1&&(i||(c+=Xi(d,f,p,g,n,r))),_&&(p=d=u[m],g=f=u[m+1]),v){case Yi.M:d=p=u[m++],f=g=u[m++];break;case Yi.L:if(i){if(Vi(d,f,u[m],u[m+1],e,n,r))return!0}else c+=Xi(d,f,u[m],u[m+1],n,r)||0;d=u[m++],f=u[m++];break;case Yi.C:if(i){if(Gi(d,f,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],e,n,r))return!0}else c+=$i(d,f,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],n,r)||0;d=u[m++],f=u[m++];break;case Yi.Q:if(i){if(Hi(d,f,u[m++],u[m++],u[m],u[m+1],e,n,r))return!0}else c+=Qi(d,f,u[m++],u[m++],u[m],u[m+1],n,r)||0;d=u[m++],f=u[m++];break;case Yi.A:var y=u[m++],x=u[m++],b=u[m++],w=u[m++],T=u[m++],S=u[m++];m+=1;var M=!!(1-u[m++]);a=Math.cos(T)*b+y,o=Math.sin(T)*w+x,_?(p=a,g=o):c+=Xi(d,f,a,o,n,r);var A=(n-y)*w/b+y;if(i){if(Zi(y,x,w,T,T+S,M,e,A,r))return!0}else c+=tn(y,x,w,T,T+S,M,A,r);d=Math.cos(T+S)*b+y,f=Math.sin(T+S)*w+x;break;case Yi.R:if(p=d=u[m++],g=f=u[m++],a=p+u[m++],o=g+u[m++],i){if(Vi(p,g,a,g,e,n,r)||Vi(a,g,a,o,e,n,r)||Vi(a,o,p,o,e,n,r)||Vi(p,o,p,g,e,n,r))return!0}else c+=Xi(a,g,a,o,n,r),c+=Xi(p,o,p,g,n,r);break;case Yi.Z:if(i){if(Vi(d,f,p,g,e,n,r))return!0}else c+=Xi(d,f,p,g,n,r);d=p,f=g}}return i||(s=f,l=g,Math.abs(s-l)<1e-4)||(c+=Xi(d,f,p,g,n,r)||0),0!==c}var nn=Object(u.defaults)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ti),rn={style:Object(u.defaults)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ei.style)},an=_e.concat(["invisible","culling","z","z2","zlevel","parent"]),on=function(t){function e(e){return t.call(this,e)||this}var i;return c(e,t),e.prototype.update=function(){var i=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){i.buildPath(t,i.shape)}),r.silent=!0;var a=r.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?"#333":e>.2?"#eee":"#ccc"}if(t)return"#ccc"}return"#333"},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(Object(u.isString)(e)){var i=this.__zr;if(!(!i||!i.isDarkMode())===Object(Tt.lum)(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,i){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Fi(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var r=this.path;(n||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return t},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path;if(this.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(t,e,i,n){return en(t,e,!0,i,n)}(a,o/s,t,e)))return!0}if(this.hasFill())return function(t,e,i){return en(t,0,!1,e,i)}(a,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,i){"shape"===e?this.setShape(i):t.prototype.attrKV.call(this,e,i)},e.prototype.setShape=function(t,e){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=e:Object(u.extend)(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return Object(u.createObject)(nn,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=Object(u.extend)({},this.shape))},e.prototype._applyStateObj=function(e,i,n,r,a,o){t.prototype._applyStateObj.call(this,e,i,n,r,a,o);var s,l=!(i&&r);if(i&&i.shape?a?r?s=i.shape:(s=Object(u.extend)({},n.shape),Object(u.extend)(s,i.shape)):(s=Object(u.extend)({},r?this.shape:n.shape),Object(u.extend)(s,i.shape)):l&&(s=n.shape),s)if(a){this.shape=Object(u.extend)({},this.shape);for(var h={},c=Object(u.keys)(s),d=0;d0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return Object(u.createObject)(cn,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var i=function(t,e,i,n){var r=((t||"")+"").split("\n");if(1===r.length)return Ne(r[0],e,i,n);for(var a=new Ee(0,0,0,0),o=0;o=vn:-l>=vn),d=l>0?l%vn:l%vn+vn,f=!1;f=!!c||!Object(St.j)(h)&&d>=mn==!!u;var p=t+i*gn(a),g=e+n*pn(a);this._start&&this._add("M",p,g);var m=Math.round(r*_n);if(c){var v=1/this._p,_=(u?1:-1)*(vn-v);this._add("A",i,n,m,1,+u,t+i*gn(a+_),e+n*pn(a+_)),v>.01&&this._add("A",i,n,m,0,+u,p,g)}else{var y=t+i*gn(o),x=e+n*pn(o);this._add("A",i,n,m,+f,+u,y,x)}},t.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,i,n,r,a,o,s,l){for(var u=[],h=this._p,c=1;c0&&(e=n.lineDash,i=n.lineWidth,e&&"solid"!==e&&i>0?"dashed"===e?[4*i,2*i]:"dotted"===e?[i]:Object(u.isNumber)(e)?[e]:Object(u.isArray)(e)?e:null:null),a=n.lineDashOffset;if(r){var o=n.strokeNoScale&&t.getLineScale?t.getLineScale():1;o&&1!==o&&(r=Object(u.map)(r,(function(t){return t/o})),a/=o)}return[r,a]}var bn=Math.round;var wn=["lineCap","miterLimit","lineJoin"],Tn=Object(u.map)(wn,(function(t){return"stroke-"+t.toLowerCase()}));var Sn="http://www.w3.org/2000/svg",Mn="http://www.w3.org/1999/xlink";function An(t){return document.createElementNS(Sn,t)}function Cn(t,e,i,n,r){return{tag:t,attrs:i||{},children:n,text:r,key:e}}function In(t,e){var i=(e=e||{}).newline?"\n":"";return function t(e){var n=e.children,r=e.tag;return function(t,e){var i=[];if(e)for(var n in e){var r=e[n],a=n;!1!==r&&(!0!==r&&null!=r&&(a+='="'+r+'"'),i.push(a))}return"<"+t+" "+i.join(" ")+">"}(r,e.attrs)+(e.text||"")+(n?""+i+Object(u.map)(n,(function(e){return t(e)})).join(i)+i:"")+function(t){return""}(r)}(t)}function Ln(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function En(t,e,i,n){return Cn("svg","root",{width:t,height:e,xmlns:Sn,"xmlns:xlink":Mn,version:"1.1",baseProfile:"full",viewBox:!!n&&"0 0 "+t+" "+e},i)}var Pn=new Pe.a(50);function Dn(t){if("string"==typeof t){var e=Pn.get(t);return e&&e.image}return t}function On(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=0&&(n=g)}}})),n){e.d=!1;var s=Vn(o,i);return n.replace(r,s)}}(t,e,i))o.push(v);else if(!a)return}else if(!a)return;for(var s={},l=0;l0})).length)return Vn(c,i)+" "+r[0]+" both"}for(var m in s){var v;(v=g(s[m]))&&o.push(v)}if(o.length){var _=i.zrId+"-cls-"+i.cssClassIdx++;i.cssNodes["."+_]={animation:o.join(",")},e.class=_}}var Un=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Wn(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=jn(e,i,n,r);for(var o=0,s=a.length;o=o;l++)s-=o;var h=Re(i,e);return h>s&&(i="",h=0),s=t-h,r.ellipsis=i,r.ellipsisWidth=h,r.contentWidth=s,r.containerWidth=t,r}function Zn(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Re(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Xn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Re(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Xn(t,e,i,n){for(var r=0,a=0,o=t.length;a0&&p+n.accumWidth>n.width&&(a=e.split("\n"),c=!0),n.accumWidth=p}else{var g=tr(e,h,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+f,o=g.linesWidths,a=g.lines}}else a=e.split("\n");for(var m=0;m=33&&e<=383}(t)||!!$n[t]}function tr(t,e,i,n,r){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;ci:r+h+f>i)?h?(s||l)&&(p?(s||(s=l,l="",h=u=0),a.push(s),o.push(h-u),l+=d,s="",h=u+=f):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=d,h=f)):p?(a.push(l),o.push(u),l=d,u=f):(a.push(d),o.push(f)):(h+=f,p?(l+=d,u+=f):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,h+=u),a.push(s),o.push(h),s="",l="",u=0,h=0}return a.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),1===a.length&&(h+=r),{accumWidth:h,lines:a,linesWidths:o}}var er=Math.round;function ir(t,e,i){if(!e)return t;var n=er(2*t);return(n+er(e))%2==0?n/2:(n+(i?1:-1))/2}var nr=function(){this.x=0,this.y=0,this.width=0,this.height=0},rr={},ar=function(t){function e(e){return t.call(this,e)||this}return c(e,t),e.prototype.getDefaultShape=function(){return new nr},e.prototype.buildPath=function(t,e){var i,n,r,a;if(this.subPixelOptimize){var o=function(t,e,i){if(e){var n=e.x,r=e.y,a=e.width,o=e.height;t.x=n,t.y=r,t.width=a,t.height=o;var s=i&&i.lineWidth;return s?(t.x=ir(n,s,!0),t.y=ir(r,s,!0),t.width=Math.max(ir(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(ir(r+o,s,!1)-t.y,0===o?0:1),t):t}}(rr,e,this.style);i=o.x,n=o.y,r=o.width,a=o.height,o.r=e.r,e=o}else i=e.x,n=e.y,r=e.width,a=e.height;e.r?function(t,e){var i,n,r,a,o,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=r=a=c:c instanceof Array?1===c.length?i=n=r=a=c[0]:2===c.length?(i=r=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],a=c[3]):i=n=r=a=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),n+r>h&&(n*=h/(o=n+r),r*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}(t,e):t.rect(i,n,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(on);ar.prototype.type="rect";var or=ar,sr={fill:"#000"},lr={style:Object(u.defaults)({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ei.style)},ur=function(t){function e(e){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=sr,i.attr(e),i}return c(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&c){var g=Math.floor(p/l);i=i.slice(0,g)}if(t&&o&&null!=d)for(var m=jn(d,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,A=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=n.calculatedLineHeight,I=0;Il&&Jn(i,t.substring(l,h),e,s),Jn(i,n[2],e,s,n[1]),l=Un.lastIndex}la){w>0?(y.tokens=y.tokens.slice(0,w),v(y,b,x),i.lines=i.lines.slice(0,_+1)):i.lines=i.lines.slice(0,_);break t}var I=T.width,L=null==I||"auto"===I;if("string"==typeof I&&"%"===I.charAt(I.length-1))O.percentWidth=I,c.push(O),O.contentWidth=Re(O.text,A);else{if(L){var E=T.backgroundColor,P=E&&E.image;P&&Rn(P=Dn(P))&&(O.width=Math.max(O.width,P.width*C/P.height))}var D=g&&null!=r?r-b:null;null!=D&&D=0&&"right"===(I=x[C]).align;)this._placeToken(I,t,w,g,A,"right",v),T-=I.width,A-=I.width,C--;for(M+=(i-(M-p)-(m-A)-T)/2;S<=C;)I=x[S],this._placeToken(I,t,w,g,M+I.width/2,"center",v),M+=I.width,S++;g+=w}},e.prototype._placeToken=function(t,e,i,n,r,a,o){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,h=n+i/2;"top"===l?h=n+t.height/2:"bottom"===l&&(h=n+i-t.height/2),!t.isLineHolder&&br(s)&&this._renderBackground(s,e,"right"===a?r-t.width:"center"===a?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!s.backgroundColor,d=t.textPadding;d&&(r=yr(r,a,d),h-=t.height/2-d[0]-t.innerHeight/2);var f=this._getOrCreateChild(fn),p=f.createStyle();f.useStyle(p);var g=this._defaultStyle,m=!1,v=0,_=_r("fill"in s?s.fill:"fill"in e?e.fill:(m=!0,g.fill)),y=vr("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||o||g.autoStroke&&!m?null:(v=2,g.stroke)),x=s.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=r,p.y=h,x&&(p.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,p.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=a,p.textBaseline="middle",p.font=t.font||De.a,p.opacity=Object(u.retrieve3)(s.opacity,e.opacity,1),pr(p,s),y&&(p.lineWidth=Object(u.retrieve3)(s.lineWidth,e.lineWidth,v),p.lineDash=Object(u.retrieve2)(s.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=y),_&&(p.fill=_);var b=t.contentWidth,w=t.contentHeight;f.setBoundingRect(new Ee(ke(p.x,b,p.textAlign),ze(p.y,w,p.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,i,n,r,a){var o,s,l,h=t.backgroundColor,c=t.borderWidth,d=t.borderColor,f=h&&h.image,p=h&&!f,g=t.borderRadius,m=this;if(p||t.lineHeight||c&&d){(o=this._getOrCreateChild(or)).useStyle(o.createStyle()),o.style.fill=null;var v=o.shape;v.x=i,v.y=n,v.width=r,v.height=a,v.r=g,o.dirtyShape()}if(p)(l=o.style).fill=h||null,l.fillOpacity=Object(u.retrieve2)(t.fillOpacity,1);else if(f){(s=this._getOrCreateChild(hn)).onload=function(){m.dirtyStyle()};var _=s.style;_.image=h.image,_.x=i,_.y=n,_.width=r,_.height=a}c&&d&&((l=o.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Object(u.retrieve2)(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,o.strokeContainThreshold=0,o.hasFill()&&o.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(o||s).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=Object(u.retrieve3)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return gr(t)&&(e=[t.fontStyle,t.fontWeight,fr(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&Object(u.trim)(e)||t.textFont||t.font},e}(si),hr={left:!0,right:1,center:1},cr={top:1,bottom:1,middle:1},dr=["fontStyle","fontWeight","fontSize","fontFamily"];function fr(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?De.c+"px":t+"px":t}function pr(t,e){for(var i=0;il?qr(t,null==i[c+1]?null:i[c+1].elm,i,s,c):Kr(t,e,o,l))}(i,n,r):jr(r)?(jr(t.text)&&Hr(i,""),qr(i,null,r,0,r.length-1)):jr(n)?Kr(i,n,0,n.length-1):jr(t.text)&&Hr(i,""):t.text!==e.text&&(jr(n)&&Kr(i,n,0,n.length-1),Hr(i,e.text)))}function Qr(t){return parseInt(t,10)}function ta(t,e,i){var n=["width","height"][e],r=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(null!=i[n]&&"auto"!==i[n])return parseFloat(i[n]);var s=document.defaultView.getComputedStyle(t);return(t[r]||Qr(s[n])||Qr(t.style[n]))-(Qr(s[a])||0)-(Qr(s[o])||0)|0}var ea=0;!function(t,e){Je[t]=e}("svg",function(){function t(t,e,i){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=i=Object(u.extend)({},i),this.root=t,this._id="zr"+ea++,this._oldVNode=En(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=An("svg");Jr(null,this._oldVNode),n.appendChild(r),t.appendChild(n)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Xr(t,e))$r(t,e);else{var i=t.elm,n=Vr(i);Yr(e),null!==n&&(zr(n,e.elm,Gr(i)),Kr(n,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return Rr(t,Ln(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._backgroundColor,n=this._width,r=this._height,a=Ln(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var o=[];if(i&&"none"!==i){var s=Object(St.p)(i),l=s.color,h=s.opacity;this._bgVNode=Cn("rect","bg",{width:n,height:r,x:"0",y:"0",id:"0",fill:l,"fill-opacity":h}),o.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=Cn("g","main",{},[]);this._paintList(e,a,c?c.children:o),c&&o.push(c);var d=Object(u.map)(Object(u.keys)(a.defs),(function(t){return a.defs[t]}));if(d.length&&o.push(Cn("defs","defs",{},d)),t.animation){var f=function(t,e,i){var n=(i=i||{}).newline?"\n":"",r=" {"+n,a=n+"}",o=Object(u.map)(Object(u.keys)(t),(function(e){return e+r+Object(u.map)(Object(u.keys)(t[e]),(function(i){return i+":"+t[e][i]+";"})).join(n)+a})).join(n),s=Object(u.map)(Object(u.keys)(e),(function(t){return"@keyframes "+t+r+Object(u.map)(Object(u.keys)(e[t]),(function(i){return i+r+Object(u.map)(Object(u.keys)(e[t][i]),(function(n){var r=e[t][i][n];return"d"===n&&(r='path("'+r+'")'),n+":"+r+";"})).join(n)+a})).join(n)+a})).join(n);return o||s?[""].join(n):""}(a.cssNodes,a.cssAnims,{newline:!0});if(f){var p=Cn("style","stl",{},[],f);o.push(p)}}return En(n,r,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},In(this.renderToVNode({animation:Object(u.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Object(u.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var i=Object(St.p)(t),n=i.color,r=i.opacity;e.elm.setAttribute("fill",n),r<1&&e.elm.setAttribute("fill-opacity",r)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,i){for(var n,r,a=t.length,o=[],s=0,l=0,u=0;u=0&&(!c||!r||c[p]!==r[p]);p--);for(var g=f-1;g>p;g--)n=o[--s-1];for(var m=p+1;m{const n=i.onClickElement.bind(e);return"graph"===t.componentSubType?n("edge"===t.dataType?"link":"node",t.data):"graphGL"===t.componentSubType?n("node",t.data):"lines"===t.componentSubType?n("link",t.data.link):n("node",t.data.node)},{passive:!0}),n}generateGraphOption(t,e){const i=[],n=e.config,r=t.nodes.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.itemStyle="function"==typeof n.nodeStyleProperty?n.nodeStyleProperty(t):n.nodeStyleProperty,e.symbolSize="function"==typeof n.nodeSize?n.nodeSize(t):n.nodeSize,e.name="string"==typeof t.label?t.label:t.id,t.properties&&t.properties.category&&(e.category=String(t.properties.category)),e.category&&-1===i.indexOf(e.category)&&i.push(e.category),e}),a=t.links.map(t=>{const e=JSON.parse(JSON.stringify(t));return e.lineStyle="function"==typeof n.linkStyleProperty?n.linkStyleProperty(t):n.linkStyleProperty,e}),o=[Object.assign(n.graphConfig,{type:"graphGL"===n.graphConfig.type?"graphGL":"graph",layout:"graphGL"===n.graphConfig.type?"forceAtlas2":n.graphConfig.layout,nodes:r,links:a,categories:i.map(t=>({name:t}))})];return{legend:i.length?{data:i}:void 0,series:o}}generateMapOption(t,e){const i=e.config,{nodes:n,links:r}=t,a=t.flatNodes||{},o=[],s=[];n.forEach(e=>{if(e.properties){const{location:n}=e.properties;n&&n.lng&&n.lat?(s.push({name:"string"==typeof e.label?e.label:e.id,value:[n.lng,n.lat],symbolSize:"function"==typeof i.nodeSize?i.nodeSize(e):i.nodeSize,itemStyle:"function"==typeof i.nodeStyleProperty?i.nodeStyleProperty(e):i.nodeStyleProperty,node:e}),t.flatNodes||(a[e.id]=JSON.parse(JSON.stringify(e)))):console.error(`Node ${e.id} position is undefined!`)}else console.error(`Node ${e.id} position is undefined!`)}),r.forEach(t=>{a[t.source]?a[t.target]?o.push({coords:[[a[t.source].properties.location.lng,a[t.source].properties.location.lat],[a[t.target].properties.location.lng,a[t.target].properties.location.lat]],lineStyle:"function"==typeof i.linkStyleProperty?i.linkStyleProperty(t):i.linkStyleProperty,link:t}):console.error(`Node ${t.target} is not exist!`):console.error(`Node ${t.source} is not exist!`)});const l=[Object.assign(i.mapNodeConfig,{type:"effectScatter"===i.mapNodeConfig.type?"effectScatter":"scatter",coordinateSystem:"leaflet",data:s,animationDuration:1e3}),...i.mapLinkConfig.map(t=>Object.assign(t,{type:"lines",coordinateSystem:"leaflet",data:o}))];return{leaflet:{tiles:i.mapTileConfig,mapOptions:i.mapOptions},toolbox:{show:!1},series:l}}graphRender(t,e){e.utils.echartsSetOption(e.utils.generateGraphOption(t,e),e),window.onresize=()=>{e.echarts.resize()},e.event.emit("onLoad"),e.event.emit("renderArray")}mapRender(t,e){e.config.mapTileConfig[0]?(e.utils.echartsSetOption(e.utils.generateMapOption(t,e),e),e.leaflet=e.echarts._api.getCoordinateSystems()[0].getLeaflet(),e.leaflet._zoomAnimated=!1,e.event.emit("onLoad"),e.event.emit("renderArray")):console.error('You must add the tiles via the "mapTileConfig" param!')}appendData(t,e){if(e.config.render!==e.utils.mapRender)return void console.error("AppendData function can only be used for map render!");e.utils.generateMapOption(t,e).series.forEach((t,i)=>{e.echarts.appendData({seriesIndex:i,data:t.data})}),e.utils.mergeData(t,e),e.config.afterUpdate.call(e)}addData(t,e){e.utils.mergeData(t,e),e.utils.render(),e.config.afterUpdate.call(e)}mergeData(t,e){const i=e.data.nodes.concat(t.nodes),n=e.data.links.concat(t.links);Object.assign(e.data,t,{nodes:i,links:n})}}var aa=function(t,e){const{util:i,graphic:n,matrix:r}=t,a=e.Layer.extend({initialize(t){this._container=t},onAdd(t){t.getPane(this.options.pane).appendChild(this._container)},onRemove(){e.DomUtil.remove(this._container)},_update(){}});function o(t,i){this._map=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=i,this._projection=e.Projection.Mercator}function s(t,e,i,n){const{leafletModel:r,seriesModel:a}=i,o=r?r.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("leaflet")[0]||{}).coordinateSystem:null;return o===this?o[t](n):null}return o.dimensions=["lng","lat"],o.prototype.dimensions=["lng","lat"],o.prototype.setZoom=function(t){this._zoom=t},o.prototype.setCenter=function(t){this._center=this._projection.project(new e.LatLng(t[1],t[0]))},o.prototype.setMapOffset=function(t){this._mapOffset=t},o.prototype.getLeaflet=function(){return this._map},o.prototype.getViewRect=function(){const t=this._api;return new n.BoundingRect(0,0,t.getWidth(),t.getHeight())},o.prototype.getRoamTransform=function(){return r.create()},o.prototype.dataToPoint=function(t){const i=new e.LatLng(t[1],t[0]),n=this._map.latLngToLayerPoint(i),r=this._mapOffset;return[n.x-r[0],n.y-r[1]]},o.prototype.pointToData=function(t){const e=this._mapOffset,i=this._map.layerPointToLatLng({x:t[0]+e[0],y:t[1]+e[1]});return[i.lng,i.lat]},o.prototype.convertToPixel=i.curry(s,"dataToPoint"),o.prototype.convertFromPixel=i.curry(s,"pointToData"),o.create=function(t,i){let n;const r=[],s=i.getDom();return t.eachComponent("leaflet",t=>{const l=i.getZr().painter.getViewportRoot();if(void 0===e)throw new Error("Leaflet api is not loaded");if(n)throw new Error("Only one leaflet component can exist");if(!t.__map){let i=s.querySelector(".ec-extension-leaflet");i&&(l.style.left="0px",l.style.top="0px",s.removeChild(i)),i=document.createElement("div"),i.style.cssText="width:100%;height:100%",i.classList.add("ec-extension-leaflet"),s.appendChild(i),t.__map=e.map(i,t.get("mapOptions"));const n=t.__map,r=t.get("tiles"),o={};let u=!1;if(r.forEach(t=>{const i=e.tileLayer(t.urlTemplate,t.options);t.label?(u||(i.addTo(n),u=!0),o[t.label]=i):i.addTo(n)}),r.length>1){const i=t.get("layerControl");e.control.layers(o,{},i).addTo(n)}const h=document.createElement("div");h.style="position: absolute;left: 0;top: 0;z-index: 100",h.appendChild(l),new a(h).addTo(n)}const u=t.__map;n=new o(u,i),r.push(n),n.setMapOffset(t.__mapOffset||[0,0]);const{center:h,zoom:c}=t.get("mapOptions");h&&c&&(n.setZoom(c),n.setCenter(h)),t.coordinateSystem=n}),t.eachSeries(t=>{"leaflet"===t.get("coordinateSystem")&&(t.coordinateSystem=n)}),r},o};function oa(t,e){t.extendComponentView({type:"leaflet",render(t,i,n){let r=!0;const a=t.getLeaflet(),o=n.getZr().painter.getViewportRoot().parentNode,s=t.coordinateSystem,l={x:0,y:0};function u(t,e){const i=[parseFloat(getComputedStyle(e).width),parseFloat(getComputedStyle(e).height)];"CANVAS"===t.tagName&&(t.width=t.width/parseFloat(getComputedStyle(t).width)*i[0],t.height=t.height/parseFloat(getComputedStyle(t).height)*i[1]),t.style.width=i[0]+"px",t.style.height=i[1]+"px"}function h(t){const i=e.DomUtil.getPosition(t.getPanes().mapPane);if(i)return i;console.error("Can't get the map offset!")}this._oldMoveStartHandler&&a.off("movestart",this._oldMoveStartHandler),this._oldMoveHandler&&a.off("move",this._oldMoveHandler),this._oldZoomEndHandler&&a.off("zoomend",this._oldZoomEndHandler),this._oldResizeHandler&&a.off("resize",this._oldResizeHandler);const{roam:c}=t.get("mapOptions");function d(){if(r)return;const t=h(a);t&&Object.assign(l,{x:t.x,y:t.y})}function f(){if(r)return;const i=function(){const i=h(a);if(i){const{x:n,y:r}=i,a=n-l.x,u=r-l.y;return Object.assign(l,{x:n,y:r}),e.DomUtil.setPosition(o,{x:-n,y:-r}),s.setMapOffset([-n,-r]),t.__mapOffset=[-n,-r],{dx:a,dy:u}}}();if(i){const{dx:t,dy:e}=i;n.dispatchAction({type:"leafletMove",dx:t,dy:e})}}function p(){r||n.dispatchAction({type:"leafletZoom"})}function g(){const t=n.getDom();u(o,t),function t(e){[...e.childNodes].forEach(i=>{u(i,e),i.childNodes.length&&t(i)})}(o),n.dispatchAction({type:"leafletZoom"})}c&&"scale"!==c?a.dragging.enable():a.dragging.disable(),c&&"move"!==c?(a.scrollWheelZoom.enable(),a.doubleClickZoom.enable(),a.touchZoom.enable()):(a.scrollWheelZoom.disable(),a.doubleClickZoom.disable(),a.touchZoom.disable()),a.on("movestart",d),a.on("move",f),a.on("zoomend",p),a.on("resize",g),this._oldMoveStartHandler=d,this._oldMoveHandler=f,this._oldZoomEndHandler=p,this._oldResizeHandler=g,r=!1}})}function sa(t,e,i){const{target:n}=t,r=n.position;r[0]+=e,r[1]+=i,function(t){t.__dirty=!0,t.__zr&&t.__zr.refreshImmediately()}(n)}function la(t,e){const i=this._model,n=this._api,r=this._zr,a=this._coordSysMgr,o=this._scheduler,{colorTool:s,aria:l,each:u,env:h}=e;if(!i)return;o.restoreData(i,t),o.performSeriesTasks(i),a.create(i,n),o.performDataProcessorTasks(i,t),function(t,e){const i=t._chartsMap,n=t._scheduler;e.eachSeries(t=>{n.updateStreamModes(t,i[t.__viewId])})}(this,i),a.update(i,n),function(t){t.clearColorPalette(),t.eachSeries(t=>{t.clearColorPalette()})}(i),o.performVisualTasks(i,t),function(t,e,i,n){(function(t,e,i,n,r){u(r||t._componentsViews,t=>{const r=t.__model;t.render(r,e,i,n),d(r,t)})})(t,e,i,n),u(t._chartsViews,t=>{t.__alive=!1}),function(t,e,i,n,r){const a=t._scheduler;let o;e.eachSeries(e=>{const i=t._chartsMap[e.__viewId];i.__alive=!0;const s=i.renderTask;a.updatePayload(s,n),r&&r.get(e.uid)&&s.dirty(),o|=s.perform(a.getPerformArgs(s)),i.group.silent=!!e.get("silent"),d(e,i),function(t,e){const i=t.get("blendMode")||null;e.group.traverse(t=>{t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(t=>{t.setStyle("blend",i)})})}(e,i)}),a.unfinished|=o,function(t,e){const i=t.storage;let n=0;i.traverse(t=>{t.isGroup||n++}),n>e.get("hoverLayerThreshold")&&!h.node&&i.traverse(t=>{t.isGroup||(t.useHoverLayer=!0)})}(t._zr,e),l(t._zr.dom,e)}(t,e,0,n),u(t._chartsViews,t=>{t.__alive||t.remove(e,i)})}(this,i,n,t),r.refreshImmediately();let c=i.get("backgroundColor")||"transparent";if(h.canvasSupported)r.setBackgroundColor(c);else{const t=s.parse(c);c=s.stringify(t,"rgb"),0===t[3]&&(c="transparent")}function d(t,e){const i=t.get("z"),n=t.get("zlevel");e.group.traverse(t=>{"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}}function ua(t,e,i){!function(t){t.extendComponentModel({type:"leaflet",getLeaflet(){return this.__map},setCenterAndZoom(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged(t,e){const{option:i}=this;return n=t,r=i.center,!(n&&r&&n[0]===r[0]&&n[1]===r[1]&&e===i.zoom);var n,r},defaultOption:{mapOptions:{},tiles:[{urlTemplate:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'© OpenStreetMap contributors'}}],layerControl:{}}})}(t),oa(t,e),t.registerCoordinateSystem("leaflet",aa(t,e)),t.registerAction({type:"leafletMove",event:"leafletMove",update:"none"},(t,e)=>{e.scheduler.ecInstance._chartsViews.forEach(({group:e})=>{sa({target:e},t.dx,t.dy)}),e.eachComponent("leaflet",t=>{const e=t.getLeaflet(),i=e.getCenter();t.setCenterAndZoom([i.lng,i.lat],e.getZoom())})}),t.registerAction({type:"leafletZoom",event:"leafletZoom",update:"none"},(t,e)=>{const n=e.scheduler.ecInstance;la.call(n,t,i),n._chartsViews.forEach(({group:t})=>{sa({target:t},-t.position[0],-t.position[1])}),e.eachComponent("leaflet",t=>{const e=t.getLeaflet(),i=e.getCenter();t.setCenterAndZoom([i.lng,i.lat],e.getZoom())})})}ua.version="1.0.0";var ha=ua;const ca=i(19),da=i(153),{each:fa}=i(1),pa=i(13);ha(s,na.a,{colorTool:ca,aria:da,each:fa,env:pa}),window.NetJSONGraph=class{constructor(t,e){e&&"map"===e.render?e.render=ra.prototype.mapRender:e&&e.render&&"graph"!==e.render||((e=e||{}).render=ra.prototype.graphRender);const i=new o(t);return Object.setPrototypeOf(ra.prototype,i.utils),i.utils=new ra,i.setUtils(),i.event=i.utils.createEvent(),i.setConfig({onInit(){return this.config},onRender(){return this.utils.showLoading.call(this),this.config},onUpdate(){return this.config},afterUpdate(){return this.config},onLoad(){return this.utils.hideLoading.call(this),this.config},...e}),i.echarts=s.init(i.el,null,{renderer:i.config.svgRender?"svg":"canvas"}),i.config.onInit.call(i),i}},window.echarts=s,window.L=na.a}]); \ No newline at end of file