/** Licensed to the Apache Software Foundation (ASF) under one* or more contributor license agreements. See the NOTICE file* distributed with this work for additional information* regarding copyright ownership. The ASF licenses this file* to you under the Apache License, Version 2.0 (the* "License"); you may not use this file except in compliance* with the License. You may obtain a copy of the License at** http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing,* software distributed under the License is distributed on an* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY* KIND, either express or implied. See the License for the* specific language governing permissions and limitations* under the License.*/!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t(exports,require("echarts")):"function"==typeofdefine&&define.amd?define(["exports","echarts"],t):t(e.dataTool={},e.echarts)}(this,function(e,t){"use strict";functionr(e,t,r){if(e&&t){if(e.map&&e.map===c)returne.map(t,r);for(vara=[],n=0,o=e.length;n<o;n++)a.push(t.call(r,e[n],n,e));returna}}functiona(e){returne?r(u(e,"attribute"),function(e){return{id:i(e,"id"),title:i(e,"title"),type:i(e,"type")}}):[]}functionn(e,t){returne?r(u(e,"node"),function(e){varr={id:i(e,"id"),name:i(e,"label"),itemStyle:{normal:{}}},a=l(e,"viz:size"),n=l(e,"viz:position"),o=l(e,"viz:color"),s=l(e,"attvalues");if(a&&(r.symbolSize=parseFloat(i(a,"value"))),n&&(r.x=parseFloat(i(n,"x")),r.y=parseFloat(i(n,"y"))),o&&(r.itemStyle.normal.color="rgb("+[0|i(o,"r"),0|i(o,"g"),0|i(o,"b")].join(",")+")"),s){varf=u(s,"attvalue");r.attributes={};for(varc=0;c<f.length;c++){varp=f[c],d=i(p,"for"),v=i(p,"value"),g=t[d];if(g){switch(g.type){case"integer":case"long":v=parseInt(v,10);break;case"float":case"double":v=parseFloat(v);break;case"boolean":v="true"==v.toLowerCase()}r.attributes[d]=v}}}returnr}):[]}functiono(e){returne?r(u(e,"edge"),function(e){vart={id:i(e,"id"),name:i(e,"label"),source:i(e,"source"),target:i(e,"target"),lineStyle:{normal:{}}},r=t.lineStyle.normal,a=l(e,"viz:thickness"),n=l(e,"viz:color");returna&&(r.width=parseFloat(a.getAttribute("value"))),n&&(r.color="rgb("+[0|i(n,"r"),0|i(n,"g"),0|i(n,"b")].join(",")+")"),t}):[]}functioni(e,t){returne.getAttribute(t)}functionl(e,t){for(varr=e.firstChild;r;){if(1==r.nodeType&&r.nodeName.toLowerCase()==t.toLowerCase())returnr;r=r.nextSibling}returnnull}functionu(e,t){for(varr=e.firstChild,a=[];r;)r.nodeName.toLowerCase()==t.toLowerCase()&&a.push(r),r=r.nextSibling;returna}functions(e){returne.sort(function(e,t){returne-t}),e}functionf(e,t){varr=(e.length-1)*t+1,a=Math.floor(r),n=+e[a-1],o=r-a;returno?n+o*(e[a]-n):n}varc=Array.prototype.map,p=(Object.freeze||Object)({parse:function(e){vart;if(!(t="string"==typeofe?(newDOMParser).parseFromString(e,"text/xml"):e)||t.getElementsByTagName("parsererror").length)returnnull;varr=l(t,"gexf");if(!r)returnnull;for(vari=l(r,"graph"),u=a(l(i,"attributes")),s={},f=0;f<u.length;f++)s[u[f].id]=u[f];return{nodes:n(l(i,"nodes"),s),links:o(l(i,"edges"))}}}),d=function(e,t){for(varr=[],a=[],n=[],o=(t=t||[]).boundIQR,i="none"===o||0===o,l=0;l<e.length;l++){n.push(l+"");varu=s(e[l].slice()),c=f(u,.25),p=f(u,.5),d=f(u,.75),v=u[0],g=u[u.length-1],h=(null==o?1.5:o)*(d-c),b=i?v:Math.max(v,c-h),m=i?g:Math.min(g,d+h);r.push([b,c,p,d,m]);for(vary=0;y<u.length;y++){varx=u[y];if(x<b||x>m){varw=[l,x];"vertical"===t.layout&&w.reverse(),a.push(w)}}}return{boxData:r,outliers:a,axisData:n}};t.dataTool&&(t.dataTool.version="1.0.0",t.dataTool.gexf=p,t.dataTool.prepareBoxplotData=d),e.version="1.0.0",e.gexf=p,e.prepareBoxplotData=d});