mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-21 07:45:36 +08:00
25 lines
16 KiB
JavaScript
25 lines
16 KiB
JavaScript
|
|
import{p as ge}from"./chunk-JWPE2WC7.C9webpn6.js";import{_ as w,W as ye,z as ae,B as ee,F as Se,e as ve,l as te,bf as B,d as U,b as xe,a as be,o as we,p as Ce,g as Te,s as Le,D as $e,bg as Ae,q as Fe}from"./mermaid.core.TSSz6aZW.js";import{s as Ne}from"./chunk-VR4S4FIN.V_t2sjuN.js";import{p as Me}from"./cynefin-VYW2F7L2.DDB6TQyK.js";import{b as O}from"./defaultLocale.DX6XiGOO.js";import{o as Q}from"./ordinal.BYWQX77i.js";import"./framework.C2AwuPrQ.js";import"./init.Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],r,i,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function De(t,a){for(var l=this,n=[l],r=[],i,h,d,g=-1;l=n.pop();)if(r.push(l),i=l.children)for(h=0,d=i.length;h<d;++h)n.push(i[h]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function We(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Ee(t){for(var a=this,l=Re(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Re(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function qe(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ge(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=je)):a===void 0&&(a=Ye);for(var l=new Z(t),n,r=[l],i,h,d,g;n=r.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)r.push(i=h[d]=new Z(h[d])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:We,path:Ee,ancestors:He,descendants:Ie,leaves:Oe,links:qe,copy:Xe,[Symbol.iterator]:Ge};function Je(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(n-a)/t.value;++d<g;)h=i[d],h.y0=l,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(r-l)/t.value;++d<g;)h=i[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,r,i){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,R,M;p<s;){x=r-l,S=i-n;do u=d[b++].value;while(!u&&b<s);for(y=N=u,R=Math.max(S/x,x/S)/(v*t),M=u*u*R,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*R,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Qe(g,l,n,r,v?n+=S*u/v:i):et(g,l,n,v?l+=x*u/v:r,i),v-=u,p=b}return h}const nt=(function t(a){function l(n,r,i,h,d){at(a,n,r,i,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],i=q,h=q,d=q,g=q,c=q;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.each
|
||
|
|
.treemapNode.section {
|
||
|
|
stroke: ${r.sectionStrokeColor};
|
||
|
|
stroke-width: ${r.sectionStrokeWidth};
|
||
|
|
fill: ${r.sectionFillColor};
|
||
|
|
}
|
||
|
|
.treemapNode.leaf {
|
||
|
|
stroke: ${r.leafStrokeColor};
|
||
|
|
stroke-width: ${r.leafStrokeWidth};
|
||
|
|
fill: ${r.leafFillColor};
|
||
|
|
}
|
||
|
|
.treemapLabel {
|
||
|
|
fill: ${h};
|
||
|
|
font-size: ${r.labelFontSize};
|
||
|
|
}
|
||
|
|
.treemapValue {
|
||
|
|
fill: ${d};
|
||
|
|
font-size: ${r.valueFontSize};
|
||
|
|
}
|
||
|
|
.treemapTitle {
|
||
|
|
fill: ${i};
|
||
|
|
font-size: ${r.titleFontSize};
|
||
|
|
}
|
||
|
|
`},"getStyles"),ut=pt,Ct={parser:he,get db(){return new oe},renderer:ht,styles:ut};export{Ct as diagram};
|