codecharta-visualization 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundler/browser/chunk-5CE7PKV4.js +2 -0
- package/dist/bundler/browser/chunk-5TQNGGPT.js +1 -0
- package/dist/bundler/browser/chunk-DKYMZBLK.js +1 -0
- package/dist/bundler/browser/chunk-OJZK6HWN.js +1 -0
- package/dist/bundler/browser/chunk-Z4T4NBH3.js +4209 -0
- package/dist/bundler/browser/codeCharta/assets/sample1.cc.json +62 -7
- package/dist/bundler/browser/index.html +2 -2
- package/dist/bundler/browser/main-EAULISRJ.js +3681 -0
- package/dist/bundler/browser/package.json +1 -1
- package/dist/bundler/browser/styles-MKL4DFOF.css +1 -0
- package/package.json +1 -1
- package/dist/bundler/browser/chunk-DT83IZWc.js +0 -1
- package/dist/bundler/browser/chunk-Dw17WpkN.js +0 -1
- package/dist/bundler/browser/chunk-oHIaR8OO.js +0 -17
- package/dist/bundler/browser/main-W663WA53.js +0 -7845
- package/dist/bundler/browser/styles-GORBIYPV.css +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$c as ro,$j as z,A as H,Ak as Go,B as et,Bf as dt,Bl as mi,C as ce,Cf as kt,Cl as fi,D as y,Da as Fr,Db as M,Dc as eo,Dj as Lo,Dk as Yo,E as tt,Eb as G,Ec as at,Ef as ho,Ej as At,Ek as ft,F as rt,Fa as Br,Fb as W,G as _r,Gh as He,H as Pr,Ha as J,Hb as Tt,Hi as Po,Hj as Lt,Hk as ut,I as Tr,Ia as ie,Ib as Ur,Id as st,Ik as qo,Ja as it,Jb as jr,Jg as bo,Ji as To,Jk as Xo,K as le,Ka as g,Kd as ct,Kk as Ko,La as U,Lc as to,Lf as go,Lh as _o,Lk as vt,Ma as j,Mh as Pe,Mk as je,Na as Vr,Nd as lt,Nk as Bt,O as Nr,Og as wo,Ok as Ge,Pg as Eo,Pk as ht,Q as Ee,Qf as Co,Qg as Do,Qk as gt,Rf as yo,Rk as Le,Sa as Wr,Sb as Gr,Sd as Nt,Sf as _e,Sk as Zo,T as f,Td as me,Tk as Qo,U as Pt,Wa as pe,Wb as Yr,Wd as io,Wj as Te,X as oe,Xb as nt,Xj as ze,Xk as Jo,Y as x,Ya as Re,Yj as Ne,Yk as ei,Z as kr,Za as Ir,Zd as no,Zg as Mo,Zj as xe,Zk as ti,_ as Ar,_d as ao,_g as Ro,_j as Oo,_k as ri,a as Er,ab as w,ad as oo,ae as so,ak as fe,al as oi,b as Dr,ba as Lr,bc as qr,be as co,bf as mo,bk as Fo,bl as Ct,ck as Bo,db as $r,dc as Xr,dj as No,dk as Se,dl as Vt,e as Bn,eb as N,ec as Kr,ed as de,ee as lo,ek as ee,fa as Q,fc as Vn,fk as Vo,fl as ii,ga as P,gc as Zr,gk as Wo,gl as Wt,h as _t,ha as T,hb as Hr,hc as Qr,hk as Io,hl as It,ic as Jr,ik as $o,il as ni,ja as De,jk as Ho,jl as $t,ka as Me,kk as m,kl as Ht,l as Ze,la as I,lk as ne,ll as ai,ma as R,na as E,nk as Ot,o as Qe,oa as _,ob as zr,ol as si,pa as S,pe as po,pf as pt,pl as zt,qa as b,qk as Ft,r as Mr,ra as q,re as $e,rl as ci,sa as Or,sk as Ue,sl as Oe,ta as ot,tk as mt,tl as li,ua as X,uf as fo,uk as zo,ul as pi,va as ye,vk as Uo,vl as di,wa as Ie,wl as ue,x as Je,xa as O,xg as xo,xj as ko,xk as jo,yf as uo,yg as So,yj as Ao,yk as ke,z as Rr,zf as vo,zk as Ae}from"./chunk-Z4T4NBH3.js";var Wn=(e,t,o,r,i)=>{let n=[],a=Ut("area",e.areaMetric,t,i);a&&n.push(a);let s=Ut("height",e.heightMetric,t,i);s&&n.push(s);let l=Ut("color",e.colorMetric,t,i);l&&!r&&n.push(Dr(Er({},l),{inverted:o.isColorRangeInverted===!0}));let p=In(e.edgeMetric,t,i);return p&&n.push(p),n},Ut=(e,t,o,r)=>{if(t)return{kind:e,metricName:t,value:r?.attributes?.[t],descriptor:o?.[t]}},In=(e,t,o)=>{if(!e)return;let r=o?.edgeAttributes?.[e];if(r)return{kind:"edge",metricName:e,incoming:r.incoming??0,outgoing:r.outgoing??0,descriptor:t?.[e]}},ui=W(yo,pt,oo,eo,_e,Wn);var $n=.3333333333333333,Hn=2/3,jt=(e,t,o,r)=>{if(t===void 0||o===void 0||o===t)return{fraction:1,severity:"neutral"};let i=zn((e-t)/(o-t));return{fraction:i,severity:Un(r===1?1-i:i)}},zn=e=>Math.min(1,Math.max(0,e)),Un=e=>e<$n?"success":e<Hn?"warning":"error";var Gt=e=>e===void 0||e===0||Number.isNaN(e),Yt=e=>Gt(e.value)&&!e.delta,vi={fraction:0,severity:"neutral"},jn="unary",Gn=(e,t,o,r)=>e?.attributes?Object.keys(e.attributes).filter(i=>i!==jn).sort((i,n)=>i.localeCompare(n)).map(i=>Yn(i,e,t,o,r)):[],Yn=(e,t,o,r,i)=>{let n=i?.[e],a=t.attributes[e];return{name:e,value:a,delta:t.deltas?.[e],mapBar:qn(e,a,o,n),rangeBar:Xn(e,a,r,n),descriptor:n}},qn=(e,t,o,r)=>{if(Gt(t))return vi;let i=o?.attributes?.[e];return jt(t,0,i,r?.direction)},Xn=(e,t,o,r)=>{if(Gt(t))return vi;let i=o.nodeMetricData.find(n=>n.name===e);return jt(t,i?.minValue,i?.maxValue,r?.direction)},hi=W(_e,dt,uo,pt,(e,t,o,r)=>Gn(e,t.unifiedMapNode,{nodeMetricData:o},r));var ve=(()=>{class e{constructor(o){this.store=o,this.selectedNode$=this.store.select(_e),this.mappingBlocks$=this.store.select(ui),this.metricRows$=this.store.select(hi)}static{this.\u0275fac=function(r){return new(r||e)(ce(G))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var be=(()=>{class e{constructor(){this.readStore=y(ve),this.threeSceneService=y(So),this.threeRendererService=y(xo),this.selectedNode=M(this.readStore.selectedNode$,{initialValue:void 0}),this.isVisible=w(()=>this.selectedNode()!=null)}close(){this.threeSceneService.clearSelection(),this.threeRendererService.render()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ci=e=>{if(e)return{all:e.attributes?.unary??0,added:e.fileCount?.added??0,removed:e.fileCount?.removed??0,changed:e.fileCount?.changed??0}};function Kn(e,t){if(e&1&&(S(0,"span",2)(1,"span",3),g(2),b(),S(3,"span",4),g(4),b(),S(5,"span",5),g(6),b()()),e&2){let o=O();f(2),j("\u0394",o.added),f(2),j("\u0394",o.removed>0?-o.removed:0),f(2),j("\u0394",o.changed)}}function Zn(e,t){if(e&1&&(S(0,"span",1),g(1),b(),P(2,Kn,7,3,"span",2)),e&2){let o=t,r=O();f(),Vr(" ",o.all," ",o.all===1?"file":"files"," "),f(),T(r.isDeltaState()?2:-1)}}var yi=(()=>{class e{constructor(){this.isFolder=N.required(),this.fileCount=N(),this.isDeltaState=N.required()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-node-badges"]],hostAttrs:["data-testid","inspector-node-badges",1,"mt-1","flex","flex-wrap","items-center","gap-1"],inputs:{isFolder:[1,"isFolder"],fileCount:[1,"fileCount"],isDeltaState:[1,"isDeltaState"]},decls:3,vars:2,consts:[["data-testid","inspector-node-type",1,"badge","badge-ghost","badge-sm"],["data-testid","inspector-file-count",1,"badge","badge-ghost","badge-sm"],[1,"text-xs","opacity-60"],["title","Number of added files",1,"text-success"],["title","Number of removed files",1,"text-error"],["title","Number of files with metric changes"]],template:function(r,i){if(r&1&&(S(0,"span",0),g(1),b(),P(2,Zn,3,3)),r&2){let n;f(),U(i.isFolder()?"folder":"file"),f(),T((n=i.isFolder()&&i.fileCount())?2:-1,n)}},encapsulation:2})}}return e})();function Qn(e,t){if(e&1&&(S(0,"p",0),g(1),b()),e&2){let o=O();f(),U(o.parentPath())}}function Jn(e,t){if(e&1&&(S(0,"a",2),q(1,"i",3),b()),e&2){let o=t;X("href",o,Ee)("title",o)}}var xi=(()=>{class e{constructor(){this.parentPath=N.required(),this.nodeName=N.required(),this.link=N()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-node-path"]],hostAttrs:[1,"block"],inputs:{parentPath:[1,"parentPath"],nodeName:[1,"nodeName"],link:[1,"link"]},decls:4,vars:3,consts:[["data-testid","inspector-parent-path",1,"break-all","text-sm","leading-snug","opacity-60"],["data-testid","inspector-node-name",1,"break-all","text-lg","font-semibold","leading-snug","text-primary"],["target","_blank","rel","noopener noreferrer","data-testid","inspector-node-link",1,"text-sm",3,"href","title"],[1,"fa","fa-external-link"]],template:function(r,i){if(r&1&&(P(0,Qn,2,1,"p",0),S(1,"p",1),g(2),P(3,Jn,2,2,"a",2),b()),r&2){let n;T(i.parentPath()?0:-1),f(2),j(" ",i.nodeName()," "),f(),T((n=i.link())?3:-1,n)}},encapsulation:2})}}return e})();function ea(e,t){if(e&1){let o=ot();R(0,"div",4)(1,"div",5),_(2,"cc-inspector-node-path",6)(3,"cc-inspector-node-badges",7),E(),R(4,"button",8),ye("click",function(){tt(o);let i=O();return rt(i.copyPath())}),_(5,"i",9),E()()}if(e&2){let o=O();f(2),I("parentPath",o.parentPath())("nodeName",o.nodeName())("link",o.nodeLink()),f(),I("isFolder",o.isFolder())("fileCount",o.fileCount())("isDeltaState",o.isDeltaState()),f(),I("title",o.copied()?"Copied!":"Copy path"),f(),ie("fa-copy",!o.copied())("fa-check",o.copied())}}var Si=(()=>{class e{static{this.COPY_FEEDBACK_MS=1500}constructor(){this.readStore=y(ve),this.fileStoreReadWindow=y(at),this.visibilityService=y(be),this.selectedNode=M(this.readStore.selectedNode$,{requireSync:!0}),this.isDeltaState=M(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.copied=le(!1),this.nodeName=w(()=>this.selectedNode()?.name??""),this.nodeLink=w(()=>this.selectedNode()?.link),this.parentPath=w(()=>{let o=this.selectedNode();return o?.path?o.path.slice(0,o.path.length-o.name.length):""}),this.isFolder=w(()=>this.selectedNode()?.type===Yr.FOLDER),this.fileCount=w(()=>Ci(this.selectedNode())),y(Tr).onDestroy(()=>clearTimeout(this.copyFeedbackTimeout))}close(){this.visibilityService.close()}async copyPath(){let o=this.selectedNode()?.path;o&&(await navigator.clipboard.writeText(o),this.copied.set(!0),clearTimeout(this.copyFeedbackTimeout),this.copyFeedbackTimeout=setTimeout(()=>this.copied.set(!1),e.COPY_FEEDBACK_MS))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-header"]],hostAttrs:[1,"block","shrink-0","px-3","py-2"],decls:6,vars:1,consts:[[1,"flex","items-center","justify-between"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["type","button","title","Close inspector","data-testid","inspector-close-button",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-times"],[1,"mt-1","flex","items-start","justify-between","gap-2"],[1,"min-w-0"],[3,"parentPath","nodeName","link"],[3,"isFolder","fileCount","isDeltaState"],["type","button","data-testid","inspector-copy-path-button",1,"btn","btn-ghost","btn-sm","btn-square","shrink-0",3,"click","title"],[1,"fa"]],template:function(r,i){r&1&&(R(0,"div",0)(1,"span",1),g(2,"Inspector"),E(),R(3,"button",2),ye("click",function(){return i.close()}),_(4,"i",3),E()(),P(5,ea,6,11,"div",4)),r&2&&(f(5),T(i.selectedNode()?5:-1))},dependencies:[xi,yi],encapsulation:2})}}return e})();var we=e=>e===void 0||Number.isNaN(e)?"-":e.toLocaleString("en-US");function ta(e,t){if(e&1&&(S(0,"a",4),q(1,"i",7),b()),e&2){let o=O();X("href",t,Ee),Q("data-testid","mapping-block-link-"+o.block().kind)}}function ra(e,t){if(e&1&&(g(0),S(1,"span",8),g(2,"(in/out)"),b()),e&2){let o=O();j(" ",o.edgeCountText()," ")}}function oa(e,t){if(e&1&&g(0),e&2){let o=O();j(" ",o.formattedValue()," ")}}function ia(e,t){e&1&&(S(0,"span",6),g(1,"\xB7 inverted"),b())}var bi=(()=>{class e{constructor(){this.block=N.required(),this.iconClasses=w(()=>`${e.ICONS[this.block().kind]} text-xs text-primary`),this.formattedValue=w(()=>we(this.block().value)),this.edgeCountText=w(()=>`${we(this.block().incoming)}/${we(this.block().outgoing)}`)}static{this.ICONS={area:"fa fa-arrows-alt",height:"fa fa-arrows-v",color:"fa fa-paint-brush",edge:"fa fa-exchange"}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-mapping-block"]],hostAttrs:[1,"block","py-2"],inputs:{block:[1,"block"]},decls:12,vars:13,consts:[[1,"flex","items-center","gap-2"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["aria-hidden","true"],[1,"break-all","leading-snug",3,"title"],["target","_blank","rel","noopener noreferrer",1,"text-sm","opacity-70",3,"href"],[1,"text-base","font-semibold","tabular-nums","leading-snug"],["data-testid","mapping-block-inverted",1,"text-sm","font-normal","opacity-60"],[1,"fa","fa-external-link"],[1,"text-sm","font-normal","opacity-70"]],template:function(r,i){if(r&1&&(S(0,"div",0)(1,"span",1),g(2),b(),q(3,"i",2),b(),S(4,"p",3),pe(5,"attributeDescriptorTooltip"),g(6),P(7,ta,2,2,"a",4),b(),S(8,"p",5),P(9,ra,3,1)(10,oa,1,1),P(11,ia,2,0,"span",6),b()),r&2){let n;f(2),U(i.block().kind),f(),it(i.iconClasses()),f(),X("title",Re(5,10,i.block().descriptor,i.block().metricName)),Q("data-testid","mapping-block-name-"+i.block().kind),f(2),j(" ",i.block().metricName," "),f(),T((n=i.block().descriptor?.link)?7:-1,n),f(),Q("data-testid","mapping-block-value-"+i.block().kind),f(),T(i.block().kind==="edge"?9:10),f(2),T(i.block().inverted?11:-1)}},dependencies:[Pe],encapsulation:2})}}return e})();var na=(e,t)=>t.kind;function aa(e,t){if(e&1&&_(0,"cc-inspector-mapping-block",2),e&2){let o=t.$implicit;I("block",o)}}var wi=(()=>{class e{constructor(){this.readStore=y(ve),this.mappingBlocks=M(this.readStore.mappingBlocks$,{requireSync:!0})}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-metric-mapping"]],hostAttrs:[1,"block","shrink-0","border-t","border-base-300","px-3","py-2"],decls:5,vars:0,consts:[[1,"text-xs","uppercase","tracking-widest","opacity-60"],[1,"mt-1","divide-y","divide-base-200"],[3,"block"]],template:function(r,i){r&1&&(R(0,"span",0),g(1,"Metric Mapping"),E(),R(2,"div",1),De(3,aa,1,1,"cc-inspector-mapping-block",2,na),E()),r&2&&(f(3),Me(i.mappingBlocks()))},dependencies:[bi],encapsulation:2})}}return e})();var yt=(()=>{class e{constructor(){this.comparisonMode=le("map")}setComparisonMode(o){this.comparisonMode.set(o)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ei=(()=>{class e{constructor(){this.comparisonModeService=y(yt),this.comparisonMode=this.comparisonModeService.comparisonMode}setComparisonMode(o){this.comparisonModeService.setComparisonMode(o)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-comparison-toggle"]],hostAttrs:[1,"contents"],decls:5,vars:4,consts:[["data-testid","inspector-comparison-toggle",1,"join"],["type","button","title","Compare each value against the whole map","data-testid","inspector-comparison-map",1,"btn","btn-xs","join-item",3,"click"],["type","button","title","Compare each value against the min/max range of all files","data-testid","inspector-comparison-range",1,"btn","btn-xs","join-item",3,"click"]],template:function(r,i){r&1&&(S(0,"div",0)(1,"button",1),Ie("click",function(){return i.setComparisonMode("map")}),g(2," map "),b(),S(3,"button",2),Ie("click",function(){return i.setComparisonMode("range")}),g(4," range "),b()()),r&2&&(f(),ie("btn-active",i.comparisonMode()==="map"),f(2),ie("btn-active",i.comparisonMode()==="range"))},encapsulation:2})}}return e})();function sa(e,t){e&1&&(S(0,"a",2),q(1,"i",7),b()),e&2&&X("href",t,Ee)}function ca(e,t){if(e&1&&(S(0,"span",8),g(1),b()),e&2){let o=O();J("color",o.deltaColor()),f(),U(o.formattedDelta())}}var xt=(()=>{class e{constructor(){this.row=N.required(),this.comparisonMode=N.required(),this.positiveDeltaColor=N.required(),this.negativeDeltaColor=N.required(),this.bar=w(()=>this.comparisonMode()==="map"?this.row().mapBar:this.row().rangeBar),this.formattedValue=w(()=>we(this.row().value)),this.hasDelta=w(()=>!!this.row().delta),this.formattedDelta=w(()=>`\u0394${we(this.row().delta)}`),this.deltaColor=w(()=>(this.row().delta??0)>0?this.positiveDeltaColor():this.negativeDeltaColor()),this.barClasses=w(()=>`h-full rounded ${e.SEVERITY_CLASSES[this.bar().severity]}`),this.barWidthPercentage=w(()=>this.bar().fraction*100)}static{this.SEVERITY_CLASSES={success:"bg-success",warning:"bg-warning",error:"bg-error",neutral:"bg-base-content/30"}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-metric-row"]],hostAttrs:[1,"block"],inputs:{row:[1,"row"],comparisonMode:[1,"comparisonMode"],positiveDeltaColor:[1,"positiveDeltaColor"],negativeDeltaColor:[1,"negativeDeltaColor"]},decls:10,vars:12,consts:[[1,"flex","items-baseline","justify-between","gap-2"],[1,"min-w-0","truncate","text-sm",3,"title"],["target","_blank","rel","noopener noreferrer","data-testid","metric-row-link",1,"opacity-70",3,"href"],[1,"shrink-0","text-sm","tabular-nums"],["data-testid","metric-row-delta",1,"mr-1",3,"color"],[1,"mt-0.5","h-1","overflow-hidden","rounded","bg-base-300"],["data-testid","metric-row-bar"],[1,"fa","fa-external-link"],["data-testid","metric-row-delta",1,"mr-1"]],template:function(r,i){if(r&1&&(S(0,"div",0)(1,"span",1),pe(2,"attributeDescriptorTooltip"),g(3),P(4,sa,2,1,"a",2),b(),S(5,"span",3),P(6,ca,2,3,"span",4),g(7),b()(),S(8,"div",5),q(9,"div",6),b()),r&2){let n;f(),X("title",Re(2,9,i.row().descriptor,i.row().name)),f(2),j(" ",i.row().name," "),f(),T((n=i.row().descriptor?.link)?4:-1,n),f(2),T(i.hasDelta()?6:-1),f(),j(" ",i.formattedValue()," "),f(2),it(i.barClasses()),J("width",i.barWidthPercentage(),"%")}},dependencies:[Pe],encapsulation:2})}}return e})();var la=(e,t)=>t.name;function pa(e,t){if(e&1&&_(0,"cc-inspector-metric-row",3),e&2){let o=t.$implicit,r=O(3);I("row",o)("comparisonMode",r.comparisonMode())("positiveDeltaColor",r.positiveDeltaColor())("negativeDeltaColor",r.negativeDeltaColor())}}function da(e,t){if(e&1&&(R(0,"div",2),De(1,pa,1,4,"cc-inspector-metric-row",3,la),E()),e&2){let o=O(2);f(),Me(o.rows())}}function ma(e,t){if(e&1){let o=ot();R(0,"button",0),ye("click",function(){tt(o);let i=O();return rt(i.toggleEmptyMetrics())}),_(1,"i",1),g(2),E(),P(3,da,3,0,"div",2)}if(e&2){let o=O();f(),ie("fa-chevron-right",!o.showEmptyMetrics())("fa-chevron-down",o.showEmptyMetrics()),f(),j(" Empty metrics (",o.rows().length,") "),f(),T(o.showEmptyMetrics()?3:-1)}}var Di=(()=>{class e{constructor(){this.rows=N.required(),this.comparisonMode=N.required(),this.positiveDeltaColor=N.required(),this.negativeDeltaColor=N.required(),this.showEmptyMetrics=le(!1)}toggleEmptyMetrics(){this.showEmptyMetrics.update(o=>!o)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-empty-metrics"]],hostAttrs:[1,"block"],inputs:{rows:[1,"rows"],comparisonMode:[1,"comparisonMode"],positiveDeltaColor:[1,"positiveDeltaColor"],negativeDeltaColor:[1,"negativeDeltaColor"]},decls:1,vars:1,consts:[["type","button","data-testid","inspector-empty-metrics-toggle",1,"mt-3","flex","items-center","gap-1.5","text-xs","uppercase","tracking-widest","opacity-60",3,"click"],[1,"fa","text-[10px]"],["data-testid","inspector-empty-metrics",1,"mt-2","flex","flex-col","gap-2","opacity-60"],[3,"row","comparisonMode","positiveDeltaColor","negativeDeltaColor"]],template:function(r,i){r&1&&P(0,ma,4,6),r&2&&T(i.rows().length>0?0:-1)},dependencies:[xt],encapsulation:2})}}return e})();var fa=(e,t)=>t.name;function ua(e,t){e&1&&_(0,"cc-inspector-comparison-toggle")}function va(e,t){e&1&&(R(0,"p",2),g(1,"No metrics available"),E())}function ha(e,t){if(e&1&&_(0,"cc-inspector-metric-row",4),e&2){let o=t.$implicit,r=O(2);I("row",o)("comparisonMode",r.comparisonMode())("positiveDeltaColor",r.mapColors().positiveDelta)("negativeDeltaColor",r.mapColors().negativeDelta)}}function ga(e,t){if(e&1&&(R(0,"div",3),De(1,ha,1,4,"cc-inspector-metric-row",4,fa),E(),_(3,"cc-inspector-empty-metrics",5)),e&2){let o=O();f(),Me(o.metricRowsWithValues()),f(2),I("rows",o.emptyMetricRows())("comparisonMode",o.comparisonMode())("positiveDeltaColor",o.mapColors().positiveDelta)("negativeDeltaColor",o.mapColors().negativeDelta)}}var Mi=(()=>{class e{constructor(){this.readStore=y(ve),this.mapStateReadWindow=y(de),this.comparisonModeService=y(yt),this.metricRows=M(this.readStore.metricRows$,{requireSync:!0}),this.mapColors=M(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.comparisonMode=this.comparisonModeService.comparisonMode,this.metricRowsWithValues=w(()=>this.metricRows().filter(o=>!Yt(o))),this.emptyMetricRows=w(()=>this.metricRows().filter(o=>Yt(o)))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-inspector-metrics-list"]],hostAttrs:[1,"block","border-t","border-base-300","px-3","py-2"],decls:6,vars:2,consts:[[1,"flex","items-center","justify-between"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["data-testid","inspector-metrics-empty",1,"mt-2","text-sm","opacity-60"],[1,"mt-2","flex","flex-col","gap-2"],[3,"row","comparisonMode","positiveDeltaColor","negativeDeltaColor"],[3,"rows","comparisonMode","positiveDeltaColor","negativeDeltaColor"]],template:function(r,i){r&1&&(R(0,"div",0)(1,"span",1),g(2,"Metrics"),E(),P(3,ua,1,0,"cc-inspector-comparison-toggle"),E(),P(4,va,2,0,"p",2)(5,ga,4,4)),r&2&&(f(3),T(i.metricRows().length>0?3:-1),f(),T(i.metricRows().length===0?4:5))},dependencies:[Ei,Di,xt],encapsulation:2})}}return e})();var Ca=(()=>{class e{constructor(){this.visibilityService=y(be),this.isVisible=this.visibilityService.isVisible}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-sidebar-inspector"]],hostAttrs:[1,"fixed","right-0","z-[60]","w-[var(--cc-inspector-width)]","bg-base-100","overflow-hidden","flex","flex-col","shadow-[-2px_0_8px_-2px_rgba(0,0,0,0.15)]","transition-transform","duration-300"],hostVars:9,hostBindings:function(r,i){r&2&&(Q("aria-hidden",!i.isVisible()),J("top","var(--cc-bars-height, 49px)")("height","calc(100vh - var(--cc-bars-height, 49px) - var(--cc-file-extension-bar-height, 17px) - var(--cc-bottom-bar-height, 32px))"),ie("translate-x-full",!i.isVisible())("pointer-events-none",!i.isVisible()))},decls:4,vars:0,consts:[[1,"min-h-0","flex-1","overflow-y-auto"]],template:function(r,i){r&1&&(_(0,"cc-inspector-header")(1,"cc-inspector-metric-mapping"),R(2,"div",0),_(3,"cc-inspector-metrics-list"),E())},dependencies:[Si,wi,Mi],encapsulation:2})}}return e})();var St="var(--cc-bottom-bar-height, 32px) + var(--cc-file-extension-bar-height, 17px)";var Ri=(()=>{class e{constructor(){this.isOpen=N.required(),this.isMovedAsideByInspector=N.required(),this.togglePanel=$r(),this.buttonBottom=`calc(${St} + 32px)`,this.buttonRight=w(()=>this.isMovedAsideByInspector()?"calc(var(--cc-inspector-width) - 28px)":"-28px")}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-toggle-button"]],hostAttrs:[1,"contents"],inputs:{isOpen:[1,"isOpen"],isMovedAsideByInspector:[1,"isMovedAsideByInspector"]},outputs:{togglePanel:"togglePanel"},decls:2,vars:6,consts:[["id","legend-panel-button","data-testid","legend-panel-button","aria-controls","legend-panel",1,"btn","btn-primary","btn-sm","fixed","z-[60]","w-[88px]","rotate-90","rounded-t-none","transition-[right]","duration-300",3,"click","title"]],template:function(r,i){r&1&&(S(0,"button",0),Ie("click",function(){return i.togglePanel.emit()}),g(1,` LEGEND
|
|
2
|
+
`),b()),r&2&&(J("right",i.buttonRight())("bottom",i.buttonBottom),X("title",i.isOpen()?"Hide panel":"Show panel"),Q("aria-expanded",i.isOpen()))},encapsulation:2})}}return e})();function ya(e,t){if(e&1&&(R(0,"div",2)(1,"div",3),Or(2,4),E()()),e&2){let o=O();J("right",o.panelRight())("bottom",o.panelBottom),f(2),I("ngTemplateOutlet",o.legendContent())}}var qt=(()=>{class e{constructor(){this.elementReference=y(Nr),this.inspectorVisibilityService=y(be),this.besideInspector=N(!1),this.legendContent=Hr.required(Pt),this.isOpen=le(!1),this.isMovedAsideByInspector=w(()=>this.besideInspector()&&this.inspectorVisibilityService.isVisible()),this.panelBottom=`calc(${St} + 12px)`,this.panelRight=w(()=>this.isMovedAsideByInspector()?"calc(var(--cc-inspector-width) + 40px)":"40px"),this.mouseDownListener=o=>this.closeOnOutsideClick(o)}ngOnInit(){document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){document.removeEventListener("mousedown",this.mouseDownListener)}toggleIsOpen(){this.isOpen.update(o=>!o)}closeOnOutsideClick(o){this.isOpen()&&o.target instanceof Node&&!this.elementReference.nativeElement.contains(o.target)&&this.isOpen.set(!1)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-drawer"]],contentQueries:function(r,i,n){r&1&&Fr(n,i.legendContent,Pt,5),r&2&&Br()},inputs:{besideInspector:[1,"besideInspector"]},decls:2,vars:3,consts:[["id","legend-panel","data-testid","legend-panel",1,"rounded-box","border-base-300","bg-base-100","fixed","z-[60]","flex","w-72","max-w-[30vw]","flex-col","border","shadow-lg","transition-[right]","duration-300",3,"right","bottom"],[3,"togglePanel","isOpen","isMovedAsideByInspector"],["id","legend-panel","data-testid","legend-panel",1,"rounded-box","border-base-300","bg-base-100","fixed","z-[60]","flex","w-72","max-w-[30vw]","flex-col","border","shadow-lg","transition-[right]","duration-300"],[1,"flex","flex-col","gap-3","p-3"],[3,"ngTemplateOutlet"]],template:function(r,i){r&1&&(P(0,ya,3,5,"div",0),R(1,"cc-legend-toggle-button",1),ye("togglePanel",function(){return i.toggleIsOpen()}),E()),r&2&&(T(i.isOpen()?0:-1),f(),I("isOpen",i.isOpen())("isMovedAsideByInspector",i.isMovedAsideByInspector()))},dependencies:[Ri,zr],encapsulation:2})}}return e})();var _i=(()=>{class e{static{this.NO_MATCHING="\u2013 (no matching buildings)"}transform(o,r,i,n){switch(o){case"positive":{let a=n==="unary",s=i.minValue===r.from,l=i.maxValue===r.from;return a?`${i.minValue} - ${i.maxValue}`:s?e.NO_MATCHING:l?`${i.minValue} to ${this.formatNumber(r.from)}`:`${i.minValue} to ${this.formatNumber(r.from-1)}`}case"neutral":{let a=r.from===r.to,s=r.to===i.maxValue;return a?e.NO_MATCHING:s?`${this.formatNumber(r.from)} to ${this.formatNumber(r.to)}`:`${this.formatNumber(r.from)} to ${this.formatNumber(r.to-1)}`}case"negative":return i.maxValue===r.to?e.NO_MATCHING:`${this.formatNumber(r.to)} to ${this.formatNumber(i.maxValue)}`;case"positiveDelta":return"+\u0394 positive delta";case"negativeDelta":return"\u2013\u0394 negative delta";case"selected":return"selected";case"outgoingEdge":return"Outgoing Edge";case"incomingEdge":return"Incoming Edge"}}formatNumber(o){return(o||0).toLocaleString()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275pipe=Ar({name:"mapColorLabel",type:e,pure:!0})}}return e})();var Pi=(()=>{class e{constructor(o){this.store=o,this.selectedColorMetricData$=this.store.select(vo)}static{this.\u0275fac=function(r){return new(r||e)(ce(G))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var he=(()=>{class e{constructor(o,r){this.mapStateReadWindow=o,this.legendMetricRangeStore=r,this.mapColorFor=N.required(),this.colorMetric=M(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=M(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=M(this.legendMetricRangeStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=M(this.mapStateReadWindow.mapColors$,{initialValue:ro}),this.color=w(()=>this.mapColors()[this.mapColorFor()])}static{this.\u0275fac=function(r){return new(r||e)(oe(de),oe(Pi))}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-color-row"]],inputs:{mapColorFor:[1,"mapColorFor"]},decls:7,vars:8,consts:[[1,"flex","items-center","gap-2"],[1,"h-4","w-4","shrink-0","rounded-sm","border","border-base-300"],["width","100%","height","100%"],[1,"min-w-0","flex-1","truncate","text-sm"]],template:function(r,i){if(r&1&&(Wr(0),pe(1,"mapColorLabel"),S(2,"div",0),_r(),S(3,"svg",1),q(4,"rect",2),b(),Pr(),S(5,"span",3),g(6),b()()),r&2){let n=Ir(1,3,i.mapColorFor(),i.colorRange(),i.nodeMetricRange(),i.colorMetric());f(3),Q("aria-label","Color for "+n),f(),Q("fill",i.color()),f(2),U(n)}},dependencies:[_i],encapsulation:2})}}return e})();var Ni=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-color-scale-section"]],hostAttrs:[1,"contents"],decls:6,vars:0,consts:[[1,"border-base-300","flex","flex-col","gap-1","border-t","pt-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","positive"],["mapColorFor","neutral"],["mapColorFor","negative"]],template:function(r,i){r&1&&(R(0,"div",0)(1,"span",1),g(2,"Color scale"),E(),_(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3)(5,"cc-legend-color-row",4),E())},dependencies:[he],encapsulation:2})}}return e})();var ki=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-delta-colors-section"]],hostAttrs:[1,"contents"],decls:5,vars:0,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(r,i){r&1&&(R(0,"div",0)(1,"span",1),g(2,"Delta colors"),E(),_(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3),E())},dependencies:[he],encapsulation:2})}}return e})();function Sa(e,t){e&1&&(R(0,"div",0),_(1,"cc-legend-color-row",1)(2,"cc-legend-color-row",2),E())}var Ai=(()=>{class e{constructor(o){this.mapStateReadWindow=o,this.edgeMetric=M(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(r){return new(r||e)(oe(de))}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-edge-colors-section"]],hostAttrs:[1,"contents"],decls:1,vars:1,consts:[[1,"border-base-300","flex","flex-col","gap-1","border-t","pt-2"],["mapColorFor","outgoingEdge"],["mapColorFor","incomingEdge"]],template:function(r,i){r&1&&P(0,Sa,3,0,"div",0),r&2&&T(i.edgeMetric()?0:-1)},dependencies:[he],encapsulation:2})}}return e})();var Li=(()=>{class e{constructor(){this.preferencesReadWindow=y(Do),this.folderValue=M(this.preferencesReadWindow.radialFolderValue$,{requireSync:!0}),this.isNeutral=M(this.preferencesReadWindow.isRadialFolderNeutral$,{requireSync:!0}),this.swatch=M(this.preferencesReadWindow.radialFolderSwatch$,{requireSync:!0}),this.label=w(()=>this.isNeutral()?"folders: neutral":`folders: ${bo(this.folderValue()).legend}, tinted`)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-folders-row"]],decls:4,vars:3,consts:[["data-testid","legend-folders-row",1,"flex","items-center","gap-2"],[1,"h-4","w-4","shrink-0","rounded-sm","border","border-base-300"],[1,"min-w-0","flex-1","text-sm"]],template:function(r,i){r&1&&(S(0,"div",0),q(1,"span",1),S(2,"span",2),g(3),b()()),r&2&&(f(),J("background",i.swatch()),f(2),U(i.label()))},encapsulation:2})}}return e})();var Oi=(()=>{class e{constructor(o){this.metricsLensFacade=o,this.label=N.required(),this.metricName=N.required(),this.attributeDescriptors=M(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.descriptor=w(()=>this.attributeDescriptors()[this.metricName()]),this.title=w(()=>this.descriptor()?.title||_o.get(this.metricName())||this.metricName())}static{this.\u0275fac=function(r){return new(r||e)(oe(fo))}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-metric-row"]],inputs:{label:[1,"label"],metricName:[1,"metricName"]},decls:6,vars:6,consts:[[1,"flex","items-baseline","gap-3",3,"title"],[1,"w-16","shrink-0","text-xs","uppercase","tracking-wider","opacity-60"],[1,"min-w-0","truncate","text-sm","font-semibold"]],template:function(r,i){r&1&&(S(0,"div",0),pe(1,"attributeDescriptorTooltip"),S(2,"span",1),g(3),b(),S(4,"span",2),g(5),b()()),r&2&&(X("title",Re(1,3,i.descriptor(),i.metricName())),f(3),U(i.label()),f(2),U(i.title()))},dependencies:[Pe],encapsulation:2})}}return e})();function ba(e,t){e&1&&_(0,"cc-legend-metric-row",4),e&2&&I("metricName",t)}var Fi=(()=>{class e{constructor(o){this.mapStateReadWindow=o,this.areaMetric=M(this.mapStateReadWindow.areaMetric$,{initialValue:""}),this.heightMetric=M(this.mapStateReadWindow.heightMetric$,{initialValue:""}),this.colorMetric=M(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.edgeMetric=M(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(r){return new(r||e)(oe(de))}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-metrics-section"]],hostAttrs:[1,"contents"],decls:5,vars:4,consts:[[1,"flex","flex-col","gap-2"],["label","Area",3,"metricName"],["label","Height",3,"metricName"],["label","Color",3,"metricName"],["label","Edge",3,"metricName"]],template:function(r,i){if(r&1&&(R(0,"div",0),_(1,"cc-legend-metric-row",1)(2,"cc-legend-metric-row",2)(3,"cc-legend-metric-row",3),P(4,ba,1,1,"cc-legend-metric-row",4),E()),r&2){let n;f(),I("metricName",i.areaMetric()??""),f(),I("metricName",i.heightMetric()??""),f(),I("metricName",i.colorMetric()??""),f(),T((n=i.edgeMetric())?4:-1,n)}},dependencies:[Oi],encapsulation:2})}}return e})();function wa(e,t){e&1&&_(0,"cc-legend-delta-colors-section")}function Ea(e,t){e&1&&_(0,"cc-legend-folders-row")}function Da(e,t){if(e&1&&(_(0,"cc-legend-metrics-section")(1,"cc-legend-color-scale-section"),P(2,Ea,1,0,"cc-legend-folders-row")),e&2){let o=O(2);f(2),T(o.isRadialLayout()?2:-1)}}function Ma(e,t){if(e&1&&(P(0,wa,1,0,"cc-legend-delta-colors-section")(1,Da,3,1),R(2,"div",1),_(3,"cc-legend-color-row",2),E(),_(4,"cc-legend-edge-colors-section")),e&2){let o=O();T(o.isDeltaState()?0:1)}}var Ra=(()=>{class e{constructor(){this.fileStoreReadWindow=y(at),this.isDeltaState=M(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.isRadialLayout=To()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-legend-panel"]],decls:2,vars:1,consts:[[3,"besideInspector"],[1,"border-base-300","border-t","pt-2"],["mapColorFor","selected"]],template:function(r,i){r&1&&(R(0,"cc-legend-drawer",0),Lr(1,Ma,5,1,"ng-template"),E()),r&2&&I("besideInspector",!0)},dependencies:[qt,Fi,Ni,ki,Ai,he,Li],encapsulation:2})}}return e})();var Xt=new et("HANDED_OVER_MAP_NODE_ARRIVAL");var Kt=new et("MAP_EXPLORER_VIEW");var Bi=(()=>{class e{constructor(){this.store=y(G)}currentNodeAt(o){return this.store.select(Co(o)).pipe(Qe(1))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var _a=(()=>{class e{constructor(){this.mapNodeByPathStore=y(Bi),this.selection=y(ko),this.revealService=y(Ao),this.arrival=y(Xt,{optional:!0}),No(y(Kt),o=>this.showNode(o))}showNode(o){this.mapNodeByPathStore.currentNodeAt(o).subscribe(r=>{r&&(this.arrival?.receive(o),this.selection.select(r),this.revealService.revealNode(o))})}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275dir=kr({type:e,selectors:[["","ccShowsHandedOverMapNode",""]]})}}return e})();var bt=W(me,Lo);var Pa={patternSelector:me,setPattern:$e,isPatternEmptySelector:bt,searchedNodePathsSelector:go};var Ta={options:Object.values(nt),optionSelector:wo,ascendingSelector:Eo,setOption:Mo,toggleAscending:()=>Ro()};var Fe=e=>(e=e.trim(),e.startsWith("*")||e.endsWith("*")||e.startsWith("/")||e.startsWith("./")?e:!e.startsWith('"')&&!e.endsWith('"')?e.startsWith("!")?e:`*${e}*`:e);var Vi=e=>{let t=[],o=e.split(",");if(o[0].startsWith("!")){o[0]=o[0].slice(1);for(let r of o)r.length>0&&t.push({path:`!${Fe(r)}`});return t}for(let r of o){if(r.startsWith("!"))break;r.length>0&&t.push({path:Fe(r)})}return t};var Wi=e=>({type:"RuleFromSearchPatternAction",action:{effect:e}}),hd=(()=>{class e{constructor(o,r,i){this.actions$=o,this.store=r,this.excludeGuard=i,this.searchPatternToRules$=this.actions$.pipe(jr("RuleFromSearchPatternAction"),Rr(this.store.select(me)),_t(([n,a])=>({effect:n.action.effect,rules:Vi(a)})),Mr()),this.flattenSearchPattern$=Tt(()=>this.searchPatternToRules$.pipe(Ze(({effect:n})=>n==="flatten"),Je(({rules:n})=>{this.store.dispatch(so({items:n})),this.store.dispatch($e({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Tt(()=>this.searchPatternToRules$.pipe(Ze(({effect:n})=>n==="exclude"),Je(()=>{this.excludeGuard.doExcludedNodesResultInEmptyMap$.pipe(Qe(1),Ze(({resultsInEmptyMap:n})=>!n),Je(()=>{this.store.dispatch($e({value:""}))})).subscribe()}),_t(({rules:n})=>ao({items:n}))))}static{this.\u0275fac=function(r){return new(r||e)(ce(Ur),ce(G),ce(Po))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();var Yi=Bn(Vn());var Ii=e=>/[*?]/.test(e);var Na={gt:">",gte:"\u2265",lt:"<",lte:"\u2264",eq:"="};function $i(e){if(e.operator==="between"){let t=Math.min(e.value,e.upperValue??e.value),o=Math.max(e.value,e.upperValue??e.value);return`${e.metric} ${t}\u2026${o}`}return`${e.metric} ${Na[e.operator]} ${e.value}`}var Hi=W(mo,e=>e?.map?Gr(e.map).descendants().map(({data:t})=>t).filter(t=>qr(t)):[]);var wt=W(Hi,e=>{let t=new Map;for(let o of ka(e))t.set(o,e.map(r=>r.attributes?.[o]??0).filter(r=>typeof r=="number"&&!Number.isNaN(r)));return t});function ka(e){let t=new Set;for(let o of e)for(let r of Object.keys(o.attributes??{}))r!==Xr&&t.add(r);return t}var Aa=(e,t)=>(t.get(e.metric)??[]).filter(o=>Kr(e,o)).length,zi=(e,t,o)=>e.filter(r=>r.type===o).map(r=>({id:r.id,label:$i(r),affectedCount:Aa(r,t),kind:"METRIC",metricRule:r})),Ui=W(Nt,wt,(e,t)=>zi(e,t,"flatten")),ji=W(Nt,wt,(e,t)=>zi(e,t,"exclude"));var qi=(e,t,o)=>{if(e.length===0)return[];let r=t.map(a=>Zr(a.path)),{rules:i,combinedPositivePrefilter:n}=La(e);return Oa(i,n,r),i.map(({item:a,affectedCount:s})=>({id:`${o}/${a.path}`,label:a.path,item:a,effect:o,affectedCount:s,kind:Ii(a.path)?"RULE":"MANUAL"})).sort((a,s)=>a.label.localeCompare(s.label))};function La(e){let t=(0,Yi.default)();return{rules:e.map(r=>{let{ignoredNodePaths:i,condition:n}=Qr(r.path);return n&&Jr(t,r.path),{item:r,ignoredNodePaths:i,condition:n,affectedCount:0}}),combinedPositivePrefilter:t}}function Oa(e,t,o){let r=e.filter(n=>n.condition),i=e.filter(n=>!n.condition);for(let n of o)r.length>0&&t.ignores(n)&&Gi(r,n,!0),Gi(i,n,!1)}function Gi(e,t,o){for(let r of e)r.ignoredNodePaths.ignores(t)===o&&r.affectedCount++}var Xi=W(ct,kt,Ui,(e,t,o)=>[...o,...qi(e,t,"flatten")]),Ki=W(st,kt,ji,(e,t,o)=>[...o,...qi(e,t,"exclude")]);var Zi=(e,t)=>{let o=t.trim().split(",");return t.trim().startsWith("!")?(o[0]=o[0].slice(1),o.some(r=>e.some(i=>`!${Fe(r)}`===i.path))):o.some(r=>e.some(i=>Fe(r)===i.path))};var Qi=e=>W(me,bt,e,(t,o,r)=>o||Zi(r,t)),Ji=Qi(ct),en=Qi(st);var Fa=(()=>{class e{constructor(){this.store=y(G),this.flattenRules$=this.store.select(Xi),this.excludeRules$=this.store.select(Ki),this.isFlattenPatternDisabled$=this.store.select(Ji),this.isExcludePatternDisabled$=this.store.select(en)}removeRule(o){if(o.kind==="METRIC"){He(this.store,o.metricRule.type,po({id:o.metricRule.id}));return}let r=o.effect==="flatten"?co({items:[o.item]}):no({items:[o.item]});He(this.store,o.effect,r)}clearRules(o){He(this.store,o,io({ruleEffect:o}))}ruleFromSearchPattern(o){He(this.store,o,Wi(o))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();var tn=W(dt,ho,lt,({unifiedMapNode:e},t,o)=>o&&t.get(o)||e),rn=(e,t)=>e!==nt.AREA_SIZE?W(tn,o=>At(Lt(o),e,t)):W(tn,to,(o,r)=>At(Lt(o),e,t,r));var Ba=(()=>{class e{constructor(){this.store=y(G)}rootNodeFor(o,r){return this.store.select(rn(o,r))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();var Va=(()=>{class e{constructor(){this.store=y(G),this.focusedNodePath=M(this.store.select(lt),{requireSync:!0})}receive(o){let r=this.focusedNodePath();r&&o!==r&&!o.startsWith(`${r}/`)&&this.store.dispatch(lo())}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();var Zt={color:"fill",borderColor:"stroke"},on={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},te=Le(),Wa=(function(e){Te(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.type=t.type,o}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(o,r){return ci(null,this)},t.prototype.getDataParams=function(o,r,i){var n=e.prototype.getDataParams.call(this,o,r);return i&&(n.info=te(i).info),n},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t})(li),nn=Wa;function Qt(e,t){var o=e.mapDimensionsAll("defaultedLabel"),r=o.length;if(r===1){var i=zt(e,t,o[0]);return i!=null?i+"":null}else if(r){for(var n=[],a=0;a<o.length;a++)n.push(zt(e,t,o[a]));return n.join(" ")}}var qm=Zo(),an="__ec_stack_";function sn(e){if(di(e.axis.scale)){for(var t=ue(e.axis),o=[],r=0;r<e.count;r++)o.push(Ne({stackId:an+r},e));for(var i=Ia({bandWidthResult:t,seriesInfo:o}),n=[],r=0;r<e.count;r++){var a=i[an+r];a.offsetCenter=a.offset+a.width/2,n.push(a)}return n}}function Ia(e){var t=e.bandWidthResult.w,o=t,r=0,i,n,a=[],s={};z(e.seriesInfo,function(B,D){D||(n=B.defaultBarGap||0);var $=B.stackId;m(s,$)||r++;var F=s[$];F||(F=s[$]={width:0,maxWidth:0},a.push($));var A=B.barWidth;A&&!F.width&&(F.width=A,A=vt(o,A),o-=A);var We=B.barMaxWidth;We&&(F.maxWidth=We);var qe=B.barMinWidth;qe&&(F.minWidth=qe);var Xe=B.barGap;Xe!=null&&(n=Xe);var Ke=B.barCategoryGap;Ke!=null&&(i=Ke)}),i==null&&(i=je(35-a.length*4,15)+"%");var l=Bt(i,t),p=Bt(n,1),c=(o-l)/(r+(r-1)*p);c=je(c,0),z(a,function(B){var D=s[B],$=D.maxWidth,F=D.minWidth;if(D.width){var A=D.width;$&&(A=vt(A,$)),F&&(A=je(A,F)),D.width=A,o-=A+p*A,r--}else{var A=c;$&&$<A&&(A=vt($,o)),F&&F>A&&(A=F),A!==c&&(D.width=A,o-=A+p*A,r--)}}),c=(o-l)/(r+(r-1)*p),c=je(c,0);var d=0,h;z(a,function(B){var D=s[B];D.width||(D.width=c),h=D,d+=D.width*(1+p)}),h&&(d-=h.width*p);var C={},L=-d/2;return z(a,function(B){var D=s[B];C[B]=C[B]||{bandWidth:t,offset:L,width:D.width},L+=D.width*(1+p)}),C}function Ha(e,t,o,r,i){var n=e.getArea(),a=n.x,s=n.y,l=n.width,p=n.height,c=o.get(["lineStyle","width"])||0;a-=c/2,s-=c/2,l+=c,p+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new Xo({shape:{x:a,y:s,width:l,height:p}});if(t){var h=e.getBaseAxis(),C=h.isHorizontal(),L=h.inverse;C?(L&&(d.shape.x+=l),d.shape.width=0):(L||(d.shape.y+=p),d.shape.height=0);var B=Wo(i)?function(D){i(D,d)}:null;Vt(d,{shape:{width:l,height:p,x:a,y:s}},o,null,r,B)}return d}function za(e,t,o){var r=e.getArea(),i=Ge(r.r0,1),n=Ge(r.r,1),a=new ri({shape:{cx:Ge(e.cx,1),cy:Ge(e.cy,1),r0:i,r:n,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?a.shape.endAngle=r.startAngle:a.shape.r=i,Vt(a,{shape:{endAngle:r.endAngle,r:n}},o)}return a}function cn(e,t,o,r,i){if(e){if(e.type==="polar")return za(e,t,o);if(e.type==="cartesian2d")return Ha(e,t,o,r,i)}else return null;return null}function Ua(e,t){return t=t||[0,0],fe(["x","y"],function(o,r){var i=this.getAxis(o),n=t[r],a=e[r]/2;return i.type==="category"?ue(i).w:Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))},this)}function Jt(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(o){return e.dataToPoint(o)},size:ee(Ua,e)}}}var ja=0,pn=1,Ga=2;var Ya="view",vf=(function(e){Te(t,e);function t(o,r,i){var n=e.call(this)||this;n.type=Ya,n.dimensions=["x","y"];var a=n;a.invertY=o,a.lgCt=r,a.lgGeo=i;var s=a.trans=[];return s[ja]=ke(),s[pn]=ke(),s[Ga]=ke(),a.mtRaw=ne(),a.mtRawInv=ne(),a.mtOverall=ne(),a.mtOverallInv=ne(),a.zoom=1,n}return t.prototype.getBoundingRect=function(){return qa(null,this)},t.prototype.getViewRect=function(){return Xa(null,this)},t.prototype.getRoamTransform=function(){return jo(this.trans[pn])},t.prototype.dataToPoint=function(o,r,i){var n=r?this.mtRaw:this.mtOverall;return i=i||[],n?Ft(i,o,n):Ot(i,o)},t.prototype.pointToData=function(o,r,i){i=i||[];var n=this.mtOverallInv;return n?Ft(i,o,n):Ot(i,o)},t.prototype.convertToPixel=function(o,r,i){var n=dn(r);return n===this?n.dataToPoint(i):null},t.prototype.convertFromPixel=function(o,r,i){var n=dn(r);return n===this?n.pointToData(i):null},t.prototype.containPoint=function(o){var r=this;return mt(Et,r.dataRect),zo(Et,Et,r.mtOverall),Uo(Et,o[0],o[1])},t.dimensions=["x","y"],t})(Go),Et=Ue();function mn(e){return e.zoom}function qa(e,t){return mt(e||Ue(),t.dataRect)}function Xa(e,t){return mt(e||Ue(),t.viewRect)}var hf=ne();var gf=ne(),Cf=Ue();var yf=ne(),xf=ne();function dn(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var Sf=ke(),bf=ke();function Ka(e,t){return t=t||[0,0],fe([0,1],function(o){var r=t[o],i=e[o]/2,n=[],a=[];return n[o]=r-i,a[o]=r+i,n[1-o]=a[1-o]=t[1-o],Math.abs(this.dataToPoint(n)[o]-this.dataToPoint(a)[o])},this)}function er(e){var t=e.view,o=t.getBoundingRect();return{coordSys:{type:"geo",x:o.x,y:o.y,width:o.width,height:o.height,zoom:mn(t)},api:{coord:function(r){return e.dataToPoint(r)},size:ee(Ka,e)}}}function Za(e,t){var o=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return o.type==="category"?ue(o).w:Math.abs(o.dataToCoord(r-i)-o.dataToCoord(r+i))}function tr(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(o){return e.dataToPoint(o)},size:ee(Za,e)}}}function Qa(e,t){return t=t||[0,0],fe(["Radius","Angle"],function(o,r){var i="get"+o+"Axis",n=this[i](),a=t[r],s=e[r]/2,l=n.type==="category"?ue(n).w:Math.abs(n.dataToCoord(a-s)-n.dataToCoord(a+s));return o==="Angle"&&(l=l*Math.PI/180),l},this)}function rr(e){var t=e.getRadiusAxis(),o=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(i){var n=t.dataToRadius(i[0]),a=o.dataToAngle(i[1]),s=e.coordToPoint([n,a]);return s.push(n,a*Math.PI/180),s},size:ee(Qa,e)}}}function or(e){var t=e.getRect(),o=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:o.start,end:o.end,weeks:o.weeks,dayCount:o.allDay}},api:{coord:function(r,i){return e.dataToPoint(r,i)},layout:function(r,i){return e.dataToLayout(r,i)}}}}function ir(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(o,r){return e.dataToPoint(o,r)},layout:function(o,r){return e.dataToLayout(o,r)}}}}function vn(e,t,o,r){return e&&(e.legacy||e.legacy!==!1&&!o&&!r&&t!=="tspan"&&(t==="text"||m(e,"text")))}function hn(e,t,o){var r=e,i,n,a;if(t==="text")a=r;else{a={},m(r,"text")&&(a.text=r.text),m(r,"rich")&&(a.rich=r.rich),m(r,"textFill")&&(a.fill=r.textFill),m(r,"textStroke")&&(a.stroke=r.textStroke),m(r,"fontFamily")&&(a.fontFamily=r.fontFamily),m(r,"fontSize")&&(a.fontSize=r.fontSize),m(r,"fontStyle")&&(a.fontStyle=r.fontStyle),m(r,"fontWeight")&&(a.fontWeight=r.fontWeight),n={type:"text",style:a,silent:!0},i={};var s=m(r,"textPosition");o?i.position=s?r.textPosition:"inside":s&&(i.position=r.textPosition),m(r,"textPosition")&&(i.position=r.textPosition),m(r,"textOffset")&&(i.offset=r.textOffset),m(r,"textRotation")&&(i.rotation=r.textRotation),m(r,"textDistance")&&(i.distance=r.textDistance)}return fn(a,e),z(a.rich,function(l){fn(l,l)}),{textConfig:i,textContent:n}}function fn(e,t){t&&(t.font=t.textFont||t.font,m(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),m(t,"textAlign")&&(e.align=t.textAlign),m(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),m(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),m(t,"textWidth")&&(e.width=t.textWidth),m(t,"textHeight")&&(e.height=t.textHeight),m(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),m(t,"textPadding")&&(e.padding=t.textPadding),m(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),m(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),m(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),m(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),m(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),m(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),m(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function nr(e,t,o){var r=e;r.textPosition=r.textPosition||o.position||"inside",o.offset!=null&&(r.textOffset=o.offset),o.rotation!=null&&(r.textRotation=o.rotation),o.distance!=null&&(r.textDistance=o.distance);var i=r.textPosition.indexOf("inside")>=0,n=e.fill||Oe.color.neutral99;un(r,t);var a=r.textFill==null;return i?a&&(r.textFill=o.insideFill||Oe.color.neutral00,!r.textStroke&&o.insideStroke&&(r.textStroke=o.insideStroke),!r.textStroke&&(r.textStroke=n),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||o.outsideFill||Oe.color.neutral00),!r.textStroke&&o.outsideStroke&&(r.textStroke=o.outsideStroke)),r.text=t.text,r.rich=t.rich,z(t.rich,function(s){un(s,s)}),r}function un(e,t){t&&(m(t,"fill")&&(e.textFill=t.fill),m(t,"stroke")&&(e.textStroke=t.fill),m(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),m(t,"font")&&(e.font=t.font),m(t,"fontStyle")&&(e.fontStyle=t.fontStyle),m(t,"fontWeight")&&(e.fontWeight=t.fontWeight),m(t,"fontSize")&&(e.fontSize=t.fontSize),m(t,"fontFamily")&&(e.fontFamily=t.fontFamily),m(t,"align")&&(e.textAlign=t.align),m(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),m(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),m(t,"width")&&(e.textWidth=t.width),m(t,"height")&&(e.textHeight=t.height),m(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),m(t,"padding")&&(e.textPadding=t.padding),m(t,"borderColor")&&(e.textBorderColor=t.borderColor),m(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),m(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),m(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),m(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),m(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),m(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),m(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),m(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),m(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),m(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var yn={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},gn=Se(yn),jf=Fo(Ae,function(e,t){return e[t]=1,e},{}),Gf=Ae.join(", "),Ye=["","style","shape","extra"],Ve=Le();function sr(e,t,o,r,i){var n=e+"Animation",a=Ct(e,r,i)||{},s=Ve(t).userDuring;return a.duration>0&&(a.during=s?ee(is,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),ze(a,o[n]),a}function xn(e,t,o,r){r=r||{};var i=r.dataIndex,n=r.isInit,a=r.clearStyle,s=o.isAnimationEnabled(),l=Ve(e),p=t.style;l.userDuring=t.during;var c={},d={};if(as(e,t,d),e.type==="compound")for(var h=e.shape.paths,C=t.shape.paths,L=0;L<C.length;L++){var B=C[L];ar("shape",B,h[L])}else ar("shape",t,d),ar("extra",t,d);if(!n&&s&&(ns(e,t,c),Cn("shape",e,t,c),Cn("extra",e,t,c),ss(e,t,p,c)),d.style=p,es(e,d,a),rs(e,t),s)if(n){var D={};z(Ye,function(F){var A=F?t[F]:t;A&&A.enterFrom&&(F&&(D[F]=D[F]||{}),ze(F?D[F]:D,A.enterFrom))});var $=sr("enter",e,t,o,i);$.duration>0&&e.animateFrom(D,$)}else ts(e,t,i||0,o,c);Ja(e,t),p?e.dirty():e.markRedraw()}function Ja(e,t){for(var o=Ve(e).leaveToProps,r=0;r<Ye.length;r++){var i=Ye[r],n=i?t[i]:t;n&&n.leaveTo&&(o||(o=Ve(e).leaveToProps={}),i&&(o[i]=o[i]||{}),ze(i?o[i]:o,n.leaveTo))}}function Dt(e,t,o,r){if(e){var i=e.parent,n=Ve(e).leaveToProps;if(n){var a=sr("update",e,t,o,0);a.done=function(){i&&i.remove(e),r&&r()},e.animateTo(n,a)}else i&&i.remove(e),r&&r()}}function Be(e){return e==="all"}function es(e,t,o){var r=t.style;if(!e.isGroup&&r){if(o){e.useStyle({});for(var i=e.animators,n=0;n<i.length;n++){var a=i[n];a.targetName==="style"&&a.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function ts(e,t,o,r,i){if(i){var n=sr("update",e,t,r,o);n.duration>0&&e.animateFrom(i,n)}}function rs(e,t){m(t,"silent")&&(e.silent=t.silent),m(t,"ignore")&&(e.ignore=t.ignore),e instanceof ft&&m(t,"invisible")&&(e.invisible=t.invisible),e instanceof ut&&m(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var re={},os={setTransform:function(e,t){return re.el[e]=t,this},getTransform:function(e){return re.el[e]},setShape:function(e,t){var o=re.el,r=o.shape||(o.shape={});return r[e]=t,o.dirtyShape&&o.dirtyShape(),this},getShape:function(e){var t=re.el.shape;if(t)return t[e]},setStyle:function(e,t){var o=re.el,r=o.style;return r&&(r[e]=t,o.dirtyStyle&&o.dirtyStyle()),this},getStyle:function(e){var t=re.el.style;if(t)return t[e]},setExtra:function(e,t){var o=re.el.extra||(re.el.extra={});return o[e]=t,this},getExtra:function(e){var t=re.el.extra;if(t)return t[e]}};function is(){var e=this,t=e.el;if(t){var o=Ve(t).userDuring,r=e.userDuring;if(o!==r){e.el=e.userDuring=null;return}re.el=t,r(os)}}function Cn(e,t,o,r){var i=o[e];if(i){var n=t[e],a;if(n){var s=o.transition,l=i.transition;if(l)if(!a&&(a=r[e]={}),Be(l))ze(a,n);else for(var p=gt(l),c=0;c<p.length;c++){var d=p[c],h=n[d];a[d]=h}else if(Be(s)||xe(s,e)>=0){!a&&(a=r[e]={});for(var C=Se(n),c=0;c<C.length;c++){var d=C[c],h=n[d];cs(i[d],h)&&(a[d]=h)}}}}}function ar(e,t,o){var r=t[e];if(r)for(var i=o[e]={},n=Se(r),a=0;a<n.length;a++){var s=n[a];i[s]=Yo(r[s])}}function ns(e,t,o){for(var r=t.transition,i=Be(r)?Ae:gt(r||[]),n=0;n<i.length;n++){var a=i[n];if(!(a==="style"||a==="shape"||a==="extra")){var s=e[a];o[a]=s}}}function as(e,t,o){for(var r=0;r<gn.length;r++){var i=gn[r],n=yn[i],a=t[i];a&&(o[n[0]]=a[0],o[n[1]]=a[1])}for(var r=0;r<Ae.length;r++){var s=Ae[r];t[s]!=null&&(o[s]=t[s])}}function ss(e,t,o,r){if(o){var i=e.style,n;if(i){var a=o.transition,s=t.transition;if(a&&!Be(a)){var l=gt(a);!n&&(n=r.style={});for(var p=0;p<l.length;p++){var c=l[p],d=i[c];n[c]=d}}else if(e.getAnimationStyleProps&&(Be(s)||Be(a)||xe(s,"style")>=0)){var h=e.getAnimationStyleProps(),C=h?h.style:null;if(C){!n&&(n=r.style={});for(var L=Se(o),p=0;p<L.length;p++){var c=L[p];if(C[c]){var d=i[c];n[c]=d}}}}}}}function cs(e,t){return Oo(e)?e!==t:e!=null&&isFinite(e)}var Sn=Le(),ls=["percent","easing","shape","style","extra"];function bn(e){e.stopAnimation("keyframe"),e.attr(Sn(e))}function cr(e,t,o){if(!(!o.isAnimationEnabled()||!t)){if(Vo(t)){z(t,function(s){cr(e,s,o)});return}var r=t.keyframes,i=t.duration;if(o&&i==null){var n=Ct("enter",o,0);i=n&&n.duration}if(!(!r||!i)){var a=Sn(e);z(Ye,function(s){if(!(s&&!e[s])){var l,p=!1;r.sort(function(c,d){return c.percent-d.percent}),z(r,function(c){var d=e.animators,h=s?c[s]:c;if(h){var C=Se(h);if(s||(C=Bo(C,function(D){return xe(ls,D)<0})),!!C.length){l||(l=e.animate(s,t.loop,!0),l.scope="keyframe");for(var L=0;L<d.length;L++)d[L]!==l&&d[L].targetName===l.targetName&&d[L].stopTracks(C);s&&(a[s]=a[s]||{});var B=s?a[s]:a;z(C,function(D){B[D]=((s?e[s]:e)||{})[D]}),l.whenWithKeys(i*c.percent,h,C,c.easing)}}}),l&&l.delay(t.delay||0).duration(i).start(t.easing)}})}}}var ae="emphasis",ge="normal",ur="blur",vr="select",Ce=[ge,ae,ur,vr],lr={normal:["itemStyle"],emphasis:[ae,"itemStyle"],blur:[ur,"itemStyle"],select:[vr,"itemStyle"]},pr={normal:["label"],emphasis:[ae,"label"],blur:[ur,"label"],select:[vr,"label"]},ps=["x","y"],ds="e\0\0",K={normal:{},emphasis:{},blur:{},select:{}},ms={cartesian2d:Jt,geo:er,single:tr,polar:rr,calendar:or,matrix:ir};function mr(e){return e instanceof ut}function fr(e){return e instanceof ft}function fs(e,t){t.copyTransform(e),fr(t)&&fr(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,mr(t)&&mr(e)&&t.setShape(e.shape))}var us=(function(e){Te(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.type=t.type,o}return t.prototype.render=function(o,r,i,n){this._progressiveEls=null;var a=this._data,s=o.getData(),l=this.group,p=wn(o,s,r,i);a||l.removeAll(),s.diff(a).add(function(d){dr(i,null,d,p(d,n),o,l,s)}).remove(function(d){var h=a.getItemGraphicEl(d);h&&Dt(h,te(h).option,o)}).update(function(d,h){var C=a.getItemGraphicEl(h);dr(i,C,d,p(d,n),o,l,s)}).execute();var c=o.get("clip",!0)?cn(o.coordinateSystem,!1,o):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(o,r,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(o,r,i,n,a){var s=r.getData(),l=wn(r,s,i,n),p=this._progressiveEls=[];function c(C){C.isGroup||(C.incremental=Qo(r),C.ensureState("emphasis").hoverLayer=ii)}for(var d=o.start;d<o.end;d++){var h=dr(null,null,d,l(d,a),r,this.group,s);h&&(h.traverse(c),p.push(h))}},t.prototype.eachRendered=function(o){ni(this._progressiveEls||this.group,o)},t.prototype.filterForExposedEvent=function(o,r,i,n){var a=r.element;if(a==null||i.name===a)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===a)return!0;return!1},t.type="custom",t})(pi),Rn=us;function hr(e){var t=e.type,o;if(t==="path"){var r=e.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,n=Tn(r);o=It(n,null,i,r.layout||"center"),te(o).customPathData=n}else if(t==="image")o=new qo({}),te(o).customImagePath=e.style.image;else if(t==="text")o=new Ko({});else if(t==="group")o=new ti;else if(t==="compoundPath"){var r=e.shape;if(!r||!r.paths){var a="";ht(a)}var s=fe(r.paths,function(c){if(c.type==="path")return It(c.shape.pathData,c,null);var d=Wt(c.type);if(!d){var h="";ht(h)}return new d});o=new oi({shape:{paths:s}})}else{var l=Wt(t);if(!l){var a="";ht(a)}o=new l}return te(o).customGraphicType=t,o.name=e.name,o.z2EmphasisLift=1,o.z2SelectLift=1,o}function gr(e,t,o,r,i,n,a){bn(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=ps);var l=r&&r.style;if(l){if(t.type==="text"){var p=l;m(p,"textFill")&&(p.fill=p.textFill),m(p,"textStroke")&&(p.stroke=p.textStroke)}var c=void 0,d=mr(t)?l.decal:null;e&&d&&(d.dirty=!0,c=fi(d,e)),l.__decalPattern=c}if(fr(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}xn(t,r,n,{dataIndex:o,isInit:a,clearStyle:!0}),cr(t,r.keyframeAnimation,n)}function _n(e,t,o,r,i){var n=t.isGroup?null:t,a=i&&i[e].cfg;if(n){var s=n.ensureState(e);if(r===!1){var l=n.getState(e);l&&(l.style=null)}else s.style=r||null;a&&(s.textConfig=a),Jo(n)}}function vs(e,t,o){if(!e.isGroup){var r=e,i=o.currentZ,n=o.currentZLevel;r.z=i,r.zlevel=n;var a=t.z2;a!=null&&(r.z2=a||0);for(var s=0;s<Ce.length;s++)hs(r,t,Ce[s])}}function hs(e,t,o){var r=o===ge,i=r?t:Mt(t,o),n=i?i.z2:null,a;n!=null&&(a=r?e:e.ensureState(o),a.z2=n||0)}function wn(e,t,o,r){var i=e.get("renderItem");if(typeof i=="string"){var n=mi(i);n&&(i=n)}var a=e.coordinateSystem,s={};a&&(s=a.prepareCustoms?a.prepareCustoms(a):ms[a.type](a));for(var l=Ne({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:qe,style:Ke,ordinalRawValue:Xe,styleEmphasis:Nn,visual:kn,barLayout:An,currentSeriesIndices:Ln,font:On},s.api||{}),p={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:gs(e.getData()),itemPayload:e.get("itemPayload")||{}},c,d,h={},C={},L={},B={},D=0;D<Ce.length;D++){var $=Ce[D];L[$]=e.getModel(lr[$]),B[$]=e.getModel(pr[$])}function F(v){return v===c?d||(d=t.getItemModel(v)):t.getItemModel(v)}function A(v,u){return t.hasItemOption?v===c?h[u]||(h[u]=F(v).getModel(lr[u])):F(v).getModel(lr[u]):L[u]}function We(v,u){return t.hasItemOption?v===c?C[u]||(C[u]=F(v).getModel(pr[u])):F(v).getModel(pr[u]):B[u]}return function(v,u){return c=v,d=null,h={},C={},i&&i(Ne({dataIndexInside:v,dataIndex:t.getRawIndex(v),actionType:u?u.type:null},p),l)};function qe(v,u){return u==null&&(u=c),t.getStore().get(t.getDimensionIndex(v||0),u)}function Xe(v,u){u==null&&(u=c),v=v||0;var V=t.getDimensionInfo(v);if(!V){var Z=t.getDimensionIndex(v);return Z>=0?t.getStore().get(Z,u):void 0}var se=t.get(V.name,u),Y=V&&V.ordinalMeta;return Y?Y.categories[se]:se}function Ke(v,u){u==null&&(u=c);var V=t.getItemVisual(u,"style"),Z=V&&V.fill,se=V&&V.opacity,Y=A(u,ge).getItemStyle();Z!=null&&(Y.fill=Z),se!=null&&(Y.opacity=se);var br={inheritColor:Io(Z)?Z:Oe.color.neutral99},Rt=We(u,ge),wr=$t(Rt,null,br,!1,!0);wr.text=Rt.getShallow("show")?$o(e.getFormattedLabel(u,ge),Qt(t,u)):null;var Fn=Ht(Rt,br,!1);return Sr(v,Y),Y=nr(Y,wr,Fn),v&&xr(Y,v),Y.legacy=!0,Y}function Nn(v,u){u==null&&(u=c);var V=A(u,ae).getItemStyle(),Z=We(u,ae),se=$t(Z,null,null,!0,!0);se.text=Z.getShallow("show")?Ho(e.getFormattedLabel(u,ae),e.getFormattedLabel(u,ge),Qt(t,u)):null;var Y=Ht(Z,null,!0);return Sr(v,V),V=nr(V,se,Y),v&&xr(V,v),V.legacy=!0,V}function xr(v,u){for(var V in u)m(u,V)&&(v[V]=u[V])}function Sr(v,u){v&&(v.textFill&&(u.textFill=v.textFill),v.textPosition&&(u.textPosition=v.textPosition))}function kn(v,u){if(u==null&&(u=c),m(Zt,v)){var V=t.getItemVisual(u,"style");return V?V[Zt[v]]:null}if(m(on,v))return t.getItemVisual(u,v)}function An(v){if(a.type==="cartesian2d"){var u=a.getBaseAxis();return sn(Ne({axis:u},v))}}function Ln(){return o.getCurrentSeriesIndices()}function On(v){return ai(v,o)}}function gs(e){var t={};return z(e.dimensions,function(o){var r=e.getDimensionInfo(o);if(!r.isExtraCoord){var i=r.coordDim,n=t[i]=t[i]||[];n[r.coordDimIndex]=e.getDimensionIndex(o)}}),t}function dr(e,t,o,r,i,n,a){if(!r){n.remove(t);return}var s=Cr(e,t,o,r,i,n);return s&&a.setItemGraphicEl(o,s),s&&ei(s,r.focus,r.blurScope,r.emphasisDisabled),s}function Cr(e,t,o,r,i,n){var a=-1,s=t;t&&Pn(t,r,i)&&(a=xe(n.childrenRef(),t),t=null);var l=!t,p=t;p?p.clearStates():(p=hr(r),s&&fs(s,p)),r.morph===!1?p.disableMorphing=!0:p.disableMorphing&&(p.disableMorphing=!1),r.tooltipDisabled&&(p.tooltipDisabled=!0),K.normal.cfg=K.normal.conOpt=K.emphasis.cfg=K.emphasis.conOpt=K.blur.cfg=K.blur.conOpt=K.select.cfg=K.select.conOpt=null,K.isLegacy=!1,ys(p,o,r,i,l,K),Cs(p,o,r,i,l),gr(e,p,o,r,K,i,l),m(r,"info")&&(te(p).info=r.info);for(var c=0;c<Ce.length;c++){var d=Ce[c];if(d!==ge){var h=Mt(r,d),C=yr(r,h,d);_n(d,p,h,C,K)}}return vs(p,r,i),r.type==="group"&&xs(e,p,o,r,i),a>=0?n.replaceAt(p,a):n.add(p),p}function Pn(e,t,o){var r=te(e),i=t.type,n=t.shape,a=t.style;return o.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&Es(n)&&Tn(n)!==r.customPathData||i==="image"&&m(a,"image")&&a.image!==r.customImagePath}function Cs(e,t,o,r,i){var n=o.clipPath;if(n===!1)e&&e.getClipPath()&&e.removeClipPath();else if(n){var a=e.getClipPath();a&&Pn(a,n,r)&&(a=null),a||(a=hr(n),e.setClipPath(a)),gr(null,a,t,n,null,r,i)}}function ys(e,t,o,r,i,n){if(!(e.isGroup||e.type==="compoundPath")){En(o,null,n),En(o,ae,n);var a=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,p=n.select.conOpt;if(a!=null||s!=null||p!=null||l!=null){var c=e.getTextContent();if(a===!1)c&&e.removeTextContent();else{a=n.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=hr(a),e.setTextContent(c)),gr(null,c,t,a,null,r,i);for(var d=a&&a.style,h=0;h<Ce.length;h++){var C=Ce[h];if(C!==ge){var L=n[C].conOpt;_n(C,c,L,yr(a,L,C),null)}}d?c.dirty():c.markRedraw()}}}}function En(e,t,o){var r=t?Mt(e,t):e,i=t?yr(e,r,ae):e.style,n=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?Mt(s,t):s:null;if(i&&(o.isLegacy||vn(i,n,!!a,!!l))){o.isLegacy=!0;var p=hn(i,n,!t);!a&&p.textConfig&&(a=p.textConfig),!l&&p.textContent&&(l=p.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?o[t]:o.normal;d.cfg=a,d.conOpt=l}function Mt(e,t){return t?e?e[t]:null:e}function yr(e,t,o){var r=t&&t.style;return r==null&&o===ae&&e&&(r=e.styleEmphasis),r}function xs(e,t,o,r,i){var n=r.children,a=n?n.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,p=s===!1;if(!(!a&&!l&&!p)){if(l){bs({api:e,oldChildren:t.children()||[],newChildren:n||[],dataIndex:o,seriesModel:i,group:t});return}p&&t.removeAll();for(var c=0;c<a;c++){var d=n[c],h=t.childAt(c);d?(d.ignore==null&&(d.ignore=!1),Cr(e,h,o,d,i,t)):h.ignore=!0}for(var C=t.childCount()-1;C>=c;C--){var L=t.childAt(C);Ss(t,L,i)}}}function Ss(e,t,o){t&&Dt(t,te(e).option,o)}function bs(e){new si(e.oldChildren,e.newChildren,Dn,Dn,e).add(Mn).update(Mn).remove(ws).execute()}function Dn(e,t){var o=e&&e.name;return o??ds+t}function Mn(e,t){var o=this.context,r=e!=null?o.newChildren[e]:null,i=t!=null?o.oldChildren[t]:null;Cr(o.api,i,o.dataIndex,r,o.seriesModel,o.group)}function ws(e){var t=this.context,o=t.oldChildren[e];o&&Dt(o,te(o).option,t.seriesModel)}function Tn(e){return e&&(e.pathData||e.d)}function Es(e){return e&&(m(e,"pathData")||m(e,"d"))}function Ds(e){e.registerChartView(Rn),e.registerSeriesModel(nn)}export{Vi as a,hd as b,be as c,Ca as d,qt as e,_i as f,Ra as g,Xt as h,Kt as i,_a as j,Pa as k,Ta as l,wt as m,Va as n,Fa as o,Ba as p,Ds as q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as s,Db as c,f as o}from"./chunk-Z4T4NBH3.js";var d=(()=>{class e{constructor(){this.selectedNodePathSubject=new o(null),this.selectedNodePath$=this.selectedNodePathSubject.asObservable(),this.selectedNodePath=c(this.selectedNodePath$,{requireSync:!0})}select(r){this.selectedNodePathSubject.next(r)}clear(){this.selectedNodePathSubject.next(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function u(e,t){return e===t||e.startsWith(`${t}/`)}export{u as a,d as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as vn,h as On,i as An,j as Fn,k as kn,l as Bn,o as Ye,p as Ke,q as jn}from"./chunk-5CE7PKV4.js";import{A as N,Bf as ze,Bj as Mn,C as de,Cf as Kt,Cg as en,Cj as Pn,D as p,Db as m,Dc as Ot,Dg as tn,Di as mn,Dj as In,Dl as Un,E as M,Ea as Lt,Eb as z,Ec as At,Ef as Jt,F as P,Fa as Mt,Fb as Y,Fj as Nn,G as Se,Ga as be,Gi as fn,Gj as Rn,Gl as Xn,H as xe,Ha as Pt,Hh as dn,Hl as zn,Ia as ce,Ii as gn,Ij as Hn,Il as Yn,Ja as we,Jh as cn,Jj as Wn,Jl as Kn,K as Z,Ka as S,Kf as Zt,Kh as re,Kj as Gn,Kl as Jn,L as oe,La as R,Lf as Qt,Lj as Vn,Ma as Ce,Nd as te,Nh as hn,Oh as ln,Pd as Bt,Rc as Ft,T as c,Td as Ht,Tj as $n,Tl as Zn,Ua as De,Ud as Wt,Uj as qn,Ul as Qn,Vd as Gt,Vj as Je,Vl as Ze,Wb as Nt,Wl as le,Xl as eo,Y as x,a as u,aa as _e,ab as y,b as g,ba as bt,bb as he,bc as Te,cj as yn,db as A,eb as D,ee as Vt,eh as K,fa as O,ff as Le,fh as nn,ga as Q,gb as It,gf as Me,ha as ee,hf as qt,hh as on,hj as Sn,if as ie,ih as rn,ij as xn,ja as X,jf as Ut,jh as sn,ka as j,kf as je,kh as an,la as v,lf as Pe,ma as l,md as kt,mf as Xt,na as h,nj as _n,oa as _,of as jt,oj as En,pa as k,qa as W,qe as $t,ra as Ee,sj as bn,ta as B,tj as wn,ua as wt,uf as zt,va as w,vg as Ie,vj as Cn,wa as Ct,wf as Yt,wj as Dn,xa as C,xi as pn,xj as Tn,ya as Dt,yi as un,za as Tt,zc as Rt,zj as Ln}from"./chunk-Z4T4NBH3.js";function J(e,n,t){let o=e.get(n);o?o.push(t):e.set(n,[t])}function pe(e){return e.reduce((n,t)=>Math.min(n,t),Number.POSITIVE_INFINITY)}function ne(e){return e.reduce((n,t)=>Math.max(n,t),Number.NEGATIVE_INFINITY)}var G={x:0,y:0,rotation:0};function se(e){return g(u({type:"group"},G),{emphasisDisabled:!0,children:e})}function to(e,n){return g(u({},e),{children:e.children.map(t=>g(u({},t),{z2:n}))})}var oo="#1f2937",io="#1b9cfc",ro="#1f2937",no=["#f4f6f9","#e9edf2","#dfe5ec","#d5dce5"],so="#b8c2cf",ao="#dbe7f5",co="#7a9cc6",ho="#ffffff",lo="#9aa5b4",Qe="#c3cbd6",po={regular:"#8c96a3",cyclic:"#2563eb",feedbackContainerLevel:"#dc2626",feedbackLeafLevel:"#dc2626"},Ei=[5,4],Ne={regular:"Dependency",cyclic:"In a cycle",feedbackContainerLevel:"Points upward",feedbackLeafLevel:"Points upward and closes a cycle"},V=Object.keys(Ne).map(e=>({type:e,label:Ne[e],color:po[e],isDashed:e==="feedbackContainerLevel"})),uo=.12,mo=.3,fo=1,bi=.65,wi=[1,3,5],Ci=2,Di=16;function go(e){let[n,t,o]=wi.map(i=>Number.parseInt(e.slice(i,i+Ci),Di));return`rgba(${n}, ${t}, ${o}, ${bi})`}function yo(e){return no[Math.min(e,no.length-1)]}function vo(e){return po[e]}function So(e){return V.find(n=>n.type===e).isDashed?Ei:null}function nt(e){let n=t=>g(u({},t),{levelPath:t.levelPath.slice(-1)});return g(u({},e),{boxes:e.boxes.map(n),bands:e.bands.map(n)})}function Re(e){return e.join(".")}var E={nodeWidth:160,nodeHeight:40,padding:12,headerHeight:28,gapBetweenNodes:20,gapBetweenRows:14,gapBetweenLevels:36},_o=16/10,Ti=6;function ot(e,n,t=[]){let o=new et(n),i=o.sizeOf(e),r={boxes:[],bands:[],width:i.width,height:i.height};return new tt(o,r,new Map([[e.path,t]])).place(e,0,0,0),r}var et=class{constructor(n){this.expandedPaths=n,this.plans=new Map}isOpen(n){return n.isFolder&&this.expandedPaths.has(n.path)}sizeOf(n){return this.isOpen(n)?this.planOf(n):{width:E.nodeWidth,height:E.nodeHeight}}planOf(n){let t=this.plans.get(n.path);return t||(t=this.planFolder(n),this.plans.set(n.path,t)),t}planFolder(n){let t=Li(n.children),o=Mi(t,r=>this.sizeOf(r).width);return Ni(o,r=>this.packRows(t,r))}packRows(n,t){let o=n.flatMap(s=>this.wrapLevel(s,t)),i=ne(o.map(s=>s.width)),r=o.reduce((s,a,d)=>s+a.height+(d===0?0:bo(a,o[d-1])),0);return{rows:o,innerWidth:i,width:i+2*E.padding,height:E.headerHeight+r+2*E.padding}}wrapLevel(n,t){let o=[],i=null;for(let r of n){let s=this.sizeOf(r),a=i?i.width+E.gapBetweenNodes+s.width:s.width;i&&a<=t?(i.nodes.push(r),i.width=a,i.height=Math.max(i.height,s.height)):(i={level:r.level,nodes:[r],width:s.width,height:s.height},o.push(i))}return o}};function Li(e){let n=new Map;for(let t of e)J(n,t.level,t);return[...n.entries()].sort(([t],[o])=>o-t).map(([,t])=>t.toSorted((o,i)=>o.name.localeCompare(i.name)))}function Mi(e,n){let t=e.map(a=>Pi(a.map(n))),o=ne(t.map(a=>a.at(-1))),i=ne(e.flat().map(n)),r=Math.max(i,Math.min(Ii(Ti),o));return[...new Set([r,...t.flat().filter(a=>a>r)])].sort((a,d)=>a-d)}function Pi(e){let n=-E.gapBetweenNodes;return e.map(t=>n+=E.gapBetweenNodes+t)}function Ii(e){return e*E.nodeWidth+(e-1)*E.gapBetweenNodes}function Ni(e,n){let t=Ri(a=>n(e[a])),o=0,i=e.length-1;for(;o<i;){let a=Math.floor((o+i)/2);Eo(t(a))<_o?o=a+1:i=a}let r=t(o);if(o===0)return r;let s=t(o-1);return xo(s)<xo(r)?s:r}function Ri(e){let n=new Map;return t=>(n.has(t)||n.set(t,e(t)),n.get(t))}function Eo({width:e,height:n}){return e/n}function xo(e){return Math.abs(Math.log(Eo(e)/_o))}function bo(e,n){return e.level===n.level?E.gapBetweenRows:E.gapBetweenLevels}var tt=class{constructor(n,t,o){this.measurer=n,this.layout=t,this.levelPaths=o}place(n,t,o,i){let r=this.measurer.isOpen(n),s=this.measurer.sizeOf(n);this.layout.boxes.push(u({path:n.path,name:n.name,isFolder:n.isFolder,isExpanded:r,level:n.level,levelPath:this.levelPaths.get(n.path),depth:i,x:t,y:o},s)),r&&this.placeRows(n,t,o+E.headerHeight+E.padding,i+1)}placeRows(n,t,o,i){let{rows:r,innerWidth:s,width:a}=this.measurer.planOf(n),d=o,f;r.forEach((b,F)=>{let H=r[F-1];H&&(d+=bo(b,H)),H?.level!==b.level&&(f=this.startBand(n,b.level,{x:t,y:d,width:a,height:0}),f.isTopmost=!H,this.layout.bands.push(f)),f.height=d+b.height-f.y;let ae=t+E.padding+(s-b.width)/2;for(let ve of b.nodes)f.memberPaths.push(ve.path),this.levelPaths.set(ve.path,f.levelPath),this.place(ve,ae,d,i),ae+=this.measurer.sizeOf(ve).width+E.gapBetweenNodes;d+=b.height})}startBand(n,t,o){let i=[...this.levelPaths.get(n.path),t];return u({folderPath:n.path,level:t,levelPath:i,isTopmost:!1,memberPaths:[]},o)}};function $(e,n){return e===n||e.startsWith(`${n}/`)}var Oi={x:0,y:0,width:0,height:0};function it(e,n){return e.x<n.x+n.width&&n.x<e.x+e.width&&e.y<n.y+n.height&&n.y<e.y+e.height}function q(e){if(e.length===0)return Oi;let n=pe(e.map(r=>r.x)),t=pe(e.map(r=>r.y)),o=ne(e.map(r=>r.x+r.width)),i=ne(e.map(r=>r.y+r.height));return{x:n,y:t,width:o-n,height:i-t}}var Ai=1,Oe=class{constructor(n,t){this.rectangleOf=t;let o=q(n.map(t)),i=Math.max(1,Math.ceil(Math.sqrt(n.length)));this.columns=wo(o.x,o.width,i),this.rows=wo(o.y,o.height,i),this.cells=Array.from({length:i*i},()=>[]);for(let r of n)this.forEachCellUnder(t(r),s=>s.push(r))}itemsNear(n){let t=new Set;return this.forEachCellUnder(n,o=>{for(let i of o)t.add(i)}),[...t]}forEachCellUnder(n,t){let[o,i]=Co(this.columns,n.x,n.x+n.width),[r,s]=Co(this.rows,n.y,n.y+n.height);for(let a=r;a<=s;a++)for(let d=o;d<=i;d++)t(this.cells[a*this.columns.cellCount+d])}};function wo(e,n,t){return{origin:e,cellSize:n/t||Ai,cellCount:t}}function Co(e,n,t){return[Do(e,n),Do(e,t)]}function Do({origin:e,cellSize:n,cellCount:t},o){let i=Math.floor((o-e)/n);return Math.min(t-1,Math.max(0,i))}var Lo={seeThroughPaths:new Set,bandCutouts:new Map},To={width:48,height:12};function Mo(e){let n=e.flatMap((o,i)=>o.kind==="box"?[{box:o.box,paintIndex:i}]:[]),t=new Oe(n,({box:o})=>o);return{seeThroughPaths:Fi(n,t),bandCutouts:Bi(e,t)}}function ue(e){return{left:e.x+E.padding,right:e.x+e.width-E.padding,y:e.y-E.gapBetweenLevels/2}}function Fi(e,n){let t=new Set;for(let o of e)o.box.isFolder&&n.itemsNear(o.box).some(i=>ki(o,i))&&t.add(o.box.path);return t}function ki(e,n){return n.paintIndex<e.paintIndex&&Gi(e.box,n.box)&&it(e.box,n.box)}function Bi(e,n){let t=new Map;return e.forEach((o,i)=>{if(o.kind!=="band")return;let r=Wi(o.band,Hi(o.band,i,n));(r.hiddenSpans.length>0||r.isLabelHidden)&&t.set(o.band,r)}),t}function Hi(e,n,t){let o=ue(e),i={x:o.left,y:o.y,width:o.right-o.left,height:0};return t.itemsNear(q([i,Po(e)])).filter(({box:r,paintIndex:s})=>s>n&&!$(r.path,e.folderPath)).sort((r,s)=>r.paintIndex-s.paintIndex).map(({box:r})=>r)}function Wi(e,n){let{left:t,right:o,y:i}=ue(e),r=e.isTopmost?[]:n.filter(a=>a.y<=i&&i<=a.y+a.height&&a.x<o&&a.x+a.width>t).map(a=>[Math.max(t,a.x),Math.min(o,a.x+a.width)]),s=Po(e);return{hiddenSpans:r,isLabelHidden:n.some(a=>it(a,s))}}function Po(e){return u({x:ue(e).left,y:e.y-To.height},To)}function Gi(e,n){return!$(e.path,n.path)&&!$(n.path,e.path)}var Vi={hiddenSpans:[],isLabelHidden:!1},$i=12,qi=10,Io=8,Ui=36,Xi=4,Ae=1,ji=2.5,zi=2,Yi=2,Ki=[4,4];function No(e,{emphasis:n,isSeeThrough:t,isMissedBySearch:o},i){let r=Fo(e,i),s=er(e,n),a=t?go(s.fill):s.fill,d=Oo(o),f=[g(u({type:"rect"},G),{shape:g(u({},r),{r:Xi}),style:g(u({},s),{fill:a,opacity:d})})],b=e.isExpanded?null:ko(e,r,d);return b&&f.push(b),se(f)}function Ro(e,{isMissedBySearch:n},t){let o=ko(e,Fo(e,t),Oo(n));return se(o?[o]:[])}function Oo(e){return e?mo:fo}function Ao(e,n,t=Vi){let o=ue(e),i=t.isLabelHidden?[]:[Ji(e,o,n)],r=e.isTopmost?[]:Zi(o,t.hiddenSpans,n);return se([...i,...r])}function Ji(e,{left:n},t){let[o,i]=t([n,e.y]);return g(u({type:"text"},G),{silent:!0,style:{text:`level ${Re(e.levelPath)}`,x:o,y:i-Yi,align:"left",verticalAlign:"bottom",fontSize:qi,fill:Qe}})}function Zi({left:e,right:n,y:t},o,i){return Qi([e,n],o).map(([r,s])=>{let[a,d]=i([r,t]),[f]=i([s,t]);return g(u({type:"line"},G),{silent:!0,shape:{x1:a,y1:d,x2:f,y2:d},style:{stroke:Qe,lineWidth:Ae,lineDash:Ki}})})}function Qi([e,n],t){let o=[],i=e;for(let[r,s]of[...t].sort(([a],[d])=>a-d))r>i&&o.push([i,Math.min(r,n)]),i=Math.max(i,s);return i<n&&o.push([i,n]),o}function Fo(e,n){let[t,o]=n([e.x,e.y]),[i,r]=n([e.x+e.width,e.y+e.height]);return{x:t,y:o,width:i-t,height:r-o}}function er(e,n){let t=tr(e);return n==="selected"?g(u({},t),{stroke:io,lineWidth:ji}):n==="hovered"?g(u({},t),{stroke:ro,lineWidth:zi}):t}function tr(e){return e.isFolder?e.isExpanded?{fill:yo(e.depth),stroke:so,lineWidth:Ae}:{fill:ao,stroke:co,lineWidth:Ae}:{fill:ho,stroke:lo,lineWidth:Ae}}function ko(e,n,t){let o=n.width-2*Io;if(o<Ui)return null;let i=e.isExpanded;return g(u({type:"text"},G),{silent:!0,style:{text:e.name,x:i?n.x+Io:n.x+n.width/2,y:i?n.y+nr(e,n)/2:n.y+n.height/2,width:o,overflow:"truncate",align:i?"left":"center",verticalAlign:"middle",fontSize:$i,fontWeight:e.isFolder?"bold":"normal",fill:oo,opacity:t}})}function nr(e,n){return n.height*E.headerHeight/e.height}var or=8,ir=4,rr=3,sr=1.5,ar=24,dr=40,cr=.35,hr=14,Bo={start:1/3,end:2/3},lr=0,pr={top:[0,-1],bottom:[0,1],left:[-1,0],right:[1,0]};function $o(e,n,{isDimmed:t,widthPx:o},i){let r=ur(n,Vo(i(n.start)),Vo(i(n.end))),s=vo(e.type),a=t?uo:1;return se([g(u({type:"bezierCurve"},G),{shape:{x1:r.start[0],y1:r.start[1],cpx1:r.startPull[0],cpy1:r.startPull[1],cpx2:r.endPull[0],cpy2:r.endPull[1],x2:r.end[0],y2:r.end[1]},style:{stroke:s,lineWidth:o,lineDash:So(e.type),fill:null,opacity:a}}),g(u({type:"polygon"},G),{shape:{points:fr(r,o)},style:{fill:s,opacity:a}})])}function ur(e,n,t){switch(e.bend){case"straight":return Ho(n,t,lr);case"arc":return Ho(n,t,hr);case"aside":{let o=Math.max(n[0],t[0])+Math.max(dr,Math.abs(t[1]-n[1])*cr);return{start:n,startPull:[o,n[1]],endPull:[o,t[1]],end:t}}default:return mr(e,n,t)}}function Ho(e,n,t){return{start:e,startPull:Go(e,n,Bo.start,t),endPull:Go(e,n,Bo.end,t),end:n}}function mr({startSide:e,endSide:n},t,o){let r=Math.abs(e==="top"||e==="bottom"?o[1]-t[1]:o[0]-t[0]),s=Math.max(r/2,ar);return{start:t,startPull:Wo(t,e,s),endPull:Wo(o,n,s),end:o}}function Wo(e,n,t){let[o,i]=pr[n];return[e[0]+o*t,e[1]+i*t]}function Go(e,n,t,o){let i=n[0]-e[0],r=n[1]-e[1],s=Math.hypot(i,r)||1;return[e[0]+i*t+r/s*o,e[1]+r*t-i/s*o]}function Vo(e){return[e[0],e[1]]}function fr({endPull:e,end:n},t){let o=Math.max(or,t*rr),i=Math.max(ir,t*sr),r=Math.atan2(n[1]-e[1],n[0]-e[0]),s=n[0]-Math.cos(r)*o,a=n[1]-Math.sin(r)*o,d=Math.sin(r)*i,f=-Math.cos(r)*i;return[n,[s+d,a+f],[s-d,a-f]]}function me(e,n){return n!==null&&$(e.fromPath,n)!==$(e.toPath,n)}function qo(e){return new Map(e.boxes.map(n=>[n.path,n]))}function Uo(e){if(e===null)return()=>!0;let n=new Set;for(let t of e)for(let o=t;o!==""&&!n.has(o);o=rt(o))n.add(o);return t=>n.has(t)||gr(t).some(o=>e.has(o))}function rt(e){return e.slice(0,Math.max(e.lastIndexOf("/"),0))}function gr(e){let n=[];for(let t=rt(e);t!=="";t=rt(t))n.push(t);return n}var Fe="graph";function jo(e,n,t){return({dataIndex:o})=>{let i=e[o];switch(i?.kind){case"box":return yr(i.box);case"edge":return vr(i.edge,n,t);default:return""}}}function yr(e){let n=[`<b>${le(e.path)}</b>`];return e.levelPath.length>0&&n.push(`Level ${Re(e.levelPath)}`),e.isFolder&&n.push(`<i>Double-click to ${e.isExpanded?"close":"open"}</i>`),n.join("<br/>")}function vr(e,n,t){let o=n.get(e.fromPath).name,i=n.get(e.toPath).name,r=`<b>${le(o)} \u2192 ${le(i)}</b>`;if(!ie(t))return[r,`${le(t??"")} ${Sr(e.weight)}`].join("<br/>");let s=`${e.weight} ${e.weight===1?"dependency":"dependencies"}`;return[r,`${s} \xB7 ${Ne[e.type]}`].join("<br/>")}var Xo=1e3;function Sr(e){return Math.round(e*Xo)/Xo}var xr={bottom:"high",top:"low",right:"low",left:"high"},_r={low:.42,high:.58},zo=.1,Er=.5;function Jo(e,n,t,o=!1){let i=e.map(d=>wr(n.get(d.fromPath),n.get(d.toPath),t)),r=o&&Me(t),s=br({edges:e,sides:i,byPath:n},t,r),a=new Set(e.map(d=>d.id));return e.map((d,f)=>{let{startSide:b,endSide:F}=i[f],H=a.has(`${d.toPath}|${d.fromPath}`),ae=Cr(t,i[f],H);return{start:Ko(n.get(d.fromPath),b,s(f,"start")),startSide:b,end:Ko(n.get(d.toPath),F,s(f,"end")),endSide:F,bend:r&&H&&ae!=="aside"?"arc":ae}})}function br(e,n,t){return t?()=>Er:n==="curved"?o=>_r[Zo(e.sides[o])]:Dr(e)}function wr(e,n,t){return n.y>=e.y+e.height?{startSide:"bottom",endSide:"top"}:n.y+n.height<=e.y?t==="upwardAside"?{startSide:"right",endSide:"right"}:{startSide:"top",endSide:"bottom"}:n.x>=e.x+e.width?{startSide:"right",endSide:"left"}:{startSide:"left",endSide:"right"}}function Cr(e,{startSide:n,endSide:t},o){return e==="straight"?o?"arc":"straight":e==="upwardAside"&&n==="right"&&t==="right"?"aside":"sCurve"}function Zo({startSide:e}){return xr[e]}function Dr(e){let n=Tr(e),t=new Map;for(let o of n.values())o.sort((i,r)=>i.along-r.along||Yo(i.lane)-Yo(r.lane)||i.id.localeCompare(r.id)),o.forEach(({key:i},r)=>t.set(i,zo+(1-2*zo)*(r+1)/(o.length+1)));return(o,i)=>t.get(`${o}|${i}`)}function Tr({edges:e,sides:n,byPath:t}){let o=new Map;return e.forEach((i,r)=>{let s=[[i.fromPath,n[r].startSide,i.toPath,"start"],[i.toPath,n[r].endSide,i.fromPath,"end"]];for(let[a,d,f,b]of s){let F=Lr(d,t.get(f));J(o,`${a}|${d}`,{key:`${r}|${b}`,along:F,lane:Zo(n[r]),id:i.id})}}),o}function Yo(e){return e==="low"?0:1}function Lr(e,n){return e==="top"||e==="bottom"?n.x+n.width/2:n.y+n.height/2}function Ko(e,n,t){switch(n){case"top":return[e.x+e.width*t,e.y];case"bottom":return[e.x+e.width*t,e.y+e.height];case"left":return[e.x,e.y+e.height*t];default:return[e.x+e.width,e.y+e.height*t]}}var Mr={perDoublingPx:.5,maxExtraPx:2.5},Pr={perDoublingPx:1,maxExtraPx:5};function ei(e,{thickness:n,factor:t}){return Nr(Ir(e,n)*t)}function Ir(e,n){switch(n){case"thin":return .6;case"uniform":return 1.6;case"strong":return Qo(e,Pr);default:return Qo(e,Mr)}}function Qo(e,{perDoublingPx:n,maxExtraPx:t}){return 1.2+Math.min(t,Math.log2(e)*n)}function Nr(e){return Math.round(e*100)/100}function ke(e){let n=new Map,t=[];return e.forEach((o,i)=>{o.depth>0&&J(n,t[o.depth-1],i),o.isExpanded&&(t[o.depth]=i)}),n}function st(e,n){let{boxes:t}=e;if(t.length===0)return[];let o=ke(t),i=Or(e.bands),r=d=>n.indexOf(t[d].path),s=[],a=d=>{let f=t[d];s.push({kind:"box",box:f});for(let F of i.get(f.path)??[])s.push({kind:"band",band:F});[...o.get(d)??[]].sort((F,H)=>r(F)-r(H)||F-H).forEach(a)};return a(0),s}function at(e){let n=[],t=[];for(let o of e){if(o.kind==="box"&&!o.box.isExpanded){t.push(o);continue}n.push(o),o.kind==="box"&&t.push({kind:"title",box:o.box})}return{underEdges:n,overEdges:t}}function dt(e,n,t){let{underEdges:o,overEdges:i}=at(st(e,n));return Rr([...o,...i],t)}function Rr(e,[n,t]){for(let o=e.length-1;o>=0;o--){let i=e[o];if(i.kind==="box"&&n>=i.box.x&&n<=i.box.x+i.box.width&&t>=i.box.y&&t<=i.box.y+i.box.height)return i.box.path}return null}function Or(e){let n=new Map;for(let t of e)J(n,t.folderPath,t);return n}var Ar=.94,Fr=0,kr=Number.POSITIVE_INFINITY,Br={x:[0,2],y:[1,3]};function ni(e,n,t){let o=qo(e.layout),i=$r(e),r=Hr(e,i,o);return g(u({animation:!1,aria:{enabled:!0,label:{description:Qr(e.layout,i)}},hoverLayerThreshold:kr,tooltip:{show:!0,confine:!0,formatter:jo(r.items,o,e.edgeMetric)},grid:{left:0,right:0,top:0,bottom:0}},Yr(e.layout,n,t)),{dataZoom:Kr(t),series:[Wr(r,o)]})}function Hr(e,n,t){let o=st(e.layout,e.raisedPaths),i=e.raisedPaths.length>0?Mo(o):Lo,r=Uo(e.searchedPaths),s=f=>Xr(f,e,i,r(f.path)),{underEdges:a,overEdges:d}=at(o);return{items:[...a,...Gr(e,n,t,r),...d],draw:(f,b)=>qr(f,s,i,b)}}function Wr({items:e,draw:n},t){return{id:Fe,type:"custom",data:e.map(o=>Ur(o,t)),encode:Br,renderItem:({dataIndex:o},i)=>to(n(e[o],i.coord),o),progressive:Fr,clip:!0}}function Gr(e,n,t,o){let i=Jo(n,t,e.edgeStyle,e.isAnchoredAtSideMiddle),s=n.some(d=>me(d,e.hoveredPath))?d=>!me(d,e.hoveredPath):d=>!o(d.fromPath)&&!o(d.toPath),a=pe(n.map(d=>d.weight));return n.map((d,f)=>({kind:"edge",edge:d,route:i[f],look:{isDimmed:s(d),widthPx:ei(d.weight/a,e.edgeWidth)}}))}var oi={regular:0,cyclic:1,feedbackContainerLevel:2,feedbackLeafLevel:3},Vr=Object.keys(oi).length;function $r({edges:e,shownEdgeTypes:n,hoveredPath:t}){let o=i=>oi[i.type]+(me(i,t)?Vr:0);return e.filter(i=>n.includes(i.type)||me(i,t)).sort((i,r)=>o(i)-o(r))}function qr(e,n,t,o){switch(e.kind){case"box":return No(e.box,n(e.box),o);case"band":return Ao(e.band,o,t.bandCutouts.get(e.band));case"title":return Ro(e.box,n(e.box),o);default:return $o(e.edge,e.route,e.look,o)}}function Ur(e,n){switch(e.kind){case"box":return{name:e.box.path,value:Be(e.box)};case"band":return{value:Be(e.band)};case"title":return{value:Be(e.box)};default:return{isEdge:!0,value:Be(q([n.get(e.edge.fromPath),n.get(e.edge.toPath)]))}}}function Xr(e,n,{seeThroughPaths:t},o){let i=e.isFolder&&e.path===n.draggingPath;return{emphasis:jr(e,n),isSeeThrough:i||t.has(e.path),isMissedBySearch:!o}}function jr(e,{selectedPath:n,hoveredPath:t}){return e.path===n?"selected":e.path===t?"hovered":"none"}function Be({x:e,y:n,width:t,height:o}){return[e,n,e+t,n+o]}var zr=1;function Yr(e,n,t){let o=Math.max(e.width,e.height)*zr,i=ri({x:-o,y:-o,width:e.width+2*o,height:e.height+2*o},n,1),r=Jr(i,t);return{xAxis:{type:"value",show:!1,min:r.x[0],max:r.x[1]},yAxis:{type:"value",show:!1,inverse:!0,min:r.y[0],max:r.y[1]}}}function Kr({x:e,y:n}){return[{type:"inside",xAxisIndex:0,filterMode:"none",startValue:e[0],endValue:e[1]},{type:"inside",yAxisIndex:0,filterMode:"none",startValue:n[0],endValue:n[1]}]}function Jr(e,n){return{x:[Math.min(e.x[0],n.x[0]),Math.max(e.x[1],n.x[1])],y:[Math.min(e.y[0],n.y[0]),Math.max(e.y[1],n.y[1])]}}function ii(e,n){let[t]=e.boxes;return ri(t??{x:0,y:0,width:e.width,height:e.height},n,Ar)}function ri(e,n,t){let o=Math.min(n.width/e.width,n.height/e.height)*t;if(!(Number.isFinite(o)&&o>0))return Zr(e);let i=n.width/o/2,r=n.height/o/2,s=e.x+e.width/2,a=e.y+e.height/2;return{x:[s-i,s+i],y:[a-r,a+r]}}function si(e,n,t){return{x:ti(e.x,n.width,t.width),y:ti(e.y,n.height,t.height)}}function ti([e,n],t,o){let i=(e+n)/2,r=(n-e)*o/t/2;return[i-r,i+r]}function Zr({x:e,y:n,width:t,height:o}){return{x:[e,e+t],y:[n,n+o]}}function Qr(e,n){return`Dependency graph with ${e.boxes.filter(o=>!o.isFolder).length} files and ${n.length} edges shown, arranged in rows by level.`}var He=class{constructor(n,t){this.chart=n,this.handlers=t,this.drag=null,this.pending=[0,0],this.hasJustDragged=!1}press(n,t){if(this.hasJustDragged=!1,!es(t)||!this.handlers.canDragBox(n))return;let o=[t.offsetX,t.offsetY];this.drag={path:n,last:this.toLayout(t),pressedAt:o,hasMoved:!1}}move(n){let t=this.drag;if(!t)return;n.__ecRoamConsumed=!0,t.hasMoved||=Math.hypot(n.offsetX-t.pressedAt[0],n.offsetY-t.pressedAt[1])>3;let o=this.toLayout(n);this.pending=[this.pending[0]+o[0]-t.last[0],this.pending[1]+o[1]-t.last[1]],t.last=o,this.frame??=requestAnimationFrame(()=>this.flush(t.path))}release(){let n=this.drag;this.drag=null,n&&(this.flush(n.path),this.hasJustDragged=n.hasMoved,this.handlers.onBoxDragEnded())}takeClickThatEndedDrag(){let n=this.hasJustDragged;return this.hasJustDragged=!1,n}cancel(){this.frame!==void 0&&cancelAnimationFrame(this.frame),this.frame=void 0,this.drag=null,this.pending=[0,0]}flush(n){this.frame!==void 0&&(cancelAnimationFrame(this.frame),this.frame=void 0);let[t,o]=this.pending;this.pending=[0,0],(t!==0||o!==0)&&this.handlers.onBoxDragged(n,t,o)}toLayout(n){return fe(this.chart,n)}};function es({event:e}){return!e||!("button"in e)||e.button===0}function fe(e,{offsetX:n,offsetY:t}){let[o,i]=e.convertFromPixel({gridIndex:0},[n,t]);return[o,i]}Xn([jn,Zn,zn,Kn,Yn,Jn]);var ts=120,ns=500,We=class{constructor(n,t){this.chartRegistry=n,this.handlers=t,this.pathUnderPointer=null,this.lastBoxClick=null,this.containerSizeObserver=new Qn,this.containerSize=this.containerSizeObserver.size,this.reportDoubleClick=()=>{let o=this.lastBoxClick;this.lastBoxClick=null,o&&Date.now()-o.at<=ns&&this.handlers.onBoxToggled(o.path)}}attachTo(n){this.chart&&this.attachedContainer===n||(this.dispose(),this.attachedContainer=n,this.chart=Un(n),this.dragGesture=new He(this.chart,this.handlers),this.listenToChart(this.chart),this.listenToRenderSurface(this.chart.getZr(),this.dragGesture),this.listenToContainer(n),this.chartRegistry.register(this.chart))}render(n){this.chart&&(this.attachedContainer?.setAttribute("aria-busy","true"),this.resizeToContainer(this.chart),this.chart.setOption(n))}shownWindowFor(n){if(!this.chart||!this.chartSize)return null;let t=si(this.shownWindow(this.chart,this.chartSize),this.chartSize,n);return[...t.x,...t.y].every(Number.isFinite)?t:null}dispose(){this.cancelPointerLeave(),this.reportPointerLeft(),this.attachedContainer?.removeEventListener("contextmenu",Ze),this.attachedContainer?.removeEventListener("dblclick",this.reportDoubleClick),this.containerSizeObserver.disconnect(),this.dragGesture?.cancel(),this.dragGesture=void 0,this.chart&&this.chartRegistry.unregister(this.chart),this.chart?.dispose(),this.chart=void 0,this.chartSize=void 0,this.attachedContainer=void 0}listenToChart(n){n.on("mousedown",t=>this.startDragging(t)),n.on("click",t=>this.reportClick(t)),n.on("mouseover",t=>this.reportPointerEntered(t)),n.on("mouseout",()=>this.reportPointerLeftAfterGrace()),n.on("contextmenu",t=>this.reportRightClick(t)),n.on("finished",()=>this.reportRendered())}listenToRenderSurface(n,t){n.on("mousemove",o=>{t.move(o),o.target||this.reportPointerOverNothing()}),n.on("mouseup",()=>t.release()),n.on("globalout",()=>{t.release(),this.reportPointerOverNothing()})}listenToContainer(n){n.addEventListener("contextmenu",Ze),n.addEventListener("dblclick",this.reportDoubleClick),this.containerSizeObserver.observe(n)}shownWindow(n,{width:t,height:o}){let[i,r]=fe(n,{offsetX:0,offsetY:0}),[s,a]=fe(n,{offsetX:t,offsetY:o});return{x:[i,s],y:[r,a]}}resizeToContainer(n){let t=this.containerSize();t.width===this.chartSize?.width&&t.height===this.chartSize?.height||(this.chartSize=t,n.resize())}startDragging(n){let t=this.boxUnder(n);t!==null&&n.event&&this.dragGesture?.press(t,n.event)}reportClick(n){let t=this.boxUnder(n);this.dragGesture?.takeClickThatEndedDrag()||t===null||(this.lastBoxClick={path:t,at:Date.now()},this.handlers.onBoxClicked(t))}reportRightClick(n){let t=this.boxUnder(n),o=n.event?.event;t!==null&&o&&this.handlers.onBoxRightClicked(t,o.clientX,o.clientY)}boxUnder(n){return n.data?.isEdge&&n.event&&this.chart?this.handlers.boxAt(fe(this.chart,n.event)):os(n)}reportRendered(){this.attachedContainer?.setAttribute("aria-busy","false"),this.handlers.onRendered()}reportPointerEntered(n){let t=this.boxUnder(n);t!==null&&(this.cancelPointerLeave(),t!==this.pathUnderPointer&&(this.pathUnderPointer=t,this.handlers.onBoxHovered(t)))}reportPointerLeftAfterGrace(){this.cancelPointerLeave(),this.pointerLeaveTimeout=setTimeout(()=>{this.pointerLeaveTimeout=void 0,this.reportPointerLeft()},ts)}reportPointerOverNothing(){this.pathUnderPointer!==null&&this.pointerLeaveTimeout===void 0&&this.reportPointerLeftAfterGrace()}reportPointerLeft(){this.pathUnderPointer!==null&&(this.pathUnderPointer=null,this.handlers.onBoxHovered(null))}cancelPointerLeave(){this.pointerLeaveTimeout!==void 0&&(clearTimeout(this.pointerLeaveTimeout),this.pointerLeaveTimeout=void 0)}};function os({seriesId:e,name:n}){return e===Fe&&n?n:null}var is=["chartContainer"],rs=()=>!1,ss=()=>null,ct=(()=>{class e{constructor(){this.scene=D.required(),this.graphIdentity=D.required(),this.fitRequest=D(0),this.canDragBox=D(rs),this.boxAt=D(ss),this.boxClicked=A(),this.boxToggled=A(),this.boxHovered=A(),this.boxRightClicked=A(),this.rendered=A(),this.boxDragged=A(),this.boxDragEnded=A(),this.chartContainer=It.required("chartContainer"),this.fittedGraphIdentity=null,this.handledFitRequest=0,this.chartHost=new We(p(Gn),{onBoxClicked:t=>this.boxClicked.emit(t),onBoxToggled:t=>this.boxToggled.emit(t),onBoxHovered:t=>this.boxHovered.emit(t),onBoxRightClicked:(t,o,i)=>this.boxRightClicked.emit({path:t,clientX:o,clientY:i}),onRendered:()=>this.rendered.emit(),canDragBox:t=>this.canDragBox()(t),onBoxDragged:(t,o,i)=>this.boxDragged.emit({path:t,deltaX:o,deltaY:i}),onBoxDragEnded:()=>this.boxDragEnded.emit(),boxAt:t=>this.boxAt()(t)}),oe(()=>this.chartHost.attachTo(this.chartContainer().nativeElement)),oe(()=>this.renderOnceTheContainerIsMeasured())}ngOnDestroy(){this.chartHost.dispose()}renderOnceTheContainerIsMeasured(){let t=this.chartHost.containerSize();if(t.width===0||t.height===0)return;let o=this.scene();this.chartHost.render(ni(o,t,this.windowToShow(o,t)))}windowToShow(t,o){return(this.consumeDueFit()?null:this.chartHost.shownWindowFor(o))??ii(t.layout,o)}consumeDueFit(){let t=this.graphIdentity(),o=this.fitRequest(),i=t!==this.fittedGraphIdentity||o>0&&o!==this.handledFitRequest;return this.fittedGraphIdentity=t,this.handledFitRequest=o,i}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-dependency-graph"]],viewQuery:function(o,i){o&1&&Lt(i.chartContainer,is,5),o&2&&Mt()},hostAttrs:[1,"block","h-full","w-full"],inputs:{scene:[1,"scene"],graphIdentity:[1,"graphIdentity"],fitRequest:[1,"fitRequest"],canDragBox:[1,"canDragBox"],boxAt:[1,"boxAt"]},outputs:{boxClicked:"boxClicked",boxToggled:"boxToggled",boxHovered:"boxHovered",boxRightClicked:"boxRightClicked",rendered:"rendered",boxDragged:"boxDragged",boxDragEnded:"boxDragEnded"},decls:2,vars:0,consts:[["chartContainer",""],["data-testid","dependency-graph",1,"h-full","w-full"]],template:function(o,i){o&1&&Ee(0,"div",1,0)},encapsulation:2})}}return e})();function ht(e,n){if(n.size===0)return e;let t=as(n),o=e.boxes.map(r=>ls(r,t(r.path)));ds(o);let i=new Map(o.map(r=>[r.path,r]));return g(u({},e),{boxes:o,bands:e.bands.map(r=>hs(r,i))})}function lt(e,n){let t=e.boxes.find(o=>o.path===n);return t!==void 0&&t.depth>0}function as(e){let n=[...e];return t=>n.filter(([o])=>$(t,o)).reduce(([o,i],[,[r,s]])=>[o+r,i+s],[0,0])}function ds(e){let n=ke(e);for(let t=e.length-1;t>=0;t--){let o=n.get(t);if(o){let i=e[t];e[t]=u(u({},i),q([i,...o.map(r=>cs(e[r]))]))}}}function cs(e){let{padding:n,headerHeight:t}=E;return{x:e.x-n,y:e.y-n-t,width:e.width+2*n,height:e.height+2*n+t}}function hs(e,n){let t=n.get(e.folderPath),o=q(e.memberPaths.map(i=>n.get(i)));return g(u({},e),{x:t.x,width:t.width,y:o.y,height:o.height})}function ls(e,[n,t]){return n===0&&t===0?e:g(u({},e),{x:e.x+n,y:e.y+t})}function ps(e){return typeof e=="number"&&e>0}function pt(e,n){let t=new Map,o=(i,r)=>{let s=r??i.path;for(let d of[...i.foldedPaths??[],i.path])t.set(d,s);let a=r!==null||!n.has(i.path);for(let d of i.children)o(d,a?s:null)};return o(e,null),t}function ut(e,n,t){let o=new Map;for(let r of e){let s=t===null?void 0:r.attributes?.[t],a=n.get(r.fromNodeName),d=n.get(r.toNodeName);if(!ps(s)||a===void 0||d===void 0||a===d)continue;let f=`${a}|${d}`,b=o.get(f)??{fromPath:a,toPath:d,weight:0,isCyclic:!1,isPointingUpwards:!1};o.set(f,{fromPath:a,toPath:d,weight:b.weight+s,isCyclic:b.isCyclic||!!r.isCyclic,isPointingUpwards:b.isPointingUpwards||!!r.isPointingUpwards})}let i=ie(t)?qt:()=>"regular";return[...o].map(([r,s])=>({id:r,fromPath:s.fromPath,toPath:s.toPath,weight:s.weight,type:i(s)}))}var us=0;function ge(e,n){if(e.isExcluded||e.path===void 0)return null;if(e.type!==Nt.FOLDER){let r=n[e.path];return r===void 0?null:{path:e.path,name:e.name,level:r,isFolder:!1,children:[]}}let t=(e.children??[]).map(r=>ge(r,n)).filter(r=>r!==null);if(t.length===0)return null;let o=n[e.path]??us,[i]=t;return t.length===1&&i.isFolder?g(u({},i),{name:`${e.name}/${i.name}`,level:o,foldedPaths:[e.path,...i.foldedPaths??[]]}):{path:e.path,name:e.name,level:o,isFolder:!0,children:t}}function Ge(e,n){if(e.path===n||e.foldedPaths?.includes(n))return e.path;for(let t of e.children){let o=Ge(t,n);if(o!==null)return o}return null}function Ve(e,n){if(e.path===n||e.foldedPaths?.includes(n))return[];for(let t of e.children){let o=Ve(t,n);if(o!==null)return[t.level,...o]}return null}function $e(e){let n=new Set([e.path]),t=e;for(;t.children.length===1&&t.children[0].isFolder;)t=t.children[0],n.add(t.path);return n}var ai=Y(ze,Jt,te,je,({unifiedMapNode:e},n,t,o)=>{let i=t&&n.get(t)||e;return i?ge(i,o):null}),ms=[],di=Y(ze,te,je,({unifiedMapNode:e},n,t)=>{let o=n&&e?ge(e,t):null;return(o&&Ve(o,n))??ms}),ci=Y(Rt,te,(e,n)=>JSON.stringify({fileChecksums:e.map(({file:t})=>t.fileMeta.fileChecksum).sort(),focusedNodePath:n??null})),hi=Y(te,Boolean),li=Y(Ht,Qt,(e,n)=>In(e)?null:n);var T=(()=>{class e{constructor(t){this.store=t,this.tree$=this.store.select(ai),this.focusedFolderLevelPath$=this.store.select(di),this.layoutIdentity$=this.store.select(ci),this.hasDependencyData$=this.store.select(Xt),this.isFocused$=this.store.select(hi),this.focusedNodePath$=this.store.select(te),this.edges$=this.store.select(jt),this.sharedEdgeMetric$=this.store.select(Ft),this.edgeMetricData$=this.store.select(Yt),this.persistedSettings$=this.store.select(tn),this.hoveredNodePath$=this.store.select(Bt),this.selectedNodePath$=this.store.select(Wt),this.isDeltaState$=this.store.select(Ot),this.searchedPaths$=this.store.select(li)}static{this.\u0275fac=function(o){return new(o||e)(de(z))}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var I=(()=>{class e{constructor(t,o){this.store=t,this.nodeInteraction=o}selectNode(t){this.nodeInteraction.selectNode(t)}hoverNode(t){this.nodeInteraction.hoverNode(t)}openContextMenu(t,o,i){this.store.dispatch($t({value:{nodeId:t,xPositionOfRightClickEvent:o,yPositionOfRightClickEvent:i,origin:"dependencyMap"}}))}setEdgeMetric(t){this.store.dispatch(kt({value:t}))}changeSettings(t){this.store.dispatch(en({value:t}))}unfocus(){this.store.dispatch(Vt())}static{this.\u0275fac=function(o){return new(o||e)(de(z),de(Ie))}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var pi=(()=>{class e{constructor(){this.readStore=p(T),this.writeStore=p(I),this.popoverId="dependency-bar-edge-metric-popover",this.anchorName="dependency-bar-edge-metric-card",this.edgeMetric=m(this.readStore.sharedEdgeMetric$,{requireSync:!0}),this.edgeMetricData=m(this.readStore.edgeMetricData$,{requireSync:!0}),this.descriptors=m(p(zt).descriptors$,{initialValue:{}})}pick(t){this.writeStore.setEdgeMetric(t)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-edge-metric-segment"]],hostAttrs:[1,"contents"],decls:2,vars:8,consts:[["label","Edge metric","testId","dependency-bar-edge-metric-segment",3,"metricName","searchPopoverId","searchAnchorName"],["placeholder","Edge Metric (highest value)",3,"metricSelected","popoverId","anchorName","options","descriptors","selected"]],template:function(o,i){o&1&&(_(0,"cc-axis-card",0),l(1,"cc-metric-select-popover",1),w("metricSelected",function(s){return i.pick(s)}),h()),o&2&&(v("metricName",i.edgeMetric())("searchPopoverId",i.popoverId)("searchAnchorName",i.anchorName),c(),v("popoverId",i.popoverId)("anchorName",i.anchorName)("options",i.edgeMetricData())("descriptors",i.descriptors())("selected",i.edgeMetric()))},dependencies:[K,hn],encapsulation:2})}}return e})();var gs=["*"],ys=(e,n)=>n.value;function vs(e,n){if(e&1){let t=B();l(0,"label",5)(1,"input",6),w("click",function(){let i=M(t).$implicit,r=C();return P(r.choose.emit(i.value))}),h(),l(2,"span",7)(3,"span",8),S(4),h(),l(5,"span",9),S(6),h()(),_(7,"i",10),h()}if(e&2){let t=n.$implicit,o=C();ce("bg-base-200",t.value===o.chosen()),O("data-testid",o.idPrefix()+"-"+t.value),c(),v("name",o.popoverId()+"-value")("checked",t.value===o.chosen()),c(3),R(t.label),c(2),R(t.hint),c(),ce("invisible",t.value!==o.chosen())}}var qe=(()=>{class e{constructor(){this.popoverId=D.required(),this.anchorName=D.required(),this.title=D.required(),this.idPrefix=D.required(),this.choices=D.required(),this.chosen=D.required(),this.choose=A(),this.chosenLabel=y(()=>this.choices().find(t=>t.value===this.chosen())?.label??"")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-choice-list-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],title:[1,"title"],idPrefix:[1,"idPrefix"],choices:[1,"choices"],chosen:[1,"chosen"]},outputs:{choose:"choose"},ngContentSelectors:gs,decls:9,vars:8,consts:[["widthClass","w-80",3,"popoverId","anchorName","ariaLabel","testId"],[1,"text-sm","font-semibold","whitespace-nowrap"],[1,"text-primary"],["role","radiogroup",1,"flex","flex-col","gap-0.5"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","px-2","py-1","text-left","hover:bg-base-200","has-[:focus-visible]:outline-2",3,"bg-base-200"],[1,"flex","cursor-pointer","items-center","gap-2","rounded-md","px-2","py-1","text-left","hover:bg-base-200","has-[:focus-visible]:outline-2"],["type","radio",1,"sr-only",3,"click","name","checked"],[1,"flex","min-w-0","flex-1","flex-col"],[1,"text-sm","font-medium"],[1,"text-xs","opacity-70"],["aria-hidden","true",1,"fa","fa-check","text-primary"]],template:function(o,i){o&1&&(Dt(),l(0,"cc-settings-popover-shell",0)(1,"span",1),S(2),l(3,"span",2),S(4),h()(),l(5,"div",3),X(6,vs,8,9,"label",4,ys),h(),Tt(8),h()),o&2&&(v("popoverId",i.popoverId())("anchorName",i.anchorName())("ariaLabel",i.title())("testId",i.idPrefix()+"-popover"),c(2),Ce(" ",i.title()," "),c(),O("data-testid",i.idPrefix()+"-title"),c(),R(i.chosenLabel()),c(),O("aria-label",i.title()),c(),j(i.choices()))},dependencies:[re],encapsulation:2})}}return e})();var Ss=(e,n)=>n.value;function xs(e,n){if(e&1){let t=B();k(0,"input",4),Ct("change",function(){let i=M(t).$implicit,r=C();return P(r.choose.emit(i.value))}),W()}if(e&2){let t=n.$implicit,o=C();wt("name",o.idPrefix())("title",t.hint)("checked",t.value===o.chosen()),O("aria-label",t.label)("data-testid",o.idPrefix()+"-"+t.value)}}var ui=(()=>{class e{constructor(){this.label=D.required(),this.idPrefix=D.required(),this.choices=D.required(),this.chosen=D.required(),this.choose=A(),this.chosenHint=y(()=>this.choices().find(t=>t.value===this.chosen())?.hint??"")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-choice-row"]],hostAttrs:[1,"flex","flex-col","gap-1"],inputs:{label:[1,"label"],idPrefix:[1,"idPrefix"],choices:[1,"choices"],chosen:[1,"chosen"]},outputs:{choose:"choose"},decls:7,vars:4,consts:[[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup",1,"join","w-full"],["type","radio",1,"join-item","btn","btn-sm","flex-1",3,"name","title","checked"],[1,"m-0","text-xs","opacity-70"],["type","radio",1,"join-item","btn","btn-sm","flex-1",3,"change","name","title","checked"]],template:function(o,i){o&1&&(k(0,"span",0),S(1),W(),k(2,"div",1),X(3,xs,1,5,"input",2,Ss),W(),k(5,"p",3),S(6),W()),o&2&&(c(),R(i.label()),c(),O("aria-label",i.label()),c(),j(i.choices()),c(2),O("data-testid",i.idPrefix()+"-hint"),c(),R(i.chosenHint()))},encapsulation:2})}}return e})();var mt=[{value:"curved",label:"Curved",hint:"Leave and enter each box square to its side"},{value:"spread",label:"Spread",hint:"Curved, each edge with its own spot on the box"},{value:"upwardAside",label:"Upward aside",hint:"Upward edges bow out to the right of the boxes"},{value:"straight",label:"Straight",hint:"A straight line from box to box"}],Ue=[{value:"byCount",label:"By count",hint:"Width grows with the dependencies an edge stands for"},{value:"thin",label:"Thin",hint:"Every edge a hairline, easiest to see through"},{value:"uniform",label:"Uniform",hint:"Every edge the same width"},{value:"strong",label:"Strong",hint:"Grows with the dependencies, twice as pronounced"}];function ye(e,n){return e.find(t=>t.value===n)?.label??null}var _s={min:.25,max:3,step:.25},mi=(()=>{class e{constructor(){this.writeStore=p(I),this.settings=m(p(T).persistedSettings$,{requireSync:!0}),this.popoverId=D.required(),this.anchorName=D.required(),this.edgeThicknessChoices=Ue,this.widthFactorRange=_s,this.resetKeys=["preferences.dependencyGraph.edgeStyle","preferences.dependencyGraph.isAnchoredAtSideMiddle","preferences.dependencyGraph.edgeWidth"],this.edgeWidth=y(()=>this.settings().edgeWidth)}drawEdgesThick(t){this.writeStore.changeSettings({edgeWidth:g(u({},this.edgeWidth()),{thickness:t})})}scaleEdgeWidth(t){this.writeStore.changeSettings({edgeWidth:g(u({},this.edgeWidth()),{factor:t})})}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-edge-style-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:9,vars:9,consts:[["widthClass","w-96 max-w-[95vw]","ariaLabel","Edge style settings","testId","dependency-bar-edge-style-settings-popover",3,"popoverId","anchorName"],[1,"text-sm","font-semibold"],["label","Line thickness","idPrefix","dependency-bar-edge-thickness",3,"choose","choices","chosen"],[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["ariaLabel","Line width factor",3,"valueChange","min","max","step","value"],["tooltip","Reset the edge style and line thickness to their defaults","label","Reset edge style",3,"settingsKeys"]],template:function(o,i){o&1&&(l(0,"cc-settings-popover-shell",0)(1,"span",1),S(2,"Edge style settings"),h(),l(3,"cc-choice-row",2),w("choose",function(s){return i.drawEdgesThick(s)}),h(),l(4,"div",3)(5,"span",4),S(6,"Width factor"),h(),l(7,"cc-slider-number-input",5),w("valueChange",function(s){return i.scaleEdgeWidth(s)}),h()(),_(8,"cc-reset-settings-button",6),h()),o&2&&(v("popoverId",i.popoverId())("anchorName",i.anchorName()),c(3),v("choices",i.edgeThicknessChoices)("chosen",i.edgeWidth().thickness),c(4),v("min",i.widthFactorRange.min)("max",i.widthFactorRange.max)("step",i.widthFactorRange.step)("value",i.edgeWidth().factor),c(),v("settingsKeys",i.resetKeys))},dependencies:[ui,pn,re,mn],encapsulation:2})}}return e})();function Es(e,n){if(e&1&&(l(0,"p",8),S(1),h()),e&2){let t=C();c(),Ce(" Not for ",t.edgeStyleLabel(),", which gives each edge its own spot. ")}}var fi=(()=>{class e{constructor(){this.writeStore=p(I),this.settings=m(p(T).persistedSettings$,{requireSync:!0}),this.stylePopoverId="dependency-bar-edge-style-popover",this.styleAnchorName="dependency-bar-edge-style-card",this.settingsPopoverId="dependency-bar-edge-style-settings-popover",this.settingsAnchorName="dependency-bar-edge-style-cog",this.edgeStyleChoices=mt,this.edgeStyle=y(()=>this.settings().edgeStyle),this.edgeStyleLabel=y(()=>ye(mt,this.edgeStyle())),this.edgeThicknessLabel=y(()=>ye(Ue,this.settings().edgeWidth.thickness)),this.canAnchorAtSideMiddle=y(()=>Me(this.edgeStyle())),this.isAnchoredAtSideMiddle=y(()=>this.canAnchorAtSideMiddle()&&this.settings().isAnchoredAtSideMiddle)}drawEdgesAs(t){this.writeStore.changeSettings({edgeStyle:t})}anchorAtSideMiddle(t){this.writeStore.changeSettings({isAnchoredAtSideMiddle:t})}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-edge-style-segment"]],hostAttrs:[1,"contents"],decls:12,vars:18,consts:[["sideMiddleCheckbox",""],["label","Edge style","testId","dependency-bar-edge-style-segment","cogTestId","dependency-bar-edge-style-cog",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName"],["body","","data-testid","dependency-bar-edge-thickness-value",1,"text-center","text-xs","opacity-70"],["title","Edges drawn","idPrefix","dependency-bar-edge-style",3,"choose","popoverId","anchorName","choices","chosen"],[1,"flex","flex-col","gap-1","border-t","border-base-300","pt-2.5"],[1,"flex","items-center","gap-2"],["type","checkbox","data-testid","dependency-bar-edge-style-side-middle",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"text-sm"],["data-testid","dependency-bar-edge-style-side-middle-note",1,"m-0","text-xs","opacity-70"],[3,"popoverId","anchorName"]],template:function(o,i){if(o&1){let r=B();l(0,"cc-axis-card",1)(1,"div",2),S(2),h()(),l(3,"cc-choice-list-popover",3),w("choose",function(a){return i.drawEdgesAs(a)}),l(4,"div",4)(5,"label",5)(6,"input",6,0),w("change",function(){M(r);let a=be(7);return P(i.anchorAtSideMiddle(a.checked))}),h(),l(8,"span",7),S(9,"Start and end at the middle of the side"),h()(),Q(10,Es,2,1,"p",8),h()(),_(11,"cc-edge-style-settings-popover",9)}o&2&&(v("metricName",i.edgeStyleLabel())("hasCog",!0)("cogPopoverId",i.settingsPopoverId)("cogAnchorName",i.settingsAnchorName)("searchPopoverId",i.stylePopoverId)("searchAnchorName",i.styleAnchorName),c(2),R(i.edgeThicknessLabel()),c(),v("popoverId",i.stylePopoverId)("anchorName",i.styleAnchorName)("choices",i.edgeStyleChoices)("chosen",i.edgeStyle()),c(2),we(i.canAnchorAtSideMiddle()?"cursor-pointer":"cursor-not-allowed opacity-50"),c(),v("checked",i.isAnchoredAtSideMiddle())("disabled",!i.canAnchorAtSideMiddle()),c(4),ee(i.canAnchorAtSideMiddle()?-1:10),c(),v("popoverId",i.settingsPopoverId)("anchorName",i.settingsAnchorName))},dependencies:[K,qe,mi],encapsulation:2})}}return e})();function gi(e,n){let t=n.filter(o=>e.includes(o));return t.length===n.length?"All":t.length===0?"None":V.filter(o=>t.includes(o.type)).map(o=>o.label).join(", ")}function ft(e,n){return Le.filter(t=>e.includes(t)||n.includes(t))}function gt(e,n){return Le.filter(t=>e.includes(t)&&!n.includes(t))}function yi(e,n){return Le.filter(t=>e.includes(t)!==n.includes(t))}var bs=(e,n)=>n.type;function ws(e,n){if(e&1){let t=B();l(0,"li")(1,"label",6)(2,"input",7,0),w("change",function(){let i=M(t).$implicit,r=be(3),s=C();return P(s.toggle(i.type,r.checked))}),h(),Se(),l(4,"svg",8),_(5,"line",9),h(),xe(),l(6,"span",10),S(7),h()()()}if(e&2){let t=n.$implicit;c(),we(t.isCarried?"cursor-pointer hover:bg-base-200":"cursor-not-allowed opacity-50"),c(),v("checked",t.isShown)("disabled",!t.isCarried),O("data-testid","dependency-bar-edges-"+t.type),c(3),O("stroke",t.color)("stroke-dasharray",t.isDashed?"5 4":null),c(2),R(t.label)}}var vi=(()=>{class e{constructor(){this.readStore=p(T),this.writeStore=p(I),this.edgeMetric=m(this.readStore.sharedEdgeMetric$,{requireSync:!0}),this.settings=m(this.readStore.persistedSettings$,{requireSync:!0}),this.popoverId="dependency-bar-edges-popover",this.anchorName="dependency-bar-edges-card",this.carriedTypes=y(()=>Ut(this.edgeMetric())),this.shownTypes=y(()=>this.settings().shownEdgeTypes),this.entries=y(()=>V.map(t=>{let o=this.carriedTypes().includes(t.type);return g(u({},t),{isCarried:o,isShown:o&&this.shownTypes().includes(t.type)})})),this.chosenLabel=y(()=>gi(this.shownTypes(),this.carriedTypes()))}toggle(t,o){this.show(o?ft(this.shownTypes(),[t]):gt(this.shownTypes(),[t]))}showAll(){this.show(ft(this.shownTypes(),this.carriedTypes()))}showNone(){this.show(gt(this.shownTypes(),this.carriedTypes()))}invert(){this.show(yi(this.shownTypes(),this.carriedTypes()))}show(t){this.writeStore.changeSettings({shownEdgeTypes:t})}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-edge-types-segment"]],hostAttrs:[1,"contents"],decls:8,vars:5,consts:[["edgeTypeCheckbox",""],["label","Edges shown","testId","dependency-bar-edges-segment",3,"metricName","searchPopoverId","searchAnchorName"],["ariaLabel","Edges shown","widthClass","w-72","contentClass","gap-2 p-2",3,"popoverId","anchorName"],[3,"selectAll","selectNone","invert"],[1,"m-0","flex","list-none","flex-col","gap-0.5","p-0"],[1,"m-0","px-2","text-xs","opacity-70"],[1,"flex","w-full","items-center","gap-2","rounded-md","px-2","py-1"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary","shrink-0",3,"change","checked","disabled"],["viewBox","0 0 24 8","aria-hidden","true",1,"h-2","w-6","shrink-0"],["x1","0","y1","4","x2","24","y2","4","stroke-width","2"],[1,"text-sm"]],template:function(o,i){o&1&&(_(0,"cc-axis-card",1),l(1,"cc-settings-popover-shell",2)(2,"cc-selection-shortcuts",3),w("selectAll",function(){return i.showAll()})("selectNone",function(){return i.showNone()})("invert",function(){return i.invert()}),h(),l(3,"ul",4),X(4,ws,8,8,"li",null,bs),h(),l(6,"p",5),S(7,"With none ticked, only the edges of the box under the pointer show."),h()()),o&2&&(v("metricName",i.chosenLabel())("searchPopoverId",i.popoverId)("searchAnchorName",i.anchorName),c(),v("popoverId",i.popoverId)("anchorName",i.anchorName),c(3),j(i.entries()))},dependencies:[K,re,un],encapsulation:2})}}return e})();var U=(()=>{class e{constructor(){this.currentLayoutIdentity=m(p(T).layoutIdentity$,{requireSync:!0}),this.layoutIdentityOfTheOpenedFolders=Z(null),this.openedFolders=Z(new Set),this.movedBoxes=Z(new Map),this.draggedOrder=Z([]),this.boxBeingDragged=Z(null),this.fitRequestCount=Z(0),this.revealsAwaitingAdoption=null,this.adoptedTree=null,this.adoptedLayoutIdentity=this.layoutIdentityOfTheOpenedFolders.asReadonly(),this.expandedPaths=this.openedFolders.asReadonly(),this.boxOffsets=this.movedBoxes.asReadonly(),this.raisedPaths=this.draggedOrder.asReadonly(),this.draggingPath=this.boxBeingDragged.asReadonly(),this.fitRequest=this.fitRequestCount.asReadonly()}adoptTree(t){let o=this.currentLayoutIdentity(),i=t.path!==this.adoptedTree?.path;this.adoptedTree=t,o!==he(this.layoutIdentityOfTheOpenedFolders)?this.startOver(t,o):i&&this.openTheMovedRoot(t)}requestFit(){this.fitRequestCount.update(t=>t+1)}placeBox(t,o){this.boxBeingDragged.set(t),this.movedBoxes.update(i=>new Map(i).set(t,o)),this.draggedOrder().at(-1)!==t&&this.draggedOrder.update(i=>[...i.filter(r=>r!==t),t])}endDragging(){this.boxBeingDragged.set(null)}resetLayout(){this.movedBoxes.set(new Map),this.draggedOrder.set([])}reveal(t){this.openFoldersHolding([t]);let o=he(this.currentLayoutIdentity);o!==he(this.layoutIdentityOfTheOpenedFolders)&&this.awaitAdoptionToReveal(o,t)}openFolder(t){this.reveal(t);let o=(this.adoptedTree&&Ge(this.adoptedTree,t))??t;this.openedFolders.update(i=>new Set([...i,o]))}toggle(t){this.openedFolders.update(o=>{let i=new Set(o);return i.delete(t)||i.add(t),i})}startOver(t,o){this.layoutIdentityOfTheOpenedFolders.set(o),this.openedFolders.set($e(t)),this.resetLayout(),this.revealTheAwaitingPaths(o)}openTheMovedRoot(t){he(this.openedFolders).has(t.path)||this.openedFolders.update(o=>new Set([...o,...$e(t)]))}awaitAdoptionToReveal(t,o){let i=this.revealsAwaitingAdoption,r=i?.layoutIdentity===t?i.paths:[];this.revealsAwaitingAdoption={layoutIdentity:t,paths:[...r,o]}}revealTheAwaitingPaths(t){let o=this.revealsAwaitingAdoption;this.revealsAwaitingAdoption=null,o?.layoutIdentity===t&&this.openFoldersHolding(o.paths)}openFoldersHolding(t){this.openedFolders.update(o=>new Set([...o,...t.flatMap(Cs)]))}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Cs(e){let n=e.split("/");return n.slice(2).map((t,o)=>n.slice(0,o+2).join("/"))}function Ds(e,n){e&1&&_(0,"cc-bar-tools-divider",2)}var Si=(()=>{class e{constructor(){this.writeStore=p(I),this.viewStore=p(U),this.isFocused=m(p(T).isFocused$,{requireSync:!0}),this.hasMovedBoxes=y(()=>this.viewStore.boxOffsets().size>0),this.hasSomethingToUndo=y(()=>this.isFocused()||this.hasMovedBoxes())}showWholeGraph(){this.viewStore.requestFit()}resetLayout(){this.viewStore.resetLayout()}unfocus(){this.writeStore.unfocus()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-graph-view-tools"]],hostAttrs:[1,"flex","items-center","gap-0.5"],features:[De([{provide:Hn,useExisting:Vn}])],decls:5,vars:3,consts:[["testId","dependency-bar-unfocus",3,"unfocused","isFocused"],["label","Reset layout","icon","fa fa-undo","tooltip","Put every dragged box back in its place","highlighted","","testId","dependency-reset-layout",3,"activated","revealed"],["data-testid","dependency-tools-divider"],["label","Show whole graph","icon","fa-solid fa-expand","testId","dependency-reset-view",3,"activated"],["view","dependencies"]],template:function(o,i){o&1&&(l(0,"cc-unfocus-tool",0),w("unfocused",function(){return i.unfocus()}),h(),l(1,"cc-bar-tool",1),w("activated",function(){return i.resetLayout()}),h(),Q(2,Ds,1,0,"cc-bar-tools-divider",2),l(3,"cc-bar-tool",3),w("activated",function(){return i.showWholeGraph()}),h(),_(4,"cc-toolbox-screenshot-button",4)),o&2&&(v("isFocused",i.isFocused()),c(),v("revealed",i.hasMovedBoxes()),c(),ee(i.hasSomethingToUndo()?2:-1))},dependencies:[rn,sn,Wn,fn],encapsulation:2})}}return e})();var xi=[{value:"number",label:"Number",hint:"Each level by its own number, as in level 2"},{value:"path",label:"Path",hint:"The levels of the folders around it first, as in level 0.1.2"}],_i=(()=>{class e{constructor(){this.writeStore=p(I),this.settings=m(p(T).persistedSettings$,{requireSync:!0}),this.popoverId="dependency-bar-level-label-popover",this.anchorName="dependency-bar-level-label-card",this.levelLabelChoices=xi,this.levelLabel=y(()=>this.settings().levelLabel),this.chosenLabel=y(()=>ye(xi,this.levelLabel()))}labelLevelsBy(t){this.writeStore.changeSettings({levelLabel:t})}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-level-label-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Level labels","testId","dependency-bar-level-label-segment",3,"metricName","searchPopoverId","searchAnchorName"],["title","Levels labelled by","idPrefix","dependency-bar-level-label",3,"choose","popoverId","anchorName","choices","chosen"]],template:function(o,i){o&1&&(_(0,"cc-axis-card",0),l(1,"cc-choice-list-popover",1),w("choose",function(s){return i.labelLevelsBy(s)}),h()),o&2&&(v("metricName",i.chosenLabel())("searchPopoverId",i.popoverId)("searchAnchorName",i.anchorName),c(),v("popoverId",i.popoverId)("anchorName",i.anchorName)("choices",i.levelLabelChoices)("chosen",i.levelLabel()))},dependencies:[K,qe],encapsulation:2})}}return e})();var yt=(()=>{class e{constructor(){this.barBottom=nn}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-dependency-bar"]],hostVars:2,hostBindings:function(o,i){o&2&&Pt("bottom",i.barBottom)},features:[_e([on])],decls:6,vars:0,template:function(o,i){o&1&&(l(0,"cc-bar-tools-tab"),_(1,"cc-graph-view-tools"),h(),_(2,"cc-edge-types-segment")(3,"cc-edge-style-segment")(4,"cc-edge-metric-segment")(5,"cc-level-label-segment"))},dependencies:[an,vi,fi,pi,Si,_i],encapsulation:2})}}return e})();var Ts=(e,n)=>n.type;function Ls(e,n){if(e&1&&(k(0,"li",3),Se(),k(1,"svg",4),Ee(2,"line",5),W(),xe(),k(3,"span"),S(4),W()()),e&2){let t=n.$implicit;c(2),O("stroke",t.color)("stroke-dasharray",t.isDashed?"5 4":null),c(2),R(t.label)}}var[Ms]=V,vt=(()=>{class e{constructor(){this.edgeMetric=m(p(T).sharedEdgeMetric$,{requireSync:!0}),this.isDependencyMetric=y(()=>ie(this.edgeMetric())),this.edgeLegend=y(()=>this.isDependencyMetric()?V:[g(u({},Ms),{label:this.edgeMetric()??""})])}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-dependency-edge-legend"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[["aria-labelledby","dependency-edge-legend-title",1,"flex","flex-col","gap-1"],["id","dependency-edge-legend-title",1,"text-xs","uppercase","tracking-wider","opacity-60"],["data-testid","dependency-edge-legend",1,"m-0","flex","list-none","flex-col","gap-1","p-0","text-sm"],[1,"flex","items-center","gap-2"],["viewBox","0 0 24 8","aria-hidden","true",1,"h-2","w-6"],["x1","0","y1","4","x2","24","y2","4","stroke-width","2"]],template:function(o,i){o&1&&(k(0,"section",0)(1,"span",1),S(2),W(),k(3,"ul",2),X(4,Ls,5,3,"li",3,Ts),W()()),o&2&&(c(2),R(i.isDependencyMetric()?"Dependencies":"Edges"),c(2),j(i.edgeLegend()))},encapsulation:2})}}return e})();function Ps(e,n){e&1&&(l(0,"div",0)(1,"output",2)(2,"span"),S(3,"The dependency view shows a single map. Leave compare mode to see its dependencies."),h()()())}function Is(e,n){if(e&1){let t=B();l(0,"cc-dependency-graph",3),w("boxClicked",function(i){M(t);let r=C();return P(r.select(i))})("boxToggled",function(i){M(t);let r=C();return P(r.toggle(i))})("boxHovered",function(i){M(t);let r=C();return P(r.hover(i))})("boxRightClicked",function(i){M(t);let r=C();return P(r.openContextMenu(i))})("rendered",function(){M(t);let i=C();return P(i.markReady())})("boxDragged",function(i){M(t);let r=C();return P(r.moveBox(i))})("boxDragEnded",function(){M(t);let i=C();return P(i.endDragging())}),h()}if(e&2){let t=C();v("scene",n)("graphIdentity",t.graphIdentity())("fitRequest",t.fitRequest())("canDragBox",t.canDragBox)("boxAt",t.boxAt)}}function Ns(e,n){if(e&1){let t=B();l(0,"span"),S(1,"Nothing in the focused folder carries dependency levels."),h(),l(2,"button",4),w("click",function(){M(t);let i=C(2);return P(i.unfocus())}),S(3,"Unfocus"),h()}}function Rs(e,n){e&1&&(l(0,"span"),S(1,"Every file that carries dependency levels is excluded. Include some again from the Excluded list in the explorer."),h())}function Os(e,n){if(e&1&&(l(0,"div",0)(1,"output",2),Q(2,Ns,4,0)(3,Rs,2,0,"span"),h()()),e&2){let t=C();c(2),ee(t.isFocused()?2:3)}}function As(e,n){e&1&&(l(0,"div",0)(1,"output",2)(2,"span"),S(3,"No file in view carries dependency levels."),h()()())}var St=(()=>{class e{constructor(){this.readStore=p(T),this.writeStore=p(I),this.viewStore=p(U),this.viewReadinessStore=p(dn),this.isDeltaState=m(this.readStore.isDeltaState$,{requireSync:!0}),this.isLoadingFile=m(p(At).isLoadingFile$,{initialValue:!1}),this.hasDependencyData=m(this.readStore.hasDependencyData$,{requireSync:!0}),this.isFocused=m(this.readStore.isFocused$,{requireSync:!0}),this.graphIdentity=y(()=>this.viewStore.adoptedLayoutIdentity()??""),this.fitRequest=this.viewStore.fitRequest,this.tree=m(this.readStore.tree$,{requireSync:!0}),this.focusedFolderLevelPath=m(this.readStore.focusedFolderLevelPath$,{requireSync:!0}),this.edges=m(this.readStore.edges$,{requireSync:!0}),this.edgeMetric=m(this.readStore.sharedEdgeMetric$,{requireSync:!0}),this.settings=m(this.readStore.persistedSettings$,{requireSync:!0}),this.hoveredPath=m(this.readStore.hoveredNodePath$,{requireSync:!0}),this.selectedPath=m(this.readStore.selectedNodePath$,{requireSync:!0}),this.searchedPaths=m(this.readStore.searchedPaths$,{requireSync:!0}),this.layout=y(()=>{let t=this.tree();if(!t)return null;let o=ot(t,this.viewStore.expandedPaths(),this.focusedFolderLevelPath());return this.settings().levelLabel==="path"?o:nt(o)}),this.shownLayout=y(()=>{let t=this.layout();return t?ht(t,this.viewStore.boxOffsets()):null}),this.boxAt=t=>{let o=this.shownLayout();return o===null?null:dt(o,this.viewStore.raisedPaths(),t)},this.canDragBox=t=>{let o=this.shownLayout();return o!==null&<(o,t)},this.representatives=y(()=>{let t=this.tree();return t?pt(t,this.viewStore.expandedPaths()):new Map}),this.projectedEdges=y(()=>ut(this.edges(),this.representatives(),this.edgeMetric())),this.folderPaths=y(()=>new Set(this.layout()?.boxes.filter(t=>t.isFolder).map(t=>t.path))),this.scene=y(()=>{let t=this.shownLayout();if(!t)return null;let{shownEdgeTypes:o,edgeStyle:i,isAnchoredAtSideMiddle:r,edgeWidth:s}=this.settings();return{layout:t,edges:this.projectedEdges(),edgeMetric:this.edgeMetric(),shownEdgeTypes:o,edgeStyle:i,isAnchoredAtSideMiddle:r,edgeWidth:s,hoveredPath:this.boxStandingFor(this.hoveredPath()),selectedPath:this.boxStandingFor(this.selectedPath()),raisedPaths:this.viewStore.raisedPaths(),draggingPath:this.viewStore.draggingPath(),searchedPaths:this.searchedPaths()}}),oe(()=>{let t=this.tree();t&&this.viewStore.adoptTree(t)}),oe(()=>{(!this.scene()||this.isDeltaState())&&this.markReady()})}select(t){this.writeStore.selectNode(t)}toggle(t){this.folderPaths().has(t)&&this.viewStore.toggle(t)}hover(t){this.writeStore.hoverNode(t)}openContextMenu({path:t,clientX:o,clientY:i}){this.writeStore.openContextMenu(t,o,i)}moveBox({path:t,deltaX:o,deltaY:i}){let[r,s]=this.viewStore.boxOffsets().get(t)??[0,0];this.viewStore.placeBox(t,[r+o,s+i])}endDragging(){this.viewStore.endDragging()}unfocus(){this.writeStore.unfocus()}markReady(){this.viewReadinessStore.markReady("dependencies")}boxStandingFor(t){return t===null?null:this.representatives().get(t)??null}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-dependency-map"]],hostAttrs:[1,"fixed","inset-x-0","z-0","top-[var(--cc-bars-height,49px)]","bottom-[var(--cc-bottom-bar-height,32px)]"],hostVars:2,hostBindings:function(o,i){o&2&&ce("hidden",i.isLoadingFile())},decls:4,vars:1,consts:[[1,"flex","h-full","items-center","justify-center","p-4"],[3,"scene","graphIdentity","fitRequest","canDragBox","boxAt"],[1,"alert","max-w-md"],[3,"boxClicked","boxToggled","boxHovered","boxRightClicked","rendered","boxDragged","boxDragEnded","scene","graphIdentity","fitRequest","canDragBox","boxAt"],["type","button","data-testid","dependency-unfocus",1,"btn","btn-sm",3,"click"]],template:function(o,i){if(o&1&&Q(0,Ps,4,0,"div",0)(1,Is,1,5,"cc-dependency-graph",1)(2,Os,4,1,"div",0)(3,As,4,0,"div",0),o&2){let r;ee(i.isDeltaState()?0:(r=i.scene())?1:i.hasDependencyData()?2:3,r)}},dependencies:[ct],encapsulation:2})}}return e})();var Xe=(()=>{class e{constructor(){this.writeStore=p(I),this.viewStore=p(U),this.focusedNodePath=m(p(T).focusedNodePath$,{requireSync:!0})}receive(t){Fs(t,this.focusedNodePath())||this.writeStore.unfocus(),this.viewStore.requestFit()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function Fs(e,n){return!n||e===n||e.startsWith(`${n}/`)}function ks(e,n,t){let o=e.length>0?e.filter(s=>Te(s)):n,i=o.filter(s=>s.isExcluded).length;return{shown:o.filter(s=>!s.isExcluded&&t.has(s.path)).length,flattened:0,excluded:i,noArea:0}}var Bs=Y(Zt,Kt,Pe,ks),xt=(()=>{class e{constructor(){this.counts$=p(z).select(Bs)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();var _t=(()=>{class e{constructor(){this.store=p(z),this.pathsWithDependencyLevels=m(this.store.select(Pe),{requireSync:!0})}project(t){return eo(t,{pathsWithDependencyLevels:this.pathsWithDependencyLevels(),hidesExcludedNodes:!0})}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();var Et=(()=>{class e{constructor(){this.nodeInteraction=p(Ie),this.sharedViewReadWindow=p(Gt),this.viewStore=p(U),this.selectedNodePath=m(this.sharedViewReadWindow.selectedNodePath$,{requireSync:!0}),this.hoveredNodePath=m(this.sharedViewReadWindow.hoveredNodePath$,{requireSync:!0})}isSelected(t){return this.selectedNodePath()===t.path}isHovered(t){return this.hoveredNodePath()===t.path}select(t){this.nodeInteraction.selectNode(t.path),Te(t)?this.viewStore.reveal(t.path):this.viewStore.openFolder(t.path)}deselect(){this.nodeInteraction.clearSelection()}hover(t){this.nodeInteraction.hoverNode(t.path)}hoverEnd(){this.nodeInteraction.hoverNode(null)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function Hs(e,n){e&1&&_(0,"cc-dependency-edge-legend")}var Xl=(()=>{class e{static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x({type:e,selectors:[["cc-dependency-view"]],features:[De([_t,{provide:Dn,useExisting:_t},Et,{provide:Tn,useExisting:Et},Je,{provide:Ln,useExisting:Je},Ke,{provide:Cn,useExisting:Ke},xt,{provide:wn,useExisting:xt},Ye,{provide:_n,useExisting:Ye},{provide:bn,useExisting:gn},Rn(Bn),Nn(kn),{provide:An,useValue:"dependencies"},Xe,{provide:On,useExisting:Xe},{provide:xn,useValue:{showRules:!0,showSearch:!0,showCounts:!0,canFlatten:!1,modes:[Sn]}},{provide:$n,useValue:{focusableNodes:"folders",showMapActions:!1,showExclude:!0}},Pn("dependencies"),ln()]),_e([Fn])],decls:9,vars:0,consts:[["view","dependencies"],["collapsedContent","",1,"flex-1","min-w-0"]],template:function(o,i){o&1&&(_(0,"cc-loading-file-progress-spinner",0)(1,"cc-dependency-map"),l(2,"cc-sidebar-explorer"),_(3,"cc-explorer-search-bar",1),h(),_(4,"cc-node-context-menu")(5,"cc-dependency-bar"),l(6,"cc-legend-drawer"),bt(7,Hs,1,0,"ng-template"),h(),_(8,"cc-bottom-bar"))},dependencies:[Mn,En,St,yt,vn,vt,qn,yn,cn],encapsulation:2})}}return e})();export{Xl as DependencyViewComponent};
|