Files
Thesis/share/jupyter/lab/static/872.a89dc5555d0aed622e6e.js

1 line
12 KiB
JavaScript

"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[872],{85054:(e,t,a)=>{a.d(t,{S:()=>l});var s=a(70416);function l(e,t){if(e.accDescr){t.setAccDescription?.(e.accDescr)}if(e.accTitle){t.setAccTitle?.(e.accTitle)}if(e.title){t.setDiagramTitle?.(e.title)}}(0,s.K2)(l,"populateCommonDb")},47925:(e,t,a)=>{a.d(t,{P:()=>n});var s=a(42418);var l=a(70416);var n=(0,l.K2)(((e,t,a,n)=>{e.attr("class",a);const{width:c,height:i,x:d,y:p}=r(e,t);(0,s.a$)(e,i,c,n);const h=o(d,p,c,i,t);e.attr("viewBox",h);l.Rm.debug(`viewBox configured: ${h} with padding: ${t}`)}),"setupViewPortForSVG");var r=(0,l.K2)(((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+t*2,height:a.height+t*2,x:a.x,y:a.y}}),"calculateDimensionsWithPadding");var o=(0,l.K2)(((e,t,a,s,l)=>`${e-l} ${t-l} ${a} ${s}`),"createViewBox")},8491:(e,t,a)=>{a.d(t,{diagram:()=>L});var s=a(29479);var l=a(47925);var n=a(55750);var r=a(85054);var o=a(29131);var c=a(42418);var i=a(70416);var d=a(24010);var p=a(1218);var h=class{constructor(){this.nodes=[];this.levels=new Map;this.outerNodes=[];this.classes=new Map;this.setAccTitle=c.SV;this.getAccTitle=c.iN;this.setDiagramTitle=c.ke;this.getDiagramTitle=c.ab;this.getAccDescription=c.m7;this.setAccDescription=c.EI}static{(0,i.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=c.UI;const t=(0,c.zj)();return(0,o.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e);this.levels.set(e,t);if(t===0){this.outerNodes.push(e);this.root??=e}}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]};const s=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(s){s.forEach((e=>{if((0,n.KX)(e)){if(a?.textStyles){a.textStyles.push(e)}else{a.textStyles=[e]}}if(a?.styles){a.styles.push(e)}else{a.styles=[e]}}))}this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,c.IU)();this.nodes=[];this.levels=new Map;this.outerNodes=[];this.classes=new Map;this.root=void 0}};function f(e){if(!e.length){return[]}const t=[];const a=[];e.forEach((e=>{const s={name:e.name,children:e.type==="Leaf"?void 0:[]};s.classSelector=e?.classSelector;if(e?.cssCompiledStyles){s.cssCompiledStyles=[e.cssCompiledStyles]}if(e.type==="Leaf"&&e.value!==void 0){s.value=e.value}while(a.length>0&&a[a.length-1].level>=e.level){a.pop()}if(a.length===0){t.push(s)}else{const e=a[a.length-1].node;if(e.children){e.children.push(s)}else{e.children=[s]}}if(e.type!=="Leaf"){a.push({node:s,level:e.level})}}));return t}(0,i.K2)(f,"buildHierarchy");var m=(0,i.K2)(((e,t)=>{(0,r.S)(e,t);const a=[];for(const n of e.TreemapRows??[]){if(n.$type==="ClassDefStatement"){t.addClass(n.className??"",n.styleText??"")}}for(const n of e.TreemapRows??[]){const e=n.item;if(!e){continue}const s=n.indent?parseInt(n.indent):0;const l=y(e);const r=e.classSelector?t.getStylesForClass(e.classSelector):[];const o=r.length>0?r.join(";"):void 0;const c={level:s,name:l,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:o};a.push(c)}const s=f(a);const l=(0,i.K2)(((e,a)=>{for(const s of e){t.addNode(s,a);if(s.children&&s.children.length>0){l(s.children,a+1)}}}),"addNodesRecursively");l(s,0)}),"populate");var y=(0,i.K2)((e=>e.name?String(e.name):""),"getItemName");var u={parser:{yy:void 0},parse:(0,i.K2)((async e=>{try{const t=d.qg;const a=await t("treemap",e);i.Rm.debug("Treemap AST:",a);const s=u.parser?.yy;if(!(s instanceof h)){throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.")}m(a,s)}catch(t){i.Rm.error("Error parsing treemap:",t);throw t}}),"parse")};var S=10;var g=10;var x=25;var v=(0,i.K2)(((e,t,a,r)=>{const o=r.db;const d=o.getConfig();const h=d.padding??S;const f=o.getDiagramTitle();const m=o.getRoot();const{themeVariables:y}=(0,c.zj)();if(!m){return}const u=f?30:0;const v=(0,s.D)(t);const b=d.nodeWidth?d.nodeWidth*g:960;const w=d.nodeHeight?d.nodeHeight*g:500;const $=b;const C=w+u;v.attr("viewBox",`0 0 ${$} ${C}`);(0,c.a$)(v,C,$,d.useMaxWidth);let k;try{const e=d.valueFormat||",";if(e==="$0,0"){k=(0,i.K2)((e=>"$"+(0,p.GPZ)(",")(e)),"valueFormat")}else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e);const a=t?t[0]:"";k=(0,i.K2)((e=>"$"+(0,p.GPZ)(","+a)(e)),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);k=(0,i.K2)((e=>"$"+(0,p.GPZ)(t||"")(e)),"valueFormat")}else{k=(0,p.GPZ)(e)}}catch(A){i.Rm.error("Error creating format function:",A);k=(0,p.GPZ)(",")}const L=(0,p.UMr)().range(["transparent",y.cScale0,y.cScale1,y.cScale2,y.cScale3,y.cScale4,y.cScale5,y.cScale6,y.cScale7,y.cScale8,y.cScale9,y.cScale10,y.cScale11]);const T=(0,p.UMr)().range(["transparent",y.cScalePeer0,y.cScalePeer1,y.cScalePeer2,y.cScalePeer3,y.cScalePeer4,y.cScalePeer5,y.cScalePeer6,y.cScalePeer7,y.cScalePeer8,y.cScalePeer9,y.cScalePeer10,y.cScalePeer11]);const M=(0,p.UMr)().range([y.cScaleLabel0,y.cScaleLabel1,y.cScaleLabel2,y.cScaleLabel3,y.cScaleLabel4,y.cScaleLabel5,y.cScaleLabel6,y.cScaleLabel7,y.cScaleLabel8,y.cScaleLabel9,y.cScaleLabel10,y.cScaleLabel11]);if(f){v.append("text").attr("x",$/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f)}const P=v.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer");const z=(0,p.Sk5)(m).sum((e=>e.value??0)).sort(((e,t)=>(t.value??0)-(e.value??0)));const F=(0,p.hkb)().size([b,w]).paddingTop((e=>e.children&&e.children.length>0?x+g:0)).paddingInner(h).paddingLeft((e=>e.children&&e.children.length>0?g:0)).paddingRight((e=>e.children&&e.children.length>0?g:0)).paddingBottom((e=>e.children&&e.children.length>0?g:0)).round(true);const K=F(z);const D=K.descendants().filter((e=>e.children&&e.children.length>0));const N=P.selectAll(".treemapSection").data(D).enter().append("g").attr("class","treemapSection").attr("transform",(e=>`translate(${e.x0},${e.y0})`));N.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",x).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",(e=>{if(e.depth===0){return"display: none;"}return""}));N.append("clipPath").attr("id",((e,a)=>`clip-section-${t}-${a}`)).append("rect").attr("width",(e=>Math.max(0,e.x1-e.x0-12))).attr("height",x);N.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).attr("class",((e,t)=>`treemapSection section${t}`)).attr("fill",(e=>L(e.data.name))).attr("fill-opacity",.6).attr("stroke",(e=>T(e.data.name))).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",(e=>{if(e.depth===0){return"display: none;"}const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}));N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",x/2).attr("dominant-baseline","middle").text((e=>e.depth===0?"":e.data.name)).attr("font-weight","bold").attr("style",(e=>{if(e.depth===0){return"display: none;"}const t="dominant-baseline: middle; font-size: 12px; fill:"+M(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;";const a=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t+a.labelStyles.replace("color:","fill:")})).each((function(e){if(e.depth===0){return}const t=(0,p.Ltv)(this);const a=e.data.name;t.text(a);const s=e.x1-e.x0;const l=6;let n;if(d.showValues!==false&&e.value){const e=s-10;const t=30;const a=10;const r=e-t-a;n=r-l}else{const e=6;n=s-l-e}const r=15;const o=Math.max(r,n);const c=t.node();const i=c.getComputedTextLength();if(i>o){const e="...";let s=a;while(s.length>0){s=a.substring(0,s.length-1);if(s.length===0){t.text(e);if(c.getComputedTextLength()>o){t.text("")}break}t.text(s+e);if(c.getComputedTextLength()<=o){break}}}}));if(d.showValues!==false){N.append("text").attr("class","treemapSectionValue").attr("x",(e=>e.x1-e.x0-10)).attr("y",x/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((e=>e.value?k(e.value):"")).attr("font-style","italic").attr("style",(e=>{if(e.depth===0){return"display: none;"}const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+M(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;";const a=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t+a.labelStyles.replace("color:","fill:")}))}const G=K.leaves();const V=P.selectAll(".treemapLeafGroup").data(G).enter().append("g").attr("class",((e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`)).attr("transform",(e=>`translate(${e.x0},${e.y0})`));V.append("rect").attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).attr("class","treemapLeaf").attr("fill",(e=>e.parent?L(e.parent.data.name):L(e.data.name))).attr("style",(e=>{const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles})).attr("fill-opacity",.3).attr("stroke",(e=>e.parent?L(e.parent.data.name):L(e.data.name))).attr("stroke-width",3);V.append("clipPath").attr("id",((e,a)=>`clip-${t}-${a}`)).append("rect").attr("width",(e=>Math.max(0,e.x1-e.x0-4))).attr("height",(e=>Math.max(0,e.y1-e.y0-4)));const W=V.append("text").attr("class","treemapLabel").attr("x",(e=>(e.x1-e.x0)/2)).attr("y",(e=>(e.y1-e.y0)/2)).attr("style",(e=>{const t="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+M(e.data.name)+";";const a=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t+a.labelStyles.replace("color:","fill:")})).attr("clip-path",((e,a)=>`url(#clip-${t}-${a})`)).text((e=>e.data.name));W.each((function(e){const t=(0,p.Ltv)(this);const a=e.x1-e.x0;const s=e.y1-e.y0;const l=t.node();const n=4;const r=a-2*n;const o=s-2*n;if(r<10||o<10){t.style("display","none");return}let c=parseInt(t.style("font-size"),10);const i=8;const d=28;const h=.6;const f=6;const m=2;while(l.getComputedTextLength()>r&&c>i){c--;t.style("font-size",`${c}px`)}let y=Math.max(f,Math.min(d,Math.round(c*h)));let u=c+m+y;while(u>o&&c>i){c--;y=Math.max(f,Math.min(d,Math.round(c*h)));if(y<f&&c===i){break}t.style("font-size",`${c}px`);u=c+m+y;if(y<=f&&u>o){}}t.style("font-size",`${c}px`);if(l.getComputedTextLength()>r||c<i||o<c){t.style("display","none")}}));if(d.showValues!==false){const e=V.append("text").attr("class","treemapValue").attr("x",(e=>(e.x1-e.x0)/2)).attr("y",(function(e){return(e.y1-e.y0)/2})).attr("style",(e=>{const t="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+M(e.data.name)+";";const a=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t+a.labelStyles.replace("color:","fill:")})).attr("clip-path",((e,a)=>`url(#clip-${t}-${a})`)).text((e=>e.value?k(e.value):""));e.each((function(e){const t=(0,p.Ltv)(this);const a=this.parentNode;if(!a){t.style("display","none");return}const s=(0,p.Ltv)(a).select(".treemapLabel");if(s.empty()||s.style("display")==="none"){t.style("display","none");return}const l=parseFloat(s.style("font-size"));const n=28;const r=.6;const o=6;const c=2;const i=Math.max(o,Math.min(n,Math.round(l*r)));t.style("font-size",`${i}px`);const d=(e.y1-e.y0)/2;const h=d+l/2+c;t.attr("y",h);const f=e.x1-e.x0;const m=e.y1-e.y0;const y=4;const u=m-y;const S=f-2*4;if(t.node().getComputedTextLength()>S||h+i>u||i<o){t.style("display","none")}else{t.style("display",null)}}))}const R=d.diagramPadding??8;(0,l.P)(v,R,"flowchart",d?.useMaxWidth||false)}),"draw");var b=(0,i.K2)((function(e,t){return t.db.getClasses()}),"getClasses");var w={draw:v,getClasses:b};var $={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"};var C=(0,i.K2)((({treemap:e}={})=>{const t=(0,o.$t)($,e);return`\n .treemapNode.section {\n stroke: ${t.sectionStrokeColor};\n stroke-width: ${t.sectionStrokeWidth};\n fill: ${t.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${t.leafStrokeColor};\n stroke-width: ${t.leafStrokeWidth};\n fill: ${t.leafFillColor};\n }\n .treemapLabel {\n fill: ${t.labelColor};\n font-size: ${t.labelFontSize};\n }\n .treemapValue {\n fill: ${t.valueColor};\n font-size: ${t.valueFontSize};\n }\n .treemapTitle {\n fill: ${t.titleColor};\n font-size: ${t.titleFontSize};\n }\n `}),"getStyles");var k=C;var L={parser:u,get db(){return new h},renderer:w,styles:k}}}]);