Newer
Older
smartwell_front_dz / smartwell / static / js / chunk-libs-cc94fb57.e56627a9.js
wangxitong on 11 Sep 2023 7 KB first commit
(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[9335],{17831:(e,t,r)=>{var a=r(70492);r(37670),r(45255),r(93663);var o=r(46188),n=r(29605);a.registerVisual(o),a.registerLayout(n)},93663:(e,t,r)=>{for(var a=r(70492),o=r(68833),n=function(){},i=["treemapZoomToNode","treemapRender","treemapMove"],l=0;l<i.length;l++)a.registerAction({type:i[l],update:"updateView"},n);a.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){function r(t,r){var a=["treemapZoomToNode","treemapRootToNode"],n=o.retrieveTargetInfo(e,a,t);if(n){var i=t.getViewRoot();i&&(e.direction=o.aboveViewRoot(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}t.eachComponent({mainType:"series",subType:"treemap",query:e},r)}))},29605:(e,t,r)=>{var a=r(33051),o=r(60479),n=r(85669),i=n.parsePercent,l=n.MAX_SAFE_INTEGER,u=r(76172),g=r(68833),h=Math.max,d=Math.min,s=a.retrieve,v=a.each,p=["itemStyle","borderWidth"],f=["itemStyle","gapWidth"],c=["upperLabel","show"],y=["upperLabel","height"],m={seriesType:"treemap",reset:function(e,t,r,n){var l=r.getWidth(),h=r.getHeight(),d=e.option,p=u.getLayoutRect(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),f=d.size||[],c=i(s(p.width,f[0]),l),y=i(s(p.height,f[1]),h),m=n&&n.type,x=["treemapZoomToNode","treemapRootToNode"],V=g.retrieveTargetInfo(n,x,e),L="treemapRender"===m||"treemapMove"===m?n.rootRect:null,M=e.getViewRoot(),R=g.getPathToRoot(M);if("treemapMove"!==m){var T="treemapZoomToNode"===m?b(e,V,M,c,y):L?[L.width,L.height]:[c,y],I=d.sort;I&&"asc"!==I&&"desc"!==I&&(I="desc");var A={squareRatio:d.squareRatio,sort:I,leafDepth:d.leafDepth};M.hostTree.clearLayouts();var S={x:0,y:0,width:T[0],height:T[1],area:T[0]*T[1]};M.setLayout(S),w(M,A,!1,0);S=M.getLayout();v(R,(function(e,t){var r=(R[t+1]||M).getValue();e.setLayout(a.extend({dataExtent:[r,r],borderWidth:0,upperHeight:0},S))}))}var D=e.getData().tree.root;D.setLayout(N(p,L,V),!0),e.setLayoutInfo(p),C(D,new o(-p.x,-p.y,l,h),R,M,0)}};function w(e,t,r,a){var o,n;if(!e.isRemoved()){var i=e.getLayout();o=i.width,n=i.height;var l=e.getModel(),u=l.get(p),g=l.get(f)/2,s=I(l),v=Math.max(u,s),c=u-g,y=v-g;l=e.getModel();e.setLayout({borderWidth:u,upperHeight:v,upperLabelHeight:s},!0),o=h(o-2*c,0),n=h(n-c-y,0);var m=o*n,V=x(e,l,m,t,r,a);if(V.length){var L={x:c,y,width:o,height:n},M=d(o,n),b=1/0,N=[];N.area=0;for(var C=0,A=V.length;C<A;){var S=V[C];N.push(S),N.area+=S.getLayout().area;var D=R(N,M,t.squareRatio);D<=b?(C++,b=D):(N.area-=N.pop().getLayout().area,T(N,M,L,g,!1),M=d(L.width,L.height),N.length=N.area=0,b=1/0)}if(N.length&&T(N,M,L,g,!0),!r){var E=l.get("childrenVisibleMin");null!=E&&m<E&&(r=!0)}for(C=0,A=V.length;C<A;C++)w(V[C],t,r,a+1)}}}function x(e,t,r,o,n,i){var l=e.children||[],u=o.sort;"asc"!==u&&"desc"!==u&&(u=null);var g=null!=o.leafDepth&&o.leafDepth<=i;if(n&&!g)return e.viewChildren=[];l=a.filter(l,(function(e){return!e.isRemoved()})),L(l,u);var h=M(t,l,u);if(0===h.sum)return e.viewChildren=[];if(h.sum=V(t,r,h.sum,u,l),0===h.sum)return e.viewChildren=[];for(var d=0,s=l.length;d<s;d++){var v=l[d].getValue()/h.sum*r;l[d].setLayout({area:v})}return g&&(l.length&&e.setLayout({isLeafRoot:!0},!0),l.length=0),e.viewChildren=l,e.setLayout({dataExtent:h.dataExtent},!0),l}function V(e,t,r,a,o){if(!a)return r;for(var n=e.get("visibleMin"),i=o.length,l=i,u=i-1;u>=0;u--){var g=o["asc"===a?i-u-1:u].getValue();g/r*t<n&&(l=u,r-=g)}return"asc"===a?o.splice(0,i-l):o.splice(l,i-l),r}function L(e,t){return t&&e.sort((function(e,r){var a="asc"===t?e.getValue()-r.getValue():r.getValue()-e.getValue();return 0===a?"asc"===t?e.dataIndex-r.dataIndex:r.dataIndex-e.dataIndex:a})),e}function M(e,t,r){for(var a=0,o=0,n=t.length;o<n;o++)a+=t[o].getValue();var i=e.get("visualDimension");if(t&&t.length)if("value"===i&&r)l=[t[t.length-1].getValue(),t[0].getValue()],"asc"===r&&l.reverse();else{var l=[1/0,-1/0];v(t,(function(e){var t=e.getValue(i);t<l[0]&&(l[0]=t),t>l[1]&&(l[1]=t)}))}else l=[NaN,NaN];return{sum:a,dataExtent:l}}function R(e,t,r){for(var a,o=0,n=1/0,i=0,l=e.length;i<l;i++)a=e[i].getLayout().area,a&&(a<n&&(n=a),a>o&&(o=a));var u=e.area*e.area,g=t*t*r;return u?h(g*o/u,u/(g*n)):1/0}function T(e,t,r,a,o){var n=t===r.width?0:1,i=1-n,l=["x","y"],u=["width","height"],g=r[l[n]],s=t?e.area/t:0;(o||s>r[u[i]])&&(s=r[u[i]]);for(var v=0,p=e.length;v<p;v++){var f=e[v],c={},y=s?f.getLayout().area/s:0,m=c[u[i]]=h(s-2*a,0),w=r[l[n]]+r[u[n]]-g,x=v===p-1||w<y?w:y,V=c[u[n]]=h(x-2*a,0);c[l[i]]=r[l[i]]+d(a,m/2),c[l[n]]=g+d(a,V/2),g+=x,f.setLayout(c,!0)}r[l[i]]+=s,r[u[i]]-=s}function b(e,t,r,a,o){var n,i=(t||{}).node,u=[a,o];if(!i||i===r)return u;var g=a*o,h=g*e.option.zoomToNodeRatio;while(n=i.parentNode){for(var d=0,s=n.children,v=0,f=s.length;v<f;v++)d+=s[v].getValue();var c=i.getValue();if(0===c)return u;h*=d/c;var y=n.getModel(),m=y.get(p),w=Math.max(m,I(y,m));h+=4*m*m+(3*m+w)*Math.pow(h,.5),h>l&&(h=l),i=n}h<g&&(h=g);var x=Math.pow(h/g,.5);return[a*x,o*x]}function N(e,t,r){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!r)return a;var o=r.node,n=o.getLayout();if(!n)return a;var i=[n.width/2,n.height/2],l=o;while(l){var u=l.getLayout();i[0]+=u.x,i[1]+=u.y,l=l.parentNode}return{x:e.width/2-i[0],y:e.height/2-i[1]}}function C(e,t,r,a,n){var i=e.getLayout(),l=r[n],u=l&&l===e;if(!(l&&!u||n===r.length&&e!==a)){e.setLayout({isInView:!0,invisible:!u&&!t.intersect(i),isAboveViewRoot:u},!0);var g=new o(t.x-i.x,t.y-i.y,t.width,t.height);v(e.viewChildren||[],(function(e){C(e,g,r,a,n+1)}))}}function I(e){return e.get(c)?e.get(y):0}e.exports=m},46188:(e,t,r)=>{var a=r(59937),o=r(21092),n=r(33051),i=n.isArray,l="itemStyle",u={seriesType:"treemap",reset:function(e,t,r,a){var o=e.getData().tree,n=o.root;n.isRemoved()||g(n,{},e.getViewRoot().getAncestors(),e)}};function g(e,t,r,a){var o=e.getModel(),i=e.getLayout();if(i&&!i.invisible&&i.isInView){var u,v=e.getModel(l),f=h(v,t,a),y=v.get("borderColor"),m=v.get("borderColorSaturation");null!=m&&(u=d(f,e),y=s(m,u)),e.setVisual("borderColor",y);var w=e.viewChildren;if(w&&w.length){var x=p(e,o,i,v,f,w);n.each(w,(function(e,t){if(e.depth>=r.length||e===r[e.depth]){var n=c(o,f,e,t,x,a);g(e,n,r,a)}}))}else u=d(f,e),e.setVisual("color",u)}}function h(e,t,r){var a=n.extend({},t),o=r.designatedVisualItemStyle;return n.each(["color","colorAlpha","colorSaturation"],(function(r){o[r]=t[r];var n=e.get(r);o[r]=null,null!=n&&(a[r]=n)})),a}function d(e){var t=v(e,"color");if(t){var r=v(e,"colorAlpha"),a=v(e,"colorSaturation");return a&&(t=o.modifyHSL(t,null,null,a)),r&&(t=o.modifyAlpha(t,r)),t}}function s(e,t){return null!=t?o.modifyHSL(t,null,null,e):null}function v(e,t){var r=e[t];if(null!=r&&"none"!==r)return r}function p(e,t,r,o,n,i){if(i&&i.length){var l=f(t,"color")||null!=n.color&&"none"!==n.color&&(f(t,"colorAlpha")||f(t,"colorSaturation"));if(l){var u=t.get("visualMin"),g=t.get("visualMax"),h=r.dataExtent.slice();null!=u&&u<h[0]&&(h[0]=u),null!=g&&g>h[1]&&(h[1]=g);var d=t.get("colorMappingBy"),s={type:l.name,dataExtent:h,visual:l.range};"color"!==s.type||"index"!==d&&"id"!==d?s.mappingMethod="linear":(s.mappingMethod="category",s.loop=!0);var v=new a(s);return v.__drColorMappingBy=d,v}}}function f(e,t){var r=e.get(t);return i(r)&&r.length?{name:t,range:r}:null}function c(e,t,r,a,o,i){var l=n.extend({},t);if(o){var u=o.type,g="color"===u&&o.__drColorMappingBy,h="index"===g?a:"id"===g?i.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));l[u]=o.mapValueToVisual(h)}return l}e.exports=u}}]);