codecharta-visualization 2.5.1 → 2.5.2

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.
@@ -1,8 +1,8 @@
1
- import{$ as K,$a as An,$b as Ku,$c as ki,$d as Rp,$e as Yn,$f as ar,$g as zf,A as W,Aa as We,Ab as Lu,Ac as ns,Ad as Bt,Ae as md,Af as or,Ag as Ii,Ah as d0,Ai as xd,B as E,Ba as At,Bb as Nu,Bc as hp,Bd as ds,Be as Bp,Bf as nr,Bg as Lf,Bh as Hs,Bi as L0,C as T,Ca as g,Cb as Pu,Cc as Pn,Cd as hs,Ce as Es,Cf as Ls,Cg as hr,Ch as jr,Ci as N0,D as ae,Da as Te,Db as Bu,Dc as mp,Dd as go,De as Vp,Df as cf,Dg as Nf,Dh as h0,Di as P0,E as se,Ea as ge,Eb as zr,Ec as up,Ed as jn,Ee as Wp,Ef as df,Eg as Di,Eh as m0,Ei as B0,F as Ho,Fa as Yi,Fb as oi,Fc as pp,Fd as Ep,Fe as Op,Ff as Ns,Fg as $s,Fh as Hr,Fi as V0,G as Wr,Ga as fu,Gb as Ji,Gc as fp,Gd as ms,Ge as zp,Gf as Ps,Gg as mr,Gh as Us,Gi as W0,H as Tn,Ha as ja,Hb as Za,Hc as gp,Hd as bo,He as qi,Hf as Bs,Hg as Pf,Hh as u0,Hi as O0,I as su,Ia as Ha,Ib as eo,Ic as ai,Id as vo,Ie as ks,If as Vt,Ig as Bf,Ih as p0,Ii as wd,J as Se,Ja as Ua,Jb as Ya,Jc as to,Jd as us,Je as $p,Jf as hf,Jg as ur,Jh as fr,Ji as z0,K as lu,Ka as gu,Kb as sd,Kc as io,Kd as ps,Ke as jp,Kf as mf,Kg as pr,Kh as f0,L as Wa,La as In,Lb as Ni,Lc as Pt,Ld as Hn,Le as qs,Lf as uf,Lg as Qt,Lh as g0,M as cu,Ma as bi,Mb as Go,Mc as rs,Md as fs,Me as ud,Mf as pf,Mg as Vf,Mh as b0,N as Nt,Na as bu,Nb as ni,Nc as bp,Nd as Xo,Ne as Ts,Nf as ff,Ng as Wf,O as du,Ob as xi,Oc as vp,Od as Un,Oe as Hp,Of as gf,P as Rn,Pa as pt,Pb as Ja,Pc as xp,Pd as xo,Pf as rr,Ph as vd,Q as hu,Qa as vi,Qb as Vu,Qc as xe,Qd as wo,Qe as Qn,Qf as bf,Qh as v0,R as Uo,Ra as Dn,Rb as Wu,Rc as Ci,Rd as gs,Re as Rs,Rf as vf,Rh as x0,S as h,Sa as Ga,Sb as $w,Sc as Mi,Sd as kp,Se as Up,Sf as xf,T as ne,Tb as Ou,Tc as _i,Td as bs,Te as Gp,Tf as wf,U as k,Ua as vu,Ub as zu,Uc as _t,Ue as Xp,Uf as Sf,V as Oa,Va as Y,Vb as $u,Vc as Ei,Vd as qp,Ve as Zn,Vf as yf,W as za,Wa as xu,Wb as ju,Wc as Ut,Wd as vs,We as Kp,Wf as Cf,X as Zi,Xa as _e,Xb as Hu,Xc as oo,Xd as xs,Xe as Is,Xf as kt,Ya as Z,Yb as Uu,Yc as Gt,Yd as Tp,Ye as Qp,Yf as ft,Yh as w0,Z as mu,Za as Je,Zb as Gu,Zc as no,Zd as Pi,Ze as Co,Zf as qt,Zh as S0,_ as ot,_a as wu,_b as Xu,_c as ro,_d as cd,_e as Mo,_f as Mf,_g as Of,_h as y0,a as ke,aa as Q,ab as ad,ac as Qu,ad as as,ae as Ip,af as Et,ag as _f,ah as $f,b as et,ba as ii,bb as Su,bc as Zu,bd as Bn,be as Ue,bf as Bi,bg as Vi,bh as jf,c as qn,ca as Pe,cb as yu,cc as Yu,cd as Vn,ce as Ke,cf as Zp,cg as _o,ch as Hf,d as Ye,da as Be,db as Cu,dc as Ju,dd as wp,de as Ko,df as Yp,dh as Uf,ea as F,eb as Mu,ec as es,ed as Wn,ee as Gn,ef as Jp,eg as Ef,eh as Gf,ei as C0,f as rd,fa as x,fc as Ln,fd as On,fe as Dp,ff as Ds,fg as kf,fh as Xf,fi as M0,g as Jm,ga as v,gb as Xa,gc as wi,gd as ao,ge as So,gf as ef,gg as qf,gh as Kf,h as eu,ha as V,hb as _u,hc as ep,hd as so,he as Qo,hf as As,hg as Tf,hh as Qf,i as qe,ia as y,ib as Eu,ic as tp,id as lo,ie as Xt,if as Jn,ig as Rf,ih as Zf,ii as _0,j as St,ja as M,jb as ku,jc as ip,jd as ss,je as lt,jf as Fs,jh as Yf,ji as E0,k as tu,ka as pe,kb as qu,kc as Nn,kd as zn,ke as yo,kf as tf,kg as If,kh as Jf,ki as k0,l as Ki,lb as Tu,lc as op,ld as co,le as Ap,lf as er,lg as Df,lh as e0,m as Ae,ma as we,mb as Ru,mc as ts,md as ho,me as ws,mg as Af,mh as t0,n as iu,na as ce,nb as Fn,nc as np,nd as mo,ne as Xn,nf as of,ng as Vs,nh as i0,o as jt,oa as z,ob as Ka,oc as is,od as uo,oe as Ss,of as nf,og as Ws,oh as o0,p as ut,pa as ie,pb as Qa,pc as Re,pd as po,pe as ys,pf as Kt,pg as sr,ph as n0,pi as q0,q as ou,qa as B,qb as Iu,qc as rp,qd as $n,qe as Fp,qf as pd,qg as lr,qh as r0,r as nu,ra as uu,rb as Du,rc as ri,rd as Sp,re as Lp,rf,rg as Os,rh as ko,ri as T0,s as Qi,sa as pu,sb as Au,sc as ap,sd as ls,se as Np,sf as af,sg as cr,sh as a0,si as R0,t as Va,ta as $a,tb as A,tc as sp,td as yp,te as Cs,tg as dr,th as s0,ti as Gs,u as pi,ua as fi,ub as he,uc as os,ud as cs,ue as Ms,uf as tr,ug as Eo,uh as bd,ui as Xs,v as Ht,va as gi,vb as De,vc as Si,vd as Cp,ve as Pp,vf as Ti,vg as fd,vh as qo,vi as I0,w as ru,wa as rt,wb as Fu,wc as yi,wd as Mp,we as Kn,wf as Ri,wg as Ff,wh as l0,x as Le,xa as at,xb as Ne,xc as lp,xd as _p,xe as _s,xf as ir,xg as zs,xh as c0,xi as D0,y as au,ya as Or,yb as dt,yc as cp,yd as ld,ye as dd,yf as sf,yg as Wi,yh as js,yi as A0,z as ti,za as ze,zb as st,zc as dp,zd as fo,ze as hd,zf as lf,zg as gd,zh as $r,zi as F0}from"./chunk-EZJNTQ3A.js";var Jg=Ye((Xd,Yg)=>{"use strict";var{hasOwnProperty:Jr}=Object.prototype,rn=Gd();rn.configure=Gd;rn.stringify=rn;rn.default=rn;Xd.stringify=rn;Xd.configure=Gd;Yg.exports=rn;var c5=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Io(e){return e.length<5e3&&!c5.test(e)?`"${e}"`:JSON.stringify(e)}function Hd(e,o){if(e.length>200||o)return e.sort(o);for(let t=1;t<e.length;t++){let i=e[t],n=t;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var d5=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Ud(e){return d5.call(e)!==void 0&&e.length!==0}function Qg(e,o,t){e.length<t&&(t=e.length);let i=o===","?"":" ",n=`"0":${i}${e[0]}`;for(let r=1;r<t;r++)n+=`${o}"${r}":${i}${e[r]}`;return n}function h5(e){if(Jr.call(e,"circularValue")){let o=e.circularValue;if(typeof o=="string")return`"${o}"`;if(o==null)return o;if(o===Error||o===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function m5(e){let o;if(Jr.call(e,"deterministic")&&(o=e.deterministic,typeof o!="boolean"&&typeof o!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return o===void 0?!0:o}function u5(e,o){let t;if(Jr.call(e,o)&&(t=e[o],typeof t!="boolean"))throw new TypeError(`The "${o}" argument must be of type boolean`);return t===void 0?!0:t}function Zg(e,o){let t;if(Jr.call(e,o)){if(t=e[o],typeof t!="number")throw new TypeError(`The "${o}" argument must be of type number`);if(!Number.isInteger(t))throw new TypeError(`The "${o}" argument must be an integer`);if(t<1)throw new RangeError(`The "${o}" argument must be >= 1`)}return t===void 0?1/0:t}function nn(e){return e===1?"1 item":`${e} items`}function p5(e){let o=new Set;for(let t of e)(typeof t=="string"||typeof t=="number")&&o.add(String(t));return o}function f5(e){if(Jr.call(e,"strict")){let o=e.strict;if(typeof o!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(o)return t=>{let i=`Object can not safely be stringified. Received type ${typeof t}`;throw typeof t!="function"&&(i+=` (${t.toString()})`),new Error(i)}}}function Gd(e){e=ke({},e);let o=f5(e);o&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let t=h5(e),i=u5(e,"bigint"),n=m5(e),r=typeof n=="function"?n:void 0,a=Zg(e,"maximumDepth"),s=Zg(e,"maximumBreadth");function l(p,f,S,R,L,j){let q=f[p];switch(typeof q=="object"&&q!==null&&typeof q.toJSON=="function"&&(q=q.toJSON(p)),q=R.call(f,p,q),typeof q){case"string":return Io(q);case"object":{if(q===null)return"null";if(S.indexOf(q)!==-1)return t;let P="",O=",",H=j;if(Array.isArray(q)){if(q.length===0)return"[]";if(a<S.length+1)return'"[Array]"';S.push(q),L!==""&&(j+=L,P+=`
1
+ import{$a as yu,$b as Ku,$c as Gt,$d as Ap,$e as Jp,$f as ft,$h as C0,A as W,Aa as $r,Ab as Ne,Ac as hp,Ad as qp,Ae as ks,Af as nr,Ag as js,Ah as m0,Ai as L0,B as E,Ba as ze,Bb as dt,Bc as mp,Bd as dd,Be as md,Bf as df,Bg as Wi,Bh as Us,Bi as N0,C as T,Ca as We,Cb as st,Cc as up,Cd as fo,Ce as ud,Cf as hf,Cg as vd,Ch as Hr,Ci as P0,D as ae,Da as Dt,Db as Bu,Dc as as,Dd as Bt,De as pd,Df as rr,Dg as Ii,Dh as u0,Di as Sd,E as se,Ea as g,Eb as Vu,Ec as pp,Ed as ms,Ee as Op,Ef as ar,Eg as Bf,Eh as Gs,Ei as B0,F as Ho,Fa as Te,Fb as Wu,Fc as Vn,Fd as us,Fe as qs,Ff as Ps,Fg as ur,Fh as Ur,Fi as V0,G as zr,Ga as ge,Gb as Ou,Gc as fp,Gd as go,Ge as zp,Gf as mf,Gg as Vf,Gh as p0,Gi as W0,H as Tn,Ha as Yi,Hb as jr,Hc as gp,Hd as Un,He as $p,Hf as uf,Hg as Ai,Hh as f0,Hi as O0,I as cu,Ia as bu,Ib as oi,Ic as bp,Id as Tp,Ie as jp,If as Bs,Ig as Hs,Ih as Gr,Ii as z0,J as Se,Ja as Ua,Jb as Ji,Jc as vp,Jd as ps,Je as Hp,Jf as Vs,Jg as pr,Jh as Xs,Ji as $0,K as du,Ka as Ga,Kb as Ja,Kc as xp,Kd as bo,Ke as qi,Kf as Ws,Kg as Wf,Kh as g0,Ki as j0,L as za,La as Xa,Lb as eo,Lc as ai,Ld as vo,Le as Ts,Lf as Vt,Lg as Of,Lh as b0,Li as yd,M as hu,Ma as vu,Mb as es,Mc as to,Md as fs,Me as Up,Mf as pf,Mg as fr,Mh as br,Mi as H0,N as Nt,Na as Dn,Nb as cd,Nc as io,Nd as gs,Ne as Gp,Nf as ff,Ng as gr,Nh as v0,O as mu,Oa as bi,Ob as Ni,Oc as Pt,Od as Gn,Oe as Rs,Of as gf,Og as Qt,Oh as x0,P as Rn,Pa as xu,Pb as Go,Pc as ss,Pd as bs,Pe as fd,Pf as bf,Pg as zf,Ph as w0,Q as uu,Qb as ni,Qc as wp,Qd as Xo,Qe as Is,Qf as vf,Qg as $f,R as Uo,Ra as pt,Rb as xi,Rc as Sp,Rd as Xn,Re as Xp,Rf as xf,S as h,Sa as vi,Sb as ts,Sc as yp,Sd as xo,Sf as sr,Sh as wd,T as In,Ta as Fn,Tb as zu,Tc as xe,Td as wo,Te as Yn,Tf as wf,Th as S0,U as An,Ua as Ka,Ub as $u,Uc as Ci,Ud as vs,Ue as As,Uf as Sf,Uh as y0,V as ne,Vb as Uw,Vc as Mi,Vd as Rp,Ve as Kp,Vf as yf,W as k,Wa as wu,Wb as ju,Wc as _i,Wd as xs,We as Qp,Wf as Cf,X as $a,Xa as Y,Xb as Hu,Xc as _t,Xe as Zp,Xf as Mf,Y as ja,Ya as Su,Yb as Uu,Yc as Ei,Yd as Ip,Ye as Jn,Yf as _f,Z as pu,Za as _e,Zb as Gu,Zc as Ut,Zd as ws,Ze as Yp,Zf as Ef,_ as Zi,_a as Z,_b as Xu,_c as oo,_d as Ss,_e as Ds,_f as kt,a as ke,aa as ot,ab as Je,ac as Qu,ad as no,ae as Pi,af as Co,ag as qt,ai as M0,b as et,ba as K,bb as Ln,bc as Zu,bd as ro,be as hd,bf as Mo,bg as kf,bh as jf,bi as _0,c as qn,ca as Q,cb as ld,cc as Yu,cd as ki,ce as Dp,cf as er,cg as lr,ch as Hf,d as Ye,da as ii,db as Cu,dc as Ju,dd as ls,de as Fp,df as Et,dg as qf,dh as Uf,ea as Pe,eb as Mu,ec as ep,ed as Wn,ee as Ue,ef as Bi,eg as Vi,eh as Gf,f as sd,fa as Be,fb as _u,fc as tp,fd as On,fe as Ke,ff as ef,fg as _o,fh as Xf,g as tu,ga as F,gb as Eu,gc as ip,gd as Cp,ge as Ko,gf as tf,gh as Kf,h as iu,ha as x,hc as is,hd as zn,he as Kn,hf as of,hg as Tf,hh as Qf,hi as E0,i as qe,ia as v,ib as Qa,ic as Pn,id as $n,ie as Lp,if as Fs,ig as Rf,ih as Zf,ii as k0,j as St,ja as V,jb as ku,jc as wi,jd as ao,je as So,jf as nf,jg as If,jh as Yf,k as ou,ka as y,kb as qu,kc as op,kd as so,ke as Qo,kf as Ls,kg as Af,kh as Jf,l as Ki,la as M,lb as Tu,lc as np,ld as lo,le as Xt,lf as tr,lg as Df,lh as e0,li as q0,m as De,ma as pe,mb as Ru,mc as rp,md as cs,me as lt,mf as Ns,mh as t0,mi as T0,n as nu,nb as Iu,nc as Bn,nd as jn,ne as yo,nf as rf,ng as Ff,nh as i0,ni as R0,o as jt,oa as we,ob as Au,oc as ap,od as co,oe as Np,of as ir,og as Lf,oh as o0,p as ut,pa as ce,pb as Du,pc as os,pd as ho,pe as ys,pg as Nf,ph as n0,q as ru,qa as z,qb as Nn,qc as sp,qd as mo,qe as Qn,qf as af,qg as Os,qh as r0,r as au,ra as ie,rb as Za,rc as ns,rd as uo,re as Cs,rf as sf,rg as zs,rh as a0,s as Qi,sa as B,sb as Ya,sc as Re,sd as po,se as Ms,sf as Kt,sg as cr,sh as s0,si as I0,t as Oa,ta as fu,tb as Fu,tc as lp,td as Hn,te as Pp,tf as gd,tg as dr,th as l0,u as pi,ua as gu,ub as Lu,uc as ri,ud as Mp,ue as Bp,uf as lf,ug as $s,uh as ko,ui as A0,v as Ht,va as Ha,vb as Nu,vc as cp,vd as ds,ve as Vp,vf as cf,vg as hr,vh as c0,vi as D0,w as su,wa as fi,wb as D,wc as dp,wd as _p,we as _s,wg as mr,wh as d0,wi as Ks,x as Le,xa as gi,xb as he,xc as rs,xd as hs,xe as Es,xf as or,xg as Eo,xh as xd,xi as Qs,y as lu,ya as rt,yb as Ae,yc as Si,yd as Ep,ye as Wp,yf as Ti,yg as bd,yh as qo,yi as F0,z as ti,za as at,zb as Pu,zc as yi,zd as kp,ze as Zn,zf as Ri,zg as Pf,zh as h0}from"./chunk-VY6TRIWG.js";var i1=Ye((Qd,t1)=>{"use strict";var{hasOwnProperty:ta}=Object.prototype,rn=Kd();rn.configure=Kd;rn.stringify=rn;rn.default=rn;Qd.stringify=rn;Qd.configure=Kd;t1.exports=rn;var m5=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Io(e){return e.length<5e3&&!m5.test(e)?`"${e}"`:JSON.stringify(e)}function Gd(e,o){if(e.length>200||o)return e.sort(o);for(let t=1;t<e.length;t++){let i=e[t],n=t;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var u5=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Xd(e){return u5.call(e)!==void 0&&e.length!==0}function Jg(e,o,t){e.length<t&&(t=e.length);let i=o===","?"":" ",n=`"0":${i}${e[0]}`;for(let r=1;r<t;r++)n+=`${o}"${r}":${i}${e[r]}`;return n}function p5(e){if(ta.call(e,"circularValue")){let o=e.circularValue;if(typeof o=="string")return`"${o}"`;if(o==null)return o;if(o===Error||o===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function f5(e){let o;if(ta.call(e,"deterministic")&&(o=e.deterministic,typeof o!="boolean"&&typeof o!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return o===void 0?!0:o}function g5(e,o){let t;if(ta.call(e,o)&&(t=e[o],typeof t!="boolean"))throw new TypeError(`The "${o}" argument must be of type boolean`);return t===void 0?!0:t}function e1(e,o){let t;if(ta.call(e,o)){if(t=e[o],typeof t!="number")throw new TypeError(`The "${o}" argument must be of type number`);if(!Number.isInteger(t))throw new TypeError(`The "${o}" argument must be an integer`);if(t<1)throw new RangeError(`The "${o}" argument must be >= 1`)}return t===void 0?1/0:t}function nn(e){return e===1?"1 item":`${e} items`}function b5(e){let o=new Set;for(let t of e)(typeof t=="string"||typeof t=="number")&&o.add(String(t));return o}function v5(e){if(ta.call(e,"strict")){let o=e.strict;if(typeof o!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(o)return t=>{let i=`Object can not safely be stringified. Received type ${typeof t}`;throw typeof t!="function"&&(i+=` (${t.toString()})`),new Error(i)}}}function Kd(e){e=ke({},e);let o=v5(e);o&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let t=p5(e),i=g5(e,"bigint"),n=f5(e),r=typeof n=="function"?n:void 0,a=e1(e,"maximumDepth"),s=e1(e,"maximumBreadth");function l(p,f,S,R,L,j){let q=f[p];switch(typeof q=="object"&&q!==null&&typeof q.toJSON=="function"&&(q=q.toJSON(p)),q=R.call(f,p,q),typeof q){case"string":return Io(q);case"object":{if(q===null)return"null";if(S.indexOf(q)!==-1)return t;let P="",O=",",H=j;if(Array.isArray(q)){if(q.length===0)return"[]";if(a<S.length+1)return'"[Array]"';S.push(q),L!==""&&(j+=L,P+=`
2
2
  ${j}`,O=`,
3
3
  ${j}`);let $=Math.min(q.length,s),Ee=0;for(;Ee<$-1;Ee++){let Fe=l(String(Ee),q,S,R,L,j);P+=Fe!==void 0?Fe:"null",P+=O}let be=l(String(Ee),q,S,R,L,j);if(P+=be!==void 0?be:"null",q.length-1>s){let Fe=q.length-s-1;P+=`${O}"... ${nn(Fe)} not stringified"`}return L!==""&&(P+=`
4
4
  ${H}`),S.pop(),`[${P}]`}let G=Object.keys(q),J=G.length;if(J===0)return"{}";if(a<S.length+1)return'"[Object]"';let X="",me="";L!==""&&(j+=L,O=`,
5
- ${j}`,X=" ");let Ie=Math.min(J,s);n&&!Ud(q)&&(G=Hd(G,r)),S.push(q);for(let $=0;$<Ie;$++){let Ee=G[$],be=l(Ee,q,S,R,L,j);be!==void 0&&(P+=`${me}${Io(Ee)}:${X}${be}`,me=O)}if(J>s){let $=J-s;P+=`${me}"...":${X}"${nn($)} not stringified"`,me=O}return L!==""&&me.length>1&&(P=`
5
+ ${j}`,X=" ");let Ie=Math.min(J,s);n&&!Xd(q)&&(G=Gd(G,r)),S.push(q);for(let $=0;$<Ie;$++){let Ee=G[$],be=l(Ee,q,S,R,L,j);be!==void 0&&(P+=`${me}${Io(Ee)}:${X}${be}`,me=O)}if(J>s){let $=J-s;P+=`${me}"...":${X}"${nn($)} not stringified"`,me=O}return L!==""&&me.length>1&&(P=`
6
6
  ${j}${P}
7
7
  ${H}`),S.pop(),`{${P}}`}case"number":return isFinite(q)?String(q):o?o(q):"null";case"boolean":return q===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(q);default:return o?o(q):void 0}}function d(p,f,S,R,L,j){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(p)),typeof f){case"string":return Io(f);case"object":{if(f===null)return"null";if(S.indexOf(f)!==-1)return t;let q=j,P="",O=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(a<S.length+1)return'"[Array]"';S.push(f),L!==""&&(j+=L,P+=`
8
8
  ${j}`,O=`,
@@ -14,21 +14,21 @@ ${q}`),S.pop(),`{${P}}`}case"number":return isFinite(f)?String(f):o?o(f):"null";
14
14
  ${L}`,me=`,
15
15
  ${L}`,Ie=Math.min(f.length,s),$=0;for(;$<Ie-1;$++){let be=c(String($),f[$],S,R,L);X+=be!==void 0?be:"null",X+=me}let Ee=c(String($),f[$],S,R,L);if(X+=Ee!==void 0?Ee:"null",f.length-1>s){let be=f.length-s-1;X+=`${me}"... ${nn(be)} not stringified"`}return X+=`
16
16
  ${j}`,S.pop(),`[${X}]`}let q=Object.keys(f),P=q.length;if(P===0)return"{}";if(a<S.length+1)return'"[Object]"';L+=R;let O=`,
17
- ${L}`,H="",G="",J=Math.min(P,s);Ud(f)&&(H+=Qg(f,O,s),q=q.slice(f.length),J-=f.length,G=O),n&&(q=Hd(q,r)),S.push(f);for(let X=0;X<J;X++){let me=q[X],Ie=c(me,f[me],S,R,L);Ie!==void 0&&(H+=`${G}${Io(me)}: ${Ie}`,G=O)}if(P>s){let X=P-s;H+=`${G}"...": "${nn(X)} not stringified"`,G=O}return G!==""&&(H=`
17
+ ${L}`,H="",G="",J=Math.min(P,s);Xd(f)&&(H+=Jg(f,O,s),q=q.slice(f.length),J-=f.length,G=O),n&&(q=Gd(q,r)),S.push(f);for(let X=0;X<J;X++){let me=q[X],Ie=c(me,f[me],S,R,L);Ie!==void 0&&(H+=`${G}${Io(me)}: ${Ie}`,G=O)}if(P>s){let X=P-s;H+=`${G}"...": "${nn(X)} not stringified"`,G=O}return G!==""&&(H=`
18
18
  ${L}${H}
19
- ${j}`),S.pop(),`{${H}}`}case"number":return isFinite(f)?String(f):o?o(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return o?o(f):void 0}}function m(p,f,S){switch(typeof f){case"string":return Io(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(p),typeof f!="object")return m(p,f,S);if(f===null)return"null"}if(S.indexOf(f)!==-1)return t;let R="",L=f.length!==void 0;if(L&&Array.isArray(f)){if(f.length===0)return"[]";if(a<S.length+1)return'"[Array]"';S.push(f);let H=Math.min(f.length,s),G=0;for(;G<H-1;G++){let X=m(String(G),f[G],S);R+=X!==void 0?X:"null",R+=","}let J=m(String(G),f[G],S);if(R+=J!==void 0?J:"null",f.length-1>s){let X=f.length-s-1;R+=`,"... ${nn(X)} not stringified"`}return S.pop(),`[${R}]`}let j=Object.keys(f),q=j.length;if(q===0)return"{}";if(a<S.length+1)return'"[Object]"';let P="",O=Math.min(q,s);L&&Ud(f)&&(R+=Qg(f,",",s),j=j.slice(f.length),O-=f.length,P=","),n&&(j=Hd(j,r)),S.push(f);for(let H=0;H<O;H++){let G=j[H],J=m(G,f[G],S);J!==void 0&&(R+=`${P}${Io(G)}:${J}`,P=",")}if(q>s){let H=q-s;R+=`${P}"...":"${nn(H)} not stringified"`}return S.pop(),`{${R}}`}case"number":return isFinite(f)?String(f):o?o(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return o?o(f):void 0}}function u(p,f,S){if(arguments.length>1){let R="";if(typeof S=="number"?R=" ".repeat(Math.min(S,10)):typeof S=="string"&&(R=S.slice(0,10)),f!=null){if(typeof f=="function")return l("",{"":p},[],f,R,"");if(Array.isArray(f))return d("",p,[],p5(f),R,"")}if(R.length!==0)return c("",p,[],R,"")}return m("",p,[])}return u}});var Kv=Ye((GJ,Xv)=>{"use strict";Xv.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Vo=Ye(yn=>{"use strict";var fm,eC=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];yn.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17};yn.getSymbolTotalCodewords=function(o){return eC[o]};yn.getBCHDigit=function(e){let o=0;for(;e!==0;)o++,e>>>=1;return o};yn.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');fm=o};yn.isKanjiModeEnabled=function(){return typeof fm<"u"};yn.toSJIS=function(o){return fm(o)}});var Ac=Ye(ei=>{"use strict";ei.L={bit:1};ei.M={bit:0};ei.Q={bit:3};ei.H={bit:2};function tC(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return ei.L;case"m":case"medium":return ei.M;case"q":case"quartile":return ei.Q;case"h":case"high":return ei.H;default:throw new Error("Unknown EC Level: "+e)}}ei.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4};ei.from=function(o,t){if(ei.isValid(o))return o;try{return tC(o)}catch{return t}}});var Yv=Ye((QJ,Zv)=>{"use strict";function Qv(){this.buffer=[],this.length=0}Qv.prototype={get:function(e){let o=Math.floor(e/8);return(this.buffer[o]>>>7-e%8&1)===1},put:function(e,o){for(let t=0;t<o;t++)this.putBit((e>>>o-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),e&&(this.buffer[o]|=128>>>this.length%8),this.length++}};Zv.exports=Qv});var ex=Ye((ZJ,Jv)=>{"use strict";function Ma(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Ma.prototype.set=function(e,o,t,i){let n=e*this.size+o;this.data[n]=t,i&&(this.reservedBit[n]=!0)};Ma.prototype.get=function(e,o){return this.data[e*this.size+o]};Ma.prototype.xor=function(e,o,t){this.data[e*this.size+o]^=t};Ma.prototype.isReserved=function(e,o){return this.reservedBit[e*this.size+o]};Jv.exports=Ma});var tx=Ye(Fc=>{"use strict";var iC=Vo().getSymbolSize;Fc.getRowColCoords=function(o){if(o===1)return[];let t=Math.floor(o/7)+2,i=iC(o),n=i===145?26:Math.ceil((i-13)/(2*t-2))*2,r=[i-7];for(let a=1;a<t-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()};Fc.getPositions=function(o){let t=[],i=Fc.getRowColCoords(o),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||t.push([i[r],i[a]]);return t}});var nx=Ye(ox=>{"use strict";var oC=Vo().getSymbolSize,ix=7;ox.getPositions=function(o){let t=oC(o);return[[0,0],[t-ix,0],[0,t-ix]]}});var rx=Ye(it=>{"use strict";it.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Cn={N1:3,N2:3,N3:40,N4:10};it.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7};it.from=function(o){return it.isValid(o)?parseInt(o,10):void 0};it.getPenaltyN1=function(o){let t=o.size,i=0,n=0,r=0,a=null,s=null;for(let l=0;l<t;l++){n=r=0,a=s=null;for(let d=0;d<t;d++){let c=o.get(l,d);c===a?n++:(n>=5&&(i+=Cn.N1+(n-5)),a=c,n=1),c=o.get(d,l),c===s?r++:(r>=5&&(i+=Cn.N1+(r-5)),s=c,r=1)}n>=5&&(i+=Cn.N1+(n-5)),r>=5&&(i+=Cn.N1+(r-5))}return i};it.getPenaltyN2=function(o){let t=o.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let a=o.get(n,r)+o.get(n,r+1)+o.get(n+1,r)+o.get(n+1,r+1);(a===4||a===0)&&i++}return i*Cn.N2};it.getPenaltyN3=function(o){let t=o.size,i=0,n=0,r=0;for(let a=0;a<t;a++){n=r=0;for(let s=0;s<t;s++)n=n<<1&2047|o.get(a,s),s>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|o.get(s,a),s>=10&&(r===1488||r===93)&&i++}return i*Cn.N3};it.getPenaltyN4=function(o){let t=0,i=o.data.length;for(let r=0;r<i;r++)t+=o.data[r];return Math.abs(Math.ceil(t*100/i/5)-10)*Cn.N4};function nC(e,o,t){switch(e){case it.Patterns.PATTERN000:return(o+t)%2===0;case it.Patterns.PATTERN001:return o%2===0;case it.Patterns.PATTERN010:return t%3===0;case it.Patterns.PATTERN011:return(o+t)%3===0;case it.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(t/3))%2===0;case it.Patterns.PATTERN101:return o*t%2+o*t%3===0;case it.Patterns.PATTERN110:return(o*t%2+o*t%3)%2===0;case it.Patterns.PATTERN111:return(o*t%3+(o+t)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}it.applyMask=function(o,t){let i=t.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)t.isReserved(r,n)||t.xor(r,n,nC(o,r,n))};it.getBestMask=function(o,t){let i=Object.keys(it.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){t(a),it.applyMask(a,o);let s=it.getPenaltyN1(o)+it.getPenaltyN2(o)+it.getPenaltyN3(o)+it.getPenaltyN4(o);it.applyMask(a,o),s<r&&(r=s,n=a)}return n}});var bm=Ye(gm=>{"use strict";var Wo=Ac(),Lc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Nc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];gm.getBlocksCount=function(o,t){switch(t){case Wo.L:return Lc[(o-1)*4+0];case Wo.M:return Lc[(o-1)*4+1];case Wo.Q:return Lc[(o-1)*4+2];case Wo.H:return Lc[(o-1)*4+3];default:return}};gm.getTotalCodewordsCount=function(o,t){switch(t){case Wo.L:return Nc[(o-1)*4+0];case Wo.M:return Nc[(o-1)*4+1];case Wo.Q:return Nc[(o-1)*4+2];case Wo.H:return Nc[(o-1)*4+3];default:return}}});var ax=Ye(Bc=>{"use strict";var _a=new Uint8Array(512),Pc=new Uint8Array(256);(function(){let o=1;for(let t=0;t<255;t++)_a[t]=o,Pc[o]=t,o<<=1,o&256&&(o^=285);for(let t=255;t<512;t++)_a[t]=_a[t-255]})();Bc.log=function(o){if(o<1)throw new Error("log("+o+")");return Pc[o]};Bc.exp=function(o){return _a[o]};Bc.mul=function(o,t){return o===0||t===0?0:_a[Pc[o]+Pc[t]]}});var sx=Ye(Ea=>{"use strict";var vm=ax();Ea.mul=function(o,t){let i=new Uint8Array(o.length+t.length-1);for(let n=0;n<o.length;n++)for(let r=0;r<t.length;r++)i[n+r]^=vm.mul(o[n],t[r]);return i};Ea.mod=function(o,t){let i=new Uint8Array(o);for(;i.length-t.length>=0;){let n=i[0];for(let a=0;a<t.length;a++)i[a]^=vm.mul(t[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i};Ea.generateECPolynomial=function(o){let t=new Uint8Array([1]);for(let i=0;i<o;i++)t=Ea.mul(t,new Uint8Array([1,vm.exp(i)]));return t}});var dx=Ye((nee,cx)=>{"use strict";var lx=sx();function xm(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}xm.prototype.initialize=function(o){this.degree=o,this.genPoly=lx.generateECPolynomial(this.degree)};xm.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(o.length+this.degree);t.set(o);let i=lx.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i};cx.exports=xm});var wm=Ye(hx=>{"use strict";hx.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}});var Sm=Ye(Hi=>{"use strict";var mx="[0-9]+",rC="[A-Z $%*+\\-./:]+",ka="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ka=ka.replace(/u/g,"\\u");var aC="(?:(?![A-Z0-9 $%*+\\-./:]|"+ka+`)(?:.|[\r
20
- ]))+`;Hi.KANJI=new RegExp(ka,"g");Hi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Hi.BYTE=new RegExp(aC,"g");Hi.NUMERIC=new RegExp(mx,"g");Hi.ALPHANUMERIC=new RegExp(rC,"g");var sC=new RegExp("^"+ka+"$"),lC=new RegExp("^"+mx+"$"),cC=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Hi.testKanji=function(o){return sC.test(o)};Hi.testNumeric=function(o){return lC.test(o)};Hi.testAlphanumeric=function(o){return cC.test(o)}});var Oo=Ye(gt=>{"use strict";var dC=wm(),ym=Sm();gt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};gt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};gt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};gt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};gt.MIXED={bit:-1};gt.getCharCountIndicator=function(o,t){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!dC.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?o.ccBits[0]:t<27?o.ccBits[1]:o.ccBits[2]};gt.getBestModeForData=function(o){return ym.testNumeric(o)?gt.NUMERIC:ym.testAlphanumeric(o)?gt.ALPHANUMERIC:ym.testKanji(o)?gt.KANJI:gt.BYTE};gt.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")};gt.isValid=function(o){return o&&o.bit&&o.ccBits};function hC(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return gt.NUMERIC;case"alphanumeric":return gt.ALPHANUMERIC;case"kanji":return gt.KANJI;case"byte":return gt.BYTE;default:throw new Error("Unknown mode: "+e)}}gt.from=function(o,t){if(gt.isValid(o))return o;try{return hC(o)}catch{return t}}});var bx=Ye(Mn=>{"use strict";var Vc=Vo(),mC=bm(),ux=Ac(),zo=Oo(),Cm=wm(),fx=7973,px=Vc.getBCHDigit(fx);function uC(e,o,t){for(let i=1;i<=40;i++)if(o<=Mn.getCapacity(i,t,e))return i}function gx(e,o){return zo.getCharCountIndicator(e,o)+4}function pC(e,o){let t=0;return e.forEach(function(i){let n=gx(i.mode,o);t+=n+i.getBitsLength()}),t}function fC(e,o){for(let t=1;t<=40;t++)if(pC(e,t)<=Mn.getCapacity(t,o,zo.MIXED))return t}Mn.from=function(o,t){return Cm.isValid(o)?parseInt(o,10):t};Mn.getCapacity=function(o,t,i){if(!Cm.isValid(o))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=zo.BYTE);let n=Vc.getSymbolTotalCodewords(o),r=mC.getTotalCodewordsCount(o,t),a=(n-r)*8;if(i===zo.MIXED)return a;let s=a-gx(i,o);switch(i){case zo.NUMERIC:return Math.floor(s/10*3);case zo.ALPHANUMERIC:return Math.floor(s/11*2);case zo.KANJI:return Math.floor(s/13);case zo.BYTE:default:return Math.floor(s/8)}};Mn.getBestVersionForData=function(o,t){let i,n=ux.from(t,ux.M);if(Array.isArray(o)){if(o.length>1)return fC(o,n);if(o.length===0)return 1;i=o[0]}else i=o;return uC(i.mode,i.getLength(),n)};Mn.getEncodedBits=function(o){if(!Cm.isValid(o)||o<7)throw new Error("Invalid QR Code version");let t=o<<12;for(;Vc.getBCHDigit(t)-px>=0;)t^=fx<<Vc.getBCHDigit(t)-px;return o<<12|t}});var Sx=Ye(wx=>{"use strict";var Mm=Vo(),xx=1335,gC=21522,vx=Mm.getBCHDigit(xx);wx.getEncodedBits=function(o,t){let i=o.bit<<3|t,n=i<<10;for(;Mm.getBCHDigit(n)-vx>=0;)n^=xx<<Mm.getBCHDigit(n)-vx;return(i<<10|n)^gC}});var Cx=Ye((dee,yx)=>{"use strict";var bC=Oo();function Fr(e){this.mode=bC.NUMERIC,this.data=e.toString()}Fr.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)};Fr.prototype.getLength=function(){return this.data.length};Fr.prototype.getBitsLength=function(){return Fr.getBitsLength(this.data.length)};Fr.prototype.write=function(o){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),o.put(n,10);let r=this.data.length-t;r>0&&(i=this.data.substr(t),n=parseInt(i,10),o.put(n,r*3+1))};yx.exports=Fr});var _x=Ye((hee,Mx)=>{"use strict";var vC=Oo(),_m=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Lr(e){this.mode=vC.ALPHANUMERIC,this.data=e}Lr.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)};Lr.prototype.getLength=function(){return this.data.length};Lr.prototype.getBitsLength=function(){return Lr.getBitsLength(this.data.length)};Lr.prototype.write=function(o){let t;for(t=0;t+2<=this.data.length;t+=2){let i=_m.indexOf(this.data[t])*45;i+=_m.indexOf(this.data[t+1]),o.put(i,11)}this.data.length%2&&o.put(_m.indexOf(this.data[t]),6)};Mx.exports=Lr});var kx=Ye((mee,Ex)=>{"use strict";var xC=Oo();function Nr(e){this.mode=xC.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}Nr.getBitsLength=function(o){return o*8};Nr.prototype.getLength=function(){return this.data.length};Nr.prototype.getBitsLength=function(){return Nr.getBitsLength(this.data.length)};Nr.prototype.write=function(e){for(let o=0,t=this.data.length;o<t;o++)e.put(this.data[o],8)};Ex.exports=Nr});var Tx=Ye((uee,qx)=>{"use strict";var wC=Oo(),SC=Vo();function Pr(e){this.mode=wC.KANJI,this.data=e}Pr.getBitsLength=function(o){return o*13};Pr.prototype.getLength=function(){return this.data.length};Pr.prototype.getBitsLength=function(){return Pr.getBitsLength(this.data.length)};Pr.prototype.write=function(e){let o;for(o=0;o<this.data.length;o++){let t=SC.toSJIS(this.data[o]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
21
- Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};qx.exports=Pr});var Rx=Ye((pee,Em)=>{"use strict";var qa={single_source_shortest_paths:function(e,o,t){var i={},n={};n[o]=0;var r=qa.PriorityQueue.make();r.push(o,0);for(var a,s,l,d,c,m,u,p,f;!r.empty();){a=r.pop(),s=a.value,d=a.cost,c=e[s]||{};for(l in c)c.hasOwnProperty(l)&&(m=c[l],u=d+m,p=n[l],f=typeof n[l]>"u",(f||p>u)&&(n[l]=u,r.push(l,u),i[l]=s))}if(typeof t<"u"&&typeof n[t]>"u"){var S=["Could not find a path from ",o," to ",t,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(e,o){for(var t=[],i=o,n;i;)t.push(i),n=e[i],i=e[i];return t.reverse(),t},find_path:function(e,o,t){var i=qa.single_source_shortest_paths(e,o,t);return qa.extract_shortest_path_from_predecessor_list(i,t)},PriorityQueue:{make:function(e){var o=qa.PriorityQueue,t={},i;e=e||{};for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);return t.queue=[],t.sorter=e.sorter||o.default_sorter,t},default_sorter:function(e,o){return e.cost-o.cost},push:function(e,o){var t={value:e,cost:o};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof Em<"u"&&(Em.exports=qa)});var Bx=Ye(Br=>{"use strict";var Ze=Oo(),Ax=Cx(),Fx=_x(),Lx=kx(),Nx=Tx(),Ta=Sm(),Wc=Vo(),yC=Rx();function Ix(e){return unescape(encodeURIComponent(e)).length}function Ra(e,o,t){let i=[],n;for(;(n=e.exec(t))!==null;)i.push({data:n[0],index:n.index,mode:o,length:n[0].length});return i}function Px(e){let o=Ra(Ta.NUMERIC,Ze.NUMERIC,e),t=Ra(Ta.ALPHANUMERIC,Ze.ALPHANUMERIC,e),i,n;return Wc.isKanjiModeEnabled()?(i=Ra(Ta.BYTE,Ze.BYTE,e),n=Ra(Ta.KANJI,Ze.KANJI,e)):(i=Ra(Ta.BYTE_KANJI,Ze.BYTE,e),n=[]),o.concat(t,i,n).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function km(e,o){switch(o){case Ze.NUMERIC:return Ax.getBitsLength(e);case Ze.ALPHANUMERIC:return Fx.getBitsLength(e);case Ze.KANJI:return Nx.getBitsLength(e);case Ze.BYTE:return Lx.getBitsLength(e)}}function CC(e){return e.reduce(function(o,t){let i=o.length-1>=0?o[o.length-1]:null;return i&&i.mode===t.mode?(o[o.length-1].data+=t.data,o):(o.push(t),o)},[])}function MC(e){let o=[];for(let t=0;t<e.length;t++){let i=e[t];switch(i.mode){case Ze.NUMERIC:o.push([i,{data:i.data,mode:Ze.ALPHANUMERIC,length:i.length},{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.ALPHANUMERIC:o.push([i,{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.KANJI:o.push([i,{data:i.data,mode:Ze.BYTE,length:Ix(i.data)}]);break;case Ze.BYTE:o.push([{data:i.data,mode:Ze.BYTE,length:Ix(i.data)}])}}return o}function _C(e,o){let t={},i={start:{}},n=["start"];for(let r=0;r<e.length;r++){let a=e[r],s=[];for(let l=0;l<a.length;l++){let d=a[l],c=""+r+l;s.push(c),t[c]={node:d,lastCount:0},i[c]={};for(let m=0;m<n.length;m++){let u=n[m];t[u]&&t[u].node.mode===d.mode?(i[u][c]=km(t[u].lastCount+d.length,d.mode)-km(t[u].lastCount,d.mode),t[u].lastCount+=d.length):(t[u]&&(t[u].lastCount=d.length),i[u][c]=km(d.length,d.mode)+4+Ze.getCharCountIndicator(d.mode,o))}}n=s}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:t}}function Dx(e,o){let t,i=Ze.getBestModeForData(e);if(t=Ze.from(o,i),t!==Ze.BYTE&&t.bit<i.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Ze.toString(t)+`.
22
- Suggested mode is: `+Ze.toString(i));switch(t===Ze.KANJI&&!Wc.isKanjiModeEnabled()&&(t=Ze.BYTE),t){case Ze.NUMERIC:return new Ax(e);case Ze.ALPHANUMERIC:return new Fx(e);case Ze.KANJI:return new Nx(e);case Ze.BYTE:return new Lx(e)}}Br.fromArray=function(o){return o.reduce(function(t,i){return typeof i=="string"?t.push(Dx(i,null)):i.data&&t.push(Dx(i.data,i.mode)),t},[])};Br.fromString=function(o,t){let i=Px(o,Wc.isKanjiModeEnabled()),n=MC(i),r=_C(n,t),a=yC.find_path(r.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(r.table[a[l]].node);return Br.fromArray(CC(s))};Br.rawSplit=function(o){return Br.fromArray(Px(o,Wc.isKanjiModeEnabled()))}});var Wx=Ye(Vx=>{"use strict";var zc=Vo(),qm=Ac(),EC=Yv(),kC=ex(),qC=tx(),TC=nx(),Im=rx(),Dm=bm(),RC=dx(),Oc=bx(),IC=Sx(),DC=Oo(),Tm=Bx();function AC(e,o){let t=e.size,i=TC.getPositions(o);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(r+s<=-1||t<=r+s))for(let l=-1;l<=7;l++)a+l<=-1||t<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(r+s,a+l,!0,!0):e.set(r+s,a+l,!1,!0))}}function FC(e){let o=e.size;for(let t=8;t<o-8;t++){let i=t%2===0;e.set(t,6,i,!0),e.set(6,t,i,!0)}}function LC(e,o){let t=qC.getPositions(o);for(let i=0;i<t.length;i++){let n=t[i][0],r=t[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?e.set(n+a,r+s,!0,!0):e.set(n+a,r+s,!1,!0)}}function NC(e,o){let t=e.size,i=Oc.getEncodedBits(o),n,r,a;for(let s=0;s<18;s++)n=Math.floor(s/3),r=s%3+t-8-3,a=(i>>s&1)===1,e.set(n,r,a,!0),e.set(r,n,a,!0)}function Rm(e,o,t){let i=e.size,n=IC.getEncodedBits(o,t),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(i-15+r,8,a,!0),r<8?e.set(8,i-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(i-8,8,1,!0)}function PC(e,o){let t=e.size,i=-1,n=t-1,r=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!e.isReserved(n,s-l)){let d=!1;a<o.length&&(d=(o[a]>>>r&1)===1),e.set(n,s-l,d),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function BC(e,o,t){let i=new EC;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),DC.getCharCountIndicator(l.mode,e)),l.write(i)});let n=zc.getSymbolTotalCodewords(e),r=Dm.getTotalCodewordsCount(e,o),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return VC(i,e,o)}function VC(e,o,t){let i=zc.getSymbolTotalCodewords(o),n=Dm.getTotalCodewordsCount(o,t),r=i-n,a=Dm.getBlocksCount(o,t),s=i%a,l=a-s,d=Math.floor(i/a),c=Math.floor(r/a),m=c+1,u=d-c,p=new RC(u),f=0,S=new Array(a),R=new Array(a),L=0,j=new Uint8Array(e.buffer);for(let G=0;G<a;G++){let J=G<l?c:m;S[G]=j.slice(f,f+J),R[G]=p.encode(S[G]),f+=J,L=Math.max(L,J)}let q=new Uint8Array(i),P=0,O,H;for(O=0;O<L;O++)for(H=0;H<a;H++)O<S[H].length&&(q[P++]=S[H][O]);for(O=0;O<u;O++)for(H=0;H<a;H++)q[P++]=R[H][O];return q}function WC(e,o,t,i){let n;if(Array.isArray(e))n=Tm.fromArray(e);else if(typeof e=="string"){let d=o;if(!d){let c=Tm.rawSplit(e);d=Oc.getBestVersionForData(c,t)}n=Tm.fromString(e,d||40)}else throw new Error("Invalid data");let r=Oc.getBestVersionForData(n,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!o)o=r;else if(o<r)throw new Error(`
19
+ ${j}`),S.pop(),`{${H}}`}case"number":return isFinite(f)?String(f):o?o(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return o?o(f):void 0}}function m(p,f,S){switch(typeof f){case"string":return Io(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(p),typeof f!="object")return m(p,f,S);if(f===null)return"null"}if(S.indexOf(f)!==-1)return t;let R="",L=f.length!==void 0;if(L&&Array.isArray(f)){if(f.length===0)return"[]";if(a<S.length+1)return'"[Array]"';S.push(f);let H=Math.min(f.length,s),G=0;for(;G<H-1;G++){let X=m(String(G),f[G],S);R+=X!==void 0?X:"null",R+=","}let J=m(String(G),f[G],S);if(R+=J!==void 0?J:"null",f.length-1>s){let X=f.length-s-1;R+=`,"... ${nn(X)} not stringified"`}return S.pop(),`[${R}]`}let j=Object.keys(f),q=j.length;if(q===0)return"{}";if(a<S.length+1)return'"[Object]"';let P="",O=Math.min(q,s);L&&Xd(f)&&(R+=Jg(f,",",s),j=j.slice(f.length),O-=f.length,P=","),n&&(j=Gd(j,r)),S.push(f);for(let H=0;H<O;H++){let G=j[H],J=m(G,f[G],S);J!==void 0&&(R+=`${P}${Io(G)}:${J}`,P=",")}if(q>s){let H=q-s;R+=`${P}"...":"${nn(H)} not stringified"`}return S.pop(),`{${R}}`}case"number":return isFinite(f)?String(f):o?o(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return o?o(f):void 0}}function u(p,f,S){if(arguments.length>1){let R="";if(typeof S=="number"?R=" ".repeat(Math.min(S,10)):typeof S=="string"&&(R=S.slice(0,10)),f!=null){if(typeof f=="function")return l("",{"":p},[],f,R,"");if(Array.isArray(f))return d("",p,[],b5(f),R,"")}if(R.length!==0)return c("",p,[],R,"")}return m("",p,[])}return u}});var Yv=Ye((QJ,Zv)=>{"use strict";Zv.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Vo=Ye(yn=>{"use strict";var bm,oC=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];yn.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17};yn.getSymbolTotalCodewords=function(o){return oC[o]};yn.getBCHDigit=function(e){let o=0;for(;e!==0;)o++,e>>>=1;return o};yn.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');bm=o};yn.isKanjiModeEnabled=function(){return typeof bm<"u"};yn.toSJIS=function(o){return bm(o)}});var Lc=Ye(ei=>{"use strict";ei.L={bit:1};ei.M={bit:0};ei.Q={bit:3};ei.H={bit:2};function nC(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return ei.L;case"m":case"medium":return ei.M;case"q":case"quartile":return ei.Q;case"h":case"high":return ei.H;default:throw new Error("Unknown EC Level: "+e)}}ei.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4};ei.from=function(o,t){if(ei.isValid(o))return o;try{return nC(o)}catch{return t}}});var tx=Ye((JJ,ex)=>{"use strict";function Jv(){this.buffer=[],this.length=0}Jv.prototype={get:function(e){let o=Math.floor(e/8);return(this.buffer[o]>>>7-e%8&1)===1},put:function(e,o){for(let t=0;t<o;t++)this.putBit((e>>>o-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),e&&(this.buffer[o]|=128>>>this.length%8),this.length++}};ex.exports=Jv});var ox=Ye((eee,ix)=>{"use strict";function Ea(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Ea.prototype.set=function(e,o,t,i){let n=e*this.size+o;this.data[n]=t,i&&(this.reservedBit[n]=!0)};Ea.prototype.get=function(e,o){return this.data[e*this.size+o]};Ea.prototype.xor=function(e,o,t){this.data[e*this.size+o]^=t};Ea.prototype.isReserved=function(e,o){return this.reservedBit[e*this.size+o]};ix.exports=Ea});var nx=Ye(Nc=>{"use strict";var rC=Vo().getSymbolSize;Nc.getRowColCoords=function(o){if(o===1)return[];let t=Math.floor(o/7)+2,i=rC(o),n=i===145?26:Math.ceil((i-13)/(2*t-2))*2,r=[i-7];for(let a=1;a<t-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()};Nc.getPositions=function(o){let t=[],i=Nc.getRowColCoords(o),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||t.push([i[r],i[a]]);return t}});var sx=Ye(ax=>{"use strict";var aC=Vo().getSymbolSize,rx=7;ax.getPositions=function(o){let t=aC(o);return[[0,0],[t-rx,0],[0,t-rx]]}});var lx=Ye(it=>{"use strict";it.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Cn={N1:3,N2:3,N3:40,N4:10};it.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7};it.from=function(o){return it.isValid(o)?parseInt(o,10):void 0};it.getPenaltyN1=function(o){let t=o.size,i=0,n=0,r=0,a=null,s=null;for(let l=0;l<t;l++){n=r=0,a=s=null;for(let d=0;d<t;d++){let c=o.get(l,d);c===a?n++:(n>=5&&(i+=Cn.N1+(n-5)),a=c,n=1),c=o.get(d,l),c===s?r++:(r>=5&&(i+=Cn.N1+(r-5)),s=c,r=1)}n>=5&&(i+=Cn.N1+(n-5)),r>=5&&(i+=Cn.N1+(r-5))}return i};it.getPenaltyN2=function(o){let t=o.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let a=o.get(n,r)+o.get(n,r+1)+o.get(n+1,r)+o.get(n+1,r+1);(a===4||a===0)&&i++}return i*Cn.N2};it.getPenaltyN3=function(o){let t=o.size,i=0,n=0,r=0;for(let a=0;a<t;a++){n=r=0;for(let s=0;s<t;s++)n=n<<1&2047|o.get(a,s),s>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|o.get(s,a),s>=10&&(r===1488||r===93)&&i++}return i*Cn.N3};it.getPenaltyN4=function(o){let t=0,i=o.data.length;for(let r=0;r<i;r++)t+=o.data[r];return Math.abs(Math.ceil(t*100/i/5)-10)*Cn.N4};function sC(e,o,t){switch(e){case it.Patterns.PATTERN000:return(o+t)%2===0;case it.Patterns.PATTERN001:return o%2===0;case it.Patterns.PATTERN010:return t%3===0;case it.Patterns.PATTERN011:return(o+t)%3===0;case it.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(t/3))%2===0;case it.Patterns.PATTERN101:return o*t%2+o*t%3===0;case it.Patterns.PATTERN110:return(o*t%2+o*t%3)%2===0;case it.Patterns.PATTERN111:return(o*t%3+(o+t)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}it.applyMask=function(o,t){let i=t.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)t.isReserved(r,n)||t.xor(r,n,sC(o,r,n))};it.getBestMask=function(o,t){let i=Object.keys(it.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){t(a),it.applyMask(a,o);let s=it.getPenaltyN1(o)+it.getPenaltyN2(o)+it.getPenaltyN3(o)+it.getPenaltyN4(o);it.applyMask(a,o),s<r&&(r=s,n=a)}return n}});var xm=Ye(vm=>{"use strict";var Wo=Lc(),Pc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Bc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];vm.getBlocksCount=function(o,t){switch(t){case Wo.L:return Pc[(o-1)*4+0];case Wo.M:return Pc[(o-1)*4+1];case Wo.Q:return Pc[(o-1)*4+2];case Wo.H:return Pc[(o-1)*4+3];default:return}};vm.getTotalCodewordsCount=function(o,t){switch(t){case Wo.L:return Bc[(o-1)*4+0];case Wo.M:return Bc[(o-1)*4+1];case Wo.Q:return Bc[(o-1)*4+2];case Wo.H:return Bc[(o-1)*4+3];default:return}}});var cx=Ye(Wc=>{"use strict";var ka=new Uint8Array(512),Vc=new Uint8Array(256);(function(){let o=1;for(let t=0;t<255;t++)ka[t]=o,Vc[o]=t,o<<=1,o&256&&(o^=285);for(let t=255;t<512;t++)ka[t]=ka[t-255]})();Wc.log=function(o){if(o<1)throw new Error("log("+o+")");return Vc[o]};Wc.exp=function(o){return ka[o]};Wc.mul=function(o,t){return o===0||t===0?0:ka[Vc[o]+Vc[t]]}});var dx=Ye(qa=>{"use strict";var wm=cx();qa.mul=function(o,t){let i=new Uint8Array(o.length+t.length-1);for(let n=0;n<o.length;n++)for(let r=0;r<t.length;r++)i[n+r]^=wm.mul(o[n],t[r]);return i};qa.mod=function(o,t){let i=new Uint8Array(o);for(;i.length-t.length>=0;){let n=i[0];for(let a=0;a<t.length;a++)i[a]^=wm.mul(t[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i};qa.generateECPolynomial=function(o){let t=new Uint8Array([1]);for(let i=0;i<o;i++)t=qa.mul(t,new Uint8Array([1,wm.exp(i)]));return t}});var ux=Ye((see,mx)=>{"use strict";var hx=dx();function Sm(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Sm.prototype.initialize=function(o){this.degree=o,this.genPoly=hx.generateECPolynomial(this.degree)};Sm.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(o.length+this.degree);t.set(o);let i=hx.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i};mx.exports=Sm});var ym=Ye(px=>{"use strict";px.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}});var Cm=Ye(Hi=>{"use strict";var fx="[0-9]+",lC="[A-Z $%*+\\-./:]+",Ta="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ta=Ta.replace(/u/g,"\\u");var cC="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ta+`)(?:.|[\r
20
+ ]))+`;Hi.KANJI=new RegExp(Ta,"g");Hi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Hi.BYTE=new RegExp(cC,"g");Hi.NUMERIC=new RegExp(fx,"g");Hi.ALPHANUMERIC=new RegExp(lC,"g");var dC=new RegExp("^"+Ta+"$"),hC=new RegExp("^"+fx+"$"),mC=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Hi.testKanji=function(o){return dC.test(o)};Hi.testNumeric=function(o){return hC.test(o)};Hi.testAlphanumeric=function(o){return mC.test(o)}});var Oo=Ye(gt=>{"use strict";var uC=ym(),Mm=Cm();gt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};gt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};gt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};gt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};gt.MIXED={bit:-1};gt.getCharCountIndicator=function(o,t){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!uC.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?o.ccBits[0]:t<27?o.ccBits[1]:o.ccBits[2]};gt.getBestModeForData=function(o){return Mm.testNumeric(o)?gt.NUMERIC:Mm.testAlphanumeric(o)?gt.ALPHANUMERIC:Mm.testKanji(o)?gt.KANJI:gt.BYTE};gt.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")};gt.isValid=function(o){return o&&o.bit&&o.ccBits};function pC(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return gt.NUMERIC;case"alphanumeric":return gt.ALPHANUMERIC;case"kanji":return gt.KANJI;case"byte":return gt.BYTE;default:throw new Error("Unknown mode: "+e)}}gt.from=function(o,t){if(gt.isValid(o))return o;try{return pC(o)}catch{return t}}});var wx=Ye(Mn=>{"use strict";var Oc=Vo(),fC=xm(),gx=Lc(),zo=Oo(),_m=ym(),vx=7973,bx=Oc.getBCHDigit(vx);function gC(e,o,t){for(let i=1;i<=40;i++)if(o<=Mn.getCapacity(i,t,e))return i}function xx(e,o){return zo.getCharCountIndicator(e,o)+4}function bC(e,o){let t=0;return e.forEach(function(i){let n=xx(i.mode,o);t+=n+i.getBitsLength()}),t}function vC(e,o){for(let t=1;t<=40;t++)if(bC(e,t)<=Mn.getCapacity(t,o,zo.MIXED))return t}Mn.from=function(o,t){return _m.isValid(o)?parseInt(o,10):t};Mn.getCapacity=function(o,t,i){if(!_m.isValid(o))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=zo.BYTE);let n=Oc.getSymbolTotalCodewords(o),r=fC.getTotalCodewordsCount(o,t),a=(n-r)*8;if(i===zo.MIXED)return a;let s=a-xx(i,o);switch(i){case zo.NUMERIC:return Math.floor(s/10*3);case zo.ALPHANUMERIC:return Math.floor(s/11*2);case zo.KANJI:return Math.floor(s/13);case zo.BYTE:default:return Math.floor(s/8)}};Mn.getBestVersionForData=function(o,t){let i,n=gx.from(t,gx.M);if(Array.isArray(o)){if(o.length>1)return vC(o,n);if(o.length===0)return 1;i=o[0]}else i=o;return gC(i.mode,i.getLength(),n)};Mn.getEncodedBits=function(o){if(!_m.isValid(o)||o<7)throw new Error("Invalid QR Code version");let t=o<<12;for(;Oc.getBCHDigit(t)-bx>=0;)t^=vx<<Oc.getBCHDigit(t)-bx;return o<<12|t}});var Mx=Ye(Cx=>{"use strict";var Em=Vo(),yx=1335,xC=21522,Sx=Em.getBCHDigit(yx);Cx.getEncodedBits=function(o,t){let i=o.bit<<3|t,n=i<<10;for(;Em.getBCHDigit(n)-Sx>=0;)n^=yx<<Em.getBCHDigit(n)-Sx;return(i<<10|n)^xC}});var Ex=Ye((uee,_x)=>{"use strict";var wC=Oo();function Nr(e){this.mode=wC.NUMERIC,this.data=e.toString()}Nr.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)};Nr.prototype.getLength=function(){return this.data.length};Nr.prototype.getBitsLength=function(){return Nr.getBitsLength(this.data.length)};Nr.prototype.write=function(o){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),o.put(n,10);let r=this.data.length-t;r>0&&(i=this.data.substr(t),n=parseInt(i,10),o.put(n,r*3+1))};_x.exports=Nr});var qx=Ye((pee,kx)=>{"use strict";var SC=Oo(),km=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Pr(e){this.mode=SC.ALPHANUMERIC,this.data=e}Pr.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)};Pr.prototype.getLength=function(){return this.data.length};Pr.prototype.getBitsLength=function(){return Pr.getBitsLength(this.data.length)};Pr.prototype.write=function(o){let t;for(t=0;t+2<=this.data.length;t+=2){let i=km.indexOf(this.data[t])*45;i+=km.indexOf(this.data[t+1]),o.put(i,11)}this.data.length%2&&o.put(km.indexOf(this.data[t]),6)};kx.exports=Pr});var Rx=Ye((fee,Tx)=>{"use strict";var yC=Oo();function Br(e){this.mode=yC.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}Br.getBitsLength=function(o){return o*8};Br.prototype.getLength=function(){return this.data.length};Br.prototype.getBitsLength=function(){return Br.getBitsLength(this.data.length)};Br.prototype.write=function(e){for(let o=0,t=this.data.length;o<t;o++)e.put(this.data[o],8)};Tx.exports=Br});var Ax=Ye((gee,Ix)=>{"use strict";var CC=Oo(),MC=Vo();function Vr(e){this.mode=CC.KANJI,this.data=e}Vr.getBitsLength=function(o){return o*13};Vr.prototype.getLength=function(){return this.data.length};Vr.prototype.getBitsLength=function(){return Vr.getBitsLength(this.data.length)};Vr.prototype.write=function(e){let o;for(o=0;o<this.data.length;o++){let t=MC.toSJIS(this.data[o]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
21
+ Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};Ix.exports=Vr});var Dx=Ye((bee,qm)=>{"use strict";var Ra={single_source_shortest_paths:function(e,o,t){var i={},n={};n[o]=0;var r=Ra.PriorityQueue.make();r.push(o,0);for(var a,s,l,d,c,m,u,p,f;!r.empty();){a=r.pop(),s=a.value,d=a.cost,c=e[s]||{};for(l in c)c.hasOwnProperty(l)&&(m=c[l],u=d+m,p=n[l],f=typeof n[l]>"u",(f||p>u)&&(n[l]=u,r.push(l,u),i[l]=s))}if(typeof t<"u"&&typeof n[t]>"u"){var S=["Could not find a path from ",o," to ",t,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(e,o){for(var t=[],i=o,n;i;)t.push(i),n=e[i],i=e[i];return t.reverse(),t},find_path:function(e,o,t){var i=Ra.single_source_shortest_paths(e,o,t);return Ra.extract_shortest_path_from_predecessor_list(i,t)},PriorityQueue:{make:function(e){var o=Ra.PriorityQueue,t={},i;e=e||{};for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);return t.queue=[],t.sorter=e.sorter||o.default_sorter,t},default_sorter:function(e,o){return e.cost-o.cost},push:function(e,o){var t={value:e,cost:o};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof qm<"u"&&(qm.exports=Ra)});var Ox=Ye(Wr=>{"use strict";var Ze=Oo(),Nx=Ex(),Px=qx(),Bx=Rx(),Vx=Ax(),Ia=Cm(),zc=Vo(),_C=Dx();function Fx(e){return unescape(encodeURIComponent(e)).length}function Aa(e,o,t){let i=[],n;for(;(n=e.exec(t))!==null;)i.push({data:n[0],index:n.index,mode:o,length:n[0].length});return i}function Wx(e){let o=Aa(Ia.NUMERIC,Ze.NUMERIC,e),t=Aa(Ia.ALPHANUMERIC,Ze.ALPHANUMERIC,e),i,n;return zc.isKanjiModeEnabled()?(i=Aa(Ia.BYTE,Ze.BYTE,e),n=Aa(Ia.KANJI,Ze.KANJI,e)):(i=Aa(Ia.BYTE_KANJI,Ze.BYTE,e),n=[]),o.concat(t,i,n).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function Tm(e,o){switch(o){case Ze.NUMERIC:return Nx.getBitsLength(e);case Ze.ALPHANUMERIC:return Px.getBitsLength(e);case Ze.KANJI:return Vx.getBitsLength(e);case Ze.BYTE:return Bx.getBitsLength(e)}}function EC(e){return e.reduce(function(o,t){let i=o.length-1>=0?o[o.length-1]:null;return i&&i.mode===t.mode?(o[o.length-1].data+=t.data,o):(o.push(t),o)},[])}function kC(e){let o=[];for(let t=0;t<e.length;t++){let i=e[t];switch(i.mode){case Ze.NUMERIC:o.push([i,{data:i.data,mode:Ze.ALPHANUMERIC,length:i.length},{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.ALPHANUMERIC:o.push([i,{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.KANJI:o.push([i,{data:i.data,mode:Ze.BYTE,length:Fx(i.data)}]);break;case Ze.BYTE:o.push([{data:i.data,mode:Ze.BYTE,length:Fx(i.data)}])}}return o}function qC(e,o){let t={},i={start:{}},n=["start"];for(let r=0;r<e.length;r++){let a=e[r],s=[];for(let l=0;l<a.length;l++){let d=a[l],c=""+r+l;s.push(c),t[c]={node:d,lastCount:0},i[c]={};for(let m=0;m<n.length;m++){let u=n[m];t[u]&&t[u].node.mode===d.mode?(i[u][c]=Tm(t[u].lastCount+d.length,d.mode)-Tm(t[u].lastCount,d.mode),t[u].lastCount+=d.length):(t[u]&&(t[u].lastCount=d.length),i[u][c]=Tm(d.length,d.mode)+4+Ze.getCharCountIndicator(d.mode,o))}}n=s}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:t}}function Lx(e,o){let t,i=Ze.getBestModeForData(e);if(t=Ze.from(o,i),t!==Ze.BYTE&&t.bit<i.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Ze.toString(t)+`.
22
+ Suggested mode is: `+Ze.toString(i));switch(t===Ze.KANJI&&!zc.isKanjiModeEnabled()&&(t=Ze.BYTE),t){case Ze.NUMERIC:return new Nx(e);case Ze.ALPHANUMERIC:return new Px(e);case Ze.KANJI:return new Vx(e);case Ze.BYTE:return new Bx(e)}}Wr.fromArray=function(o){return o.reduce(function(t,i){return typeof i=="string"?t.push(Lx(i,null)):i.data&&t.push(Lx(i.data,i.mode)),t},[])};Wr.fromString=function(o,t){let i=Wx(o,zc.isKanjiModeEnabled()),n=kC(i),r=qC(n,t),a=_C.find_path(r.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(r.table[a[l]].node);return Wr.fromArray(EC(s))};Wr.rawSplit=function(o){return Wr.fromArray(Wx(o,zc.isKanjiModeEnabled()))}});var $x=Ye(zx=>{"use strict";var jc=Vo(),Rm=Lc(),TC=tx(),RC=ox(),IC=nx(),AC=sx(),Dm=lx(),Fm=xm(),DC=ux(),$c=wx(),FC=Mx(),LC=Oo(),Im=Ox();function NC(e,o){let t=e.size,i=AC.getPositions(o);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(r+s<=-1||t<=r+s))for(let l=-1;l<=7;l++)a+l<=-1||t<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(r+s,a+l,!0,!0):e.set(r+s,a+l,!1,!0))}}function PC(e){let o=e.size;for(let t=8;t<o-8;t++){let i=t%2===0;e.set(t,6,i,!0),e.set(6,t,i,!0)}}function BC(e,o){let t=IC.getPositions(o);for(let i=0;i<t.length;i++){let n=t[i][0],r=t[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?e.set(n+a,r+s,!0,!0):e.set(n+a,r+s,!1,!0)}}function VC(e,o){let t=e.size,i=$c.getEncodedBits(o),n,r,a;for(let s=0;s<18;s++)n=Math.floor(s/3),r=s%3+t-8-3,a=(i>>s&1)===1,e.set(n,r,a,!0),e.set(r,n,a,!0)}function Am(e,o,t){let i=e.size,n=FC.getEncodedBits(o,t),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(i-15+r,8,a,!0),r<8?e.set(8,i-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(i-8,8,1,!0)}function WC(e,o){let t=e.size,i=-1,n=t-1,r=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!e.isReserved(n,s-l)){let d=!1;a<o.length&&(d=(o[a]>>>r&1)===1),e.set(n,s-l,d),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function OC(e,o,t){let i=new TC;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),LC.getCharCountIndicator(l.mode,e)),l.write(i)});let n=jc.getSymbolTotalCodewords(e),r=Fm.getTotalCodewordsCount(e,o),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return zC(i,e,o)}function zC(e,o,t){let i=jc.getSymbolTotalCodewords(o),n=Fm.getTotalCodewordsCount(o,t),r=i-n,a=Fm.getBlocksCount(o,t),s=i%a,l=a-s,d=Math.floor(i/a),c=Math.floor(r/a),m=c+1,u=d-c,p=new DC(u),f=0,S=new Array(a),R=new Array(a),L=0,j=new Uint8Array(e.buffer);for(let G=0;G<a;G++){let J=G<l?c:m;S[G]=j.slice(f,f+J),R[G]=p.encode(S[G]),f+=J,L=Math.max(L,J)}let q=new Uint8Array(i),P=0,O,H;for(O=0;O<L;O++)for(H=0;H<a;H++)O<S[H].length&&(q[P++]=S[H][O]);for(O=0;O<u;O++)for(H=0;H<a;H++)q[P++]=R[H][O];return q}function $C(e,o,t,i){let n;if(Array.isArray(e))n=Im.fromArray(e);else if(typeof e=="string"){let d=o;if(!d){let c=Im.rawSplit(e);d=$c.getBestVersionForData(c,t)}n=Im.fromString(e,d||40)}else throw new Error("Invalid data");let r=$c.getBestVersionForData(n,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!o)o=r;else if(o<r)throw new Error(`
23
23
  The chosen QR Code version cannot contain this amount of data.
24
24
  Minimum version required to store current data is: `+r+`.
25
- `);let a=BC(o,t,n),s=zc.getSymbolSize(o),l=new kC(s);return AC(l,o),FC(l),LC(l,o),Rm(l,t,0),o>=7&&NC(l,o),PC(l,a),isNaN(i)&&(i=Im.getBestMask(l,Rm.bind(null,l,t))),Im.applyMask(i,l),Rm(l,t,i),{modules:l,version:o,errorCorrectionLevel:t,maskPattern:i,segments:n}}Vx.create=function(o,t){if(typeof o>"u"||o==="")throw new Error("No input text");let i=qm.M,n,r;return typeof t<"u"&&(i=qm.from(t.errorCorrectionLevel,qm.M),n=Oc.from(t.version),r=Im.from(t.maskPattern),t.toSJISFunc&&zc.setToSJISFunction(t.toSJISFunc)),WC(o,n,i,r)}});var Am=Ye(_n=>{"use strict";function Ox(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let o=e.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+e);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");let t=parseInt(o.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+o.slice(0,6).join("")}}_n.getOptions=function(o){o||(o={}),o.color||(o.color={});let t=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,n=o.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:Ox(o.color.dark||"#000000ff"),light:Ox(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}};_n.getScale=function(o,t){return t.width&&t.width>=o+t.margin*2?t.width/(o+t.margin*2):t.scale};_n.getImageWidth=function(o,t){let i=_n.getScale(o,t);return Math.floor((o+t.margin*2)*i)};_n.qrToImageData=function(o,t,i){let n=t.modules.size,r=t.modules.data,a=_n.getScale(n,i),s=Math.floor((n+i.margin*2)*a),l=i.margin*a,d=[i.color.light,i.color.dark];for(let c=0;c<s;c++)for(let m=0;m<s;m++){let u=(c*s+m)*4,p=i.color.light;if(c>=l&&m>=l&&c<s-l&&m<s-l){let f=Math.floor((c-l)/a),S=Math.floor((m-l)/a);p=d[r[f*n+S]?1:0]}o[u++]=p.r,o[u++]=p.g,o[u++]=p.b,o[u]=p.a}}});var zx=Ye($c=>{"use strict";var Fm=Am();function OC(e,o,t){e.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=t,o.width=t,o.style.height=t+"px",o.style.width=t+"px"}function zC(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}$c.render=function(o,t,i){let n=i,r=t;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),t||(r=zC()),n=Fm.getOptions(n);let a=Fm.getImageWidth(o.modules.size,n),s=r.getContext("2d"),l=s.createImageData(a,a);return Fm.qrToImageData(l.data,o,n),OC(s,r,a),s.putImageData(l,0,0),r};$c.renderToDataURL=function(o,t,i){let n=i;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),n||(n={});let r=$c.render(o,t,n),a=n.type||"image/png",s=n.rendererOpts||{};return r.toDataURL(a,s.quality)}});var Hx=Ye(jx=>{"use strict";var $C=Am();function $x(e,o){let t=e.a/255,i=o+'="'+e.hex+'"';return t<1?i+" "+o+'-opacity="'+t.toFixed(2).slice(1)+'"':i}function Lm(e,o,t){let i=e+o;return typeof t<"u"&&(i+=" "+t),i}function jC(e,o,t){let i="",n=0,r=!1,a=0;for(let s=0;s<e.length;s++){let l=Math.floor(s%o),d=Math.floor(s/o);!l&&!r&&(r=!0),e[s]?(a++,s>0&&l>0&&e[s-1]||(i+=r?Lm("M",l+t,.5+d+t):Lm("m",n,0),n=0,r=!1),l+1<o&&e[s+1]||(i+=Lm("h",a),a=0)):n++}return i}jx.render=function(o,t,i){let n=$C.getOptions(t),r=o.modules.size,a=o.modules.data,s=r+n.margin*2,l=n.color.light.a?"<path "+$x(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",d="<path "+$x(n.color.dark,"stroke")+' d="'+jC(a,r,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',u='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+d+`</svg>
26
- `;return typeof i=="function"&&i(null,u),u}});var Gx=Ye(Ia=>{"use strict";var HC=Kv(),Nm=Wx(),Ux=zx(),UC=Hx();function Pm(e,o,t,i,n){let r=[].slice.call(arguments,1),a=r.length,s=typeof r[a-1]=="function";if(!s&&!HC())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=t,t=o,o=i=void 0):a===3&&(o.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=t,t=o,o=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=o,o=i=void 0):a===2&&!o.getContext&&(i=t,t=o,o=void 0),new Promise(function(l,d){try{let c=Nm.create(t,i);l(e(c,o,i))}catch(c){d(c)}})}try{let l=Nm.create(t,i);n(null,e(l,o,i))}catch(l){n(l)}}Ia.create=Nm.create;Ia.toCanvas=Pm.bind(null,Ux.render);Ia.toDataURL=Pm.bind(null,Ux.renderToDataURL);Ia.toString=Pm.bind(null,function(e,o,t){return UC.render(e,t)})});var $0="codeChartaVersion",j0=(()=>{class e{constructor(){this.localStorageRepo=T(Pu)}readSavedVersion(){return this.localStorageRepo.read($0)}writeSavedVersion(t){this.localStorageRepo.write($0,t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var H0=(()=>{class e{constructor(){this.versionRepo=T(j0),this.currentVersion=Nu.version,this.previousVersion=Se(null),this.shouldShowChangelog=Se(!1)}getSavedVersion(){return this.versionRepo.readSavedVersion()}saveCurrentVersion(){this.versionRepo.writeSavedVersion(this.currentVersion)}setPreviousVersion(t){this.previousVersion.set(t)}setShouldShowChangelog(t){this.shouldShowChangelog.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ks=(()=>{class e{constructor(t){this.versionStore=t}get currentVersion(){return this.versionStore.currentVersion}get previousVersion(){return this.versionStore.previousVersion}get shouldShowChangelog(){return this.versionStore.shouldShowChangelog}synchronizeVersion(){let t=this.versionStore.getSavedVersion();if(t===null){this.versionStore.saveCurrentVersion();return}this.compareVersion(t,this.currentVersion)<0&&(this.versionStore.setPreviousVersion(t),this.versionStore.setShouldShowChangelog(!0),this.versionStore.saveCurrentVersion())}acknowledgeChangelog(){this.versionStore.setShouldShowChangelog(!1)}compareVersion(t,i){let n=this.parseSemver(t),r=this.parseSemver(i);return n.major!==r.major?n.major>r.major?1:-1:n.minor!==r.minor?n.minor>r.minor?1:-1:n.patch!==r.patch?n.patch>r.patch?1:-1:0}parseSemver(t){let i=t.split(".");return{major:Number.parseInt(i[0])||0,minor:Number.parseInt(i[1])||0,patch:Number.parseInt(i[2])||0}}static{this.\u0275fac=function(i){return new(i||e)(E(H0))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Md(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jo=Md();function J0(e){Jo=e}var Zo={exec:()=>null};function $e(e,o=""){let t=typeof e=="string"?e:e.source,i={replace:(n,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(Ft.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,o)};return i}var Hw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ft={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Uw=/^(?:[ \t]*(?:\n|$))+/,Gw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Xw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Kr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Kw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_d=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,eg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tg=$e(eg).replace(/bull/g,_d).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Qw=$e(eg).replace(/bull/g,_d).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ed=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zw=/^[^\n]+/,kd=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yw=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Jw=$e(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_d).getRegex(),el="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",qd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,e4=$e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",qd).replace("tag",el).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ig=$e(Ed).replace("hr",Kr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",el).getRegex(),t4=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ig).getRegex(),Td={blockquote:t4,code:Gw,def:Yw,fences:Xw,heading:Kw,hr:Kr,html:e4,lheading:tg,list:Jw,newline:Uw,paragraph:ig,table:Zo,text:Zw},G0=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",el).getRegex(),i4=et(ke({},Td),{lheading:Qw,table:G0,paragraph:$e(Ed).replace("hr",Kr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",G0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",el).getRegex()}),o4=et(ke({},Td),{html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Zo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(Ed).replace("hr",Kr).replace("heading",` *#{1,6} *[^
27
- ]`).replace("lheading",tg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),n4=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,r4=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,og=/^( {2,}|\\)\n(?!\s*$)/,a4=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,gr=/[\p{P}\p{S}]/u,tl=/[\s\p{P}\p{S}]/u,Rd=/[^\s\p{P}\p{S}]/u,s4=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tl).getRegex(),ng=/(?!~)[\p{P}\p{S}]/u,l4=/(?!~)[\s\p{P}\p{S}]/u,c4=/(?:[^\s\p{P}\p{S}]|~)/u,d4=$e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Hw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rg=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,h4=$e(rg,"u").replace(/punct/g,gr).getRegex(),m4=$e(rg,"u").replace(/punct/g,ng).getRegex(),ag="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",u4=$e(ag,"gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,tl).replace(/punct/g,gr).getRegex(),p4=$e(ag,"gu").replace(/notPunctSpace/g,c4).replace(/punctSpace/g,l4).replace(/punct/g,ng).getRegex(),f4=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,tl).replace(/punct/g,gr).getRegex(),g4=$e(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,gr).getRegex(),b4="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",v4=$e(b4,"gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,tl).replace(/punct/g,gr).getRegex(),x4=$e(/\\(punct)/,"gu").replace(/punct/g,gr).getRegex(),w4=$e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),S4=$e(qd).replace("(?:-->|$)","-->").getRegex(),y4=$e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",S4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,C4=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Zs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sg=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",Zs).replace("ref",kd).getRegex(),lg=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",kd).getRegex(),M4=$e("reflink|nolink(?!\\()","g").replace("reflink",sg).replace("nolink",lg).getRegex(),X0=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Id={_backpedal:Zo,anyPunctuation:x4,autolink:w4,blockSkip:d4,br:og,code:r4,del:Zo,delLDelim:Zo,delRDelim:Zo,emStrongLDelim:h4,emStrongRDelimAst:u4,emStrongRDelimUnd:f4,escape:n4,link:C4,nolink:lg,punctuation:s4,reflink:sg,reflinkSearch:M4,tag:y4,text:a4,url:Zo},_4=et(ke({},Id),{link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",Zs).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zs).getRegex()}),Sd=et(ke({},Id),{emStrongRDelimAst:p4,emStrongLDelim:m4,delLDelim:g4,delRDelim:v4,url:$e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",X0).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",X0).getRegex()}),E4=et(ke({},Sd),{br:$e(og).replace("{2,}","*").getRegex(),text:$e(Sd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Qs={normal:Td,gfm:i4,pedantic:o4},Ur={normal:Id,gfm:Sd,breaks:E4,pedantic:_4},k4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},K0=e=>k4[e];function Ai(e,o){if(o){if(Ft.escapeTest.test(e))return e.replace(Ft.escapeReplace,K0)}else if(Ft.escapeTestNoEncode.test(e))return e.replace(Ft.escapeReplaceNoEncode,K0);return e}function Q0(e){try{e=encodeURI(e).replace(Ft.percentDecode,"%")}catch{return null}return e}function Z0(e,o){let t=e.replace(Ft.findPipe,(r,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),i=t.split(Ft.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),o)if(i.length>o)i.splice(o);else for(;i.length<o;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Ft.slashPipe,"|");return i}function Gr(e,o,t){let i=e.length;if(i===0)return"";let n=0;for(;n<i;){let r=e.charAt(i-n-1);if(r===o&&!t)n++;else if(r!==o&&t)n++;else break}return e.slice(0,i-n)}function q4(e,o){if(e.indexOf(o[1])===-1)return-1;let t=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===o[0])t++;else if(e[i]===o[1]&&(t--,t<0))return i;return t>0?-2:-1}function T4(e,o=0){let t=o,i="";for(let n of e)if(n===" "){let r=4-t%4;i+=" ".repeat(r),t+=r}else i+=n,t++;return i}function Y0(e,o,t,i,n){let r=o.href,a=o.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function R4(e,o,t){let i=e.match(t.other.indentCodeCompensation);if(i===null)return o;let n=i[1];return o.split(`
25
+ `);let a=OC(o,t,n),s=jc.getSymbolSize(o),l=new RC(s);return NC(l,o),PC(l),BC(l,o),Am(l,t,0),o>=7&&VC(l,o),WC(l,a),isNaN(i)&&(i=Dm.getBestMask(l,Am.bind(null,l,t))),Dm.applyMask(i,l),Am(l,t,i),{modules:l,version:o,errorCorrectionLevel:t,maskPattern:i,segments:n}}zx.create=function(o,t){if(typeof o>"u"||o==="")throw new Error("No input text");let i=Rm.M,n,r;return typeof t<"u"&&(i=Rm.from(t.errorCorrectionLevel,Rm.M),n=$c.from(t.version),r=Dm.from(t.maskPattern),t.toSJISFunc&&jc.setToSJISFunction(t.toSJISFunc)),$C(o,n,i,r)}});var Lm=Ye(_n=>{"use strict";function jx(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let o=e.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+e);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");let t=parseInt(o.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+o.slice(0,6).join("")}}_n.getOptions=function(o){o||(o={}),o.color||(o.color={});let t=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,n=o.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:jx(o.color.dark||"#000000ff"),light:jx(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}};_n.getScale=function(o,t){return t.width&&t.width>=o+t.margin*2?t.width/(o+t.margin*2):t.scale};_n.getImageWidth=function(o,t){let i=_n.getScale(o,t);return Math.floor((o+t.margin*2)*i)};_n.qrToImageData=function(o,t,i){let n=t.modules.size,r=t.modules.data,a=_n.getScale(n,i),s=Math.floor((n+i.margin*2)*a),l=i.margin*a,d=[i.color.light,i.color.dark];for(let c=0;c<s;c++)for(let m=0;m<s;m++){let u=(c*s+m)*4,p=i.color.light;if(c>=l&&m>=l&&c<s-l&&m<s-l){let f=Math.floor((c-l)/a),S=Math.floor((m-l)/a);p=d[r[f*n+S]?1:0]}o[u++]=p.r,o[u++]=p.g,o[u++]=p.b,o[u]=p.a}}});var Hx=Ye(Hc=>{"use strict";var Nm=Lm();function jC(e,o,t){e.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=t,o.width=t,o.style.height=t+"px",o.style.width=t+"px"}function HC(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}Hc.render=function(o,t,i){let n=i,r=t;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),t||(r=HC()),n=Nm.getOptions(n);let a=Nm.getImageWidth(o.modules.size,n),s=r.getContext("2d"),l=s.createImageData(a,a);return Nm.qrToImageData(l.data,o,n),jC(s,r,a),s.putImageData(l,0,0),r};Hc.renderToDataURL=function(o,t,i){let n=i;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),n||(n={});let r=Hc.render(o,t,n),a=n.type||"image/png",s=n.rendererOpts||{};return r.toDataURL(a,s.quality)}});var Xx=Ye(Gx=>{"use strict";var UC=Lm();function Ux(e,o){let t=e.a/255,i=o+'="'+e.hex+'"';return t<1?i+" "+o+'-opacity="'+t.toFixed(2).slice(1)+'"':i}function Pm(e,o,t){let i=e+o;return typeof t<"u"&&(i+=" "+t),i}function GC(e,o,t){let i="",n=0,r=!1,a=0;for(let s=0;s<e.length;s++){let l=Math.floor(s%o),d=Math.floor(s/o);!l&&!r&&(r=!0),e[s]?(a++,s>0&&l>0&&e[s-1]||(i+=r?Pm("M",l+t,.5+d+t):Pm("m",n,0),n=0,r=!1),l+1<o&&e[s+1]||(i+=Pm("h",a),a=0)):n++}return i}Gx.render=function(o,t,i){let n=UC.getOptions(t),r=o.modules.size,a=o.modules.data,s=r+n.margin*2,l=n.color.light.a?"<path "+Ux(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",d="<path "+Ux(n.color.dark,"stroke")+' d="'+GC(a,r,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',u='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+d+`</svg>
26
+ `;return typeof i=="function"&&i(null,u),u}});var Qx=Ye(Da=>{"use strict";var XC=Yv(),Bm=$x(),Kx=Hx(),KC=Xx();function Vm(e,o,t,i,n){let r=[].slice.call(arguments,1),a=r.length,s=typeof r[a-1]=="function";if(!s&&!XC())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=t,t=o,o=i=void 0):a===3&&(o.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=t,t=o,o=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=o,o=i=void 0):a===2&&!o.getContext&&(i=t,t=o,o=void 0),new Promise(function(l,d){try{let c=Bm.create(t,i);l(e(c,o,i))}catch(c){d(c)}})}try{let l=Bm.create(t,i);n(null,e(l,o,i))}catch(l){n(l)}}Da.create=Bm.create;Da.toCanvas=Vm.bind(null,Kx.render);Da.toDataURL=Vm.bind(null,Kx.renderToDataURL);Da.toString=Vm.bind(null,function(e,o,t){return KC.render(e,t)})});var U0="codeChartaVersion",G0=(()=>{class e{constructor(){this.localStorageRepo=T(Wu)}readSavedVersion(){return this.localStorageRepo.read(U0)}writeSavedVersion(t){this.localStorageRepo.write(U0,t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var X0=(()=>{class e{constructor(){this.versionRepo=T(G0),this.currentVersion=Vu.version,this.previousVersion=Se(null),this.shouldShowChangelog=Se(!1)}getSavedVersion(){return this.versionRepo.readSavedVersion()}saveCurrentVersion(){this.versionRepo.writeSavedVersion(this.currentVersion)}setPreviousVersion(t){this.previousVersion.set(t)}setShouldShowChangelog(t){this.shouldShowChangelog.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Zs=(()=>{class e{constructor(t){this.versionStore=t}get currentVersion(){return this.versionStore.currentVersion}get previousVersion(){return this.versionStore.previousVersion}get shouldShowChangelog(){return this.versionStore.shouldShowChangelog}synchronizeVersion(){let t=this.versionStore.getSavedVersion();if(t===null){this.versionStore.saveCurrentVersion();return}this.compareVersion(t,this.currentVersion)<0&&(this.versionStore.setPreviousVersion(t),this.versionStore.setShouldShowChangelog(!0),this.versionStore.saveCurrentVersion())}acknowledgeChangelog(){this.versionStore.setShouldShowChangelog(!1)}compareVersion(t,i){let n=this.parseSemver(t),r=this.parseSemver(i);return n.major!==r.major?n.major>r.major?1:-1:n.minor!==r.minor?n.minor>r.minor?1:-1:n.patch!==r.patch?n.patch>r.patch?1:-1:0}parseSemver(t){let i=t.split(".");return{major:Number.parseInt(i[0])||0,minor:Number.parseInt(i[1])||0,patch:Number.parseInt(i[2])||0}}static{this.\u0275fac=function(i){return new(i||e)(E(X0))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ed(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jo=Ed();function ig(e){Jo=e}var Zo={exec:()=>null};function $e(e,o=""){let t=typeof e=="string"?e:e.source,i={replace:(n,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(Ft.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,o)};return i}var Xw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ft={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Kw=/^(?:[ \t]*(?:\n|$))+/,Qw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,og=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ng=$e(og).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Jw=$e(og).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,e4=/^[^\n]+/,Td=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,t4=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Td).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),i4=$e(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kd).getRegex(),il="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Rd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,o4=$e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Rd).replace("tag",il).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rg=$e(qd).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",il).getRegex(),n4=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rg).getRegex(),Id={blockquote:n4,code:Qw,def:t4,fences:Zw,heading:Yw,hr:Zr,html:o4,lheading:ng,list:i4,newline:Kw,paragraph:rg,table:Zo,text:e4},Q0=$e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",il).getRegex(),r4=et(ke({},Id),{lheading:Jw,table:Q0,paragraph:$e(qd).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Q0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",il).getRegex()}),a4=et(ke({},Id),{html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Rd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Zo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$e(qd).replace("hr",Zr).replace("heading",` *#{1,6} *[^
27
+ ]`).replace("lheading",ng).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),s4=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,l4=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ag=/^( {2,}|\\)\n(?!\s*$)/,c4=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vr=/[\p{P}\p{S}]/u,ol=/[\s\p{P}\p{S}]/u,Ad=/[^\s\p{P}\p{S}]/u,d4=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ol).getRegex(),sg=/(?!~)[\p{P}\p{S}]/u,h4=/(?!~)[\s\p{P}\p{S}]/u,m4=/(?:[^\s\p{P}\p{S}]|~)/u,u4=$e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),lg=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,p4=$e(lg,"u").replace(/punct/g,vr).getRegex(),f4=$e(lg,"u").replace(/punct/g,sg).getRegex(),cg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",g4=$e(cg,"gu").replace(/notPunctSpace/g,Ad).replace(/punctSpace/g,ol).replace(/punct/g,vr).getRegex(),b4=$e(cg,"gu").replace(/notPunctSpace/g,m4).replace(/punctSpace/g,h4).replace(/punct/g,sg).getRegex(),v4=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ad).replace(/punctSpace/g,ol).replace(/punct/g,vr).getRegex(),x4=$e(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vr).getRegex(),w4="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",S4=$e(w4,"gu").replace(/notPunctSpace/g,Ad).replace(/punctSpace/g,ol).replace(/punct/g,vr).getRegex(),y4=$e(/\\(punct)/,"gu").replace(/punct/g,vr).getRegex(),C4=$e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),M4=$e(Rd).replace("(?:-->|$)","-->").getRegex(),_4=$e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",M4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Js=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,E4=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Js).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),dg=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",Js).replace("ref",Td).getRegex(),hg=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",Td).getRegex(),k4=$e("reflink|nolink(?!\\()","g").replace("reflink",dg).replace("nolink",hg).getRegex(),Z0=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dd={_backpedal:Zo,anyPunctuation:y4,autolink:C4,blockSkip:u4,br:ag,code:l4,del:Zo,delLDelim:Zo,delRDelim:Zo,emStrongLDelim:p4,emStrongRDelimAst:g4,emStrongRDelimUnd:v4,escape:s4,link:E4,nolink:hg,punctuation:d4,reflink:dg,reflinkSearch:k4,tag:_4,text:c4,url:Zo},q4=et(ke({},Dd),{link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",Js).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Js).getRegex()}),Cd=et(ke({},Dd),{emStrongRDelimAst:b4,emStrongLDelim:f4,delLDelim:x4,delRDelim:S4,url:$e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Z0).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Z0).getRegex()}),T4=et(ke({},Cd),{br:$e(ag).replace("{2,}","*").getRegex(),text:$e(Cd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Ys={normal:Id,gfm:r4,pedantic:a4},Xr={normal:Dd,gfm:Cd,breaks:T4,pedantic:q4},R4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Y0=e=>R4[e];function Di(e,o){if(o){if(Ft.escapeTest.test(e))return e.replace(Ft.escapeReplace,Y0)}else if(Ft.escapeTestNoEncode.test(e))return e.replace(Ft.escapeReplaceNoEncode,Y0);return e}function J0(e){try{e=encodeURI(e).replace(Ft.percentDecode,"%")}catch{return null}return e}function eg(e,o){let t=e.replace(Ft.findPipe,(r,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),i=t.split(Ft.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),o)if(i.length>o)i.splice(o);else for(;i.length<o;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Ft.slashPipe,"|");return i}function Kr(e,o,t){let i=e.length;if(i===0)return"";let n=0;for(;n<i;){let r=e.charAt(i-n-1);if(r===o&&!t)n++;else if(r!==o&&t)n++;else break}return e.slice(0,i-n)}function I4(e,o){if(e.indexOf(o[1])===-1)return-1;let t=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===o[0])t++;else if(e[i]===o[1]&&(t--,t<0))return i;return t>0?-2:-1}function A4(e,o=0){let t=o,i="";for(let n of e)if(n===" "){let r=4-t%4;i+=" ".repeat(r),t+=r}else i+=n,t++;return i}function tg(e,o,t,i,n){let r=o.href,a=o.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function D4(e,o,t){let i=e.match(t.other.indentCodeCompensation);if(i===null)return o;let n=i[1];return o.split(`
28
28
  `).map(r=>{let a=r.match(t.other.beginningSpace);if(a===null)return r;let[s]=a;return s.length>=n.length?r.slice(n.length):r}).join(`
29
- `)}var Ys=class{options;rules;lexer;constructor(e){this.options=e||Jo}space(e){let o=this.rules.block.newline.exec(e);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(e){let o=this.rules.block.code.exec(e);if(o){let t=o[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Gr(t,`
30
- `)}}}fences(e){let o=this.rules.block.fences.exec(e);if(o){let t=o[0],i=R4(t,o[3]||"",this.rules);return{type:"code",raw:t,lang:o[2]?o[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):o[2],text:i}}}heading(e){let o=this.rules.block.heading.exec(e);if(o){let t=o[2].trim();if(this.rules.other.endingHash.test(t)){let i=Gr(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:o[0],depth:o[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){let o=this.rules.block.hr.exec(e);if(o)return{type:"hr",raw:Gr(o[0],`
31
- `)}}blockquote(e){let o=this.rules.block.blockquote.exec(e);if(o){let t=Gr(o[0],`
29
+ `)}var el=class{options;rules;lexer;constructor(e){this.options=e||Jo}space(e){let o=this.rules.block.newline.exec(e);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(e){let o=this.rules.block.code.exec(e);if(o){let t=o[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Kr(t,`
30
+ `)}}}fences(e){let o=this.rules.block.fences.exec(e);if(o){let t=o[0],i=D4(t,o[3]||"",this.rules);return{type:"code",raw:t,lang:o[2]?o[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):o[2],text:i}}}heading(e){let o=this.rules.block.heading.exec(e);if(o){let t=o[2].trim();if(this.rules.other.endingHash.test(t)){let i=Kr(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:o[0],depth:o[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){let o=this.rules.block.hr.exec(e);if(o)return{type:"hr",raw:Kr(o[0],`
31
+ `)}}blockquote(e){let o=this.rules.block.blockquote.exec(e);if(o){let t=Kr(o[0],`
32
32
  `).split(`
33
33
  `),i="",n="",r=[];for(;t.length>0;){let a=!1,s=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),a=!0;else if(!a)s.push(t[l]);else break;t=t.slice(l);let d=s.join(`
34
34
  `),c=d.replace(this.rules.other.blockquoteSetextReplace,`
@@ -39,16 +39,16 @@ ${c}`:c;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
39
39
  `),S=this.blockquote(f);r[r.length-1]=S,i=i.substring(0,i.length-p.raw.length)+S.raw,n=n.substring(0,n.length-p.text.length)+S.text;break}else if(u?.type==="list"){let p=u,f=p.raw+`
40
40
  `+t.join(`
41
41
  `),S=this.list(f);r[r.length-1]=S,i=i.substring(0,i.length-u.raw.length)+S.raw,n=n.substring(0,n.length-p.raw.length)+S.raw,t=f.substring(r.at(-1).raw.length).split(`
42
- `);continue}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let o=this.rules.block.list.exec(e);if(o){let t=o[1].trim(),i=t.length>1,n={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let r=this.rules.other.listItemRegex(t),a=!1;for(;e;){let l=!1,d="",c="";if(!(o=r.exec(e))||this.rules.block.hr.test(e))break;d=o[0],e=e.substring(d.length);let m=T4(o[2].split(`
42
+ `);continue}}return{type:"blockquote",raw:i,tokens:r,text:n}}}list(e){let o=this.rules.block.list.exec(e);if(o){let t=o[1].trim(),i=t.length>1,n={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let r=this.rules.other.listItemRegex(t),a=!1;for(;e;){let l=!1,d="",c="";if(!(o=r.exec(e))||this.rules.block.hr.test(e))break;d=o[0],e=e.substring(d.length);let m=A4(o[2].split(`
43
43
  `,1)[0],o[1].length),u=e.split(`
44
44
  `,1)[0],p=!m.trim(),f=0;if(this.options.pedantic?(f=2,c=m.trimStart()):p?f=o[1].length+1:(f=m.search(this.rules.other.nonSpaceChar),f=f>4?1:f,c=m.slice(f),f+=o[1].length),p&&this.rules.other.blankLine.test(u)&&(d+=u+`
45
45
  `,e=e.substring(u.length+1),l=!0),!l){let S=this.rules.other.nextBulletRegex(f),R=this.rules.other.hrRegex(f),L=this.rules.other.fencesBeginRegex(f),j=this.rules.other.headingBeginRegex(f),q=this.rules.other.htmlBeginRegex(f),P=this.rules.other.blockquoteBeginRegex(f);for(;e;){let O=e.split(`
46
46
  `,1)[0],H;if(u=O,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),H=u):H=u.replace(this.rules.other.tabCharGlobal," "),L.test(u)||j.test(u)||q.test(u)||P.test(u)||S.test(u)||R.test(u))break;if(H.search(this.rules.other.nonSpaceChar)>=f||!u.trim())c+=`
47
47
  `+H.slice(f);else{if(p||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(m)||j.test(m)||R.test(m))break;c+=`
48
48
  `+u}p=!u.trim(),d+=O+`
49
- `,e=e.substring(O.length+1),m=H.slice(f)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=d}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l of n.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=c.checked,n.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!n.loose){let d=l.tokens.filter(m=>m.type==="space"),c=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));n.loose=c}}if(n.loose)for(let l of n.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(e){let o=this.rules.block.html.exec(e);if(o)return{type:"html",block:!0,raw:o[0],pre:o[1]==="pre"||o[1]==="script"||o[1]==="style",text:o[0]}}def(e){let o=this.rules.block.def.exec(e);if(o){let t=o[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=o[2]?o[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=o[3]?o[3].substring(1,o[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):o[3];return{type:"def",tag:t,raw:o[0],href:i,title:n}}}table(e){let o=this.rules.block.table.exec(e);if(!o||!this.rules.other.tableDelimiter.test(o[2]))return;let t=Z0(o[1]),i=o[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=o[3]?.trim()?o[3].replace(this.rules.other.tableRowBlankLine,"").split(`
50
- `):[],r={type:"table",raw:o[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?r.align.push("right"):this.rules.other.tableAlignCenter.test(a)?r.align.push("center"):this.rules.other.tableAlignLeft.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<t.length;a++)r.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:r.align[a]});for(let a of n)r.rows.push(Z0(a,r.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:r.align[l]})));return r}}lheading(e){let o=this.rules.block.lheading.exec(e);if(o){let t=o[1].trim();return{type:"heading",raw:o[0],depth:o[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(e){let o=this.rules.block.paragraph.exec(e);if(o){let t=o[1].charAt(o[1].length-1)===`
51
- `?o[1].slice(0,-1):o[1];return{type:"paragraph",raw:o[0],text:t,tokens:this.lexer.inline(t)}}}text(e){let o=this.rules.block.text.exec(e);if(o)return{type:"text",raw:o[0],text:o[0],tokens:this.lexer.inline(o[0])}}escape(e){let o=this.rules.inline.escape.exec(e);if(o)return{type:"escape",raw:o[0],text:o[1]}}tag(e){let o=this.rules.inline.tag.exec(e);if(o)return!this.lexer.state.inLink&&this.rules.other.startATag.test(o[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:o[0]}}link(e){let o=this.rules.inline.link.exec(e);if(o){let t=o[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let r=Gr(t.slice(0,-1),"\\");if((t.length-r.length)%2===0)return}else{let r=q4(o[2],"()");if(r===-2)return;if(r>-1){let a=(o[0].indexOf("!")===0?5:4)+o[1].length+r;o[2]=o[2].substring(0,r),o[0]=o[0].substring(0,a).trim(),o[3]=""}}let i=o[2],n="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],n=r[3])}else n=o[3]?o[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),Y0(o,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},o[0],this.lexer,this.rules)}}reflink(e,o){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=o[i.toLowerCase()];if(!n){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return Y0(t,n,t[0],this.lexer,this.rules)}}emStrong(e,o,t=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,o=o.slice(-1*e.length+n);(i=d.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(a=[...r].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...i[0]][0].length,m=e.slice(0,n+i.index+c+a);if(Math.min(n,a)%2){let p=m.slice(1,-1);return{type:"em",raw:m,text:p,tokens:this.lexer.inlineTokens(p)}}let u=m.slice(2,-2);return{type:"strong",raw:m,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let o=this.rules.inline.code.exec(e);if(o){let t=o[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:o[0],text:t}}}br(e){let o=this.rules.inline.br.exec(e);if(o)return{type:"br",raw:o[0]}}del(e,o,t=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,o=o.slice(-1*e.length+n);(i=l.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(a=[...r].length,a!==n))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let d=[...i[0]][0].length,c=e.slice(0,n+i.index+d+a),m=c.slice(n,-n);return{type:"del",raw:c,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(e){let o=this.rules.inline.autolink.exec(e);if(o){let t,i;return o[2]==="@"?(t=o[1],i="mailto:"+t):(t=o[1],i=t),{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(e){let o;if(o=this.rules.inline.url.exec(e)){let t,i;if(o[2]==="@")t=o[0],i="mailto:"+t;else{let n;do n=o[0],o[0]=this.rules.inline._backpedal.exec(o[0])?.[0]??"";while(n!==o[0]);t=o[0],o[1]==="www."?i="http://"+o[0]:i=o[0]}return{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(e){let o=this.rules.inline.text.exec(e);if(o){let t=this.lexer.state.inRawBlock;return{type:"text",raw:o[0],text:o[0],escaped:t}}}},si=class yd{tokens;options;state;inlineQueue;tokenizer;constructor(o){this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Jo,this.options.tokenizer=this.options.tokenizer||new Ys,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Ft,block:Qs.normal,inline:Ur.normal};this.options.pedantic?(t.block=Qs.pedantic,t.inline=Ur.pedantic):this.options.gfm&&(t.block=Qs.gfm,this.options.breaks?t.inline=Ur.breaks:t.inline=Ur.gfm),this.tokenizer.rules=t}static get rules(){return{block:Qs,inline:Ur}}static lex(o,t){return new yd(t).lex(o)}static lexInline(o,t){return new yd(t).inlineTokens(o)}lex(o){o=o.replace(Ft.carriageReturn,`
49
+ `,e=e.substring(O.length+1),m=H.slice(f)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=d}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l of n.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=c.checked,n.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!n.loose){let d=l.tokens.filter(m=>m.type==="space"),c=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));n.loose=c}}if(n.loose)for(let l of n.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(e){let o=this.rules.block.html.exec(e);if(o)return{type:"html",block:!0,raw:o[0],pre:o[1]==="pre"||o[1]==="script"||o[1]==="style",text:o[0]}}def(e){let o=this.rules.block.def.exec(e);if(o){let t=o[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=o[2]?o[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=o[3]?o[3].substring(1,o[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):o[3];return{type:"def",tag:t,raw:o[0],href:i,title:n}}}table(e){let o=this.rules.block.table.exec(e);if(!o||!this.rules.other.tableDelimiter.test(o[2]))return;let t=eg(o[1]),i=o[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=o[3]?.trim()?o[3].replace(this.rules.other.tableRowBlankLine,"").split(`
50
+ `):[],r={type:"table",raw:o[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?r.align.push("right"):this.rules.other.tableAlignCenter.test(a)?r.align.push("center"):this.rules.other.tableAlignLeft.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<t.length;a++)r.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:r.align[a]});for(let a of n)r.rows.push(eg(a,r.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:r.align[l]})));return r}}lheading(e){let o=this.rules.block.lheading.exec(e);if(o){let t=o[1].trim();return{type:"heading",raw:o[0],depth:o[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(e){let o=this.rules.block.paragraph.exec(e);if(o){let t=o[1].charAt(o[1].length-1)===`
51
+ `?o[1].slice(0,-1):o[1];return{type:"paragraph",raw:o[0],text:t,tokens:this.lexer.inline(t)}}}text(e){let o=this.rules.block.text.exec(e);if(o)return{type:"text",raw:o[0],text:o[0],tokens:this.lexer.inline(o[0])}}escape(e){let o=this.rules.inline.escape.exec(e);if(o)return{type:"escape",raw:o[0],text:o[1]}}tag(e){let o=this.rules.inline.tag.exec(e);if(o)return!this.lexer.state.inLink&&this.rules.other.startATag.test(o[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:o[0]}}link(e){let o=this.rules.inline.link.exec(e);if(o){let t=o[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let r=Kr(t.slice(0,-1),"\\");if((t.length-r.length)%2===0)return}else{let r=I4(o[2],"()");if(r===-2)return;if(r>-1){let a=(o[0].indexOf("!")===0?5:4)+o[1].length+r;o[2]=o[2].substring(0,r),o[0]=o[0].substring(0,a).trim(),o[3]=""}}let i=o[2],n="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],n=r[3])}else n=o[3]?o[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),tg(o,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},o[0],this.lexer,this.rules)}}reflink(e,o){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=o[i.toLowerCase()];if(!n){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return tg(t,n,t[0],this.lexer,this.rules)}}emStrong(e,o,t=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,o=o.slice(-1*e.length+n);(i=d.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(a=[...r].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...i[0]][0].length,m=e.slice(0,n+i.index+c+a);if(Math.min(n,a)%2){let p=m.slice(1,-1);return{type:"em",raw:m,text:p,tokens:this.lexer.inlineTokens(p)}}let u=m.slice(2,-2);return{type:"strong",raw:m,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let o=this.rules.inline.code.exec(e);if(o){let t=o[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:o[0],text:t}}}br(e){let o=this.rules.inline.br.exec(e);if(o)return{type:"br",raw:o[0]}}del(e,o,t=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,o=o.slice(-1*e.length+n);(i=l.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(a=[...r].length,a!==n))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let d=[...i[0]][0].length,c=e.slice(0,n+i.index+d+a),m=c.slice(n,-n);return{type:"del",raw:c,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(e){let o=this.rules.inline.autolink.exec(e);if(o){let t,i;return o[2]==="@"?(t=o[1],i="mailto:"+t):(t=o[1],i=t),{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(e){let o;if(o=this.rules.inline.url.exec(e)){let t,i;if(o[2]==="@")t=o[0],i="mailto:"+t;else{let n;do n=o[0],o[0]=this.rules.inline._backpedal.exec(o[0])?.[0]??"";while(n!==o[0]);t=o[0],o[1]==="www."?i="http://"+o[0]:i=o[0]}return{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(e){let o=this.rules.inline.text.exec(e);if(o){let t=this.lexer.state.inRawBlock;return{type:"text",raw:o[0],text:o[0],escaped:t}}}},si=class Md{tokens;options;state;inlineQueue;tokenizer;constructor(o){this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Jo,this.options.tokenizer=this.options.tokenizer||new el,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Ft,block:Ys.normal,inline:Xr.normal};this.options.pedantic?(t.block=Ys.pedantic,t.inline=Xr.pedantic):this.options.gfm&&(t.block=Ys.gfm,this.options.breaks?t.inline=Xr.breaks:t.inline=Xr.gfm),this.tokenizer.rules=t}static get rules(){return{block:Ys,inline:Xr}}static lex(o,t){return new Md(t).lex(o)}static lexInline(o,t){return new Md(t).inlineTokens(o)}lex(o){o=o.replace(Ft.carriageReturn,`
52
52
  `),this.blockTokens(o,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(o,t=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(o=o.replace(Ft.tabCharGlobal," ").replace(Ft.spaceLine,""));o;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},o,t))?(o=o.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(o)){o=o.substring(n.raw.length);let a=t.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
53
53
  `:t.push(n);continue}if(n=this.tokenizer.code(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
54
54
  `)?"":`
@@ -62,9 +62,9 @@ ${c}`:c;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
62
62
  `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n),i=r.length!==o.length,o=o.substring(n.raw.length);continue}if(n=this.tokenizer.text(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
63
63
  `)?"":`
64
64
  `)+n.raw,a.text+=`
65
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(o,t=[]){return this.inlineQueue.push({src:o,tokens:t}),t}inlineTokens(o,t=[]){this.tokenizer.lexer=this;let i=o,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;o;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},o,t))?(o=o.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(l.raw.length);let c=t.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(o)){o=o.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(o))){o=o.substring(l.raw.length),t.push(l);continue}let d=o;if(this.options.extensions?.startInline){let c=1/0,m=o.slice(1),u;this.options.extensions.startInline.forEach(p=>{u=p.call({lexer:this},m),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(d=o.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){o=o.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(o){let c="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},Js=class{options;parser;constructor(e){this.options=e||Jo}space(e){return""}code({text:e,lang:o,escaped:t}){let i=(o||"").match(Ft.notSpaceStart)?.[0],n=e.replace(Ft.endingNewline,"")+`
66
- `;return i?'<pre><code class="language-'+Ai(i)+'">'+(t?n:Ai(n,!0))+`</code></pre>
67
- `:"<pre><code>"+(t?n:Ai(n,!0))+`</code></pre>
65
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(o,t=[]){return this.inlineQueue.push({src:o,tokens:t}),t}inlineTokens(o,t=[]){this.tokenizer.lexer=this;let i=o,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;o;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},o,t))?(o=o.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(l.raw.length);let c=t.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(o)){o=o.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(o))){o=o.substring(l.raw.length),t.push(l);continue}let d=o;if(this.options.extensions?.startInline){let c=1/0,m=o.slice(1),u;this.options.extensions.startInline.forEach(p=>{u=p.call({lexer:this},m),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(d=o.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){o=o.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(o){let c="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},tl=class{options;parser;constructor(e){this.options=e||Jo}space(e){return""}code({text:e,lang:o,escaped:t}){let i=(o||"").match(Ft.notSpaceStart)?.[0],n=e.replace(Ft.endingNewline,"")+`
66
+ `;return i?'<pre><code class="language-'+Di(i)+'">'+(t?n:Di(n,!0))+`</code></pre>
67
+ `:"<pre><code>"+(t?n:Di(n,!0))+`</code></pre>
68
68
  `}blockquote({tokens:e}){return`<blockquote>
69
69
  ${this.parser.parse(e)}</blockquote>
70
70
  `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:o}){return`<h${o}>${this.parser.parseInline(e)}</h${o}>
@@ -80,8 +80,8 @@ ${this.parser.parse(e)}</blockquote>
80
80
  `}tablerow({text:e}){return`<tr>
81
81
  ${e}</tr>
82
82
  `}tablecell(e){let o=this.parser.parseInline(e.tokens),t=e.header?"th":"td";return(e.align?`<${t} align="${e.align}">`:`<${t}>`)+o+`</${t}>
83
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ai(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:o,tokens:t}){let i=this.parser.parseInline(t),n=Q0(e);if(n===null)return i;e=n;let r='<a href="'+e+'"';return o&&(r+=' title="'+Ai(o)+'"'),r+=">"+i+"</a>",r}image({href:e,title:o,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=Q0(e);if(n===null)return Ai(t);e=n;let r=`<img src="${e}" alt="${Ai(t)}"`;return o&&(r+=` title="${Ai(o)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ai(e.text)}},Dd=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},li=class Cd{options;renderer;textRenderer;constructor(o){this.options=o||Jo,this.options.renderer=this.options.renderer||new Js,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dd}static parse(o,t){return new Cd(t).parse(o)}static parseInline(o,t){return new Cd(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let i=0;i<o.length;i++){let n=o[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=s||"";continue}}let r=n;switch(r.type){case"space":{t+=this.renderer.space(r);break}case"hr":{t+=this.renderer.hr(r);break}case"heading":{t+=this.renderer.heading(r);break}case"code":{t+=this.renderer.code(r);break}case"table":{t+=this.renderer.table(r);break}case"blockquote":{t+=this.renderer.blockquote(r);break}case"list":{t+=this.renderer.list(r);break}case"checkbox":{t+=this.renderer.checkbox(r);break}case"html":{t+=this.renderer.html(r);break}case"def":{t+=this.renderer.def(r);break}case"paragraph":{t+=this.renderer.paragraph(r);break}case"text":{t+=this.renderer.text(r);break}default:{let a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=s||"";continue}}let a=r;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Xr=class{options;block;constructor(e){this.options=e||Jo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?si.lex:si.lexInline}provideParser(e=this.block){return e?li.parse:li.parseInline}},I4=class{defaults=Md();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=li;Renderer=Js;TextRenderer=Dd;Lexer=si;Tokenizer=Ys;Hooks=Xr;constructor(...e){this.use(...e)}walkTokens(e,o){let t=[];for(let i of e)switch(t=t.concat(o.call(this,i)),i.type){case"table":{let n=i;for(let r of n.header)t=t.concat(this.walkTokens(r.tokens,o));for(let r of n.rows)for(let a of r)t=t.concat(this.walkTokens(a.tokens,o));break}case"list":{let n=i;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let a=n[r].flat(1/0);t=t.concat(this.walkTokens(a,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...e){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{let i=ke({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=o.renderers[n.name];r?o.renderers[n.name]=function(...a){let s=n.renderer.apply(this,a);return s===!1&&(s=r.apply(this,a)),s}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=o[n.level];r?r.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),i.extensions=o),t.renderer){let n=this.defaults.renderer||new Js(this.defaults);for(let r in t.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,s=t.renderer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Ys(this.defaults);for(let r in t.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,s=t.tokenizer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Xr;for(let r in t.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=r,s=t.hooks[a],l=n[a];Xr.passThroughHooks.has(r)?n[a]=d=>{if(this.defaults.async&&Xr.passThroughHooksRespectAsync.has(r))return(async()=>{let m=await s.call(n,d);return l.call(n,m)})();let c=s.call(n,d);return l.call(n,c)}:n[a]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await s.apply(n,d);return m===!1&&(m=await l.apply(n,d)),m})();let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(a){let s=[];return s.push(r.call(this,a)),n&&(s=s.concat(n.call(this,a))),s}}this.defaults=ke(ke({},this.defaults),i)}),this}setOptions(e){return this.defaults=ke(ke({},this.defaults),e),this}lexer(e,o){return si.lex(e,o??this.defaults)}parser(e,o){return li.parse(e,o??this.defaults)}parseMarkdown(e){return(o,t)=>{let i=ke({},t),n=ke(ke({},this.defaults),i),r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(o):o,s=await(n.hooks?await n.hooks.provideLexer(e):e?si.lex:si.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(e):e?li.parse:li.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(r);try{n.hooks&&(o=n.hooks.preprocess(o));let a=(n.hooks?n.hooks.provideLexer(e):e?si.lex:si.lexInline)(o,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?li.parse:li.parseInline)(a,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(a){return r(a)}}}onError(e,o){return t=>{if(t.message+=`
84
- Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Ai(t.message+"",!0)+"</pre>";return o?Promise.resolve(i):i}if(o)return Promise.reject(t);throw t}}},Yo=new I4;function Ge(e,o){return Yo.parse(e,o)}Ge.options=Ge.setOptions=function(e){return Yo.setOptions(e),Ge.defaults=Yo.defaults,J0(Ge.defaults),Ge};Ge.getDefaults=Md;Ge.defaults=Jo;Ge.use=function(...e){return Yo.use(...e),Ge.defaults=Yo.defaults,J0(Ge.defaults),Ge};Ge.walkTokens=function(e,o){return Yo.walkTokens(e,o)};Ge.parseInline=Yo.parseInline;Ge.Parser=li;Ge.parser=li.parse;Ge.Renderer=Js;Ge.TextRenderer=Dd;Ge.Lexer=si;Ge.lexer=si.lex;Ge.Tokenizer=Ys;Ge.Hooks=Xr;Ge.parse=Ge;var h9=Ge.options,m9=Ge.setOptions,u9=Ge.use,p9=Ge.walkTokens,f9=Ge.parseInline;var g9=li.parse,b9=si.lex;function cg(){return{mangle:!1,walkTokens(e){if(e.type!=="link"||!e.href.startsWith("mailto:"))return;let o=e.href.substring(7),t=D4(o);e.href=`mailto:${t}`,!(e.tokens.length!==1||e.tokens[0].type!=="text"||e.tokens[0].text!==o)&&(e.text=t,e.tokens[0].text=t)}}}function D4(e){let o="",t,i,n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}var dg=`# Change Log - Visualization
83
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Di(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:o,tokens:t}){let i=this.parser.parseInline(t),n=J0(e);if(n===null)return i;e=n;let r='<a href="'+e+'"';return o&&(r+=' title="'+Di(o)+'"'),r+=">"+i+"</a>",r}image({href:e,title:o,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=J0(e);if(n===null)return Di(t);e=n;let r=`<img src="${e}" alt="${Di(t)}"`;return o&&(r+=` title="${Di(o)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Di(e.text)}},Fd=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},li=class _d{options;renderer;textRenderer;constructor(o){this.options=o||Jo,this.options.renderer=this.options.renderer||new tl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Fd}static parse(o,t){return new _d(t).parse(o)}static parseInline(o,t){return new _d(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let i=0;i<o.length;i++){let n=o[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=s||"";continue}}let r=n;switch(r.type){case"space":{t+=this.renderer.space(r);break}case"hr":{t+=this.renderer.hr(r);break}case"heading":{t+=this.renderer.heading(r);break}case"code":{t+=this.renderer.code(r);break}case"table":{t+=this.renderer.table(r);break}case"blockquote":{t+=this.renderer.blockquote(r);break}case"list":{t+=this.renderer.list(r);break}case"checkbox":{t+=this.renderer.checkbox(r);break}case"html":{t+=this.renderer.html(r);break}case"def":{t+=this.renderer.def(r);break}case"paragraph":{t+=this.renderer.paragraph(r);break}case"text":{t+=this.renderer.text(r);break}default:{let a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=s||"";continue}}let a=r;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Qr=class{options;block;constructor(e){this.options=e||Jo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?si.lex:si.lexInline}provideParser(e=this.block){return e?li.parse:li.parseInline}},F4=class{defaults=Ed();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=li;Renderer=tl;TextRenderer=Fd;Lexer=si;Tokenizer=el;Hooks=Qr;constructor(...e){this.use(...e)}walkTokens(e,o){let t=[];for(let i of e)switch(t=t.concat(o.call(this,i)),i.type){case"table":{let n=i;for(let r of n.header)t=t.concat(this.walkTokens(r.tokens,o));for(let r of n.rows)for(let a of r)t=t.concat(this.walkTokens(a.tokens,o));break}case"list":{let n=i;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let a=n[r].flat(1/0);t=t.concat(this.walkTokens(a,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...e){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{let i=ke({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=o.renderers[n.name];r?o.renderers[n.name]=function(...a){let s=n.renderer.apply(this,a);return s===!1&&(s=r.apply(this,a)),s}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=o[n.level];r?r.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),i.extensions=o),t.renderer){let n=this.defaults.renderer||new tl(this.defaults);for(let r in t.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,s=t.renderer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new el(this.defaults);for(let r in t.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,s=t.tokenizer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Qr;for(let r in t.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=r,s=t.hooks[a],l=n[a];Qr.passThroughHooks.has(r)?n[a]=d=>{if(this.defaults.async&&Qr.passThroughHooksRespectAsync.has(r))return(async()=>{let m=await s.call(n,d);return l.call(n,m)})();let c=s.call(n,d);return l.call(n,c)}:n[a]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await s.apply(n,d);return m===!1&&(m=await l.apply(n,d)),m})();let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(a){let s=[];return s.push(r.call(this,a)),n&&(s=s.concat(n.call(this,a))),s}}this.defaults=ke(ke({},this.defaults),i)}),this}setOptions(e){return this.defaults=ke(ke({},this.defaults),e),this}lexer(e,o){return si.lex(e,o??this.defaults)}parser(e,o){return li.parse(e,o??this.defaults)}parseMarkdown(e){return(o,t)=>{let i=ke({},t),n=ke(ke({},this.defaults),i),r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(o):o,s=await(n.hooks?await n.hooks.provideLexer(e):e?si.lex:si.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(e):e?li.parse:li.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(r);try{n.hooks&&(o=n.hooks.preprocess(o));let a=(n.hooks?n.hooks.provideLexer(e):e?si.lex:si.lexInline)(o,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?li.parse:li.parseInline)(a,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(a){return r(a)}}}onError(e,o){return t=>{if(t.message+=`
84
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Di(t.message+"",!0)+"</pre>";return o?Promise.resolve(i):i}if(o)return Promise.reject(t);throw t}}},Yo=new F4;function Ge(e,o){return Yo.parse(e,o)}Ge.options=Ge.setOptions=function(e){return Yo.setOptions(e),Ge.defaults=Yo.defaults,ig(Ge.defaults),Ge};Ge.getDefaults=Ed;Ge.defaults=Jo;Ge.use=function(...e){return Yo.use(...e),Ge.defaults=Yo.defaults,ig(Ge.defaults),Ge};Ge.walkTokens=function(e,o){return Yo.walkTokens(e,o)};Ge.parseInline=Yo.parseInline;Ge.Parser=li;Ge.parser=li.parse;Ge.Renderer=tl;Ge.TextRenderer=Fd;Ge.Lexer=si;Ge.lexer=si.lex;Ge.Tokenizer=el;Ge.Hooks=Qr;Ge.parse=Ge;var p9=Ge.options,f9=Ge.setOptions,g9=Ge.use,b9=Ge.walkTokens,v9=Ge.parseInline;var x9=li.parse,w9=si.lex;function mg(){return{mangle:!1,walkTokens(e){if(e.type!=="link"||!e.href.startsWith("mailto:"))return;let o=e.href.substring(7),t=L4(o);e.href=`mailto:${t}`,!(e.tokens.length!==1||e.tokens[0].type!=="text"||e.tokens[0].text!==o)&&(e.autolink&&(e.autolink=!1),e.text=t,e.tokens[0].text=t)}}}function L4(e){let o="",t,i,n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}var ug=`# Change Log - Visualization
85
85
 
86
86
  All notable changes to this project will be documented in this file.
87
87
 
@@ -90,16 +90,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/)
90
90
 
91
91
  ## [unreleased] (Added \u{1F680} | Changed | Removed | Fixed \u{1F41E} | Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB})
92
92
 
93
+ ## [2.5.2] - 2026-09-22
94
+
93
95
  ## [2.5.1] - 2026-09-21
94
96
 
95
97
  ### Changed
96
98
 
99
+ - **Desktop app on a supported Electron**: the desktop version runs on a current Electron release again, carrying the browser-engine security fixes of the four releases it had fallen behind.
100
+ - **Node 22.22.3, 24.15 or 26**: installing CodeCharta Visualization from npm needs Node 22 from 22.22.3, Node 24 from 24.15, or Node 26 and later.
97
101
  - **Flattening no longer interrupts you**: flattening or unflattening \u2014 a node, a metric rule, a search pattern or a file extension \u2014 changes only how the map looks, without the loading spinner a rebuild used to bring.
98
102
  - **"Hidden" is now "Excluded"**: the explorer calls the nodes it leaves out of the map excluded, the same word the menu that creates them uses, and the search bar says what its menu does instead of "Add to Blacklist".
99
103
  - **Label and colour changes answer at once**: changing a label setting, an edge setting or the colour metric no longer redraws the whole map, so it responds immediately however large the project.
100
104
 
105
+ ### Removed
106
+
107
+ - **32-bit Windows and ARMv7 Linux downloads**: the desktop app is no longer built for those two platforms, which the browser engine it bundles stopped supporting.
108
+
101
109
  ### Fixed \u{1F41E}
102
110
 
111
+ - **The desktop app has its icon back**: the packaged app shows the CodeCharta icon in the taskbar, dock and window instead of the default Electron one.
112
+ - **Domain words are shown as text**: a word from a loaded file appears literally in its word-cloud tooltip, instead of being interpreted as markup.
103
113
  - **No spinner for a settings change**: changing a metric, a label or a colour no longer flashes the loading spinner \u2014 it now appears only while a loaded map is being written.
104
114
  - **The map cannot be tilted under itself again**: tilting stops when the camera reaches the map's floor, instead of letting you look at its underside.
105
115
  - **A long session stays light**: the memory the map holds no longer grows with every metric, label or scaling change, so a large project survives an afternoon of adjusting it.
@@ -3483,9 +3493,9 @@ Fixed release issues
3483
3493
 
3484
3494
  - SonarImporter for importing projects from SonarQube.
3485
3495
  - ValidationTool for validating an existing json file.
3486
- `;var F4=["Added \u{1F680}","Fixed \u{1F41E}","Changed","Removed \u{1F5D1}","Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}"],il=(()=>{class e{parseChangesBetweenVersions(t,i){Ge.use(cg());let r=Ge.parse(dg).split(`
3487
- `),a=this.findVersionLine(r,i),s=this.findVersionLine(r,t);if(a===-1||s===-1)return[];let l=r.slice(a,s+1);return this.extractCategories(l)}extractCategories(t){let i=[];for(let n of F4){let r=new RegExp(`<h3>${n}</h3>`),a=this.findAllIndexes(t,r),s=[];for(let l of a){let d=l+2,c=this.findEndOfChanges(t,l);for(let m of t.slice(d,c))s.push(m)}s.length>0&&i.push({title:n,changes:s.join(`
3488
- `)})}return i}findAllIndexes(t,i){return t.reduce((n,r,a)=>(i.test(r)&&n.push(a),n),[])}findVersionLine(t,i){let n=new RegExp(String.raw`\[${i}]`);return t.findIndex(r=>n.test(r))}findEndOfChanges(t,i){return i+t.slice(i+1).findIndex(n=>/<h3>/.test(n)||/<h2>/.test(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var L4=["dialog"],N4=(e,o)=>o.title;function P4(e,o){if(e&1&&(x(0,"div",15)(1,"div",24)(2,"span",25),g(3),v(),x(4,"h3",26),g(5),v(),x(6,"span",27),g(7),v()(),V(8,"div",28),v()),e&2){let t=o.$implicit,i=B();h(),F("ngClass",i.getCategoryHeaderClass(t.title)),h(),F("ngClass",i.getCategoryIconClass(t.title)),h(),ge(" ",i.getCategoryEmoji(t.title)," "),h(2),ge(" ",i.getCategoryLabel(t.title)," "),h(),F("ngClass",i.getCategoryCountClass(t.title)),h(),ge(" ",i.getChangeCount(t.changes)," "),h(),F("innerHTML",t.changes,du)}}var Ad={"Added \u{1F680}":{emoji:"\u{1F680}",label:"Added",type:"added"},"Fixed \u{1F41E}":{emoji:"\u{1F41E}",label:"Fixed",type:"fixed"},Changed:{emoji:"\u2728",label:"Changed",type:"changed"},"Removed \u{1F5D1}":{emoji:"\u{1F5D1}",label:"Removed",type:"removed"},"Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}":{emoji:"\u{1F527}",label:"Maintenance",type:"chore"}},Fd={added:{header:"bg-success/5",icon:"bg-success/10",count:"bg-success/10 text-success"},fixed:{header:"bg-info/5",icon:"bg-info/10",count:"bg-info/10 text-info"},changed:{header:"bg-warning/5",icon:"bg-warning/10",count:"bg-warning/10 text-warning"},removed:{header:"bg-error/5",icon:"bg-error/10",count:"bg-error/10 text-error"},chore:{header:"bg-neutral/5",icon:"bg-neutral/10",count:"bg-neutral/10 text-neutral"}},Ld=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i,this.dialogElement=Je.required("dialog"),this.previousVersion=this.versionService.previousVersion,this.currentVersion=this.versionService.currentVersion,this.shouldShowChangelog=this.versionService.shouldShowChangelog,this.changes=Y(()=>{let n=this.previousVersion();return n?this.changelogParserService.parseChangesBetweenVersions(n,this.currentVersion):[]}),lu(()=>{this.shouldShowChangelog()&&this.open()})}open(){this.dialogElement().nativeElement.showModal()}close(){this.versionService.acknowledgeChangelog(),this.dialogElement().nativeElement.close()}getCategoryEmoji(t){return Ad[t]?.emoji??"\u{1F4DD}"}getCategoryLabel(t){return Ad[t]?.label??t}getCategoryType(t){return Ad[t]?.type??"default"}getCategoryHeaderClass(t){let i=this.getCategoryType(t);return Fd[i]?.header??"bg-base-200"}getCategoryIconClass(t){let i=this.getCategoryType(t);return Fd[i]?.icon??"bg-base-300"}getCategoryCountClass(t){let i=this.getCategoryType(t);return Fd[i]?.count??"bg-base-300 text-base-content"}getChangeCount(t){return(t.match(/<li>/gi)||[]).length}static{this.\u0275fac=function(i){return new(i||e)(ne(Ks),ne(il))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-changelog-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,L4,5),i&2&&at()},decls:33,vars:2,consts:[["dialog",""],[1,"modal","backdrop-blur-sm"],[1,"modal-box","max-w-2xl","p-0","overflow-hidden","bg-gradient-to-b","from-base-100","to-base-200","shadow-2xl"],[1,"relative","px-8","pt-8","pb-6","bg-gradient-to-br","from-primary/5","via-transparent","to-accent/5"],[1,"absolute","top-0","right-0","w-32","h-32","bg-gradient-to-bl","from-primary/10","to-transparent","rounded-bl-full"],[1,"relative"],[1,"inline-block","px-3","py-1","mb-3","text-xs","font-semibold","tracking-wider","uppercase","rounded-full","bg-primary/10","text-primary"],[1,"text-3xl","font-bold","tracking-tight","text-base-content"],[1,"flex","items-center","gap-3","mt-3"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-medium","rounded-lg","bg-base-200","text-base-content/70","border","border-base-300"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-base-content/40"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 7l5 5m0 0l-5 5m5-5H6"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-semibold","rounded-lg","bg-primary/10","text-primary","border","border-primary/20"],[1,"px-8","py-6","max-h-[60vh]","overflow-y-auto"],[1,"flex","flex-col","gap-4"],[1,"rounded-xl","overflow-hidden","bg-base-100","border","border-base-300/50","shadow-sm"],[1,"px-8","py-5","border-t","border-base-300/50","bg-base-200/50"],[1,"flex","items-center","justify-between"],["href","https://codecharta.com/news/","target","_blank","rel","noopener noreferrer",1,"inline-flex","items-center","gap-2","text-sm","font-medium","transition-colors","text-primary","hover:text-primary/80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"],[1,"btn","btn-primary","btn-sm","px-6",3,"click"],["method","dialog",1,"modal-backdrop","bg-base-content/60"],[3,"click"],[1,"flex","items-center","gap-3","px-4","py-3","border-b","border-base-200",3,"ngClass"],[1,"flex","items-center","justify-center","w-8","h-8","rounded-lg","text-base",3,"ngClass"],[1,"text-base","font-semibold","text-base-content"],[1,"ml-auto","px-2","py-0.5","text-xs","font-semibold","rounded-full",3,"ngClass"],[1,"px-6","py-4","text-sm","text-base-content/80","leading-snug","[&_a]:text-primary","[&_a]:hover:underline",3,"innerHTML"]],template:function(i,n){i&1&&(x(0,"dialog",1,0)(2,"div",2)(3,"div",3),V(4,"div",4),x(5,"div",5)(6,"span",6),g(7," Release Notes "),v(),x(8,"h2",7),g(9," What's new in CodeCharta? "),v(),x(10,"div",8)(11,"span",9),g(12),v(),Ho(),x(13,"svg",10),V(14,"path",11),v(),Wr(),x(15,"span",12),g(16),v()()()(),x(17,"div",13)(18,"div",14),Pe(19,P4,9,7,"div",15,N4),v()(),x(21,"div",16)(22,"div",17)(23,"a",18)(24,"span"),g(25,"View full changelog"),v(),Ho(),x(26,"svg",19),V(27,"path",20),v()(),Wr(),x(28,"button",21),z("click",function(){return n.close()}),g(29," Got it "),v()()()(),x(30,"form",22)(31,"button",23),z("click",function(){return n.close()}),g(32,"close"),v()()()),i&2&&(h(12),ge(" ",n.previousVersion()," "),h(4),ge(" ",n.currentVersion," "),h(3),Be(n.changes()))},dependencies:[Mu],encapsulation:2,changeDetection:0})}}return e})();var mg=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i}get currentVersion(){return this.versionService.currentVersion}get previousVersion(){return this.versionService.previousVersion}get shouldShowChangelog(){return this.versionService.shouldShowChangelog}synchronizeVersion(){this.versionService.synchronizeVersion()}acknowledgeChangelog(){this.versionService.acknowledgeChangelog()}parseChangesBetweenVersions(t,i){return this.changelogParserService.parseChangesBetweenVersions(t,i)}static{this.\u0275fac=function(i){return new(i||e)(E(Ks),E(il))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ug=[Mp,gp,pp,bp,mp,yi];var pg=(()=>{class e{constructor(t,i,n,r,a){this.store=t,this.threeSceneService=i,this.threeMapControlsService=n,this.actions$=r,this.globalSettingsFacade=a,this.autoFitRequests$=Ki(this.actions$.pipe(st(ri),qe(s=>({force:s.forceAutoFit}))),this.store.select(Nn).pipe(pi(1),qe(()=>({force:!1}))),St(ug.map(s=>this.store.select(s))).pipe(pi(1),qe(()=>({force:!1})))),this.autoFitTo$=Ne(()=>this.autoFitRequests$.pipe(ti(this.globalSettingsFacade.resetCameraIfNewFileIsLoaded$()),Ae(([s,l])=>l||s.force),Ht(()=>this.threeSceneService.mapMeshChanged$.pipe(ut(1))),Le(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(ft),E(qt),E(dt),E(p0))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var fg=[hs,go,jn,ms,bo,vo,qp,vs,xs,ds,_i,ai,to,io,po,uo,On,Bn,Vn,as,co,oo,Ci,ho,mo,Si,so,ss,xf,Ei,Gt,Ut,zn,Pi,us,ps,Hn,fs,ki,Mi,_t,$n,Un,xo,wo,no,ro,lo,ao,Qt];var en=Object.freeze({geometry:!0,colors:!0,labels:!0,arrows:!0}),B4=new Map([[Si.type,{labels:!0}],[so.type,{labels:!0}],[ao.type,{labels:!0}],[lo.type,{labels:!0}],[po.type,{labels:!0}],[uo.type,{labels:!0}],[no.type,{labels:!0}],[ro.type,{labels:!0}],[Gt.type,{arrows:!0}],[oo.type,{arrows:!0}],[Ci.type,{arrows:!0}],[ho.type,{arrows:!0}],[mo.type,{arrows:!0}],[_t.type,{colors:!0}],[Ei.type,{colors:!0}],[Ut.type,{colors:!0}],[ai.type,{colors:!0}],[to.type,{colors:!0}],[io.type,{colors:!0}],[_i.type,{colors:!0}],[On.type,{colors:!0}],[Un.type,{colors:!0}],[xo.type,{colors:!0}],[wo.type,{colors:!0}],[co.type,{labels:!0,arrows:!0}]]);function gg(e){let o=B4.get(e.type);return o?bg(o):ke({},en)}function bg(e){let o=e.geometry===!0,t=o||e.colors===!0;return{geometry:o,colors:t,labels:t||e.labels===!0,arrows:o||e.arrows===!0}}function vg(e){return bg({geometry:e.some(({geometry:o})=>o),colors:e.some(({colors:o})=>o),labels:e.some(({labels:o})=>o),arrows:e.some(({arrows:o})=>o)})}function wg(e,o,t,i){let n=new Map;for(let r of e){let a=o(r),s=n.get(a);s?s.push(r):n.set(a,[r])}return[...n.values()].flatMap(r=>Nd(r,t,i))}function Nd(e,o,t){let i=Math.floor(t);if(Number.isNaN(i)||i<=0)return[];let n=r=>V4(o(r));return e.length<=i?[...e].sort((r,a)=>n(a)-n(r)):W4(e,n,i)}function V4(e){return Number.isNaN(e)?Number.NEGATIVE_INFINITY:e}function W4(e,o,t){let i=[],n=Number.POSITIVE_INFINITY;for(let r of e){let a=o(r);if(i.length<t)xg(i,r,a,o);else if(a>n)i.pop(),xg(i,r,a,o);else continue;i.length===t&&(n=o(i[t-1]))}return i}function xg(e,o,t,i){let n=e.length;for(;n>0&&i(e[n-1])<t;)n--;e.splice(n,0,o)}var Sg=De(ef,Pn,os,(e,o,t)=>new Set(O4(e,o,t))),O4=(e,o,t)=>{let i=[],n=Math.floor(t);if(Number.isNaN(n)||n<=0)return i;let r=e.get(o);if(r===void 0)return i;for(let a of r.keys())if(i.push(a),i.length>=n)break;return i};var yg=(e,o,t,i,n)=>{for(let r of o)if(r.visible=ni.none,r.attributes[t]!==void 0){let a=e.has(r.fromNodeName),s=e.has(r.toNodeName),l=i&&s,d=n&&a;d&&l?r.visible=ni.both:d?r.visible=ni.from:l&&(r.visible=ni.to)}};var Cg=De(Sg,qs,Pn,vp,xp,(e,o,t,i,n)=>{let r=Bu(o);return yg(e,r,t,i,n),r});var vr=(()=>{class e{constructor(t,i,n,r){this.store=t,this.ccStateSnapshot=i,this.mapStateReadWindow=n,this.sharedViewReadWindow=r}getState(){return this.ccStateSnapshot.get()}getMapState(){return this.mapStateReadWindow.getMapState()}getEdges(){return qs(this.ccStateSnapshot.get())}getEdgeVisibility(){return Cg(this.ccStateSnapshot.get())}getHoveredNodeId(){return this.sharedViewReadWindow.getHoveredNodeId()}getIdToNode(){return Zp(this.ccStateSnapshot.get())}setHoveredNodeId(t){this.store.dispatch(Xo({value:t}))}setRightClickedNodeData(t){this.store.dispatch(Tp({value:t}))}setColorLabels(t){this.store.dispatch(_i({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(Vt),E(xe),E(Bt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var nl=class e{constructor(o,t,i){this.badge=null,this.labelSize=i;let n=document.createElement("div");if(this.content=document.createElement("div"),this.content.style.cssText=e.buildContentStyles(i),o){let r=document.createElement("span");r.style.cssText="display: block; font-weight: 500;",r.textContent=o,this.content.appendChild(r)}if(t){let r=document.createElement("span");r.style.cssText=`display: block; font-size: ${10*i}px; color: #666; margin-top: 1px;`,r.textContent=t,this.content.appendChild(r)}n.appendChild(this.content),this.cssObject=new Cf(n),this.cssObject.center.set(.5,1)}getContentRect(){return this.content.getBoundingClientRect()}getContentElement(){return this.content}setOpacity(o){this.content.style.opacity=o}setTransform(o){this.content.style.transform=`translateY(${-20+o}px)`}setTransition(o){this.content.style.transition=o}setBadge(o){this.clearBadge(),this.badge=document.createElement("div"),this.badge.textContent=`+${o} more`,this.badge.style.cssText=`
3496
+ `;var P4=["Added \u{1F680}","Fixed \u{1F41E}","Changed","Removed \u{1F5D1}","Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}"],nl=(()=>{class e{parseChangesBetweenVersions(t,i){Ge.use(mg());let r=Ge.parse(ug).split(`
3497
+ `),a=this.findVersionLine(r,i),s=this.findVersionLine(r,t);if(a===-1||s===-1)return[];let l=r.slice(a,s+1);return this.extractCategories(l)}extractCategories(t){let i=[];for(let n of P4){let r=new RegExp(`<h3>${n}</h3>`),a=this.findAllIndexes(t,r),s=[];for(let l of a){let d=l+2,c=this.findEndOfChanges(t,l);for(let m of t.slice(d,c))s.push(m)}s.length>0&&i.push({title:n,changes:s.join(`
3498
+ `)})}return i}findAllIndexes(t,i){return t.reduce((n,r,a)=>(i.test(r)&&n.push(a),n),[])}findVersionLine(t,i){let n=new RegExp(String.raw`\[${i}]`);return t.findIndex(r=>n.test(r))}findEndOfChanges(t,i){return i+t.slice(i+1).findIndex(n=>/<h3>/.test(n)||/<h2>/.test(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var B4=["dialog"],V4=(e,o)=>o.title;function W4(e,o){if(e&1&&(x(0,"div",15)(1,"div",24)(2,"span",25),g(3),v(),x(4,"h3",26),g(5),v(),x(6,"span",27),g(7),v()(),V(8,"div",28),v()),e&2){let t=o.$implicit,i=B();h(),F("ngClass",i.getCategoryHeaderClass(t.title)),h(),F("ngClass",i.getCategoryIconClass(t.title)),h(),ge(" ",i.getCategoryEmoji(t.title)," "),h(2),ge(" ",i.getCategoryLabel(t.title)," "),h(),F("ngClass",i.getCategoryCountClass(t.title)),h(),ge(" ",i.getChangeCount(t.changes)," "),h(),F("innerHTML",t.changes,mu)}}var Ld={"Added \u{1F680}":{emoji:"\u{1F680}",label:"Added",type:"added"},"Fixed \u{1F41E}":{emoji:"\u{1F41E}",label:"Fixed",type:"fixed"},Changed:{emoji:"\u2728",label:"Changed",type:"changed"},"Removed \u{1F5D1}":{emoji:"\u{1F5D1}",label:"Removed",type:"removed"},"Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}":{emoji:"\u{1F527}",label:"Maintenance",type:"chore"}},Nd={added:{header:"bg-success/5",icon:"bg-success/10",count:"bg-success/10 text-success"},fixed:{header:"bg-info/5",icon:"bg-info/10",count:"bg-info/10 text-info"},changed:{header:"bg-warning/5",icon:"bg-warning/10",count:"bg-warning/10 text-warning"},removed:{header:"bg-error/5",icon:"bg-error/10",count:"bg-error/10 text-error"},chore:{header:"bg-neutral/5",icon:"bg-neutral/10",count:"bg-neutral/10 text-neutral"}},Pd=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i,this.dialogElement=Je.required("dialog"),this.previousVersion=this.versionService.previousVersion,this.currentVersion=this.versionService.currentVersion,this.shouldShowChangelog=this.versionService.shouldShowChangelog,this.changes=Y(()=>{let n=this.previousVersion();return n?this.changelogParserService.parseChangesBetweenVersions(n,this.currentVersion):[]}),du(()=>{this.shouldShowChangelog()&&this.open()})}open(){this.dialogElement().nativeElement.showModal()}close(){this.versionService.acknowledgeChangelog(),this.dialogElement().nativeElement.close()}getCategoryEmoji(t){return Ld[t]?.emoji??"\u{1F4DD}"}getCategoryLabel(t){return Ld[t]?.label??t}getCategoryType(t){return Ld[t]?.type??"default"}getCategoryHeaderClass(t){let i=this.getCategoryType(t);return Nd[i]?.header??"bg-base-200"}getCategoryIconClass(t){let i=this.getCategoryType(t);return Nd[i]?.icon??"bg-base-300"}getCategoryCountClass(t){let i=this.getCategoryType(t);return Nd[i]?.count??"bg-base-300 text-base-content"}getChangeCount(t){return(t.match(/<li>/gi)||[]).length}static{this.\u0275fac=function(i){return new(i||e)(ne(Zs),ne(nl))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-changelog-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,B4,5),i&2&&at()},decls:33,vars:2,consts:[["dialog",""],[1,"modal","backdrop-blur-sm"],[1,"modal-box","max-w-2xl","p-0","overflow-hidden","bg-gradient-to-b","from-base-100","to-base-200","shadow-2xl"],[1,"relative","px-8","pt-8","pb-6","bg-gradient-to-br","from-primary/5","via-transparent","to-accent/5"],[1,"absolute","top-0","right-0","w-32","h-32","bg-gradient-to-bl","from-primary/10","to-transparent","rounded-bl-full"],[1,"relative"],[1,"inline-block","px-3","py-1","mb-3","text-xs","font-semibold","tracking-wider","uppercase","rounded-full","bg-primary/10","text-primary"],[1,"text-3xl","font-bold","tracking-tight","text-base-content"],[1,"flex","items-center","gap-3","mt-3"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-medium","rounded-lg","bg-base-200","text-base-content/70","border","border-base-300"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-base-content/40"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 7l5 5m0 0l-5 5m5-5H6"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-semibold","rounded-lg","bg-primary/10","text-primary","border","border-primary/20"],[1,"px-8","py-6","max-h-[60vh]","overflow-y-auto"],[1,"flex","flex-col","gap-4"],[1,"rounded-xl","overflow-hidden","bg-base-100","border","border-base-300/50","shadow-sm"],[1,"px-8","py-5","border-t","border-base-300/50","bg-base-200/50"],[1,"flex","items-center","justify-between"],["href","https://codecharta.com/news/","target","_blank","rel","noopener noreferrer",1,"inline-flex","items-center","gap-2","text-sm","font-medium","transition-colors","text-primary","hover:text-primary/80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"],[1,"btn","btn-primary","btn-sm","px-6",3,"click"],["method","dialog",1,"modal-backdrop","bg-base-content/60"],[3,"click"],[1,"flex","items-center","gap-3","px-4","py-3","border-b","border-base-200",3,"ngClass"],[1,"flex","items-center","justify-center","w-8","h-8","rounded-lg","text-base",3,"ngClass"],[1,"text-base","font-semibold","text-base-content"],[1,"ml-auto","px-2","py-0.5","text-xs","font-semibold","rounded-full",3,"ngClass"],[1,"px-6","py-4","text-sm","text-base-content/80","leading-snug","[&_a]:text-primary","[&_a]:hover:underline",3,"innerHTML"]],template:function(i,n){i&1&&(x(0,"dialog",1,0)(2,"div",2)(3,"div",3),V(4,"div",4),x(5,"div",5)(6,"span",6),g(7," Release Notes "),v(),x(8,"h2",7),g(9," What's new in CodeCharta? "),v(),x(10,"div",8)(11,"span",9),g(12),v(),Ho(),x(13,"svg",10),V(14,"path",11),v(),zr(),x(15,"span",12),g(16),v()()()(),x(17,"div",13)(18,"div",14),Pe(19,W4,9,7,"div",15,V4),v()(),x(21,"div",16)(22,"div",17)(23,"a",18)(24,"span"),g(25,"View full changelog"),v(),Ho(),x(26,"svg",19),V(27,"path",20),v()(),zr(),x(28,"button",21),z("click",function(){return n.close()}),g(29," Got it "),v()()()(),x(30,"form",22)(31,"button",23),z("click",function(){return n.close()}),g(32,"close"),v()()()),i&2&&(h(12),ge(" ",n.previousVersion()," "),h(4),ge(" ",n.currentVersion," "),h(3),Be(n.changes()))},dependencies:[Eu],encapsulation:2})}}return e})();var fg=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i}get currentVersion(){return this.versionService.currentVersion}get previousVersion(){return this.versionService.previousVersion}get shouldShowChangelog(){return this.versionService.shouldShowChangelog}synchronizeVersion(){this.versionService.synchronizeVersion()}acknowledgeChangelog(){this.versionService.acknowledgeChangelog()}parseChangesBetweenVersions(t,i){return this.changelogParserService.parseChangesBetweenVersions(t,i)}static{this.\u0275fac=function(i){return new(i||e)(E(Zs),E(nl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gg=[kp,xp,bp,wp,fp,yi];var bg=(()=>{class e{constructor(t,i,n,r,a){this.store=t,this.threeSceneService=i,this.threeMapControlsService=n,this.actions$=r,this.globalSettingsFacade=a,this.autoFitRequests$=Ki(this.actions$.pipe(st(ri),qe(s=>({force:s.forceAutoFit}))),this.store.select(Bn).pipe(pi(1),qe(()=>({force:!1}))),St(gg.map(s=>this.store.select(s))).pipe(pi(1),qe(()=>({force:!1})))),this.autoFitTo$=Ne(()=>this.autoFitRequests$.pipe(ti(this.globalSettingsFacade.resetCameraIfNewFileIsLoaded$()),De(([s,l])=>l||s.force),Ht(()=>this.threeSceneService.mapMeshChanged$.pipe(ut(1))),Le(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(ft),E(qt),E(dt),E(b0))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var vg=[us,go,Un,ps,bo,vo,Ip,ws,Ss,ms,_i,ai,to,io,po,uo,$n,Wn,On,ls,co,oo,Ci,ho,mo,Si,so,cs,yf,Ei,Gt,Ut,jn,Pi,fs,gs,Gn,bs,ki,Mi,_t,Hn,Xn,xo,wo,no,ro,lo,ao,Qt];var en=Object.freeze({geometry:!0,colors:!0,labels:!0,arrows:!0}),O4=new Map([[Si.type,{labels:!0}],[so.type,{labels:!0}],[ao.type,{labels:!0}],[lo.type,{labels:!0}],[po.type,{labels:!0}],[uo.type,{labels:!0}],[no.type,{labels:!0}],[ro.type,{labels:!0}],[Gt.type,{arrows:!0}],[oo.type,{arrows:!0}],[Ci.type,{arrows:!0}],[ho.type,{arrows:!0}],[mo.type,{arrows:!0}],[_t.type,{colors:!0}],[Ei.type,{colors:!0}],[Ut.type,{colors:!0}],[ai.type,{colors:!0}],[to.type,{colors:!0}],[io.type,{colors:!0}],[_i.type,{colors:!0}],[$n.type,{colors:!0}],[Xn.type,{colors:!0}],[xo.type,{colors:!0}],[wo.type,{colors:!0}],[co.type,{labels:!0,arrows:!0}]]);function xg(e){let o=O4.get(e.type);return o?wg(o):ke({},en)}function wg(e){let o=e.geometry===!0,t=o||e.colors===!0;return{geometry:o,colors:t,labels:t||e.labels===!0,arrows:o||e.arrows===!0}}function Sg(e){return wg({geometry:e.some(({geometry:o})=>o),colors:e.some(({colors:o})=>o),labels:e.some(({labels:o})=>o),arrows:e.some(({arrows:o})=>o)})}function Cg(e,o,t,i){let n=new Map;for(let r of e){let a=o(r),s=n.get(a);s?s.push(r):n.set(a,[r])}return[...n.values()].flatMap(r=>Bd(r,t,i))}function Bd(e,o,t){let i=Math.floor(t);if(Number.isNaN(i)||i<=0)return[];let n=r=>z4(o(r));return e.length<=i?[...e].sort((r,a)=>n(a)-n(r)):$4(e,n,i)}function z4(e){return Number.isNaN(e)?Number.NEGATIVE_INFINITY:e}function $4(e,o,t){let i=[],n=Number.POSITIVE_INFINITY;for(let r of e){let a=o(r);if(i.length<t)yg(i,r,a,o);else if(a>n)i.pop(),yg(i,r,a,o);else continue;i.length===t&&(n=o(i[t-1]))}return i}function yg(e,o,t,i){let n=e.length;for(;n>0&&i(e[n-1])<t;)n--;e.splice(n,0,o)}var Mg=Ae(nf,Vn,rs,(e,o,t)=>new Set(j4(e,o,t))),j4=(e,o,t)=>{let i=[],n=Math.floor(t);if(Number.isNaN(n)||n<=0)return i;let r=e.get(o);if(r===void 0)return i;for(let a of r.keys())if(i.push(a),i.length>=n)break;return i};var _g=(e,o,t,i,n)=>{for(let r of o)if(r.visible=ni.none,r.attributes[t]!==void 0){let a=e.has(r.fromNodeName),s=e.has(r.toNodeName),l=i&&s,d=n&&a;d&&l?r.visible=ni.both:d?r.visible=ni.from:l&&(r.visible=ni.to)}};var Eg=Ae(Mg,Rs,Vn,Sp,yp,(e,o,t,i,n)=>{let r=Ou(o);return _g(e,r,t,i,n),r});var wr=(()=>{class e{constructor(t,i,n,r){this.store=t,this.ccStateSnapshot=i,this.mapStateReadWindow=n,this.sharedViewReadWindow=r}getState(){return this.ccStateSnapshot.get()}getMapState(){return this.mapStateReadWindow.getMapState()}getEdges(){return Rs(this.ccStateSnapshot.get())}getEdgeVisibility(){return Eg(this.ccStateSnapshot.get())}getHoveredNodeId(){return this.sharedViewReadWindow.getHoveredNodeId()}getIdToNode(){return ef(this.ccStateSnapshot.get())}setHoveredNodeId(t){this.store.dispatch(Xo({value:t}))}setRightClickedNodeData(t){this.store.dispatch(Ap({value:t}))}setColorLabels(t){this.store.dispatch(_i({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(Vt),E(xe),E(Bt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var al=class e{constructor(o,t,i){this.badge=null,this.labelSize=i;let n=document.createElement("div");if(this.content=document.createElement("div"),this.content.style.cssText=e.buildContentStyles(i),o){let r=document.createElement("span");r.style.cssText="display: block; font-weight: 500;",r.textContent=o,this.content.appendChild(r)}if(t){let r=document.createElement("span");r.style.cssText=`display: block; font-size: ${10*i}px; color: #666; margin-top: 1px;`,r.textContent=t,this.content.appendChild(r)}n.appendChild(this.content),this.cssObject=new Ef(n),this.cssObject.center.set(.5,1)}getContentRect(){return this.content.getBoundingClientRect()}getContentElement(){return this.content}setOpacity(o){this.content.style.opacity=o}setTransform(o){this.content.style.transform=`translateY(${-20+o}px)`}setTransition(o){this.content.style.transition=o}setBadge(o){this.clearBadge(),this.badge=document.createElement("div"),this.badge.textContent=`+${o} more`,this.badge.style.cssText=`
3489
3499
  font-size: ${10*this.labelSize}px;
3490
3500
  color: #888;
3491
3501
  margin-top: 2px;
@@ -3508,27 +3518,27 @@ Fixed release issues
3508
3518
  transform: translateY(${-20}px);
3509
3519
  opacity: 0;
3510
3520
  transition: opacity 0.2s ease-out;
3511
- `}};var rl=(()=>{class e{constructor(t){this.ccStateSnapshot=t}getValue(){return this.ccStateSnapshot.get()}isLabelsPerMapActive(){return Fs(this.ccStateSnapshot.get())}static{this.\u0275fac=function(i){return new(i||e)(E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var al=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.labels=[],this.suppressedLabel=null}getLabels(){return this.labels}getSuppressedLabel(){return this.suppressedLabel}addLeafLabel(t,i){this.createLabel(t,i,!1)}addSelectionLabel(t){this.createLabel(t,0,!0)}createLabel(t,i,n){let{mapState:r}=this.stateAccessStore.getValue(),{scaling:a,showMetricLabelNodeName:s,showMetricLabelNameValue:l,labelMode:d,labelSize:c}=r,{heightMetric:m,colorMetric:u}=r,p=new Ke(a.x,a.y,a.z),f="";if(s||n&&!l)f=t.name;else if(!l)return;let S="";if(l){let G=d===Ni.Color?u:m;S=`${t.attributes[G]} ${G}`}let R=new nl(f,S,c),L=R.cssObject;L.userData={node:t};let j=t.height+Math.abs(t.heightDelta??0),q=Math.max(j,i),P=(t.x0-pd+t.width/2)*p.x,O=(t.y0-pd+t.length/2)*p.z;L.position.set(P,(t.z0+q)*p.y,O);let H=new Ke(P,(t.z0+j)*p.y,O);this.threeSceneService.labels.add(L),this.labels.push({labelElement:R,node:t,buildingTop:H,appliedOffset:0,isSelectionLabel:n})}clearLabels(){this.threeSceneService.labels.clear(),this.labels=[],this.suppressedLabel=null}clearSelectionLabel(){let t=this.labels.findIndex(n=>n.isSelectionLabel);if(t===-1)return;let[i]=this.labels.splice(t,1);i===this.suppressedLabel&&(this.suppressedLabel=null),this.threeSceneService.labels.remove(i.labelElement.cssObject)}hasLabelForNode(t){return this.labels.some(i=>i.node===t)}suppressLabelForNode(t){this.restoreSuppressedLabel();let i=this.labels.find(n=>n.node===t);i&&(this.suppressedLabel=i,i.labelElement.setTransition("opacity 0.2s ease-out"),i.labelElement.setOpacity("0"))}restoreSuppressedLabel(){this.suppressedLabel&&(this.suppressedLabel.labelElement.setOpacity("1"),this.suppressedLabel=null)}static{this.\u0275fac=function(i){return new(i||e)(E(rl),E(ft))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var sl=(()=>{class e{constructor(t,i){this.threeRendererService=t,this.threeSceneService=i,this.connectorSegments=null,this.connectorPositions=null,this.connectorsDirty=!0,this.lastDrawnVertexCount=0,this.projectionVec=new Ke}drawConnectors(t,i){this.connectorSegments||this.initConnectors();let n=this.threeRendererService.camera;if(!n)return;let r=this.threeRendererService.labelRenderer?.domElement,a=r?r.clientHeight:window.innerHeight;if(a===0)return;let s=this.connectorPositions,l=0;for(let d of t){if(d.hidden||d.offset>100||d.label===i)continue;let c=d.label.buildingTop,m=d.label.labelElement.cssObject.position;if(m.y-c.y<.5)continue;if(l>=400)break;this.projectionVec.copy(m).project(n);let p=-20+d.offset;this.projectionVec.y-=p*2/a,this.projectionVec.unproject(n);let f=l*3;s[f]=c.x,s[f+1]=c.y,s[f+2]=c.z,l++;let S=l*3;s[S]=this.projectionVec.x,s[S+1]=this.projectionVec.y,s[S+2]=this.projectionVec.z,l++}this.connectorSegments.geometry.setDrawRange(0,l),this.connectorSegments.geometry.attributes.position.needsUpdate=!0,l!==this.lastDrawnVertexCount&&(this.connectorsDirty=!0),this.lastDrawnVertexCount=l}clearConnectors(){this.connectorSegments&&this.connectorSegments.geometry.setDrawRange(0,0),this.connectorsDirty=!0,this.lastDrawnVertexCount=0}isDirty(){return this.connectorsDirty}markClean(){this.connectorsDirty=!1}destroy(){this.connectorSegments&&(this.connectorSegments.geometry.dispose(),this.connectorSegments.material.dispose(),this.threeSceneService.scene.remove(this.connectorSegments),this.connectorSegments=null,this.connectorPositions=null)}initConnectors(){let t=400;this.connectorPositions=new Float32Array(t*3);let i=new Xt;i.setAttribute("position",new So(this.connectorPositions,3)),i.setDrawRange(0,0);let n=new ys({color:11842740,transparent:!0,opacity:.9,depthTest:!0});this.connectorSegments=new Lp(i,n),this.connectorSegments.frustumCulled=!1,this.threeSceneService.scene.add(this.connectorSegments)}static{this.\u0275fac=function(i){return new(i||e)(E(kt),E(ft))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var qg=(()=>{class e{constructor(t,i,n,r,a){this.threeRendererService=t,this.tooltipService=i,this.labelCreationService=n,this.stateAccessStore=r,this.connectorDrawingService=a,this._suppressLayout=!1,this.threeRendererService.afterRender$.subscribe(()=>this.updateLabelLayout())}setSuppressLayout(t){this._suppressLayout=t}updateLabelLayout(){let t=this.labelCreationService.getLabels();if(this._suppressLayout||t.length===0){this.connectorDrawingService.clearConnectors(),this.clearBadges(t);return}this.clearBadges(t);let i=this.collectLabelInfos(t),n=this.tooltipService.getRect();this.resolveCollisions(i),this.resolveTooltipCollisions(i,n),this.applyCollisionOffsets(i);let r=this.labelCreationService.getSuppressedLabel();this.connectorDrawingService.drawConnectors(i,r),this.connectorDrawingService.isDirty()&&(this.connectorDrawingService.markClean(),this.threeRendererService.render())}destroy(){this.clearBadges(this.labelCreationService.getLabels()),this.labelCreationService.clearLabels(),this.connectorDrawingService.destroy()}clearBadges(t){for(let i of t)i.labelElement.clearBadge()}collectLabelInfos(t){let i=[];for(let n of t){let r=n.labelElement.getContentRect(),a={top:r.top-n.appliedOffset,bottom:r.bottom-n.appliedOffset,left:r.left,right:r.right,width:r.width,height:r.height,x:r.x,y:r.y-n.appliedOffset};i.push({label:n,rect:a,offset:0,hidden:!1})}return i}resolveCollisions(t){let{mapState:i}=this.stateAccessStore.getValue();if(!i.groupLabelCollisions)return;let n=this.labelCreationService.getSuppressedLabel(),r=t.filter(l=>l.label!==n);if(r.length===0)return;let a=this.buildCollisionGroups(r,this.stateAccessStore.isLabelsPerMapActive()),s=i.labelMode===Ni.Color?i.colorMetric:i.heightMetric;for(let l of a){if(l.length<=1)continue;let d=this.pickGroupWinner(l,s);for(let c of l)c!==d&&(c.hidden=!0);d.label.labelElement.setBadge(l.length-1)}}buildCollisionGroups(t,i){let n=t.length,r=Array.from({length:n},(c,m)=>m),a=i?t.map(c=>bs(c.label.node.path)):void 0,s=c=>{for(;r[c]!==c;)r[c]=r[r[c]],c=r[c];return c},l=(c,m)=>{let u=s(c),p=s(m);u!==p&&(r[u]=p)};for(let c=0;c<n;c++)for(let m=c+1;m<n;m++)a!==void 0&&a[c]!==a[m]||this.rectsOverlap(t[c].rect,t[m].rect)&&l(c,m);let d=new Map;for(let c=0;c<n;c++){let m=s(c);d.has(m)||d.set(m,[]),d.get(m).push(t[c])}return[...d.values()]}rectsOverlap(t,i){return t.right>i.left&&t.left<i.right&&t.bottom>i.top&&t.top<i.bottom}pickGroupWinner(t,i){let n=t[0],r=n.label.node.attributes[i]??0;for(let a=1;a<t.length;a++){let s=t[a].label.node.attributes[i]??0;(s>r||s===r&&t[a].label.node.path<n.label.node.path)&&(r=s,n=t[a])}return n}resolveTooltipCollisions(t,i){if(!i)return;let n=12,r=i.left-n,a=i.right+n,s=i.top-n,l=i.bottom+n,d=this.labelCreationService.getSuppressedLabel();for(let c of t){if(c.hidden||c.label===d)continue;let m=c.rect.top+c.offset,u=c.rect.bottom+c.offset,p=c.rect.right>r&&c.rect.left<a,f=u>s&&m<l;if(p&&f){let S=l+4-m;S>0&&(c.offset+=S)}}}applyCollisionOffsets(t){let i=this.labelCreationService.getSuppressedLabel();for(let n of t){let r=n.label.labelElement,a=n.label===i;n.hidden||n.offset>100?(r.setOpacity("0"),r.setTransform(0),n.label.appliedOffset=0):(r.setOpacity(a?"0":"1"),r.setTransform(n.offset),n.label.appliedOffset=n.offset)}}static{this.\u0275fac=function(i){return new(i||e)(E(kt),E(tr),E(al),E(rl),E(sl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Tg=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}setLabelMode(t){this.store.dispatch(ao({value:t}))}setAmountOfTopLabels(t){this.store.dispatch(Si({value:t}))}setLabelSize(t){this.store.dispatch(so({value:t}))}setLabelsPerMap(t){this.store.dispatch(lo({value:t}))}setShowMetricLabelNodeName(t){this.store.dispatch(po({value:t}))}setShowMetricLabelNameValue(t){this.store.dispatch(uo({value:t}))}setColorLabels(t){this.store.dispatch(_i({value:t}))}setGroupLabelCollisions(t){this.store.dispatch(ro({value:t}))}resetSettings(t){let i=r0(t,this.ccStateSnapshot.get());i.mapState?.amountOfTopLabels!==void 0&&(i.mapState.amountOfTopLabels=10),this.store.dispatch(Qt({value:i}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Q4(e,o){if(e&1){let t=we();y(0,"div",5)(1,"input",17),ie("change",function(){ae(t);let n=B();return se(n.setLabelsPerMap(!1))}),M(),y(2,"input",18),ie("change",function(){ae(t);let n=B();return se(n.setLabelsPerMap(!0))}),M()()}if(e&2){let t=B();h(),ce("checked",!t.labelsPerMap()),h(),ce("checked",t.labelsPerMap())}}function Z4(e,o){if(e&1){let t=we();y(0,"div",14)(1,"span",19),g(2,"By Color Metric"),M(),y(3,"label",12)(4,"input",20),ie("change",function(n){ae(t);let r=B();return se(r.setColorLabel(n,"positive"))}),M(),pe(5,"span",21),y(6,"span",22),g(7),M()(),y(8,"label",12)(9,"input",23),ie("change",function(n){ae(t);let r=B();return se(r.setColorLabel(n,"neutral"))}),M(),pe(10,"span",21),y(11,"span",22),g(12),M()(),y(13,"label",12)(14,"input",24),ie("change",function(n){ae(t);let r=B();return se(r.setColorLabel(n,"negative"))}),M(),pe(15,"span",21),y(16,"span",22),g(17),M()()()}if(e&2){let t=B();h(4),ce("checked",t.colorLabels().positive)("disabled",t.colorCategoryCounts().positive===0),h(),ze("background-color",t.mapColors().positive),h(2),ge("(",t.colorCategoryCounts().positive,")"),h(2),ce("checked",t.colorLabels().neutral)("disabled",t.colorCategoryCounts().neutral===0),h(),ze("background-color",t.mapColors().neutral),h(2),ge("(",t.colorCategoryCounts().neutral,")"),h(2),ce("checked",t.colorLabels().negative)("disabled",t.colorCategoryCounts().negative===0),h(),ze("background-color",t.mapColors().negative),h(2),ge("(",t.colorCategoryCounts().negative,")")}}var Od=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.fileStoreReadWindow=T(Re),this.labelSettingsWriteStore=T(Tg),this.colorCategoryCountsStore=T(or),this.LabelMode=Ni,this.MIN_LABEL_SIZE=.75,this.MAX_LABEL_SIZE=2.5,this.LABEL_SIZE_STEP=.25,this.resetSettingsKeys=["mapState.amountOfTopLabels","mapState.labelSize","mapState.showMetricLabelNodeName","mapState.showMetricLabelNameValue","mapState.colorLabels","mapState.labelMode","mapState.groupLabelCollisions","mapState.labelsPerMap"],this.amountOfTopLabels=A(this.mapStateReadWindow.amountOfTopLabels$,{requireSync:!0}),this.labelSize=A(this.mapStateReadWindow.labelSize$,{requireSync:!0}),this.showMetricLabelNodeName=A(this.mapStateReadWindow.showMetricLabelNodeName$,{requireSync:!0}),this.showMetricLabelNodeValue=A(this.mapStateReadWindow.showMetricLabelNameValue$,{requireSync:!0}),this.colorLabels=A(this.mapStateReadWindow.colorLabels$,{requireSync:!0}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.labelMode=A(this.mapStateReadWindow.labelMode$,{requireSync:!0}),this.colorCategoryCounts=A(this.colorCategoryCountsStore.colorCategoryCounts$,{requireSync:!0}),this.groupLabelCollisions=A(this.mapStateReadWindow.groupLabelCollisions$,{requireSync:!0}),this.labelsPerMap=A(this.mapStateReadWindow.labelsPerMap$,{requireSync:!0}),this.areMultipleMapsVisible=A(this.fileStoreReadWindow.areMultipleMapsVisible$,{requireSync:!0}),this.showColorLabels=Y(()=>this.labelMode()===Ni.Color&&!this.isDeltaState()),this.topLabelsTitle=Y(()=>{let t=`Display the labels of the ${this.amountOfTopLabels()} highest buildings`;return this.labelsPerMap()&&this.areMultipleMapsVisible()?`${t} per map`:t}),this.applyDebouncedTopLabels=Vi(t=>{this.labelSettingsWriteStore.setAmountOfTopLabels(t)},e.DEBOUNCE_TIME),this.applyDebouncedLabelSize=Vi(t=>{this.labelSettingsWriteStore.setLabelSize(t)},e.DEBOUNCE_TIME)}static{this.DEBOUNCE_TIME=400}handleTopLabelsInput(t){let i=a0(t,0,50,{round:!0});if(!Number.isNaN(i)){if(i===this.amountOfTopLabels()){this.applyDebouncedTopLabels.cancel();return}this.applyDebouncedTopLabels(i)}}handleLabelSizeInput(t){let i=Number.parseFloat(t.target.value);if(Number.isNaN(i))return;let n=Math.min(2.5,Math.max(.75,i)),r=Math.round(n/.25)*.25,a=Math.round(r*100)/100;if(a===this.labelSize()){this.applyDebouncedLabelSize.cancel();return}this.applyDebouncedLabelSize(a)}setShowMetricLabelNodeName(t){this.labelSettingsWriteStore.setShowMetricLabelNodeName(t.target.checked)}setShowMetricLabelNameValue(t){this.labelSettingsWriteStore.setShowMetricLabelNameValue(t.target.checked)}setColorLabel(t,i){this.labelSettingsWriteStore.setColorLabels({[i]:t.target.checked})}setLabelMode(t){this.labelSettingsWriteStore.setLabelMode(t)}setGroupLabelCollisions(t){this.labelSettingsWriteStore.setGroupLabelCollisions(t.target.checked)}setLabelsPerMap(t){this.labelSettingsWriteStore.setLabelsPerMap(t)}resetSettings(){this.labelSettingsWriteStore.resetSettings(this.resetSettingsKeys)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-label-settings-panel"]],hostAttrs:[1,"contents"],decls:33,vars:18,consts:[[3,"title"],[1,"text-sm"],[1,"flex","items-center","gap-2"],["type","range","aria-label","Top Labels","min","0","max","50",1,"range","range-primary","range-sm","flex-1",3,"input","value"],["type","number","aria-label","Top Labels","min","0","max","50",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value"],["aria-label","Top labels scope","title","Pick the top labels across all maps combined or separately for each map",1,"join","w-full"],["title","Scale floating label font size"],["type","range","aria-label","Label Size",1,"range","range-primary","range-sm","flex-1",3,"input","min","max","step","value"],["type","number","aria-label","Label Size",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","min","max","step","value"],["aria-label","Label mode",1,"join","w-full"],["type","radio","name","labelMode","aria-label","Height",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelMode","aria-label","Color",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],[1,"flex","flex-col","gap-1"],["title","Reset label settings to their defaults",1,"btn","btn-outline","btn-error","gap-2",3,"click"],[1,"fa","fa-undo"],["type","radio","name","labelsPerMap","aria-label","All maps",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelsPerMap","aria-label","Per map",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"text-xs","opacity-60","mb-0.5"],["type","checkbox","aria-label","positive color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"inline-block","w-4","h-4","rounded-sm"],[1,"text-xs","opacity-60"],["type","checkbox","aria-label","neutral color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["type","checkbox","aria-label","negative color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"span",1),g(2,"Top Labels"),M(),y(3,"div",2)(4,"input",3),ie("input",function(a){return n.handleTopLabelsInput(a)}),M(),y(5,"input",4),ie("input",function(a){return n.handleTopLabelsInput(a)}),M()()(),K(6,Q4,3,2,"div",5),y(7,"div",6)(8,"span",1),g(9,"Label Size"),M(),y(10,"div",2)(11,"input",7),ie("input",function(a){return n.handleLabelSizeInput(a)}),M(),y(12,"input",8),ie("input",function(a){return n.handleLabelSizeInput(a)}),M()()(),y(13,"div",9)(14,"input",10),ie("change",function(){return n.setLabelMode(n.LabelMode.Height)}),M(),y(15,"input",11),ie("change",function(){return n.setLabelMode(n.LabelMode.Color)}),M()(),y(16,"label",12)(17,"input",13),ie("change",function(a){return n.setShowMetricLabelNodeName(a)}),M(),y(18,"span"),g(19,"Show node names"),M()(),y(20,"label",12)(21,"input",13),ie("change",function(a){return n.setShowMetricLabelNameValue(a)}),M(),y(22,"span"),g(23,"Show metric values"),M()(),y(24,"label",12)(25,"input",13),ie("change",function(a){return n.setGroupLabelCollisions(a)}),M(),y(26,"span"),g(27,"Group overlapping labels"),M()(),K(28,Z4,18,15,"div",14),y(29,"button",15),ie("click",function(){return n.resetSettings()}),pe(30,"i",16),y(31,"span"),g(32,"Reset label settings"),M()()),i&2&&(ce("title",n.topLabelsTitle()),h(4),ce("value",n.amountOfTopLabels()),h(),ce("value",n.amountOfTopLabels()),h(),Q(n.areMultipleMapsVisible()?6:-1),h(5),ce("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(),ce("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(2),ce("checked",n.labelMode()===n.LabelMode.Height),h(),ce("checked",n.labelMode()===n.LabelMode.Color),h(2),ce("checked",n.showMetricLabelNodeName()),h(4),ce("checked",n.showMetricLabelNodeValue()),h(4),ce("checked",n.groupLabelCollisions()),h(3),Q(n.showColorLabels()?28:-1))},encapsulation:2,changeDetection:0})}}return e})();var ll=(()=>{class e{constructor(t,i,n){this.labelCreationService=t,this.labelCollisionService=i,this.connectorDrawingService=n}addLeafLabel(t,i){this.labelCreationService.addLeafLabel(t,i)}addSelectionLabel(t){this.labelCreationService.addSelectionLabel(t)}clearLabels(){this.labelCreationService.clearLabels(),this.connectorDrawingService.clearConnectors()}clearSelectionLabel(){this.labelCreationService.clearSelectionLabel()}hasLabelForNode(t){return this.labelCreationService.hasLabelForNode(t)}suppressLabelForNode(t){this.labelCreationService.suppressLabelForNode(t)}restoreSuppressedLabel(){this.labelCreationService.restoreSuppressedLabel()}setSuppressLayout(t){this.labelCollisionService.setSuppressLayout(t)}destroy(){this.labelCollisionService.destroy(),this.connectorDrawingService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(E(al),E(qg),E(sl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ag=(()=>{class e{constructor(t,i,n){this.codeMapStore=t,this.sharedViewReadWindow=i,this.threeSceneService=n,this.VERTICES_PER_LINE=5,this.arrows=new Array,this.HIGHLIGHT_BUILDING_DELAY=1,this.debounceCalculation=Vi(r=>this.resetEdgesOfBuildings(r),this.HIGHLIGHT_BUILDING_DELAY),this.hoveredNodeSubscription=this.sharedViewReadWindow.hoveredNodeId$.pipe(Le(r=>{if(r!==null){let a=this.threeSceneService.getMapMesh()?.getMeshDescription().getBuildingByPath(r);this.onBuildingHovered(a)}else this.onBuildingUnhovered()})).subscribe(),this.resetEdgesOfBuildings=r=>{if(!this.codeMapStore.getMapState().isEdgeMetricVisible){this.scale();return}this.clearArrows(),this.showEdgesOfBuildings(this.isEdgeApplicableForBuilding(r)?r:void 0),this.scale()},this.onBuildingSelected=r=>{this.isEdgeApplicableForBuilding(r.building)&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()},this.onBuildingDeselected=()=>{this.debounceCalculation.cancel(),this.clearArrows(),this.addEdgePreview()},this.threeSceneService.subscribe("onBuildingSelected",this.onBuildingSelected),this.threeSceneService.subscribe("onBuildingDeselected",this.onBuildingDeselected)}ngOnDestroy(){this.hoveredNodeSubscription.unsubscribe()}onBuildingHovered(t){this.debounceCalculation(t)}onBuildingUnhovered(){this.debounceCalculation.cancel();let{isEdgeMetricVisible:t}=this.codeMapStore.getMapState();t&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()}clearArrows(){for(let t of this.arrows)t.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()});this.arrows=[],this.threeSceneService.edgeArrows.children.length=0}addArrow(t,i,n){let r=this.codeMapStore.getMapState(),a=100*r.edgeHeight,s=this.createCurve(t,i,a),l=ud.getNumber(r.mapColors[n?"outgoingEdge":"incomingEdge"]);this.highlightBuilding(n?i:t),this.setCurveColor(s,l)}addEdgePreview(){let t=this.codeMapStore.getEdgeVisibility();for(let i of t){let n=this.map.get(i.fromNodeName),r=this.map.get(i.toNodeName);if(n&&r&&i.visible!==ni.none&&i.visible){let a=100*this.codeMapStore.getMapState().edgeHeight,s=this.createCurve(n,r,a);this.previewMode(s,i.visible)}}}addEdgeMapBasedOnNodes(t){this.map=this.getNodesAsMap(t)}scale(){let{scaling:t}=this.codeMapStore.getMapState();for(let i of this.arrows)i.scale.x=t.x,i.scale.y=t.y,i.scale.z=t.z}isEdgeApplicableForBuilding(t){return this.codeMapStore.getMapState().isEdgeMetricVisible&&t&&!t.node.flat}showEdgesOfBuildings(t){let i=new Map,n=this.threeSceneService.getSelectedBuilding();if(n){let{node:r}=n;i.set(r.path,r)}if(t){let{node:r}=t;i.set(r.path,r)}i.size>0?this.buildPairingEdges(i):this.addEdgePreview()}buildPairingEdges(t){let{showIncomingEdges:i,showOutgoingEdges:n,edgeMetric:r}=this.codeMapStore.getMapState();if(!i&&!n)return;let a=this.codeMapStore.getEdges();for(let s of a){if(s.attributes[r]===void 0)continue;let l=this.map.get(s.fromNodeName);if(l===void 0)continue;let d=this.map.get(s.toNodeName);d!==void 0&&(n&&t.has(l.path)?(this.addArrow(l,d,!0),this.threeSceneService.applyHighlights()):i&&t.has(d.path)&&(this.addArrow(l,d,!1),this.threeSceneService.applyHighlights()))}}createCurve(t,i,n){let r=t.outgoingEdgePoint.clone(),a=i.incomingEdgePoint.clone(),s=Math.max(r.y+i.height,a.y+1)+n;return r.setY(s),a.setY(s),new Np(t.outgoingEdgePoint,r,a,i.incomingEdgePoint)}highlightBuilding(t){let i=this.threeSceneService.getMapMesh().getMeshDescription().getBuildingByPath(t.path);this.threeSceneService.addBuildingsToHighlightingList(i)}setCurveColor(t,i,n=50){let r=t.getPoints(n),a=this.buildLine(r,i);a.add(this.buildArrow(r)),this.threeSceneService.edgeArrows.add(a),this.arrows.push(a)}previewMode(t,i){if(i===ni.both||i===ni.from){let n=this.makeArrowFromBezier(t,!1);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}if(i===ni.both||i===ni.to){let n=this.makeArrowFromBezier(t,!0);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}}getNodesAsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}makeArrowFromBezier(t,i,n=50){let r=t.getPoints(n),{incomingEdge:a,outgoingEdge:s}=this.codeMapStore.getMapState().mapColors,l=i?a:s,d=i?r.slice(n+1-this.VERTICES_PER_LINE):r.slice(0,r.length-(n+1-this.VERTICES_PER_LINE));return this.buildEdge(d,ud.getNumber(l))}buildEdge(t,i){let n=this.buildLine(t,i);return n.add(this.buildArrow(t)),n}buildLine(t,i=0){let n=new Xt;n.setFromPoints(t);let r=new ys({color:i,linewidth:1});return new Fp(n,r)}buildArrow(t,i=0,n=10,r=10){let a=t.at(-1).clone().sub(t.at(-2).clone()).normalize(),s=t.at(-1).clone();return a.y<0&&(s.y+=n+1),new Op(a,s,n+1,i,n,r)}static{this.\u0275fac=function(i){return new(i||e)(E(vr),E(Bt),E(ft))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Fg=(()=>{class e{constructor(){this.mapControls=T(qt),this.zoomMenuRequested=_e()}requestZoomMenu(t){t.preventDefault(),this.zoomMenuRequested.emit({x:t.clientX,y:t.clientY})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-toolbox-center-map-button"]],outputs:{zoomMenuRequested:"zoomMenuRequested"},decls:2,vars:0,consts:[["type","button","title","Center map \u2014 right-click to set the zoom level it uses","aria-label","Center map",1,"join-item","btn","btn-sm","btn-square",3,"click","contextmenu"],[1,"fa","fa-compass"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.mapControls.autoFitTo()})("contextmenu",function(a){return n.requestZoomMenu(a)}),pe(1,"i",1),M())},encapsulation:2,changeDetection:0})}}return e})();var Lg=(()=>{class e{constructor(t){this.store=t,this.defaultCenterMapZoom=mf,this.centerMapZoom=A(this.store.select(uf),{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var cl=(()=>{class e{constructor(t){this.store=t}setPresentationMode(t){this.store.dispatch(vf({value:t}))}setCenterMapZoom(t){this.store.dispatch(hf({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ng=(()=>{class e{constructor(){this.mapControls=T(qt),this.readStore=T(Lg),this.writeStore=T(cl),this.anchor=Z.required(),this.dismissed=_e(),this.centerMapZoom=this.readStore.centerMapZoom,this.minZoom=this.mapControls.MIN_ZOOM,this.maxZoom=this.mapControls.MAX_ZOOM}previewAndStore(t){this.writeStore.setCenterMapZoom(t),this.mapControls.setZoomPercentage(t)}useCurrentZoom(){this.writeStore.setCenterMapZoom(Math.round(this.mapControls.zoomPercentage$.value))}resetCenterMapZoom(){this.previewAndStore(this.readStore.defaultCenterMapZoom)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-center-map-zoom-menu"]],hostAttrs:[1,"contents"],inputs:{anchor:[1,"anchor"]},outputs:{dismissed:"dismissed"},decls:10,vars:4,consts:[[3,"dismissed","anchor"],["data-testid","center-map-zoom-menu",1,"flex","w-64","flex-col","gap-2","px-3","py-2"],[1,"text-sm","font-semibold"],["ariaLabel","Center map zoom in percent",3,"valueChange","min","max","value"],[1,"flex","gap-2"],["type","button",1,"btn","btn-xs","flex-1",3,"click"],["type","button",1,"btn","btn-ghost","btn-xs",3,"click"]],template:function(i,n){i&1&&(x(0,"cc-floating-menu",0),z("dismissed",function(){return n.dismissed.emit()}),x(1,"div",1)(2,"span",2),g(3,"Center map zoom"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.previewAndStore(a)}),v(),x(5,"div",4)(6,"button",5),z("click",function(){return n.useCurrentZoom()}),g(7,"Use current zoom"),v(),x(8,"button",6),z("click",function(){return n.resetCenterMapZoom()}),g(9,"Reset"),v()()()()),i&2&&(F("anchor",n.anchor()),h(4),F("min",n.minZoom)("max",n.maxZoom)("value",n.centerMapZoom()))},dependencies:[Df,qo],encapsulation:2,changeDetection:0})}}return e})();var Pg=(()=>{class e{constructor(){this.preferencesReadWindow=T(rr),this.viewCubeToolboxWriteStore=T(cl),this.isPresentationMode=A(this.preferencesReadWindow.isPresentationMode$,{requireSync:!0}),this.tooltip=Y(()=>this.isPresentationMode()?"Disable flashlight hover effect":"Enable flashlight hover effect")}handleToggle(){this.viewCubeToolboxWriteStore.setPresentationMode(!this.isPresentationMode())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-toolbox-presentation-mode-button"]],decls:2,vars:3,consts:[["type","button","aria-label","Presentation mode",1,"join-item","btn","btn-sm","btn-square",3,"click","title"],[1,"fa","fa-lightbulb-o"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.handleToggle()}),pe(1,"i",1),M()),i&2&&(We("btn-active",n.isPresentationMode()),ce("title",n.tooltip()))},encapsulation:2,changeDetection:0})}}return e})();function J4(e,o){if(e&1){let t=we();x(0,"cc-center-map-zoom-menu",4),z("dismissed",function(){ae(t);let n=B();return se(n.zoomMenuAnchor.set(null))}),v()}e&2&&F("anchor",o)}var zd=(()=>{class e{constructor(){this.zoomMenuAnchor=Se(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-cube-toolbox"]],features:[bi([{provide:f0,useExisting:b0}])],decls:5,vars:1,consts:[[1,"join","shadow-md","absolute","top-0","left-1/2","-translate-x-1/2","bg-base-100","rounded"],[3,"zoomMenuRequested"],["view","metrics"],[3,"anchor"],[3,"dismissed","anchor"]],template:function(i,n){if(i&1&&(x(0,"div",0)(1,"cc-toolbox-center-map-button",1),z("zoomMenuRequested",function(a){return n.zoomMenuAnchor.set(a)}),v(),V(2,"cc-toolbox-screenshot-button",2)(3,"cc-toolbox-presentation-mode-button"),v(),K(4,J4,1,1,"cc-center-map-zoom-menu",3)),i&2){let r;h(4),Q((r=n.zoomMenuAnchor())?4:-1,r)}},dependencies:[Fg,g0,Pg,Ng],encapsulation:2,changeDetection:0})}}return e})();var Ro=()=>new _s({color:16580095}),tn=()=>new _s({color:16580095}),Qr=()=>new _s({color:16580095});var dl=class e{static buildCube(o){let t=1/o,i=(1-t)/2,n=new yo(t,i,i),r=new yo(i,t+i,i),a=new yo(i,i,i),s=new yo(t,t,i),l=new yo(t,t+i,i);return e.newBuildCubeGroup(n,r,a,s,l)}static newBuildCubeGroup(o,t,i,n,r){let a=new Xn,{group:s,frontLeft:l,frontCenter:d,frontRight:c,middleLeft:m,middleCenter:u,middleRight:p,backLeft:f,backCenter:S,backRight:R}=e.buildCubeTopFace(o,i,n);a.add(s);let{group:L,frontLeftEdge:j,frontCenterFace:q,frontRightEdge:P,middleLeftFace:O,middleRightFace:H,backLeftEdge:G,backCenterFace:J,backRightEdge:X}=e.buildCubeSides(t,r);return a.add(L),{group:a,top:{front:{left:l,center:d,right:c},middle:{left:m,center:u,right:p},back:{left:f,center:S,right:R}},sides:{front:{left:j,center:q,right:P},middle:{left:O,right:H},back:{left:G,center:J,right:X}}}}static buildCubeTopFace(o,t,i){let n=new lt(t,Qr()),r=new lt(o,Ro()),a=new lt(t,Qr()),s=new lt(o,Ro()),l=new lt(i,tn()),d=new lt(o,tn()),c=new lt(t,Qr()),m=new lt(o,Ro()),u=new lt(t,Qr()),p=i.parameters.height/2+t.parameters.height/2;n.position.x-=p,n.position.y-=p,r.position.y-=p,a.position.x+=p,a.position.y-=p,s.position.x-=p,s.rotation.z=Math.PI/2,d.position.x+=p,d.rotation.z=Math.PI/2,c.position.x-=p,c.position.y+=p,m.position.y+=p,u.position.x+=p,u.position.y+=p;let f=new Xn;return f.rotation.x=Math.PI/2,f.position.y+=p,f.add(n),f.add(r),f.add(a),f.add(s),f.add(l),f.add(d),f.add(c),f.add(m),f.add(u),{group:f,frontLeft:n,frontCenter:r,frontRight:a,middleLeft:s,middleCenter:l,middleRight:d,backLeft:c,backCenter:m,backRight:u}}static buildCubeSides(o,t){let i=new lt(o,Ro()),n=new lt(t,tn()),r=new lt(o,Ro()),a=new lt(t,tn()),s=new lt(t,tn()),l=new lt(o,Ro()),d=new lt(t,tn()),c=new lt(o,Ro()),m=t.parameters.width/2+o.parameters.width/2,u=o.parameters.width/2;i.position.x-=m,i.position.z+=m,n.position.z+=m,r.position.x+=m,r.position.z+=m,a.position.x-=m,a.rotation.y=Math.PI/2,s.position.x+=m,s.rotation.y=Math.PI/2,l.position.x-=m,l.position.z-=m,d.position.z-=m,c.position.x+=m,c.position.z-=m;let p=new Xn;return p.position.y-=u,p.add(i),p.add(n),p.add(r),p.add(a),p.add(s),p.add(l),p.add(d),p.add(c),{group:p,frontLeftEdge:i,frontCenterFace:n,frontRightEdge:r,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:d,backRightEdge:c}}};var Bg=(()=>{class e{constructor(t,i){this.threeMapControlsService=t,this.cdr=i}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(t=>{this.zoomPercentage=t,this.cdr.detectChanges()})}onInput(t){let i=t.target,n=Number.parseFloat(i.value);this.threeMapControlsService.setZoomPercentage(n)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(i){return new(i||e)(ne(qt),ne(An))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"absolute","right-[5px]","top-[10px]","m-2.5","flex","h-[150px]","flex-col","items-center","gap-2.5"],["data-testid","zoomIn",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange","aria-label","Zoom level",1,"h-[100px]","w-[3px]","appearance-none","bg-neutral-500","text-neutral-500","opacity-70","outline-none","transition-opacity","duration-200","[-webkit-appearance:none]","[direction:rtl]","[writing-mode:vertical-lr]","[&::-moz-range-thumb]:h-[3px]","[&::-moz-range-thumb]:w-[10px]","[&::-moz-range-thumb]:cursor-pointer","[&::-moz-range-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:h-[3px]","[&::-webkit-slider-thumb]:w-[10px]","[&::-webkit-slider-thumb]:cursor-pointer","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:[-webkit-appearance:none]",3,"input","min","max","value"],["data-testid","zoomOut",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["id","zoomValue",1,"w-[30px]","text-center","text-[10px]","text-neutral-500"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.zoomIn()}),g(2," + "),M(),y(3,"input",2),ie("input",function(a){return n.onInput(a)}),M(),y(4,"button",3),ie("click",function(){return n.zoomOut()}),g(5," - "),M(),y(6,"span",4),g(7),M()()),i&2&&(h(3),ce("min",n.minZoom)("max",n.maxZoom)("value",n.zoomPercentage),h(4),ge("",n.zoomPercentage==null?null:n.zoomPercentage.toFixed(0),"%"))},encapsulation:2,changeDetection:0})}}return e})();var Zr=(()=>{class e{constructor(t){this.threeMapControlsService=t,this.eventEmitter=new df,this.currentlyHovered=null,this.isDragging=!1}init(t,i,n){this.cubeGroup=t,this.camera=i,this.renderer=n,this.initOrbitalControl(i,n),this.initRendererEventListeners(n)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(t,i){this.controls=new Ls(t,i.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(t){t.domElement.addEventListener("mousemove",i=>this.onDocumentMouseMove(i)),t.domElement.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.domElement.addEventListener("mousedown",i=>this.onDocumentMouseClick(i,"mousedown")),t.domElement.addEventListener("dblclick",i=>this.onDocumentMouseClick(i,"dblclick")),t.domElement.addEventListener("mouseleave",i=>this.onWindowMouseLeave(i)),t.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(t,i){this.isDragging=!0,this.checkMouseIntersection(t,i)}onWindowMouseLeave(t){(t.relatedTarget==null||!(t.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(t){this.controls.enableRotate=t}checkMouseIntersection(t,i){this.getCubeIntersectedByMouse(t)||this.eventEmitter.emit("viewCubeEventPropagation",{type:i,event:t})}getCubeIntersectedByMouse(t){let i=this.transformIntoCanvasVector(t),n=new Es;n.setFromCamera(i,this.camera);let r=[];for(let s of Ji(this.cubeGroup))xi(s)&&r.push(s.data);let[a]=n.intersectObjects(r);return a?a.object:null}transformIntoCanvasVector(t){let{domElement:i}=this.renderer,n=this.renderer.getPixelRatio(),r=i.getBoundingClientRect(),a=(t.clientX-r.left)/i.width*n*2-1,s=-((t.clientY-r.top)/i.height*n)*2+1;return new Ue(a,s)}propagateMovement(){if(this.isDragging){let t=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-t.x,-t.y,-t.z)}return this.isDragging}onDocumentMouseMove(t){if(this.propagateMovement())return;let i=this.getCubeIntersectedByMouse(t);i?this.currentlyHovered&&i.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(i):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:t}))}onDocumentMouseUp(t){this.isDragging=!1;let i=this.getCubeIntersectedByMouse(t);i?this.eventEmitter.emit("viewCubeClicked",{cube:i}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:t})}triggerViewCubeHoverEvent(t){this.currentlyHovered=t,Ri(Ti.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:t})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,Ri(Ti.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(t,i){this.eventEmitter.on(t,n=>{i(n)})}static{this.\u0275fac=function(i){return new(i||e)(E(qt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var $d=(()=>{class e{constructor(t,i,n){this.elementReference=t,this.threeMapControlsService=i,this.viewCubeMouseEvents=n,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=r=>{let a=this.calculateCameraPosition(r.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=r=>{this.hoverInfo={cube:r.cube,originalMaterial:r.cube.material},this.hoverInfo.cube.material.emissive=new Gn(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new Gn(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=r=>{switch(r.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let t=new zp(1.3),i=-(this.LENGTH_VIEWCUBE/2)+.01;t.position.x+=i,t.position.y+=i,t.position.z+=i,this.scene.add(t)}initCube(){let{group:t,top:i,sides:n}=dl.buildCube(1.9);this.cubeGroup=t,this.cubeDefinition.top=i,this.cubeDefinition.sides=n;let r=new Wp(this.cubeGroup,new Gn(0));this.scene.add(this.cubeGroup),this.scene.add(r)}setCameraPosition(t){this.camera.position.set(t.x,t.y,t.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(t){let i=this.threeMapControlsService.controls.target.clone();return t.position.clone().sub(i).normalize().multiplyScalar(3)}initScene(){this.scene=new Ss}initRenderer(t){this.renderer=new ks({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),t.appendChild(this.renderer.domElement)}initCamera(){this.camera=new ws(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new Xn;let t=new Bp(7368816,2.8),i=new md(14737632,1.8);i.position.set(50,10,8).normalize();let n=new md(14737632,1.8);n.position.set(-50,10,-8).normalize(),this.lights.add(t),this.lights.add(i),this.lights.add(n),this.scene.add(this.lights)}static{this.\u0275fac=function(i){return new(i||e)(ne(Nt),ne(qt),ne(Zr))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-cube"]],hostAttrs:[1,"absolute","right-0","top-[10px]","z-[11]","[transition:right_0.3s_ease]","[&.sideBarVisible]:right-[var(--cc-inspector-width)]"],decls:2,vars:0,template:function(i,n){i&1&&V(0,"cc-view-cube-toolbox")(1,"cc-zoom-slider")},dependencies:[zd,Bg],encapsulation:2,changeDetection:0})}}return e})();var hl=(function(e){return e[e.LeftClick=0]="LeftClick",e[e.RightClick=2]="RightClick",e})(hl||{}),on=(()=>{class e{constructor(t,i,n,r,a,s,l,d,c,m,u){this.threeCameraService=t,this.threeRendererService=i,this.threeSceneService=n,this.codeMapStore=r,this.fileStoreReadWindow=a,this.sharedViewReadWindow=s,this.labelSettingsFacade=l,this.tooltipService=d,this.viewCubeMouseEvents=c,this.threeViewerService=m,this.idToBuilding=u,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new Es,this.subscriptions=[this.fileStoreReadWindow.visibleFileStates$.pipe(Le(()=>this.onFilesSelectionChanged())).subscribe(),this.sharedViewReadWindow.excludedNodes$.pipe(Le(p=>this.onExcludedNodesChanged(p))).subscribe(),this.sharedViewReadWindow.hoveredNodeId$.pipe(Le(p=>{p!==null?this.hoverNode(p):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=p=>{switch(p.type){case"mousemove":this.onDocumentMouseMove(p.event);break;case"mouseup":this.onDocumentMouseUp(p.event);break;case"mousedown":this.onDocumentMouseDown(p.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=p=>{this.mouse.x=p.clientX,this.mouse.y=p.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}start(){this.registerEventListeners(),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}registerEventListeners(){let t=this.threeRendererService.renderer.domElement;t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.addEventListener("mousedown",i=>this.onDocumentMouseDown(i)),t.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),t.addEventListener("mouseleave",i=>this.onDocumentMouseLeave(i)),t.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),t.addEventListener("wheel",Vi(()=>this.threeRendererService.render()))}hoverNode(t){if(this.isGrabbingOrMoving())return;let{buildings:i}=this.threeSceneService.getMapMesh().getMeshDescription();for(let n of i)if(n.node.path===t){this.hoverBuilding(n,!1);break}this.threeRendererService.render()}unhoverNode(t=!0){this.unhoverBuilding(t),this.threeRendererService.render()}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.tooltipService.hide()}onExcludedNodesChanged(t){let i=this.threeSceneService.getSelectedBuilding();this.tooltipService.hide(),i&&ju(t).isExcludedLeaf(i.node.path)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){if(this.isGrabbingOrMoving()){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let t=this.threeSceneService.getMapMesh();if(t){this.threeCameraService.camera.updateMatrixWorld(!1);let i=this.transformHTMLToSceneCoordinates(),n=this.threeCameraService.camera;n.isPerspectiveCamera&&this.raycaster.setFromCamera(i,n),this.intersectedBuilding=t.checkMouseRayMeshIntersection(i,n),this.updateHighlight(this.threeSceneService.getHighlightedBuilding(),this.intersectedBuilding)}}}updateHighlight(t,i){t?.id!==i?.id?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),t&&i&&!this.isGrabbingOrMoving()?(this.threeSceneService.prepareHighlightTransition(),this.showTooltipForBuilding(i),this.hoverBuilding(i)):(this.unhoverBuilding(),i&&!this.isGrabbingOrMoving()&&(this.showTooltipForBuilding(i),this.hoverBuilding(i)))):!i&&this.codeMapStore.getHoveredNodeId()!==null?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding()):i&&this.tooltipService.isVisible()&&this.tooltipService.updatePosition(this.mouse.x,this.mouse.y)}drawLabelSelectedBuilding(t){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.labelSettingsFacade.clearSelectionLabel(),!(!t?.node?.isLeaf||this.labelSettingsFacade.hasLabelForNode(t.node))&&this.labelSettingsFacade.addSelectionLabel(t.node)}showTooltipForBuilding(t){this.labelSettingsFacade.hasLabelForNode(t.node)&&this.labelSettingsFacade.suppressLabelForNode(t.node),this.tooltipService.show(t.node,this.mouse.x,this.mouse.y)}enableOrbitalsRotation(t){this.threeViewerService.enableRotation(t),this.viewCubeMouseEvents.enableRotation(t)}onDocumentMouseEnter(){this.enableOrbitalsRotation(!0)}onDocumentMouseLeave(t){this.labelSettingsFacade.setSuppressLayout(!1),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding(),t.relatedTarget instanceof HTMLCanvasElement||this.enableOrbitalsRotation(!1)}onDocumentDoubleClick(){let t=this.threeSceneService.getHighlightedBuilding(),i=this.threeSceneService.getSelectedBuilding(),n=t?.node.link;if(n&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(n,"_blank"),i?.node.isLeaf){let r=i.node.link;if(r){window.open(r,"_blank");return}}}onDocumentMouseDown(t){t.button===hl.RightClick&&(this.isMoving=!0,Ri(Ti.Moving)),t.button===hl.LeftClick&&(this.isGrabbing=!0,Ri(Ti.Grabbing)),this.labelSettingsFacade.setSuppressLayout(!0),this.tooltipService.hide(),this.mouseOnLastClick={x:t.clientX,y:t.clientY},document.activeElement.blur()}onDocumentMouseUp(t){this.labelSettingsFacade.setSuppressLayout(!1),this.viewCubeMouseEvents.resetIsDragging(),t.button===hl.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?Ri(Ti.Pointer):Ri(Ti.Default)}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)&&this.codeMapStore.setRightClickedNodeData({nodeId:this.intersectedBuilding.node.path,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y,origin:"codeMap"}),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding),this.showTooltipForBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.labelSettingsFacade.clearSelectionLabel()),this.threeSceneService.clearConstantHighlight()),this.threeRendererService.render()}hasMouseMovedBeyondThreshold({x:t,y:i}){return Math.abs(this.mouse.x-t)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-i)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:t,y:i}){return this.mouse.x!==t||this.mouse.y!==i}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(t,i=!0){Ri(Ti.Pointer);let r=this.codeMapStore.getIdToNode().get(t.node.id);for(let{data:a}of Ji(r)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),i&&this.codeMapStore.setHoveredNodeId(t.node.path)}transformHTMLToSceneCoordinates(){let{renderer:t,renderer:{domElement:i}}=this.threeRendererService,n=t.getPixelRatio(),r=i.getBoundingClientRect(),a=this.mouse.x/i.width*n*2-1,s=-((this.mouse.y-r.top)/i.height*n)*2+1;return{x:a,y:s}}unhoverBuilding(t=!0){this.isGrabbingOrMoving()||Ri(Ti.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),t&&this.codeMapStore.setHoveredNodeId(null)}static{this.\u0275fac=function(i){return new(i||e)(E(nr),E(kt),E(ft),E(vr),E(Re),E(Bt),E(ll),E(tr),E(Zr),E(ar),E(ir))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var i5=2,Yr=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.codeMapStore=t,this.fileStoreReadWindow=i,this.threeSceneService=n,this.labelSettingsFacade=r,this.codeMapArrowService=a,this.threeStatsService=s,this.codeMapMouseEventService=l,this.colorCategoryCountsStore=d,this.nodesByColor={positive:[],neutral:[],negative:[]},this.subscription=this.fileStoreReadWindow.isLoadingFile$.pipe(Le(c=>c?this.onFileLoadingStarted():this.onFileLoadingFinished())).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}onFileLoadingStarted(){this.threeSceneService?.dispose()}onFileLoadingFinished(){this.threeStatsService?.resetPanels()}load(t,i=en){this.render(t,i),this.scaleMap(i)}render(t,i=en){i.geometry||this.visibleSortedNodes===void 0?this.rebuildBuildings(t):i.colors&&this.threeSceneService.recolorMapMesh(this.codeMapStore.getState()),i.colors&&this.getNodesMatchingColorSelector(this.unflattenedNodes),i.arrows&&this.setArrows(this.visibleSortedNodes)}rebuildBuildings(t){let i=this.getNodes(t),n=this.sortVisibleNodesByHeightDescending(i);this.visibleSortedNodes=n,this.unflattenedNodes=n.filter(({flat:a})=>!a);let r=this.codeMapStore.getState();if(this.threeSceneService.getMapMesh()?.canUpdateInPlace(n)){this.threeSceneService.updateMapMeshInPlace(i,n,r,wi(r.files));return}this.setNewMapMesh(i,n)}setNewMapMesh(t,i){let n=this.codeMapStore.getState(),r=new lf(i,n,wi(n.files));this.threeSceneService.setMapMesh(t,r)}scaleMap(t=en){this.codeMapMouseEventService.unhoverNode(),this.codeMapArrowService.scale(),this.threeSceneService.scaleHeight(),t.labels&&(this.labelSettingsFacade.clearLabels(),this.setLabels(this.unflattenedNodes))}getNodes(t){let i=this.codeMapStore.getState(),n=Co(i),{mapState:{layoutAlgorithm:r},files:a}=i,s=wi(a);switch(r){case Za.StreetMap:case Za.TreeMapStreet:return rf.createStreetLayoutNodes(t,i,n,yp(i),s);case Za.SquarifiedTreeMap:return af(t,i,n,s);default:return[]}}sortVisibleNodesByHeightDescending(t){return this.codeMapStore.getState().preferences.experimentalFeaturesEnabled?(this.setMinBuildingLength(t),t.filter(n=>n.visible&&n.width>0).sort((n,r)=>r.height-n.height)):t.filter(n=>n.visible&&n.length>0&&n.width>0).sort((n,r)=>r.height-n.height)}setMinBuildingLength(t){for(let i of t)i.length<=0&&(i.length=i5)}getNodesMatchingColorSelector(t){let i=this.codeMapStore.getState(),n=i.mapState.colorRange;this.nodesByColor={positive:[],negative:[],neutral:[]};for(let r of t)if(r.isLeaf){let a=r.attributes[i.mapState.colorMetric];i.mapState.colorMetric==="unary"?this.nodesByColor.positive.push(r):a!==null&&(a<n.from?this.nodesByColor.positive.push(r):a<n.to?this.nodesByColor.neutral.push(r):this.nodesByColor.negative.push(r))}this.colorCategoryCountsStore.setColorCategoryCounts({positive:this.nodesByColor.positive.length,neutral:this.nodesByColor.neutral.length,negative:this.nodesByColor.negative.length}),this.uncheckEmptyColorLabels()}uncheckEmptyColorLabels(){let t=this.codeMapStore.getState().mapState.colorLabels,i={};for(let n of sd)t[n]&&this.nodesByColor[n].length===0&&(i[n]=!1);Object.keys(i).length>0&&this.codeMapStore.setColorLabels(i)}setBuildingLabel(t,i){for(let n of t)this.labelSettingsFacade.addLeafLabel(n,i)}setLabels(t){if(this.labelSettingsFacade.clearLabels(),t===void 0||t.length===0)return;let i=this.codeMapStore.getState(),{showMetricLabelNodeName:n,showMetricLabelNameValue:r,colorLabels:a,amountOfTopLabels:s,labelMode:l}=i.mapState;if(n||r){let d=t[0].height,c=this.getTopNodeSelector(i,s);if(l===Ni.Color){let{colorMetric:m}=i.mapState,u=c(sd.filter(p=>a[p]).flatMap(p=>this.nodesByColor[p]).filter(p=>Number.isFinite(p.attributes[m])),p=>p.attributes[m]);this.setBuildingLabel(u,d)}else{let m=c(t.filter(u=>u.isLeaf),u=>u.height??0);this.setBuildingLabel(m,d)}}}getTopNodeSelector(t,i){return Fs(t)?(n,r)=>wg(n,a=>bs(a.path),r,i):(n,r)=>Nd(n,r,i)}setArrows(t){this.codeMapArrowService.clearArrows(),this.codeMapArrowService.addEdgeMapBasedOnNodes(t),this.codeMapArrowService.addEdgePreview()}static{this.\u0275fac=function(i){return new(i||e)(E(vr),E(Re),E(ft),E(ll),E(Ag),E(Mf),E(on),E(or))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var r5=1e3/60,ml=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.store=t,this.actions$=i,this.threeRendererService=n,this.codeMapRenderService=r,this.threeViewerService=a,this.activeViewStore=s,this.viewReadinessStore=l,this.errorHandler=d,this.pendingInvalidation=null,this.lastRenderedMapNode=null,this.actionsRequiringRender$=this.actions$.pipe(st(...fg),Le(c=>{let m=gg(c);this.pendingInvalidation=this.pendingInvalidation?vg([this.pendingInvalidation,m]):m})),this.mapDataChange$=St([this.store.select(Et),this.actionsRequiringRender$]).pipe(qe(([c])=>c)),this.dataChangedWhileMetricsViewIsShown$=this.mapDataChange$.pipe(ti(this.activeViewStore.activeView$),Ae(([,c])=>c==="metrics"),qe(([c])=>c)),this.switchedToStaleMetricsView$=this.activeViewStore.activeView$.pipe(Ae(c=>c==="metrics"&&this.viewReadinessStore.isStale("metrics")),Ht(()=>this.threeViewerService.isMapCanvasMounted$.pipe(Ae(Boolean),ut(1))),ti(this.store.select(Et)),qe(([,c])=>c)),this.renderCodeMap$=Ne(()=>Ki(this.dataChangedWhileMetricsViewIsShown$,this.switchedToStaleMetricsView$).pipe(Ae(c=>!!c.unifiedMapNode),au(r5,eu,{leading:!1,trailing:!0}),Le(c=>this.renderMap(c)),Qi()),{dispatch:!1})}renderMap(t){try{this.codeMapRenderService.load(t.unifiedMapNode,this.consumeInvalidation(t.unifiedMapNode)),this.threeRendererService.render()}catch(i){this.errorHandler.handleError(i)}finally{zs()}}consumeInvalidation(t){let i=t===this.lastRenderedMapNode?this.pendingInvalidation:null;return this.pendingInvalidation=null,this.lastRenderedMapNode=t,i??en}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(dt),E(kt),E(Yr),E(ar),E(fr),E(hr),E(su))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var s5=350,Wg=(()=>{class e{constructor(t,i,n,r){this.store=t,this.actions$=i,this.renderCodeMapEffect=n,this.viewReadinessStore=r,this.hideLoadingFileOnCommit$=Ne(()=>this.actions$.pipe(st(ri),qe(()=>ap({value:!1})))),this.markViewsStaleOnDataChange$=Ne(()=>Ki(this.store.select(Nn).pipe(pi(1)),this.actions$.pipe(st(ri))).pipe(Le(()=>{this.viewReadinessStore.markAllStale()})),{dispatch:!1}),this.markMetricsReadyOnRender$=Ne(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(jt(s5),Ae(()=>this.viewReadinessStore.isStale("metrics")),Le(()=>{this.viewReadinessStore.markReady("metrics")})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(dt),E(ml),E(hr))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Og=[ml,pg,Wg];var xr=e=>(e=e.trim(),e.startsWith("*")||e.endsWith("*")||e.startsWith("/")||e.startsWith("./")?e:!e.startsWith('"')&&!e.endsWith('"')?e.startsWith("!")?e:`*${e}*`:e);var ul=e=>{let o=[],t=e.split(",");if(t[0].startsWith("!")){t[0]=t[0].slice(1);for(let i of t)i.length>0&&o.push({path:`!${xr(i)}`});return o}for(let i of t){if(i.startsWith("!"))break;i.length>0&&o.push({path:xr(i)})}return o};var zg="ExtensionRuleAction",jd=(e,...o)=>({type:zg,action:{effect:e},extensions:o}),$g=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.extensionPatternToRules$=this.actions$.pipe(st(zg),qe(n=>({effect:n.action.effect,rules:ul(n.extensions.join(","))})),Qi()),this.ruleForExtensions$=Ne(()=>this.extensionPatternToRules$.pipe(Ae(({effect:n})=>n==="flatten"||n==="exclude"),Le(({effect:n,rules:r})=>{this.store.dispatch(n==="flatten"?bo({items:r}):go({items:r}))})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var jg=[$g];var Hg=[];var Ug=(()=>{class e{constructor(t){this.store=t,this.updateAmountOfEdgePreviews$=Ne(()=>St([this.store.select(Ds),this.store.select(os)]).pipe(pi(1),Ae(([i,n])=>n>i),qe(([i])=>Ci({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var l5=De(up,pf,(e,o)=>({heightMetric:e,isLinked:o})),Gg=(()=>{class e{constructor(t){this.store=t,this.linkHeightAndColorMetric$=Ne(()=>this.store.select(l5).pipe(Ae(({isLinked:i})=>i),qe(({heightMetric:i})=>_t({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var wr=e=>{let o=e.maxValue-e.minValue,t=Math.round(o/3),i=t+e.minValue,n=t*2+e.minValue;return{from:i,to:n}};var Xg=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.resetColorRangeOnColorMetricChange$=Ne(()=>this.actions$.pipe(st(_t),Ht(()=>this.store.select(Mo).pipe(ut(1))),qe(n=>Ut({value:wr(n)}))))}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Kg=(()=>{class e{constructor(t){this.store=t,this.resetIsEdgeMetricVisible$=Ne(()=>this.store.select(Pn).pipe(ti(this.store.select(fp)),Ae(([,i])=>!i),qe(()=>Wn())))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Kd=rd(Jg(),1),bq=Kd.default.configure;var e1=Kd.default;var t1=(()=>{class e{constructor(t,i,n){this.store=t,this.mapStateReadWindow=i,this.metricsLensSourceReadWindow=n,this.updateMapColors$=Ne(()=>this.store.select(lp).pipe(qe(r=>{let a=this.metricsLensSourceReadWindow.getAttributeDescriptors(),s=this.mapStateReadWindow.getMapColors();if(a[r]?.direction===1){let l=JSON.parse(e1(s)),d=l.negative;return l.negative=l.positive,l.positive=d,ai({value:l})}return ai({value:s??Pt})})))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(xe),E(Rs))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var i1=[Xg,t1,Gg,Kg,Ug];var Sr=(()=>{class e{constructor(t){this.store=t}setStandard(t){this.store.dispatch(Ku({files:t}))}removeFiles(t){this.store.dispatch(Xu({fileNames:t}))}setDelta(t,i){this.store.dispatch(Ju({referenceFile:t,comparisonFile:i}))}setDeltaReference(t){this.store.dispatch(Yu({file:t}))}setDeltaComparison(t){this.store.dispatch(Zu({file:t}))}switchReferenceAndComparison(){this.store.dispatch(Qu())}setFiles(t){this.store.dispatch(Gu({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var pl=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.filesRepo=i,this.navBarWriteStore=n,this.lastSetFilesOfPreviousMode=[],this.subscription=this.fileStoreReadWindow.files$.pipe(nu(),Ae(([r,a])=>wi(r)!==wi(a)||a.length===0),Le(([r,a])=>{this.lastSetFilesOfPreviousMode=a.length===0?a:r})).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}toggle(){let t=this.filesRepo.getFiles();if(!wi(t)){this.lastSetFilesOfPreviousMode=this.filterNoneExisting(t,this.lastSetFilesOfPreviousMode);let n=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===oi.Reference)??t.find(a=>a.selectedAs===oi.Partial);if(n===void 0)return;let r=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===oi.Comparison);this.navBarWriteStore.setDelta(n.file,r?.file);return}if(this.lastSetFilesOfPreviousMode.length>0){this.navBarWriteStore.setFiles(this.lastSetFilesOfPreviousMode);return}let i=t.find(n=>n.selectedAs===oi.Reference)?.file;i!==void 0&&this.navBarWriteStore.setStandard([i])}filterNoneExisting(t,i){return i.filter(n=>t.find(r=>tp(r.file,n.file)))}static{this.\u0275fac=function(i){return new(i||e)(E(Re),E(op),E(Sr))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var v5="This file has no domain-language data \u2014 switched to the map view.",x5="Left compare mode \u2014 the domain view shows a single word cloud.",w5=0,o1=(()=>{class e{constructor(){this.store=T(he),this.router=T(Fn),this.toastService=T(l0),this.fileSelectionModeService=T(pl),this.unreachableReason$=St([this.store.select(w0),this.store.select(is)]).pipe(qe(([t,i])=>({reason:this.toUnreachableReason(t,i),wasOnDomainRoute:this.isOnDomainRoute()})),jt(w5),Va({bufferSize:1,refCount:!0})),this.navigated$=this.router.events.pipe(Ae(t=>t instanceof qu)),this.redirectAwayFromUnreachableDomainView$=Ne(()=>this.unreachableReason$.pipe(Ae(({reason:t,wasOnDomainRoute:i})=>t!==null&&i&&this.isOnDomainRoute()),Le(({reason:t})=>this.redirectToMetricsView(t))),{dispatch:!1}),this.handleTheDomainViewBeingOpenedWhileUnreachable$=Ne(()=>this.navigated$.pipe(Ht(()=>this.unreachableReason$.pipe(ut(1))),Ae(({reason:t})=>t!==null&&this.isOnDomainRoute()),Le(({reason:t})=>this.makeTheDomainViewReachable(t))),{dispatch:!1})}makeTheDomainViewReachable(t){if(t==="delta"){this.leaveCompareMode();return}this.redirectToMetricsView(t)}leaveCompareMode(){this.fileSelectionModeService.toggle(),this.toastService.show(x5)}toUnreachableReason(t,i){return t?"missing-domain-data":i?"delta":null}redirectToMetricsView(t){this.router.navigateByUrl(Ii.metrics,{replaceUrl:!0}),t==="missing-domain-data"&&this.toastService.show(v5)}isOnDomainRoute(){return Lf(this.router.url)==="domain"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var n1=[o1];var r1=(()=>{class e{constructor(t,i){this.guard=t,this.errorDialogService=i,this.showErrorDialogIfExcludedNodesResultInEmptyMap$=Ne(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(Ae(n=>n.resultsInEmptyMap),Le(()=>{zs(),this.errorDialogService.open({title:"Exclude Error",message:"Excluding all buildings is not possible."})})),{dispatch:!1}),this.addExcludedNodes$=Ne(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(Ae(n=>!n.resultsInEmptyMap),qe(n=>go({items:n.items}))))}static{this.\u0275fac=function(i){return new(i||e)(E(js),E(ts))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var a1=[r1];var s1=e=>e.some(o=>o.name==="rloc")?"rloc":"unary";var S5=["rloc","real_lines_of_code","loc","lines_of_code","lines","statements","functions"],l1=["complexity","mcc","cognitive_complexity","sonar_complexity","sonar_cognitive_complexity","max_nesting_level","indentation_level"];function c1(e){return e.some(o=>o.maxValue>0)}function d1(e,o){let t=[],i;for(let n of e)if(n.maxValue&&(t.push(n.name),i=n.name,--o===0))return t;if(!i)throw new Error("there are no metrics available");for(;o-- >0;)t.push(i);return t}function h1(e){let o=[],t={AreaMetric:S5,HeightMetric:l1,ColorMetric:l1},i=new Set(e.map(n=>n.name));for(let n in t)for(let r of t[n])if(i.has(r)){o.push(r);break}return o}function m1(e,o,t,i,n,r=!1){let a=new Set(t.map(f=>f.name)),s=new Set(i.map(f=>f.name)),l=f=>!!f&&a.has(f),d=f=>!!f&&s.has(f),c=n?e:$r,m=r?{areaMetric:null,heightMetric:null,colorMetric:null,distributionMetric:null,edgeMetric:null}:o,u=y5(c,m,t,l);if(u===null)return null;let p=m.edgeMetric;return d(c.edgeMetric)?p=c.edgeMetric:d(p)||(p=i[0]?.name),et(ke({},u),{edgeMetric:p})}function y5(e,o,t,i){let n=i(e.areaMetric)?e.areaMetric:o.areaMetric,r=i(e.heightMetric)?e.heightMetric:o.heightMetric,a=i(e.colorMetric)?e.colorMetric:o.colorMetric;if(i(n)&&i(r)&&i(a))return{areaMetric:n,heightMetric:r,colorMetric:a,distributionMetric:o.distributionMetric};if(!c1(t))return null;let[s,l,d]=C5(t);return{areaMetric:i(e.areaMetric)?e.areaMetric:s,heightMetric:i(e.heightMetric)?e.heightMetric:l,colorMetric:i(e.colorMetric)?e.colorMetric:d,distributionMetric:s1(t)}}function C5(e){let o=h1(e),[t,i,n]=o;return t&&i&&n?o:d1(e,3)}function u1(e){let o={};for(let t of e)for(let i of Object.keys(t))o[i]||(o[i]=t[i]);return o}function p1(e){let o={},t={};for(let i of e){for(let n of Object.keys(i.nodes))o[n]||(o[n]=i.nodes[n]);for(let n of Object.keys(i.edges))t[n]||(t[n]=i.edges[n])}return{nodes:o,edges:t}}var fl=class{constructor(){this.wordsByTextPerPath=new Map}add(o,t,i){let n=this.wordsByTextOf(o);for(let r of t){let a=n.get(r.text);n.set(r.text,a?i(a,r):ke({},r))}}toDomainLensData(){let o={};for(let[t,i]of this.wordsByTextPerPath)o[t]=[...i.values()];return o}wordsByTextOf(o){let t=this.wordsByTextPerPath.get(o);return t||(t=new Map,this.wordsByTextPerPath.set(o,t)),t}};function f1(e,o){if(e.length===1)return e[0].settings.fileSettings.domainWords;let t=new fl;for(let i of e)for(let[n,r]of Object.entries(i.settings.fileSettings.domainWords)){if(!o){t.add(n,r,vd);continue}t.add(kp(i.fileMeta.fileName,n),r,vd),n===zr.rootPath&&t.add(zr.rootPath,r,v0)}return t.toDomainLensData()}function g1(e,o){if(e.length===1)return e[0].settings.fileSettings.markedPackages;let t=new Map;for(let i of e)if(i.settings.fileSettings.markedPackages)for(let n of i.settings.fileSettings.markedPackages){let r={path:o?gs(i.fileMeta.fileName,n.path):n.path,color:n.color};t.set(`${r.path}|${r.color}`,r)}return[...t.values()]}function b1(e,o){let t=new Map;for(let r of e)for(let a of r.settings.fileSettings.blacklist??[]){let s=o&&e.length>1?gs(r.fileMeta.fileName,a.path):a.path;t.set(`${s}|${a.type}`,{path:s,type:a.type})}let i=[],n=[];for(let{path:r,type:a}of t.values())(a==="flatten"?n:i).push({path:r});return{excludedNodes:i,flattenedNodes:n}}var v1=(()=>{class e{constructor(t,i,n,r,a,s,l){this.actions$=t,this.store=i,this.ccStateSnapshot=n,this.fileStoreReadWindow=r,this.mapStateReadWindow=a,this.queryParamsService=s,this.loadInitialFileStore=l,this.fileSetTriggers$=Ki(this.actions$.pipe(st(ri),qe(d=>({kind:"fileSet",provenance:d}))),this.store.select(Nn).pipe(pi(1),qe(()=>({kind:"fileSet",provenance:null})))).pipe(Qi()),this.fileSetChanged$=this.fileSetTriggers$.pipe(iu(this.fileSetTriggers$.pipe(jt(0))),Ae(d=>d.length>0),qe(d=>({kind:"fileSet",provenance:d.find(c=>c.provenance)?.provenance??null}))),this.reconcileFileSet$=Ne(()=>this.fileSetChanged$.pipe(Le(d=>{this.reconcile(d)})),{dispatch:!1}),this.reconcileMetricData$=Ne(()=>St([this.store.select(Co),this.store.select(Is)]).pipe(pi(1),jt(0),Le(()=>{this.reconcile({kind:"metricData"})})),{dispatch:!1})}reconcile(t){t.kind==="fileSet"&&(this.mergeFileSettings(),this.updateFileRoot());let{nodeMetricData:i,edgeMetricData:n}=Yn(this.ccStateSnapshot.get());if(!i)return;let r=this.currentSelection(),a=m1(t.kind==="fileSet"?t.provenance?.urlMetrics??$r:$r,r,i,n,this.queryParamsService.hasFile(),t.kind==="fileSet"&&!!t.provenance?.forceDefaultMetrics);if(!a)return;this.applySelection(a,r);let s=a.colorMetric!==r.colorMetric;if(t.kind==="fileSet"||s){let l=Qp(i,a.colorMetric);this.store.dispatch(Ut({value:wr(l)}))}t.kind==="fileSet"&&(this.store.dispatch(Hn()),this.updateVisibleTopLabels(),this.applyRestoredSettings(t.provenance?.restoredSettings??null))}applyRestoredSettings(t){t&&(this.loadInitialFileStore.applyMetricsLensSource(t.metricsLensSource),this.loadInitialFileStore.applyDependencyLensSource(t.dependencyLensSource),this.loadInitialFileStore.applyDomainLensSource(t.domainLensSource),this.loadInitialFileStore.applySharedView(t.sharedView))}mergeFileSettings(){let t=this.fileStoreReadWindow.getFiles(),i=Ln(t),n=ep(t),r=this.fileStoreReadWindow.getVisibleFileStates(),a=r.map(({file:d})=>d.settings.fileSettings.attributeTypes),s=r.map(({file:d})=>d.settings.fileSettings.attributeDescriptors),l=p1(a);this.store.dispatch(Qt({value:{sharedView:et(ke({},b1(i,n)),{markedPackages:g1(i,n)}),metricsLensSource:{attributeTypes:l.nodes,attributeDescriptors:u1(s)},dependencyLensSource:{attributeTypes:l.edges},domainLensSource:{words:f1(i,n)}}}))}updateFileRoot(){let t=this.fileStoreReadWindow.getReferenceFile();t&&zr.updateRoot(t.map.name)}currentSelection(){let{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}=this.mapStateReadWindow.getMapState();return{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}}applySelection(t,i){this.dispatchIfChanged(ns,t.distributionMetric,i.distributionMetric),this.dispatchIfChanged(Mi,t.areaMetric,i.areaMetric),this.dispatchIfChanged(ki,t.heightMetric,i.heightMetric),this.dispatchIfChanged(_t,t.colorMetric,i.colorMetric),this.dispatchIfChanged(Gt,t.edgeMetric,i.edgeMetric)}dispatchIfChanged(t,i,n){i!==n&&this.store.dispatch(t({value:i}))}updateVisibleTopLabels(){let t=Bi(this.ccStateSnapshot.get()),i=this.mapStateReadWindow.getAmountOfTopLabels();this.store.dispatch(Si({value:Math.min(i,n0(t))}))}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he),E(Vt),E(Re),E(xe),E(Hs),E(d0))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var _5=2e3;function x1(e){if(Ff()||typeof requestIdleCallback!="function"){e();return}requestIdleCallback(()=>e(),{timeout:_5})}var E5=[_i,po,uo,ai,to,io,$n,ho,mo,wp,Wn,On,Vn,Bn,as,co,oo,Ci,Si,so,ss,no,ao,ro,lo,Ei,Gt,Ut,zn,ki,ns,_t,Mi],k5=[Pi,us,Hn,ps,fs,hs,ms,go,bo,jn,vo,Un,xo,wo],q5=[Gp,Up],T5=[$p],R5=[$f,jf,Hf,Kf,Zf,Uf,Gf,zf,Yf,t0,Of,Qf,Jf,e0,Xf],w1=[[...q5],[...T5],[...R5],[...E5],[...k5],[..._f],[...es],Qt].flat();var S1=500,I5=[...es,Qt],y1=(()=>{class e{constructor(t,i){this.actions$=t,this.ccStateSnapshot=i,this.saveCcState$=Ne(()=>this.actions$.pipe(Ae(n=>n.type!==Xo.type),st(...w1),jt(S1),Le(()=>this.saveWhenIdle(()=>h0(this.ccStateSnapshot.get())))),{dispatch:!1}),this.saveCcFiles$=Ne(()=>this.actions$.pipe(st(...I5),jt(S1),Le(()=>this.saveWhenIdle(()=>m0(this.ccStateSnapshot.get().files)))),{dispatch:!1})}saveWhenIdle(t){x1(()=>{t().catch(i=>console.error("Failed to persist the session:",i))})}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var C1=[Gt,ki,_t,Mi,Uu];var M1=(()=>{class e{constructor(t,i,n,r,a){this.actions$=t,this.mapStateReadWindow=i,this.fileStoreReadWindow=n,this.queryParamsService=r,this.store=a,this.saveMetricsInQueryParameters$=Ne(()=>this.actions$.pipe(st(...C1),ti(this.store.select(Is)),qe(([,s])=>s&&s.length>0),jt(100),Le(s=>{this.updateMetricQueryParameters(s)})),{dispatch:!1})}updateMetricQueryParameters(t){let{edgeMetric:i,heightMetric:n,colorMetric:r,areaMetric:a}=this.mapStateReadWindow.getMapState();this.queryParamsService.write({areaMetric:a,heightMetric:n,colorMetric:r,edgeMetric:i,isEdgeMetricDefined:t,currentFilesAreSampleFiles:this.fileStoreReadWindow.getCurrentFilesAreSampleFiles()})}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(xe),E(Re),E(Hs),E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var _1=[v1,y1,M1];var gl=class{constructor(){this.detachedHandles=new Map}routeKey(o){return o.routeConfig?.path??null}shouldDetach(o){return this.routeKey(o)!==null}store(o,t){let i=this.routeKey(o);i!==null&&(t?this.detachedHandles.set(i,t):this.detachedHandles.delete(i))}shouldAttach(o){let t=this.routeKey(o);return t!==null&&this.detachedHandles.has(t)}retrieve(o){let t=this.routeKey(o);return t===null?null:this.detachedHandles.get(t)??null}shouldReuseRoute(o,t){return o.routeConfig===t.routeConfig}};var E1=(()=>{class e extends Cu{constructor(){super(T(ad),T(yu,{optional:!0})??void 0),this.platformLocation=T(ad)}prepareExternalUrl(t){let i=new URL(this.platformLocation.href);return i.hash=super.prepareExternalUrl(t),i.toString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var k1={metricsLensSource:Xp,dependencyLensSource:jp,domainLensSource:Wf,domainState:i0,preferences:yf,mapState:Sp,sharedView:Rp,files:rp,isLoadingFile:sp,currentFilesAreSampleFiles:np},q1=e=>(o,t)=>{let i=Vf(t)?o0(ke({},o),t.value):o;return e(i,t)};var T1=(()=>{class e{constructor(){this.actions$=T(dt),this.domainSelectionStore=T(S0),this.resetDomainSelectionAfterLoad$=Ne(()=>this.actions$.pipe(st(ri),Le(()=>this.domainSelectionStore.clear())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var R1=[T1];var I1=e=>({type:"RuleFromSearchPatternAction",action:{effect:e}}),D1=(()=>{class e{constructor(t,i,n){this.actions$=t,this.store=i,this.excludeGuard=n,this.searchPatternToRules$=this.actions$.pipe(st("RuleFromSearchPatternAction"),ti(this.store.select(fo)),qe(([r,a])=>({effect:r.action.effect,rules:ul(a)})),Qi()),this.flattenSearchPattern$=Ne(()=>this.searchPatternToRules$.pipe(Ae(({effect:r})=>r==="flatten"),Le(({rules:r})=>{this.store.dispatch(bo({items:r})),this.store.dispatch(Pi({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Ne(()=>this.searchPatternToRules$.pipe(Ae(({effect:r})=>r==="exclude"),Le(()=>{this.excludeGuard.doExcludedNodesResultInEmptyMap$.pipe(ut(1),Ae(({resultsInEmptyMap:r})=>!r),Le(()=>{this.store.dispatch(Pi({value:""}))})).subscribe()}),qe(({rules:r})=>Ep({items:r}))))}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he),E(js))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var A1=[D1];var D5=(e,o,t,i,n)=>{let r=[],a=Qd("area",e.areaMetric,o,n);a&&r.push(a);let s=Qd("height",e.heightMetric,o,n);s&&r.push(s);let l=Qd("color",e.colorMetric,o,n);l&&!i&&r.push(et(ke({},l),{inverted:t.isColorRangeInverted===!0}));let d=A5(e.edgeMetric,o,n);return d&&r.push(d),r},Qd=(e,o,t,i)=>{if(o)return{kind:e,metricName:o,value:i?.attributes?.[o],descriptor:t?.[o]}},A5=(e,o,t)=>{if(!e)return;let i=t?.edgeAttributes?.[e];if(i)return{kind:"edge",metricName:e,incoming:i.incoming??0,outgoing:i.outgoing??0,descriptor:o?.[e]}},F1=De(er,Qn,rs,is,Kt,D5);var F5=.3333333333333333,L5=2/3,Zd=(e,o,t,i)=>{if(o===void 0||t===void 0||t===o)return{fraction:1,severity:"neutral"};let n=N5((e-o)/(t-o));return{fraction:n,severity:P5(i===1?1-n:n)}},N5=e=>Math.min(1,Math.max(0,e)),P5=e=>e<F5?"success":e<L5?"warning":"error";var Yd=e=>e===void 0||e===0||Number.isNaN(e),Jd=e=>Yd(e.value)&&!e.delta,L1={fraction:0,severity:"neutral"},B5="unary",V5=(e,o,t,i)=>e?.attributes?Object.keys(e.attributes).filter(n=>n!==B5).sort((n,r)=>n.localeCompare(r)).map(n=>W5(n,e,o,t,i)):[],W5=(e,o,t,i,n)=>{let r=n?.[e],a=o.attributes[e];return{name:e,value:a,delta:o.deltas?.[e],mapBar:O5(e,a,t,r),rangeBar:z5(e,a,i,r),descriptor:r}},O5=(e,o,t,i)=>{if(Yd(o))return L1;let n=t?.attributes?.[e];return Zd(o,0,n,i?.direction)},z5=(e,o,t,i)=>{if(Yd(o))return L1;let n=t.nodeMetricData.find(r=>r.name===e);return Zd(o,n?.minValue,n?.maxValue,i?.direction)},N1=De(Kt,Et,Co,Qn,(e,o,t,i)=>V5(e,o.unifiedMapNode,{nodeMetricData:t},i));var Do=(()=>{class e{constructor(t){this.store=t,this.selectedNode$=this.store.select(Kt),this.mappingBlocks$=this.store.select(F1),this.metricRows$=this.store.select(N1)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ci=(()=>{class e{constructor(){this.readStore=T(Do),this.threeSceneService=T(ft),this.threeRendererService=T(kt),this.selectedNode=A(this.readStore.selectedNode$,{initialValue:void 0}),this.isVisible=Y(()=>this.selectedNode()!=null)}close(){this.threeSceneService.clearSelection(),this.threeRendererService.render()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var P1=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 $5(e,o){if(e&1&&(y(0,"span",2)(1,"span",3),g(2),M(),y(3,"span",4),g(4),M(),y(5,"span",5),g(6),M()()),e&2){let t=B();h(2),ge("\u0394",t.added),h(2),ge("\u0394",t.removed>0?-t.removed:0),h(2),ge("\u0394",t.changed)}}function j5(e,o){if(e&1&&(y(0,"span",1),g(1),M(),K(2,$5,7,3,"span",2)),e&2){let t=o,i=B();h(),Yi(" ",t.all," ",t.all===1?"file":"files"," "),h(),Q(i.isDeltaState()?2:-1)}}var B1=(()=>{class e{constructor(){this.isFolder=Z.required(),this.fileCount=Z(),this.isDeltaState=Z.required()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(y(0,"span",0),g(1),M(),K(2,j5,3,3)),i&2){let r;h(),Te(n.isFolder()?"folder":"file"),h(),Q((r=n.isFolder()&&n.fileCount())?2:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();function H5(e,o){if(e&1&&(y(0,"p",0),g(1),M()),e&2){let t=B();h(),Te(t.parentPath())}}function U5(e,o){if(e&1&&(y(0,"a",2),pe(1,"i",3),M()),e&2){let t=o;ce("href",t,Rn)("title",t)}}var V1=(()=>{class e{constructor(){this.parentPath=Z.required(),this.nodeName=Z.required(),this.link=Z()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(K(0,H5,2,1,"p",0),y(1,"p",1),g(2),K(3,U5,2,2,"a",2),M()),i&2){let r;Q(n.parentPath()?0:-1),h(2),ge(" ",n.nodeName()," "),h(),Q((r=n.link())?3:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();function G5(e,o){if(e&1){let t=we();x(0,"div",4)(1,"div",5),V(2,"cc-inspector-node-path",6)(3,"cc-inspector-node-badges",7),v(),x(4,"button",8),z("click",function(){ae(t);let n=B();return se(n.copyPath())}),V(5,"i",9),v()()}if(e&2){let t=B();h(2),F("parentPath",t.parentPath())("nodeName",t.nodeName())("link",t.nodeLink()),h(),F("isFolder",t.isFolder())("fileCount",t.fileCount())("isDeltaState",t.isDeltaState()),h(),F("title",t.copied()?"Copied!":"Copy path"),h(),We("fa-copy",!t.copied())("fa-check",t.copied())}}var W1=(()=>{class e{static{this.COPY_FEEDBACK_MS=1500}constructor(){this.readStore=T(Do),this.fileStoreReadWindow=T(Re),this.visibilityService=T(ci),this.selectedNode=A(this.readStore.selectedNode$,{requireSync:!0}),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.copied=Se(!1),this.nodeName=Y(()=>this.selectedNode()?.name??""),this.nodeLink=Y(()=>this.selectedNode()?.link),this.parentPath=Y(()=>{let t=this.selectedNode();return t?.path?t.path.slice(0,t.path.length-t.name.length):""}),this.isFolder=Y(()=>this.selectedNode()?.type===eo.FOLDER),this.fileCount=Y(()=>P1(this.selectedNode())),T(Tn).onDestroy(()=>clearTimeout(this.copyFeedbackTimeout))}close(){this.visibilityService.close()}async copyPath(){let t=this.selectedNode()?.path;t&&(await navigator.clipboard.writeText(t),this.copied.set(!0),clearTimeout(this.copyFeedbackTimeout),this.copyFeedbackTimeout=setTimeout(()=>this.copied.set(!1),e.COPY_FEEDBACK_MS))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Inspector"),v(),x(3,"button",2),z("click",function(){return n.close()}),V(4,"i",3),v()(),K(5,G5,6,11,"div",4)),i&2&&(h(5),Q(n.selectedNode()?5:-1))},dependencies:[V1,B1],encapsulation:2,changeDetection:0})}}return e})();var an=e=>e===void 0||Number.isNaN(e)?"-":e.toLocaleString("en-US");function X5(e,o){if(e&1&&(y(0,"a",4),pe(1,"i",7),M()),e&2){let t=B();ce("href",o,Rn),ot("data-testid","mapping-block-link-"+t.block().kind)}}function K5(e,o){if(e&1&&(g(0),y(1,"span",8),g(2,"(in/out)"),M()),e&2){let t=B();ge(" ",t.edgeCountText()," ")}}function Q5(e,o){if(e&1&&g(0),e&2){let t=B();ge(" ",t.formattedValue()," ")}}function Z5(e,o){e&1&&(y(0,"span",6),g(1,"\xB7 inverted"),M())}var O1=(()=>{class e{constructor(){this.block=Z.required(),this.iconClasses=Y(()=>`${e.ICONS[this.block().kind]} text-xs text-primary`),this.formattedValue=Y(()=>an(this.block().value)),this.edgeCountText=Y(()=>`${an(this.block().incoming)}/${an(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(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(y(0,"div",0)(1,"span",1),g(2),M(),pe(3,"i",2),M(),y(4,"p",3),pt(5,"attributeDescriptorTooltip"),g(6),K(7,X5,2,2,"a",4),M(),y(8,"p",5),K(9,K5,3,1)(10,Q5,1,1),K(11,Z5,2,0,"span",6),M()),i&2){let r;h(2),Te(n.block().kind),h(),At(n.iconClasses()),h(),ce("title",Dn(5,10,n.block().descriptor,n.block().metricName)),ot("data-testid","mapping-block-name-"+n.block().kind),h(2),ge(" ",n.block().metricName," "),h(),Q((r=(r=n.block().descriptor)==null?null:r.link)?7:-1,r),h(),ot("data-testid","mapping-block-value-"+n.block().kind),h(),Q(n.block().kind==="edge"?9:10),h(2),Q(n.block().inverted?11:-1)}},dependencies:[mr],encapsulation:2,changeDetection:0})}}return e})();var Y5=(e,o)=>o.kind;function J5(e,o){if(e&1&&V(0,"cc-inspector-mapping-block",2),e&2){let t=o.$implicit;F("block",t)}}var z1=(()=>{class e{constructor(){this.readStore=T(Do),this.mappingBlocks=A(this.readStore.mappingBlocks$,{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"span",0),g(1,"Metric Mapping"),v(),x(2,"div",1),Pe(3,J5,1,1,"cc-inspector-mapping-block",2,Y5),v()),i&2&&(h(3),Be(n.mappingBlocks()))},dependencies:[O1],encapsulation:2,changeDetection:0})}}return e})();var bl=(()=>{class e{constructor(){this.comparisonMode=Se("map")}setComparisonMode(t){this.comparisonMode.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var $1=(()=>{class e{constructor(){this.comparisonModeService=T(bl),this.comparisonMode=this.comparisonModeService.comparisonMode}setComparisonMode(t){this.comparisonModeService.setComparisonMode(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.setComparisonMode("map")}),g(2," map "),M(),y(3,"button",2),ie("click",function(){return n.setComparisonMode("range")}),g(4," range "),M()()),i&2&&(h(),We("btn-active",n.comparisonMode()==="map"),h(2),We("btn-active",n.comparisonMode()==="range"))},encapsulation:2,changeDetection:0})}}return e})();function eS(e,o){e&1&&(y(0,"a",2),pe(1,"i",7),M()),e&2&&ce("href",o,Rn)}function tS(e,o){if(e&1&&(y(0,"span",8),g(1),M()),e&2){let t=B();ze("color",t.deltaColor()),h(),Te(t.formattedDelta())}}var vl=(()=>{class e{constructor(){this.row=Z.required(),this.comparisonMode=Z.required(),this.positiveDeltaColor=Z.required(),this.negativeDeltaColor=Z.required(),this.bar=Y(()=>this.comparisonMode()==="map"?this.row().mapBar:this.row().rangeBar),this.formattedValue=Y(()=>an(this.row().value)),this.hasDelta=Y(()=>!!this.row().delta),this.formattedDelta=Y(()=>`\u0394${an(this.row().delta)}`),this.deltaColor=Y(()=>(this.row().delta??0)>0?this.positiveDeltaColor():this.negativeDeltaColor()),this.barClasses=Y(()=>`h-full rounded ${e.SEVERITY_CLASSES[this.bar().severity]}`),this.barWidthPercentage=Y(()=>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(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(y(0,"div",0)(1,"span",1),pt(2,"attributeDescriptorTooltip"),g(3),K(4,eS,2,1,"a",2),M(),y(5,"span",3),K(6,tS,2,3,"span",4),g(7),M()(),y(8,"div",5),pe(9,"div",6),M()),i&2){let r;h(),ce("title",Dn(2,9,n.row().descriptor,n.row().name)),h(2),ge(" ",n.row().name," "),h(),Q((r=(r=n.row().descriptor)==null?null:r.link)?4:-1,r),h(2),Q(n.hasDelta()?6:-1),h(),ge(" ",n.formattedValue()," "),h(2),At(n.barClasses()),ze("width",n.barWidthPercentage(),"%")}},dependencies:[mr],encapsulation:2,changeDetection:0})}}return e})();var iS=(e,o)=>o.name;function oS(e,o){if(e&1&&V(0,"cc-inspector-metric-row",3),e&2){let t=o.$implicit,i=B(3);F("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.positiveDeltaColor())("negativeDeltaColor",i.negativeDeltaColor())}}function nS(e,o){if(e&1&&(x(0,"div",2),Pe(1,oS,1,4,"cc-inspector-metric-row",3,iS),v()),e&2){let t=B(2);h(),Be(t.rows())}}function rS(e,o){if(e&1){let t=we();x(0,"button",0),z("click",function(){ae(t);let n=B();return se(n.toggleEmptyMetrics())}),V(1,"i",1),g(2),v(),K(3,nS,3,0,"div",2)}if(e&2){let t=B();h(),We("fa-chevron-right",!t.showEmptyMetrics())("fa-chevron-down",t.showEmptyMetrics()),h(),ge(" Empty metrics (",t.rows().length,") "),h(),Q(t.showEmptyMetrics()?3:-1)}}var j1=(()=>{class e{constructor(){this.rows=Z.required(),this.comparisonMode=Z.required(),this.positiveDeltaColor=Z.required(),this.negativeDeltaColor=Z.required(),this.showEmptyMetrics=Se(!1)}toggleEmptyMetrics(){this.showEmptyMetrics.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&K(0,rS,4,6),i&2&&Q(n.rows().length>0?0:-1)},dependencies:[vl],encapsulation:2,changeDetection:0})}}return e})();var aS=(e,o)=>o.name;function sS(e,o){e&1&&V(0,"cc-inspector-comparison-toggle")}function lS(e,o){e&1&&(x(0,"p",2),g(1,"No metrics available"),v())}function cS(e,o){if(e&1&&V(0,"cc-inspector-metric-row",4),e&2){let t=o.$implicit,i=B(2);F("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.mapColors().positiveDelta)("negativeDeltaColor",i.mapColors().negativeDelta)}}function dS(e,o){if(e&1&&(x(0,"div",3),Pe(1,cS,1,4,"cc-inspector-metric-row",4,aS),v(),V(3,"cc-inspector-empty-metrics",5)),e&2){let t=B();h(),Be(t.metricRowsWithValues()),h(2),F("rows",t.emptyMetricRows())("comparisonMode",t.comparisonMode())("positiveDeltaColor",t.mapColors().positiveDelta)("negativeDeltaColor",t.mapColors().negativeDelta)}}var H1=(()=>{class e{constructor(){this.readStore=T(Do),this.mapStateReadWindow=T(xe),this.comparisonModeService=T(bl),this.metricRows=A(this.readStore.metricRows$,{requireSync:!0}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.comparisonMode=this.comparisonModeService.comparisonMode,this.metricRowsWithValues=Y(()=>this.metricRows().filter(t=>!Jd(t))),this.emptyMetricRows=Y(()=>this.metricRows().filter(t=>Jd(t)))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Metrics"),v(),K(3,sS,1,0,"cc-inspector-comparison-toggle"),v(),K(4,lS,2,0,"p",2)(5,dS,4,4)),i&2&&(h(3),Q(n.metricRows().length>0?3:-1),h(),Q(n.metricRows().length===0?4:5))},dependencies:[$1,j1,vl],encapsulation:2,changeDetection:0})}}return e})();var eh=(()=>{class e{constructor(){this.visibilityService=T(ci),this.isVisible=this.visibilityService.isVisible}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&2&&(ot("aria-hidden",!n.isVisible()),ze("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))"),We("translate-x-full",!n.isVisible())("pointer-events-none",!n.isVisible()))},decls:4,vars:0,consts:[[1,"min-h-0","flex-1","overflow-y-auto"]],template:function(i,n){i&1&&(V(0,"cc-inspector-header")(1,"cc-inspector-metric-mapping"),x(2,"div",0),V(3,"cc-inspector-metrics-list"),v())},dependencies:[W1,z1,H1],encapsulation:2,changeDetection:0})}}return e})();function hS(e,o){e&1&&(x(0,"div",1)(1,"div",2)(2,"span"),g(3," The graphics card stopped rendering the map, usually because it ran out of memory. Reload the page, and try a smaller map or a smaller browser window. "),v()()())}var th=(()=>{class e{constructor(t,i,n,r,a){this.inspectorVisibilityService=t,this.fileStoreReadWindow=i,this.threeViewerService=n,this.codeMapMouseEventService=r,this.elementReference=a,this.isLoadingFile$=this.fileStoreReadWindow.isLoadingFile$,this.isContextLost$=this.threeViewerService.isContextLost$}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start()}ngOnDestroy(){this.threeViewerService.stopAnimate(),this.threeViewerService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(ne(ci),ne(Re),ne(ar),ne(on),ne(Nt))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-code-map"]],decls:5,vars:9,consts:[["id","codeMap",1,"fixed","left-0","top-[var(--cc-bars-height,49px)]","z-0","h-full","w-full"],[1,"pointer-events-none","fixed","inset-0","z-[1000]","flex","items-center","justify-center","p-4"],["role","alert",1,"alert","alert-error","pointer-events-auto","max-w-md"]],template:function(i,n){i&1&&(x(0,"div",0),pt(1,"async"),V(2,"cc-view-cube"),v(),K(3,hS,4,0,"div",1),pt(4,"async")),i&2&&(We("hidden",vi(1,5,n.isLoadingFile$)),h(2),We("sideBarVisible",n.inspectorVisibilityService.isVisible()),h(),Q(vi(4,7,n.isContextLost$)?3:-1))},dependencies:[$d,Xa],encapsulation:2,changeDetection:0})}}return e})();var xl=De(Et,yi,(e,o)=>Bs.getMetricDistribution(e.unifiedMapNode,o));var wl=De(Jn,Kt,yi,xl,(e,o,t,i)=>{let n=e||o;return!n||n.type===eo.FILE?i:Bs.getMetricDistribution(n,t)});var Sl=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(wl),this.metricDistribution$=this.store.select(xl)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var G1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric$=this.mapStateReadWindow.areaMetric$,this.distributionMetric=hp}static{this.\u0275fac=function(i){return new(i||e)(ne(xe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-distribution-metric"]],hostAttrs:[1,"mx-[5px]","flex","min-w-max","items-center","gap-1.5","text-xs"],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(i,n){i&1&&(pe(0,"i",0),g(1),pt(2,"async")),i&2&&(h(),ge(" ",vi(2,1,n.areaMetric$),`
3512
- `))},dependencies:[Xa],encapsulation:2,changeDetection:0})}}return e})();var X1=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(wl),this.hoveredNode$=this.store.select(Jn),this.selectedNode$=this.store.select(Kt),this.flattenedItems$=this.store.select(Cp)}dispatchRuleChange(t,i){Wi(this.store,t,i)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function fS(e){return`*.${e}`}function gS(e,o){return e===Ns?o.others.filter(t=>t.fileExtension!==Ps).map(t=>t.fileExtension):[e]}function yl(e,o,t){return gS(e,o).map(n=>{let r=fS(n);return t?.type===eo.FOLDER?`${t.path}/**/${r}`:r})}var K1=(()=>{class e{constructor(t){this.extensionRulesStore=t,this.operationContext$=St([this.extensionRulesStore.hoveredNodeMetricDistribution$,this.extensionRulesStore.hoveredNode$,this.extensionRulesStore.selectedNode$,this.extensionRulesStore.flattenedItems$]).pipe(qe(([i,n,r,a])=>({distribution:i,node:n||r,flattenedItems:a})))}show(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=yl(t,i.distribution,i.node),r=this.createFlattenedItemsMap(i.flattenedItems),a=n.map(s=>r.get(s));this.extensionRulesStore.dispatchRuleChange("flatten",vo({items:a}))})}exclude(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=yl(t,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("exclude",jd("exclude",...n))})}flatten(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=yl(t,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("flatten",jd("flatten",...n))})}getIsFlattenedByFileExtension(t){return this.operationContext$.pipe(qe(i=>yl(t,i.distribution,i.node).every(r=>i.flattenedItems.some(a=>a.path===r))))}createFlattenedItemsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}static{this.\u0275fac=function(i){return new(i||e)(E(X1))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Q1=(()=>{class e{constructor(t,i){this.threeSceneService=t,this.metricDistributionStore=i,this.metricDistribution$=this.metricDistributionStore.metricDistribution$,this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(ou(),Ae(n=>!!n)).subscribe(n=>{this.fileExtensionsOfOthers.clear();for(let r of n.others)this.fileExtensionsOfOthers.add(r.fileExtension);this.fileExtensionsOfNone.clear();for(let r of n.none)this.fileExtensionsOfNone.add(r.fileExtension)})}highlightExtension(t){switch(t){case Ns:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case Ps:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([t]));break}}clearHighlightingOnFileExtensions(){this.threeSceneService.applyClearHighlights()}static{this.\u0275fac=function(i){return new(i||e)(E(ft),E(Sl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var xS=["menu"];function wS(e,o){if(e&1){let t=we();y(0,"button",10),ie("click",function(){ae(t);let n=B(2);return se(n.show(n.fileExtension()))}),pe(1,"i",11),y(2,"span",9),g(3,"Show"),M()()}}function SS(e,o){if(e&1){let t=we();y(0,"button",12),ie("click",function(){ae(t);let n=B(2);return se(n.flatten(n.fileExtension()))}),pe(1,"i",13),y(2,"span",9),g(3,"Flatten"),M()()}}function yS(e,o){if(e&1){let t=we();y(0,"div",4,0),ie("contextmenu",function(n){return n.preventDefault()}),K(2,wS,4,0,"button",5)(3,SS,4,0,"button",6),y(4,"button",7),ie("click",function(){ae(t);let n=B();return se(n.exclude(n.fileExtension()))}),pe(5,"i",8),y(6,"span",9),g(7,"Exclude"),M()()()}if(e&2){let t=o,i=B();ze("left",t.left,"px")("bottom",t.bottom,"px"),h(2),Q(i.isFlattened()?2:3)}}var CS=192,ih=4,Z1=(()=>{class e{constructor(t,i){this.extensionRulesService=t,this.highlightBuildingsByFileExtensionService=i,this.item=Z.required(),this.showAbsoluteValues=Z.required(),this.toggleShowAbsoluteValues=_e(),this.isFlattened=Se(!1),this.menuPosition=Se(null),this.menuRef=Je("menu"),this.fileExtension=Y(()=>this.item().fileExtension),this.hasFileExtension=Y(()=>this.fileExtension()!=="None"),this.formattedTitle=Y(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.extensionRulesService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(t=>this.isFlattened.set(t))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}openContextMenu(t){if(t.preventDefault(),!this.hasFileExtension())return;let i=Math.max(ih,Math.min(t.clientX,window.innerWidth-CS-ih)),n=Math.max(ih,window.innerHeight-t.clientY);this.menuPosition.set({left:i,bottom:n})}closeContextMenu(){this.menuPosition.set(null)}onDocumentPointerDown(t){if(!this.menuPosition())return;let i=this.menuRef()?.nativeElement;i&&t.target instanceof Node&&i.contains(t.target)||this.closeContextMenu()}closeContextMenuOnViewportChange(){this.menuPosition()&&this.closeContextMenu()}flatten(t){this.extensionRulesService.flatten(t),this.closeContextMenu()}exclude(t){this.extensionRulesService.exclude(t),this.closeContextMenu()}show(t){this.extensionRulesService.show(t),this.closeContextMenu()}onHoverFileExtensionBar(t){this.highlightBuildingsByFileExtensionService.highlightExtension(t)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(t,i,n){return t&&i.absoluteMetricValue||!t&&i.relativeMetricValue?t?`${n} ${i.absoluteMetricValue.toLocaleString()}`:`${n} ${i.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(i){return new(i||e)(ne(K1),ne(Q1))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-file-extension-bar-segment"]],viewQuery:function(i,n){i&1&&rt(n.menuRef,xS,5),i&2&&at()},hostAttrs:[1,"min-w-max","cursor-pointer","overflow-hidden","text-center","text-white"],hostVars:6,hostBindings:function(i,n){i&1&&z("pointerdown",function(a){return n.onDocumentPointerDown(a)},Uo)("wheel",function(){return n.closeContextMenuOnViewportChange()},Uo)("resize",function(){return n.closeContextMenuOnViewportChange()},hu),i&2&&ze("background-color",n.backgroundColor)("flex-grow",n.flexGrow)("flex-basis",n.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:4,vars:3,consts:[["menu",""],[1,"cc-bar-section",3,"click","contextmenu"],["data-test-id","formattedTitle",1,"cc-bar-section-text","my-0.5","whitespace-nowrap","px-2.5","text-[10px]",3,"mouseover","mouseleave","title"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"left","bottom"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"contextmenu"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","excludeBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-ban"],[1,"truncate"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-eye"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-arrows-down-to-line"]],template:function(i,n){if(i&1&&(y(0,"span",1),ie("click",function(){return n.toggleShowAbsoluteValues.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),y(1,"div",2),ie("mouseover",function(){return n.onHoverFileExtensionBar(n.fileExtension())})("mouseleave",function(){return n.onUnhoverFileExtensionBar()}),g(2),M()(),K(3,yS,8,5,"div",3)),i&2){let r;h(),ce("title",n.formattedTitle()),h(),ge(" ",n.formattedTitle()," "),h(),Q((r=n.menuPosition())?3:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();var MS=(e,o)=>o.fileExtension;function _S(e,o){if(e&1){let t=we();x(0,"cc-file-extension-bar-segment",4),z("toggleShowAbsoluteValues",function(){ae(t);let n=B();return se(n.toggleShowAbsoluteValues())}),v()}if(e&2){let t=o.$implicit,i=B();F("item",t)("showAbsoluteValues",i.showAbsoluteValues())}}var oh=(()=>{class e{constructor(){this.metricDistributionStore=T(Sl),this.showAbsoluteValues=Se(!1),this.metricDistribution=A(this.metricDistributionStore.hoveredNodeMetricDistribution$,{requireSync:!0})}toggleShowAbsoluteValues(){this.showAbsoluteValues.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-file-extension-bar"]],hostAttrs:[1,"fixed","left-0","right-0","z-[70]","block","bg-base-100"],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom","var(--cc-bottom-bar-height, 32px)")},features:[bi([{provide:ur,useValue:"--cc-file-extension-bar-height"}]),Zi([pr])],decls:5,vars:0,consts:[[1,"flex","h-[17px]","w-full"],["title","Distribution metric"],[1,"flex","w-full","gap-px"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(i,n){i&1&&(x(0,"div",0),V(1,"cc-distribution-metric",1),x(2,"div",2),Pe(3,_S,1,2,"cc-file-extension-bar-segment",3,MS),v()()),i&2&&(h(3),Be(n.metricDistribution().visible))},dependencies:[G1,Z1],encapsulation:2,changeDetection:0})}}return e})();var Cl="var(--cc-bottom-bar-height, 32px) + var(--cc-file-extension-bar-height, 17px)";var Ml=(()=>{class e{static{this.NO_MATCHING="\u2013 (no matching buildings)"}transform(t,i,n,r){switch(t){case"positive":{let a=r==="unary",s=n.minValue===i.from,l=n.maxValue===i.from;return a?`${n.minValue} - ${n.maxValue}`:s?e.NO_MATCHING:l?`${n.minValue} to ${this.formatNumber(i.from)}`:`${n.minValue} to ${this.formatNumber(i.from-1)}`}case"neutral":{let a=i.from===i.to,s=i.to===n.maxValue;return a?e.NO_MATCHING:s?`${this.formatNumber(i.from)} to ${this.formatNumber(i.to)}`:`${this.formatNumber(i.from)} to ${this.formatNumber(i.to-1)}`}case"negative":return n.maxValue===i.to?e.NO_MATCHING:`${this.formatNumber(i.to)} to ${this.formatNumber(n.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(t){return(t||0).toLocaleString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=za({name:"mapColorLabel",type:e,pure:!0})}}return e})();var J1=(()=>{class e{constructor(t){this.store=t,this.selectedColorMetricData$=this.store.select(Mo)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ao=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.legendMetricRangeStore=i,this.mapColorFor=Z.required(),this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=A(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=A(this.legendMetricRangeStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=Y(()=>this.mapColors()[this.mapColorFor()])}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(J1))}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(gu(0),pt(1,"mapColorLabel"),y(2,"div",0),Ho(),y(3,"svg",1),pe(4,"rect",2),M(),Wr(),y(5,"span",3),g(6),M()()),i&2){let r=Ga(1,3,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric());h(3),ot("aria-label","Color for "+r),h(),ot("fill",n.color()),h(2),Te(r)}},dependencies:[Ml],encapsulation:2,changeDetection:0})}}return e})();var e2=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Color scale"),v(),V(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3)(5,"cc-legend-color-row",4),v())},dependencies:[Ao],encapsulation:2,changeDetection:0})}}return e})();var t2=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Delta colors"),v(),V(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3),v())},dependencies:[Ao],encapsulation:2,changeDetection:0})}}return e})();function kS(e,o){e&1&&(x(0,"div",0),V(1,"cc-legend-color-row",1)(2,"cc-legend-color-row",2),v())}var i2=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.edgeMetric=A(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(ne(xe))}}static{this.\u0275cmp=k({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(i,n){i&1&&K(0,kS,3,0,"div",0),i&2&&Q(n.edgeMetric()?0:-1)},dependencies:[Ao],encapsulation:2,changeDetection:0})}}return e})();var o2=(()=>{class e{constructor(t){this.metricsLensFacade=t,this.label=Z.required(),this.metricName=Z.required(),this.attributeDescriptors=A(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.descriptor=Y(()=>this.attributeDescriptors()[this.metricName()]),this.title=Y(()=>this.descriptor()?.title||$s.get(this.metricName())||this.metricName())}static{this.\u0275fac=function(i){return new(i||e)(ne(Zn))}}static{this.\u0275cmp=k({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(i,n){i&1&&(y(0,"div",0),pt(1,"attributeDescriptorTooltip"),y(2,"span",1),g(3),M(),y(4,"span",2),g(5),M()()),i&2&&(ce("title",Dn(1,3,n.descriptor(),n.metricName())),h(3),Te(n.label()),h(2),Te(n.title()))},dependencies:[mr],encapsulation:2,changeDetection:0})}}return e})();function TS(e,o){e&1&&V(0,"cc-legend-metric-row",4),e&2&&F("metricName",o)}var n2=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric=A(this.mapStateReadWindow.areaMetric$,{initialValue:""}),this.heightMetric=A(this.mapStateReadWindow.heightMetric$,{initialValue:""}),this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.edgeMetric=A(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(ne(xe))}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(x(0,"div",0),V(1,"cc-legend-metric-row",1)(2,"cc-legend-metric-row",2)(3,"cc-legend-metric-row",3),K(4,TS,1,1,"cc-legend-metric-row",4),v()),i&2){let r;h(),F("metricName",n.areaMetric()??""),h(),F("metricName",n.heightMetric()??""),h(),F("metricName",n.colorMetric()??""),h(),Q((r=n.edgeMetric())?4:-1,r)}},dependencies:[o2],encapsulation:2,changeDetection:0})}}return e})();var r2=(()=>{class e{constructor(t){this.inspectorVisibilityService=t,this.isOpen=Z.required(),this.togglePanel=_e(),this.buttonBottom=`calc(${Cl} + 32px)`,this.buttonRight=Y(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) - 28px)":"-28px")}static{this.\u0275fac=function(i){return new(i||e)(ne(ci))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-legend-toggle-button"]],hostAttrs:[1,"contents"],inputs:{isOpen:[1,"isOpen"]},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(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.togglePanel.emit()}),g(1,` LEGEND
3513
- `),M()),i&2&&(ze("right",n.buttonRight())("bottom",n.buttonBottom),ce("title",n.isOpen()?"Hide panel":"Show panel"),ot("aria-expanded",n.isOpen()))},encapsulation:2,changeDetection:0})}}return e})();function RS(e,o){e&1&&V(0,"cc-legend-delta-colors-section")}function IS(e,o){e&1&&V(0,"cc-legend-metrics-section")(1,"cc-legend-color-scale-section")}function DS(e,o){if(e&1&&(x(0,"div",2)(1,"div",3),K(2,RS,1,0,"cc-legend-delta-colors-section")(3,IS,2,0),x(4,"div",4),V(5,"cc-legend-color-row",5),v(),V(6,"cc-legend-edge-colors-section"),v()()),e&2){let t=B();ze("right",t.panelRight())("bottom",t.panelBottom),h(2),Q(t.isDeltaState()?2:3)}}var nh=(()=>{class e{constructor(){this.elementReference=T(Nt),this.inspectorVisibilityService=T(ci),this.fileStoreReadWindow=T(Re),this.isOpen=Se(!1),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.panelBottom=`calc(${Cl} + 12px)`,this.panelRight=Y(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) + 40px)":"40px"),this.mouseDownListener=t=>this.closeOnOutsideClick(t)}ngOnInit(){document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){document.removeEventListener("mousedown",this.mouseDownListener)}toggleIsOpen(){this.isOpen.update(t=>!t)}closeOnOutsideClick(t){this.isOpen()&&t.target instanceof Node&&!this.elementReference.nativeElement.contains(t.target)&&this.isOpen.set(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-legend-panel"]],decls:2,vars:2,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"],["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"],[1,"border-base-300","border-t","pt-2"],["mapColorFor","selected"]],template:function(i,n){i&1&&(K(0,DS,7,5,"div",0),x(1,"cc-legend-toggle-button",1),z("togglePanel",function(){return n.toggleIsOpen()}),v()),i&2&&(Q(n.isOpen()?0:-1),h(),F("isOpen",n.isOpen()))},dependencies:[n2,e2,t2,i2,Ao,r2],encapsulation:2,changeDetection:0})}}return e})();var a2=(e,o)=>De(er,Kp,(t,i)=>{let n=t[o];return i[e][n]==="relative"?"x\u0342":"\u03A3"});var AS=e=>{if(!e)return[];let o=[];for(let{data:t}of Ji(e))t.type===eo.FOLDER&&!t.isExcluded&&o.push(t.path);return o.sort((t,i)=>t.localeCompare(i))},s2=De(Et,e=>AS(e.unifiedMapNode));var FS=(e,o)=>{let t=new Map(e.map(i=>[i.path,0]));for(let i of o){if(!xi(i)||i.isExcluded)continue;let n=LS(t,i.path);n!==void 0&&t.set(n,t.get(n)+1)}return e.map(i=>et(ke({},i),{fileCount:t.get(i.path)})).sort((i,n)=>i.path.localeCompare(n.path))};function LS(e,o){let t=o;for(;t;){if(e.has(t))return t;let i=t.lastIndexOf("/");t=i>0?t.slice(0,i):""}}var l2=De(_p,Bi,FS);var c2=De(rs,e=>({leftColor:e.positive,middleColor:e.neutral,rightColor:e.negative}));var d2=De(Mo,dp,(e,o)=>({values:e.values,min:e.minValue,max:e.maxValue,from:o.from,to:o.to}));var ht=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(Yn),this.primaryMetricNames$=this.store.select(er),this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(Ds),this.selectedColorMetricData$=this.store.select(Mo),this.metricColorRangeColors$=this.store.select(c2),this.metricColorRangeValues$=this.store.select(d2),this.markedPackagesWithCounts$=this.store.select(l2),this.markableFolderPaths$=this.store.select(s2),this.hoveredNode$=this.store.select(Jn),this.selectedNode$=this.store.select(Kt),this.accumulatedData$=this.store.select(Et)}attributeTypeLabel$(t,i){return this.store.select(a2(t,i))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qe=(()=>{class e{constructor(t){this.store=t}setAreaMetric(t){this.store.dispatch(Mi({value:t}))}setHeightMetric(t){this.store.dispatch(ki({value:t}))}setColorMetric(t){this.store.dispatch(_t({value:t}))}setEdgeMetric(t){this.store.dispatch(Gt({value:t}))}setMargin(t){this.store.dispatch(zn({value:t}))}setInvertArea(t){this.store.dispatch(Bn({value:t}))}setEnableFloorLabels(t){this.store.dispatch(no({value:t}))}setScaling(t){this.store.dispatch(co({value:t}))}setInvertHeight(t){this.store.dispatch(Vn({value:t}))}setColorRange(t){this.store.dispatch(Ut({value:t}))}setColorMode(t){this.store.dispatch(Ei({value:t}))}setMapColors(t){this.store.dispatch(ai({value:t}))}invertColorRange(){this.store.dispatch(to())}invertDeltaColors(){this.store.dispatch(io())}setEdgeHeight(t){this.store.dispatch(oo({value:t}))}setAmountOfEdgePreviews(t){this.store.dispatch(Ci({value:t}))}toggleEdgeMetricVisible(){this.store.dispatch(Wn())}setShowIncomingEdges(t){this.store.dispatch(ho({value:t}))}setShowOutgoingEdges(t){this.store.dispatch(mo({value:t}))}setShowOnlyBuildingsWithEdges(t){this.store.dispatch($n({value:t}))}toggleIsHeightAndColorMetricLinked(){this.store.dispatch(bf())}markPackage(t){this.store.dispatch(xo({packages:[t]}))}unmarkPackage(t){this.store.dispatch(wo({path:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var h2=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.popoverId=Z.required(),this.anchorName=Z.required(),this.margin=A(this.mapStateReadWindow.margin$,{initialValue:0}),this.enableFloorLabels=A(this.mapStateReadWindow.enableFloorLabels$,{initialValue:!1}),this.isInvertedArea=A(this.mapStateReadWindow.invertArea$,{initialValue:!1}),this.resetKeys=["mapState.margin","mapState.invertArea","mapState.enableFloorLabels"]}setMargin(t){this.metricsBarWriteStore.setMargin(t)}setEnableFloorLabel(t){let i=t.target.checked;this.metricsBarWriteStore.setEnableFloorLabels(i)}toggleInvertingArea(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertArea(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-area-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:14,vars:8,consts:[[3,"popoverId","anchorName"],["title","Amount of space between buildings in percent"],[1,"text-sm"],["ariaLabel","Margin",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["tooltip","Reset area metric settings to their defaults","label","Reset area metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),g(3,"Margin"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.setMargin(a)}),v()(),x(5,"label",4)(6,"input",5),z("change",function(a){return n.setEnableFloorLabel(a)}),v(),x(7,"span"),g(8,"Enable Floor Labels"),v()(),x(9,"label",4)(10,"input",5),z("change",function(a){return n.toggleInvertingArea(a)}),v(),x(11,"span"),g(12,"Invert Area"),v()(),V(13,"cc-reset-settings-button",6),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),F("min",1)("max",100)("value",n.margin()),h(2),F("checked",n.enableFloorLabels()),h(4),F("checked",n.isInvertedArea()),h(3),F("settingsKeys",n.resetKeys))},dependencies:[ko,Di,qo],encapsulation:2,changeDetection:0})}}return e})();var Cr=(()=>{class e{constructor(){this.metricsBarReadStore=T(ht),this.metricsLensFacade=T(Zn),this.popoverId=Z.required(),this.anchorName=Z.required(),this.placeholder=Z("Search metric"),this.kind=Z("node"),this.selected=Z(null),this.metricSelected=_e(),this.metricData=A(this.metricsBarReadStore.metricData$,{initialValue:{nodeMetricData:[],edgeMetricData:[],nodeEdgeMetricsMap:new Map}}),this.descriptors=A(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.options=Y(()=>{let t=this.metricData();return this.kind()==="edge"?t.edgeMetricData:t.nodeMetricData})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-bar-select-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],placeholder:[1,"placeholder"],kind:[1,"kind"],selected:[1,"selected"]},outputs:{metricSelected:"metricSelected"},decls:1,vars:6,consts:[[3,"metricSelected","popoverId","anchorName","placeholder","options","descriptors","selected"]],template:function(i,n){i&1&&(x(0,"cc-metric-select-popover",0),z("metricSelected",function(a){return n.metricSelected.emit(a)}),v()),i&2&&F("popoverId",n.popoverId())("anchorName",n.anchorName())("placeholder",n.placeholder())("options",n.options())("descriptors",n.descriptors())("selected",n.selected())},dependencies:[Pf],encapsulation:2,changeDetection:0})}}return e})();var Mr=(()=>{class e{constructor(t,i,n){this.metricsBarReadStore=t,this.mapStateReadWindow=i,this.codeMapRenderService=n;let r=this.metricsBarReadStore.hoveredNode$,a=this.metricsBarReadStore.selectedNode$,s=this.createTopLevelNodeObservable();this.node$=St([r,a,s]).pipe(qe(([l,d,c])=>l??d??c),Va({bufferSize:1,refCount:!0}))}createNodeObservable(){return this.node$}createTopLevelNodeObservable(){return St([this.metricsBarReadStore.accumulatedData$,this.mapStateReadWindow.areaMetric$,this.mapStateReadWindow.heightMetric$]).pipe(Ae(([t])=>!!t.unifiedMapNode),qe(([t])=>this.findTopLevelNode(t)))}findTopLevelNode(t){let i=this.codeMapRenderService.getNodes(t.unifiedMapNode),n=this.codeMapRenderService.sortVisibleNodesByHeightDescending(i);if(n.length!==0)return n.reduce((r,a)=>r.attributes.unary>a.attributes.unary?r:a,n[0])}static{this.\u0275fac=function(i){return new(i||e)(E(ht),E(xe),E(Yr))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var _l=(()=>{class e{constructor(){this.nodeSelectionService=T(Mr),this.metricsBarReadStore=T(ht),this.metricFor=Z.required(),this.attributeType=Z("nodes"),this.node=A(this.nodeSelectionService.createNodeObservable()),this.isNodeALeaf=Y(()=>{let t=this.node();return t?"isLeaf"in t?t.isLeaf:xi(t):!1}),this.selectorInputs=Y(()=>({attributeType:this.attributeType(),metricFor:this.metricFor()})),this.attributeTypeLabel=A(Au(this.selectorInputs).pipe(Ht(({attributeType:t,metricFor:i})=>this.metricsBarReadStore.attributeTypeLabel$(t,i))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-chooser-type"]],inputs:{metricFor:[1,"metricFor"],attributeType:[1,"attributeType"]},decls:2,vars:2,consts:[[3,"hidden"]],template:function(i,n){i&1&&(y(0,"span",0),g(1),M()),i&2&&(ce("hidden",n.isNodeALeaf()),h(),ge(" ",n.attributeTypeLabel(),`
3514
- `))},encapsulation:2,changeDetection:0})}}return e})();function NS(e,o){if(e&1&&(x(0,"span",4),g(1),v()),e&2){let t=o;At(t.styleClass),h(),ge("\u0394",t.label)}}function PS(e,o){if(e&1&&(x(0,"span",2),V(1,"cc-metric-chooser-type",3),v(),x(2,"span",4),g(3),v(),K(4,NS,2,3,"span",5)),e&2){let t,i=o,n=B();h(),F("metricFor",n.metricFor()),h(2),Te(i.value),h(),Q((t=i.delta)?4:-1,t)}}function BS(e,o){e&1&&(x(0,"span",1),g(1,"\xA0"),v())}var El=(()=>{class e{constructor(){this.nodeSelectionService=T(Mr),this.metricsBarReadStore=T(ht),this.metricFor=Z.required(),this.node=A(this.nodeSelectionService.createNodeObservable()),this.primaryMetricNames=A(this.metricsBarReadStore.primaryMetricNames$),this.metricName=Y(()=>this.primaryMetricNames()?.[this.metricFor()]??null),this.display=Y(()=>VS(this.node(),this.metricName(),this.metricFor()))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-meta-value"]],inputs:{metricFor:[1,"metricFor"]},decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],["aria-hidden","true"],[1,"opacity-60"],[3,"metricFor"],[1,"font-medium"],[1,"font-medium",3,"class"]],template:function(i,n){if(i&1&&(x(0,"div",0),K(1,PS,5,3)(2,BS,2,0,"span",1),v()),i&2){let r;h(),Q((r=n.display())?1:2,r)}},dependencies:[_l],encapsulation:2,changeDetection:0})}}return e})();function VS(e,o,t){return!e||!o?null:{value:WS(e,o),delta:OS(e,o,t)}}function WS(e,o){let t=e.attributes?.[o];return typeof t=="number"?t.toLocaleString():"\u2014"}function OS(e,o,t){if(!("deltas"in e)||!e.deltas)return null;let i=e.deltas[o];return typeof i!="number"?null:{label:i.toLocaleString(),styleClass:zS(i,t)}}function zS(e,o){return o==="heightMetric"&&e>0?"text-success":e<0?"text-error":"text-base-content"}var $S=["*"],kl=(()=>{class e{constructor(){this.label=Z.required(),this.metricName=Z(""),this.metricFor=Z.required(),this.placeholder=Z(""),this.searchPopoverId=Z.required(),this.searchAnchorName=Z.required(),this.settingsPopoverId=Z.required(),this.settingsAnchorName=Z.required(),this.testIdPrefix=Z.required(),this.metricSelected=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],metricName:[1,"metricName"],metricFor:[1,"metricFor"],placeholder:[1,"placeholder"],searchPopoverId:[1,"searchPopoverId"],searchAnchorName:[1,"searchAnchorName"],settingsPopoverId:[1,"settingsPopoverId"],settingsAnchorName:[1,"settingsAnchorName"],testIdPrefix:[1,"testIdPrefix"]},outputs:{metricSelected:"metricSelected"},ngContentSelectors:$S,decls:5,vars:14,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],[3,"metricFor"],["kind","node",3,"metricSelected","popoverId","anchorName","placeholder","selected"]],template:function(i,n){i&1&&(uu(),x(0,"cc-axis-card",0)(1,"div",1),V(2,"cc-metric-meta-value",2),v()(),x(3,"cc-metric-bar-select-popover",3),z("metricSelected",function(a){return n.metricSelected.emit(a)}),v(),pu(4)),i&2&&(F("label",n.label())("metricName",n.metricName())("hasCog",!0)("cogPopoverId",n.settingsPopoverId())("cogAnchorName",n.settingsAnchorName())("searchPopoverId",n.searchPopoverId())("searchAnchorName",n.searchAnchorName())("testId",n.testIdPrefix())("cogTestId",n.testIdPrefix()+"-cog"),h(2),F("metricFor",n.metricFor()),h(),F("popoverId",n.searchPopoverId())("anchorName",n.searchAnchorName())("placeholder",n.placeholder())("selected",n.metricName()))},dependencies:[_o,El,Cr],encapsulation:2,changeDetection:0})}}return e})();var m2=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-area",this.searchAnchorName="metric-segment-area",this.settingsPopoverId="metric-settings-popover-area",this.settingsAnchorName="metric-segment-area-cog",this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.areaMetric=A(this.mapStateReadWindow.areaMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setAreaMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-area-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Area","metricFor","areaMetric","placeholder","Area Metric (highest value)","testIdPrefix","metric-segment-area",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(x(0,"cc-metric-segment",0),z("metricSelected",function(a){return n.handleMetricSelected(a)}),V(1,"cc-area-settings-popover",1),v()),i&2&&(F("metricName",n.areaMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[kl,h2],encapsulation:2,changeDetection:0})}}return e})();function jS(e,o){if(e&1&&(x(0,"span",3),g(1),v()),e&2){let t=B();h(),Te(t.count())}}var u2=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.mapColorFor=Z.required(),this.count=Z(null),this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=A(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=A(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=Y(()=>this.mapColors()[this.mapColorFor()])}handleColorChange(t){this.metricsBarWriteStore.setMapColors({[this.mapColorFor()]:t})}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(ht),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-band-row"]],inputs:{mapColorFor:[1,"mapColorFor"],count:[1,"count"]},decls:6,vars:9,consts:[[1,"flex","items-center","gap-2"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"cc-inline-color-picker",1),z("colorChange",function(a){return n.handleColorChange(a)}),v(),x(2,"span",2),g(3),pt(4,"mapColorLabel"),v(),K(5,jS,2,1,"span",3),v()),i&2&&(h(),F("hexColor",n.color())("ariaLabel","Recolor "+n.mapColorFor()),h(2),ge(" ",Ga(4,4,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric())," "),h(2),Q(n.count()!==null?5:-1))},dependencies:[Eo,Ml],encapsulation:2,changeDetection:0})}}return e})();function HS(e,o){if(e&1&&V(0,"cc-color-band-row",3)(1,"cc-color-band-row",4)(2,"cc-color-band-row",5),e&2){let t=B();F("count",t.colorCategoryCounts().positive),h(),F("count",t.colorCategoryCounts().neutral),h(),F("count",t.colorCategoryCounts().negative)}}function US(e,o){e&1&&V(0,"cc-color-band-row",6)(1,"cc-color-band-row",7)}var p2=(()=>{class e{constructor(t,i){this.fileStoreReadWindow=t,this.colorCategoryCountsStore=i,this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.colorCategoryCounts=A(this.colorCategoryCountsStore.colorCategoryCounts$,{initialValue:{positive:0,neutral:0,negative:0}})}static{this.\u0275fac=function(i){return new(i||e)(ne(Re),ne(or))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-bands-section"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","selected"],["mapColorFor","positive",3,"count"],["mapColorFor","neutral",3,"count"],["mapColorFor","negative",3,"count"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Bands"),v(),K(3,HS,3,3)(4,US,2,0),V(5,"cc-color-band-row",2),v()),i&2&&(h(3),Q(n.isDeltaState()?4:3))},dependencies:[u2],encapsulation:2,changeDetection:0})}}return e})();function ln(e,o){return e==null||o==null?NaN:e<o?-1:e>o?1:e>=o?0:NaN}function rh(e,o){return e==null||o==null?NaN:o<e?-1:o>e?1:o>=e?0:NaN}function ql(e){let o,t,i;e.length!==2?(o=ln,t=(s,l)=>ln(e(s),l),i=(s,l)=>e(s)-l):(o=e===ln||e===rh?e:GS,t=e,i=e);function n(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let m=d+c>>>1;t(s[m],l)<0?d=m+1:c=m}while(d<c)}return d}function r(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let m=d+c>>>1;t(s[m],l)<=0?d=m+1:c=m}while(d<c)}return d}function a(s,l,d=0,c=s.length){let m=n(s,l,d,c-1);return m>d&&i(s[m-1],l)>-i(s[m],l)?m-1:m}return{left:n,center:a,right:r}}function GS(){return 0}function ah(e){return e===null?NaN:+e}var f2=ql(ln),g2=f2.right,XS=f2.left,KS=ql(ah).center,sh=g2;function Tl(e,o){let t,i;if(o===void 0)for(let n of e)n!=null&&(t===void 0?n>=n&&(t=i=n):(t>n&&(t=n),i<n&&(i=n)));else{let n=-1;for(let r of e)(r=o(r,++n,e))!=null&&(t===void 0?r>=r&&(t=i=r):(t>r&&(t=r),i<r&&(i=r)))}return[t,i]}var QS=Math.sqrt(50),ZS=Math.sqrt(10),YS=Math.sqrt(2);function Rl(e,o,t){let i=(o-e)/Math.max(0,t),n=Math.floor(Math.log10(i)),r=i/Math.pow(10,n),a=r>=QS?10:r>=ZS?5:r>=YS?2:1,s,l,d;return n<0?(d=Math.pow(10,-n)/a,s=Math.round(e*d),l=Math.round(o*d),s/d<e&&++s,l/d>o&&--l,d=-d):(d=Math.pow(10,n)*a,s=Math.round(e/d),l=Math.round(o/d),s*d<e&&++s,l*d>o&&--l),l<s&&.5<=t&&t<2?Rl(e,o,t*2):[s,l,d]}function Il(e,o,t){if(o=+o,e=+e,t=+t,!(t>0))return[];if(e===o)return[e];let i=o<e,[n,r,a]=i?Rl(o,e,t):Rl(e,o,t);if(!(r>=n))return[];let s=r-n+1,l=new Array(s);if(i)if(a<0)for(let d=0;d<s;++d)l[d]=(r-d)/-a;else for(let d=0;d<s;++d)l[d]=(r-d)*a;else if(a<0)for(let d=0;d<s;++d)l[d]=(n+d)/-a;else for(let d=0;d<s;++d)l[d]=(n+d)*a;return l}function ea(e,o,t){return o=+o,e=+e,t=+t,Rl(e,o,t)[2]}function lh(e,o,t){o=+o,e=+e,t=+t;let i=o<e,n=i?ea(o,e,t):ea(e,o,t);return(i?-1:1)*(n<0?1/-n:n)}function ta(e,o){let t;if(o===void 0)for(let i of e)i!=null&&(t<i||t===void 0&&i>=i)&&(t=i);else{let i=-1;for(let n of e)(n=o(n,++i,e))!=null&&(t<n||t===void 0&&n>=n)&&(t=n)}return t}function b2(e){return e}var ch=1,dh=2,hh=3,ia=4,v2=1e-6;function JS(e){return"translate("+e+",0)"}function ey(e){return"translate(0,"+e+")"}function ty(e){return o=>+e(o)}function iy(e,o){return o=Math.max(0,e.bandwidth()-o*2)/2,e.round()&&(o=Math.round(o)),t=>+e(t)+o}function oy(){return!this.__axis}function x2(e,o){var t=[],i=null,n=null,r=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=e===ch||e===ia?-1:1,c=e===ia||e===dh?"x":"y",m=e===ch||e===hh?JS:ey;function u(p){var f=i??(o.ticks?o.ticks.apply(o,t):o.domain()),S=n??(o.tickFormat?o.tickFormat.apply(o,t):b2),R=Math.max(r,0)+s,L=o.range(),j=+L[0]+l,q=+L[L.length-1]+l,P=(o.bandwidth?iy:ty)(o.copy(),l),O=p.selection?p.selection():p,H=O.selectAll(".domain").data([null]),G=O.selectAll(".tick").data(f,o).order(),J=G.exit(),X=G.enter().append("g").attr("class","tick"),me=G.select("line"),Ie=G.select("text");H=H.merge(H.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(X),me=me.merge(X.append("line").attr("stroke","currentColor").attr(c+"2",d*r)),Ie=Ie.merge(X.append("text").attr("fill","currentColor").attr(c,d*R).attr("dy",e===ch?"0em":e===hh?"0.71em":"0.32em")),p!==O&&(H=H.transition(p),G=G.transition(p),me=me.transition(p),Ie=Ie.transition(p),J=J.transition(p).attr("opacity",v2).attr("transform",function($){return isFinite($=P($))?m($+l):this.getAttribute("transform")}),X.attr("opacity",v2).attr("transform",function($){var Ee=this.parentNode.__axis;return m((Ee&&isFinite(Ee=Ee($))?Ee:P($))+l)})),J.remove(),H.attr("d",e===ia||e===dh?a?"M"+d*a+","+j+"H"+l+"V"+q+"H"+d*a:"M"+l+","+j+"V"+q:a?"M"+j+","+d*a+"V"+l+"H"+q+"V"+d*a:"M"+j+","+l+"H"+q),G.attr("opacity",1).attr("transform",function($){return m(P($)+l)}),me.attr(c+"2",d*r),Ie.attr(c,d*R).text(S),O.filter(oy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===dh?"start":e===ia?"end":"middle"),O.each(function(){this.__axis=P})}return u.scale=function(p){return arguments.length?(o=p,u):o},u.ticks=function(){return t=Array.from(arguments),u},u.tickArguments=function(p){return arguments.length?(t=p==null?[]:Array.from(p),u):t.slice()},u.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),u):i&&i.slice()},u.tickFormat=function(p){return arguments.length?(n=p,u):n},u.tickSize=function(p){return arguments.length?(r=a=+p,u):r},u.tickSizeInner=function(p){return arguments.length?(r=+p,u):r},u.tickSizeOuter=function(p){return arguments.length?(a=+p,u):a},u.tickPadding=function(p){return arguments.length?(s=+p,u):s},u.offset=function(p){return arguments.length?(l=+p,u):l},u}function mh(e){return x2(hh,e)}function uh(e){return x2(ia,e)}var ny={value:()=>{}};function S2(){for(var e=0,o=arguments.length,t={},i;e<o;++e){if(!(i=arguments[e]+"")||i in t||/[\s.]/.test(i))throw new Error("illegal type: "+i);t[i]=[]}return new Dl(t)}function Dl(e){this._=e}function ry(e,o){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}})}Dl.prototype=S2.prototype={constructor:Dl,on:function(e,o){var t=this._,i=ry(e+"",t),n,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((n=(e=i[r]).type)&&(n=ay(t[n],e.name)))return n;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++r<a;)if(n=(e=i[r]).type)t[n]=w2(t[n],e.name,o);else if(o==null)for(n in t)t[n]=w2(t[n],e.name,null);return this},copy:function(){var e={},o=this._;for(var t in o)e[t]=o[t].slice();return new Dl(e)},call:function(e,o){if((n=arguments.length-2)>0)for(var t=new Array(n),i=0,n,r;i<n;++i)t[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,n=r.length;i<n;++i)r[i].value.apply(o,t)},apply:function(e,o,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,r=i.length;n<r;++n)i[n].value.apply(o,t)}};function ay(e,o){for(var t=0,i=e.length,n;t<i;++t)if((n=e[t]).name===o)return n.value}function w2(e,o,t){for(var i=0,n=e.length;i<n;++i)if(e[i].name===o){e[i]=ny,e=e.slice(0,i).concat(e.slice(i+1));break}return t!=null&&e.push({name:o,value:t}),e}var ph=S2;var Al="http://www.w3.org/1999/xhtml",fh={svg:"http://www.w3.org/2000/svg",xhtml:Al,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oi(e){var o=e+="",t=o.indexOf(":");return t>=0&&(o=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),fh.hasOwnProperty(o)?{space:fh[o],local:e}:e}function sy(e){return function(){var o=this.ownerDocument,t=this.namespaceURI;return t===Al&&o.documentElement.namespaceURI===Al?o.createElement(e):o.createElementNS(t,e)}}function ly(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fl(e){var o=Oi(e);return(o.local?ly:sy)(o)}function cy(){}function cn(e){return e==null?cy:function(){return this.querySelector(e)}}function y2(e){typeof e!="function"&&(e=cn(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=new Array(a),l,d,c=0;c<a;++c)(l=r[c])&&(d=e.call(l,l.__data__,c,r))&&("__data__"in l&&(d.__data__=l.__data__),s[c]=d);return new mt(i,this._parents)}function gh(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function dy(){return[]}function oa(e){return e==null?dy:function(){return this.querySelectorAll(e)}}function hy(e){return function(){return gh(e.apply(this,arguments))}}function C2(e){typeof e=="function"?e=hy(e):e=oa(e);for(var o=this._groups,t=o.length,i=[],n=[],r=0;r<t;++r)for(var a=o[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&(i.push(e.call(l,l.__data__,d,a)),n.push(l));return new mt(i,n)}function na(e){return function(){return this.matches(e)}}function Ll(e){return function(o){return o.matches(e)}}var my=Array.prototype.find;function uy(e){return function(){return my.call(this.children,e)}}function py(){return this.firstElementChild}function M2(e){return this.select(e==null?py:uy(typeof e=="function"?e:Ll(e)))}var fy=Array.prototype.filter;function gy(){return Array.from(this.children)}function by(e){return function(){return fy.call(this.children,e)}}function _2(e){return this.selectAll(e==null?gy:by(typeof e=="function"?e:Ll(e)))}function E2(e){typeof e!="function"&&(e=na(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new mt(i,this._parents)}function Nl(e){return new Array(e.length)}function k2(){return new mt(this._enter||this._groups.map(Nl),this._parents)}function ra(e,o){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=o}ra.prototype={constructor:ra,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,o){return this._parent.insertBefore(e,o)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function q2(e){return function(){return e}}function vy(e,o,t,i,n,r){for(var a=0,s,l=o.length,d=r.length;a<d;++a)(s=o[a])?(s.__data__=r[a],i[a]=s):t[a]=new ra(e,r[a]);for(;a<l;++a)(s=o[a])&&(n[a]=s)}function xy(e,o,t,i,n,r,a){var s,l,d=new Map,c=o.length,m=r.length,u=new Array(c),p;for(s=0;s<c;++s)(l=o[s])&&(u[s]=p=a.call(l,l.__data__,s,o)+"",d.has(p)?n[s]=l:d.set(p,l));for(s=0;s<m;++s)p=a.call(e,r[s],s,r)+"",(l=d.get(p))?(i[s]=l,l.__data__=r[s],d.delete(p)):t[s]=new ra(e,r[s]);for(s=0;s<c;++s)(l=o[s])&&d.get(u[s])===l&&(n[s]=l)}function wy(e){return e.__data__}function T2(e,o){if(!arguments.length)return Array.from(this,wy);var t=o?xy:vy,i=this._parents,n=this._groups;typeof e!="function"&&(e=q2(e));for(var r=n.length,a=new Array(r),s=new Array(r),l=new Array(r),d=0;d<r;++d){var c=i[d],m=n[d],u=m.length,p=Sy(e.call(c,c&&c.__data__,d,i)),f=p.length,S=s[d]=new Array(f),R=a[d]=new Array(f),L=l[d]=new Array(u);t(c,m,S,R,L,p,o);for(var j=0,q=0,P,O;j<f;++j)if(P=S[j]){for(j>=q&&(q=j+1);!(O=R[q])&&++q<f;);P._next=O||null}}return a=new mt(a,i),a._enter=s,a._exit=l,a}function Sy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function R2(){return new mt(this._exit||this._groups.map(Nl),this._parents)}function I2(e,o,t){var i=this.enter(),n=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(n=o(n),n&&(n=n.selection())),t==null?r.remove():t(r),i&&n?i.merge(n).order():n}function D2(e){for(var o=e.selection?e.selection():e,t=this._groups,i=o._groups,n=t.length,r=i.length,a=Math.min(n,r),s=new Array(n),l=0;l<a;++l)for(var d=t[l],c=i[l],m=d.length,u=s[l]=new Array(m),p,f=0;f<m;++f)(p=d[f]||c[f])&&(u[f]=p);for(;l<n;++l)s[l]=t[l];return new mt(s,this._parents)}function A2(){for(var e=this._groups,o=-1,t=e.length;++o<t;)for(var i=e[o],n=i.length-1,r=i[n],a;--n>=0;)(a=i[n])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function F2(e){e||(e=yy);function o(m,u){return m&&u?e(m.__data__,u.__data__):!m-!u}for(var t=this._groups,i=t.length,n=new Array(i),r=0;r<i;++r){for(var a=t[r],s=a.length,l=n[r]=new Array(s),d,c=0;c<s;++c)(d=a[c])&&(l[c]=d);l.sort(o)}return new mt(n,this._parents).order()}function yy(e,o){return e<o?-1:e>o?1:e>=o?0:NaN}function L2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function N2(){return Array.from(this)}function P2(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length;n<r;++n){var a=i[n];if(a)return a}return null}function B2(){let e=0;for(let o of this)++e;return e}function V2(){return!this.node()}function W2(e){for(var o=this._groups,t=0,i=o.length;t<i;++t)for(var n=o[t],r=0,a=n.length,s;r<a;++r)(s=n[r])&&e.call(s,s.__data__,r,n);return this}function Cy(e){return function(){this.removeAttribute(e)}}function My(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _y(e,o){return function(){this.setAttribute(e,o)}}function Ey(e,o){return function(){this.setAttributeNS(e.space,e.local,o)}}function ky(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function qy(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function O2(e,o){var t=Oi(e);if(arguments.length<2){var i=this.node();return t.local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}return this.each((o==null?t.local?My:Cy:typeof o=="function"?t.local?qy:ky:t.local?Ey:_y)(t,o))}function Pl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ty(e){return function(){this.style.removeProperty(e)}}function Ry(e,o,t){return function(){this.style.setProperty(e,o,t)}}function Iy(e,o,t){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,t)}}function z2(e,o,t){return arguments.length>1?this.each((o==null?Ty:typeof o=="function"?Iy:Ry)(e,o,t??"")):Fo(this.node(),e)}function Fo(e,o){return e.style.getPropertyValue(o)||Pl(e).getComputedStyle(e,null).getPropertyValue(o)}function Dy(e){return function(){delete this[e]}}function Ay(e,o){return function(){this[e]=o}}function Fy(e,o){return function(){var t=o.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function $2(e,o){return arguments.length>1?this.each((o==null?Dy:typeof o=="function"?Fy:Ay)(e,o)):this.node()[e]}function j2(e){return e.trim().split(/^|\s+/)}function bh(e){return e.classList||new H2(e)}function H2(e){this._node=e,this._names=j2(e.getAttribute("class")||"")}H2.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function U2(e,o){for(var t=bh(e),i=-1,n=o.length;++i<n;)t.add(o[i])}function G2(e,o){for(var t=bh(e),i=-1,n=o.length;++i<n;)t.remove(o[i])}function Ly(e){return function(){U2(this,e)}}function Ny(e){return function(){G2(this,e)}}function Py(e,o){return function(){(o.apply(this,arguments)?U2:G2)(this,e)}}function X2(e,o){var t=j2(e+"");if(arguments.length<2){for(var i=bh(this.node()),n=-1,r=t.length;++n<r;)if(!i.contains(t[n]))return!1;return!0}return this.each((typeof o=="function"?Py:o?Ly:Ny)(t,o))}function By(){this.textContent=""}function Vy(e){return function(){this.textContent=e}}function Wy(e){return function(){var o=e.apply(this,arguments);this.textContent=o??""}}function K2(e){return arguments.length?this.each(e==null?By:(typeof e=="function"?Wy:Vy)(e)):this.node().textContent}function Oy(){this.innerHTML=""}function zy(e){return function(){this.innerHTML=e}}function $y(e){return function(){var o=e.apply(this,arguments);this.innerHTML=o??""}}function Q2(e){return arguments.length?this.each(e==null?Oy:(typeof e=="function"?$y:zy)(e)):this.node().innerHTML}function jy(){this.nextSibling&&this.parentNode.appendChild(this)}function Z2(){return this.each(jy)}function Hy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y2(){return this.each(Hy)}function J2(e){var o=typeof e=="function"?e:Fl(e);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function Uy(){return null}function eb(e,o){var t=typeof e=="function"?e:Fl(e),i=o==null?Uy:typeof o=="function"?o:cn(o);return this.select(function(){return this.insertBefore(t.apply(this,arguments),i.apply(this,arguments)||null)})}function Gy(){var e=this.parentNode;e&&e.removeChild(this)}function tb(){return this.each(Gy)}function Xy(){var e=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function Ky(){var e=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function ib(e){return this.select(e?Ky:Xy)}function ob(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Qy(e){return function(o){e.call(this,o,this.__data__)}}function Zy(e){return e.trim().split(/^|\s+/).map(function(o){var t="",i=o.indexOf(".");return i>=0&&(t=o.slice(i+1),o=o.slice(0,i)),{type:o,name:t}})}function Yy(e){return function(){var o=this.__on;if(o){for(var t=0,i=-1,n=o.length,r;t<n;++t)r=o[t],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):o[++i]=r;++i?o.length=i:delete this.__on}}}function Jy(e,o,t){return function(){var i=this.__on,n,r=Qy(o);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=t),n.value=o;return}}this.addEventListener(e.type,r,t),n={type:e.type,name:e.name,value:o,listener:r,options:t},i?i.push(n):this.__on=[n]}}function nb(e,o,t){var i=Zy(e+""),n,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,d=s.length,c;l<d;++l)for(n=0,c=s[l];n<r;++n)if((a=i[n]).type===c.type&&a.name===c.name)return c.value}return}for(s=o?Jy:Yy,n=0;n<r;++n)this.each(s(i[n],o,t));return this}function rb(e,o,t){var i=Pl(e),n=i.CustomEvent;typeof n=="function"?n=new n(o,t):(n=i.document.createEvent("Event"),t?(n.initEvent(o,t.bubbles,t.cancelable),n.detail=t.detail):n.initEvent(o,!1,!1)),e.dispatchEvent(n)}function e6(e,o){return function(){return rb(this,e,o)}}function t6(e,o){return function(){return rb(this,e,o.apply(this,arguments))}}function ab(e,o){return this.each((typeof o=="function"?t6:e6)(e,o))}function*sb(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length,a;n<r;++n)(a=i[n])&&(yield a)}var vh=[null];function mt(e,o){this._groups=e,this._parents=o}function lb(){return new mt([[document.documentElement]],vh)}function i6(){return this}mt.prototype=lb.prototype={constructor:mt,select:y2,selectAll:C2,selectChild:M2,selectChildren:_2,filter:E2,data:T2,enter:k2,exit:R2,join:I2,merge:D2,selection:i6,order:A2,sort:F2,call:L2,nodes:N2,node:P2,size:B2,empty:V2,each:W2,attr:O2,style:z2,property:$2,classed:X2,text:K2,html:Q2,raise:Z2,lower:Y2,append:J2,insert:eb,remove:tb,clone:ib,datum:ob,on:nb,dispatch:ab,[Symbol.iterator]:sb};var zi=lb;function xh(e){return typeof e=="string"?new mt([[document.querySelector(e)]],[document.documentElement]):new mt([[e]],vh)}function cb(e){let o;for(;o=e.sourceEvent;)e=o;return e}function wh(e,o){if(e=cb(e),o===void 0&&(o=e.currentTarget),o){var t=o.ownerSVGElement||o;if(t.createSVGPoint){var i=t.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var n=o.getBoundingClientRect();return[e.clientX-n.left-o.clientLeft,e.clientY-n.top-o.clientTop]}}return[e.pageX,e.pageY]}function Bl(e,o,t){e.prototype=o.prototype=t,t.constructor=e}function Sh(e,o){var t=Object.create(e.prototype);for(var i in o)t[i]=o[i];return t}function la(){}var aa=.7,Ol=1/aa,_r="\\s*([+-]?\\d+)\\s*",sa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o6=/^#([0-9a-f]{3,8})$/,n6=new RegExp(`^rgb\\(${_r},${_r},${_r}\\)$`),r6=new RegExp(`^rgb\\(${Fi},${Fi},${Fi}\\)$`),a6=new RegExp(`^rgba\\(${_r},${_r},${_r},${sa}\\)$`),s6=new RegExp(`^rgba\\(${Fi},${Fi},${Fi},${sa}\\)$`),l6=new RegExp(`^hsl\\(${sa},${Fi},${Fi}\\)$`),c6=new RegExp(`^hsla\\(${sa},${Fi},${Fi},${sa}\\)$`),db={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Bl(la,hi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hb,formatHex:hb,formatHex8:d6,formatHsl:h6,formatRgb:mb,toString:mb});function hb(){return this.rgb().formatHex()}function d6(){return this.rgb().formatHex8()}function h6(){return vb(this).formatHsl()}function mb(){return this.rgb().formatRgb()}function hi(e){var o,t;return e=(e+"").trim().toLowerCase(),(o=o6.exec(e))?(t=o[1].length,o=parseInt(o[1],16),t===6?ub(o):t===3?new Wt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):t===8?Vl(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):t===4?Vl(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=n6.exec(e))?new Wt(o[1],o[2],o[3],1):(o=r6.exec(e))?new Wt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=a6.exec(e))?Vl(o[1],o[2],o[3],o[4]):(o=s6.exec(e))?Vl(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=l6.exec(e))?gb(o[1],o[2]/100,o[3]/100,1):(o=c6.exec(e))?gb(o[1],o[2]/100,o[3]/100,o[4]):db.hasOwnProperty(e)?ub(db[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function ub(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function Vl(e,o,t,i){return i<=0&&(e=o=t=NaN),new Wt(e,o,t,i)}function m6(e){return e instanceof la||(e=hi(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function Er(e,o,t,i){return arguments.length===1?m6(e):new Wt(e,o,t,i??1)}function Wt(e,o,t,i){this.r=+e,this.g=+o,this.b=+t,this.opacity=+i}Bl(Wt,Er,Sh(la,{brighter(e){return e=e==null?Ol:Math.pow(Ol,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?aa:Math.pow(aa,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(hn(this.r),hn(this.g),hn(this.b),zl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pb,formatHex:pb,formatHex8:u6,formatRgb:fb,toString:fb}));function pb(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function u6(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function fb(){let e=zl(this.opacity);return`${e===1?"rgb(":"rgba("}${hn(this.r)}, ${hn(this.g)}, ${hn(this.b)}${e===1?")":`, ${e})`}`}function zl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dn(e){return e=hn(e),(e<16?"0":"")+e.toString(16)}function gb(e,o,t,i){return i<=0?e=o=t=NaN:t<=0||t>=1?e=o=NaN:o<=0&&(e=NaN),new di(e,o,t,i)}function vb(e){if(e instanceof di)return new di(e.h,e.s,e.l,e.opacity);if(e instanceof la||(e=hi(e)),!e)return new di;if(e instanceof di)return e;e=e.rgb();var o=e.r/255,t=e.g/255,i=e.b/255,n=Math.min(o,t,i),r=Math.max(o,t,i),a=NaN,s=r-n,l=(r+n)/2;return s?(o===r?a=(t-i)/s+(t<i)*6:t===r?a=(i-o)/s+2:a=(o-t)/s+4,s/=l<.5?r+n:2-r-n,a*=60):s=l>0&&l<1?0:a,new di(a,s,l,e.opacity)}function xb(e,o,t,i){return arguments.length===1?vb(e):new di(e,o,t,i??1)}function di(e,o,t,i){this.h=+e,this.s=+o,this.l=+t,this.opacity=+i}Bl(di,xb,Sh(la,{brighter(e){return e=e==null?Ol:Math.pow(Ol,e),new di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?aa:Math.pow(aa,e),new di(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*o,n=2*t-i;return new Wt(yh(e>=240?e-240:e+120,n,i),yh(e,n,i),yh(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new di(bb(this.h),Wl(this.s),Wl(this.l),zl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=zl(this.opacity);return`${e===1?"hsl(":"hsla("}${bb(this.h)}, ${Wl(this.s)*100}%, ${Wl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bb(e){return e=(e||0)%360,e<0?e+360:e}function Wl(e){return Math.max(0,Math.min(1,e||0))}function yh(e,o,t){return(e<60?o+(t-o)*e/60:e<180?t:e<240?o+(t-o)*(240-e)/60:o)*255}function Ch(e,o,t,i,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*o+(4-6*r+3*a)*t+(1+3*e+3*r-3*a)*i+a*n)/6}function wb(e){var o=e.length-1;return function(t){var i=t<=0?t=0:t>=1?(t=1,o-1):Math.floor(t*o),n=e[i],r=e[i+1],a=i>0?e[i-1]:2*n-r,s=i<o-1?e[i+2]:2*r-n;return Ch((t-i/o)*o,a,n,r,s)}}function Sb(e){var o=e.length;return function(t){var i=Math.floor(((t%=1)<0?++t:t)*o),n=e[(i+o-1)%o],r=e[i%o],a=e[(i+1)%o],s=e[(i+2)%o];return Ch((t-i/o)*o,n,r,a,s)}}var ca=e=>()=>e;function p6(e,o){return function(t){return e+t*o}}function f6(e,o,t){return e=Math.pow(e,t),o=Math.pow(o,t)-e,t=1/t,function(i){return Math.pow(e+i*o,t)}}function yb(e){return(e=+e)==1?$l:function(o,t){return t-o?f6(o,t,e):ca(isNaN(o)?t:o)}}function $l(e,o){var t=o-e;return t?p6(e,t):ca(isNaN(e)?o:e)}var mn=(function e(o){var t=yb(o);function i(n,r){var a=t((n=Er(n)).r,(r=Er(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),d=$l(n.opacity,r.opacity);return function(c){return n.r=a(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return i.gamma=e,i})(1);function Cb(e){return function(o){var t=o.length,i=new Array(t),n=new Array(t),r=new Array(t),a,s;for(a=0;a<t;++a)s=Er(o[a]),i[a]=s.r||0,n[a]=s.g||0,r[a]=s.b||0;return i=e(i),n=e(n),r=e(r),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=r(l),s+""}}}var g6=Cb(wb),b6=Cb(Sb);function Mb(e,o){o||(o=[]);var t=e?Math.min(o.length,e.length):0,i=o.slice(),n;return function(r){for(n=0;n<t;++n)i[n]=e[n]*(1-r)+o[n]*r;return i}}function _b(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Eb(e,o){var t=o?o.length:0,i=e?Math.min(t,e.length):0,n=new Array(i),r=new Array(t),a;for(a=0;a<i;++a)n[a]=un(e[a],o[a]);for(;a<t;++a)r[a]=o[a];return function(s){for(a=0;a<i;++a)r[a]=n[a](s);return r}}function kb(e,o){var t=new Date;return e=+e,o=+o,function(i){return t.setTime(e*(1-i)+o*i),t}}function yt(e,o){return e=+e,o=+o,function(t){return e*(1-t)+o*t}}function qb(e,o){var t={},i={},n;(e===null||typeof e!="object")&&(e={}),(o===null||typeof o!="object")&&(o={});for(n in o)n in e?t[n]=un(e[n],o[n]):i[n]=o[n];return function(r){for(n in t)i[n]=t[n](r);return i}}var _h=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mh=new RegExp(_h.source,"g");function v6(e){return function(){return e}}function x6(e){return function(o){return e(o)+""}}function da(e,o){var t=_h.lastIndex=Mh.lastIndex=0,i,n,r,a=-1,s=[],l=[];for(e=e+"",o=o+"";(i=_h.exec(e))&&(n=Mh.exec(o));)(r=n.index)>t&&(r=o.slice(t,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:yt(i,n)})),t=Mh.lastIndex;return t<o.length&&(r=o.slice(t),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?x6(l[0].x):v6(o):(o=l.length,function(d){for(var c=0,m;c<o;++c)s[(m=l[c]).i]=m.x(d);return s.join("")})}function un(e,o){var t=typeof o,i;return o==null||t==="boolean"?ca(o):(t==="number"?yt:t==="string"?(i=hi(o))?(o=i,mn):da:o instanceof hi?mn:o instanceof Date?kb:_b(o)?Mb:Array.isArray(o)?Eb:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?qb:yt)(e,o)}function Eh(e,o){return e=+e,o=+o,function(t){return Math.round(e*(1-t)+o*t)}}var Tb=180/Math.PI,jl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kh(e,o,t,i,n,r){var a,s,l;return(a=Math.sqrt(e*e+o*o))&&(e/=a,o/=a),(l=e*t+o*i)&&(t-=e*l,i-=o*l),(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s,l/=s),e*i<o*t&&(e=-e,o=-o,l=-l,a=-a),{translateX:n,translateY:r,rotate:Math.atan2(o,e)*Tb,skewX:Math.atan(l)*Tb,scaleX:a,scaleY:s}}var Hl;function Rb(e){let o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return o.isIdentity?jl:kh(o.a,o.b,o.c,o.d,o.e,o.f)}function Ib(e){return e==null?jl:(Hl||(Hl=document.createElementNS("http://www.w3.org/2000/svg","g")),Hl.setAttribute("transform",e),(e=Hl.transform.baseVal.consolidate())?(e=e.matrix,kh(e.a,e.b,e.c,e.d,e.e,e.f)):jl)}function Db(e,o,t,i){function n(d){return d.length?d.pop()+" ":""}function r(d,c,m,u,p,f){if(d!==m||c!==u){var S=p.push("translate(",null,o,null,t);f.push({i:S-4,x:yt(d,m)},{i:S-2,x:yt(c,u)})}else(m||u)&&p.push("translate("+m+o+u+t)}function a(d,c,m,u){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),u.push({i:m.push(n(m)+"rotate(",null,i)-2,x:yt(d,c)})):c&&m.push(n(m)+"rotate("+c+i)}function s(d,c,m,u){d!==c?u.push({i:m.push(n(m)+"skewX(",null,i)-2,x:yt(d,c)}):c&&m.push(n(m)+"skewX("+c+i)}function l(d,c,m,u,p,f){if(d!==m||c!==u){var S=p.push(n(p)+"scale(",null,",",null,")");f.push({i:S-4,x:yt(d,m)},{i:S-2,x:yt(c,u)})}else(m!==1||u!==1)&&p.push(n(p)+"scale("+m+","+u+")")}return function(d,c){var m=[],u=[];return d=e(d),c=e(c),r(d.translateX,d.translateY,c.translateX,c.translateY,m,u),a(d.rotate,c.rotate,m,u),s(d.skewX,c.skewX,m,u),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,m,u),d=c=null,function(p){for(var f=-1,S=u.length,R;++f<S;)m[(R=u[f]).i]=R.x(p);return m.join("")}}}var qh=Db(Rb,"px, ","px)","deg)"),Th=Db(Ib,", ",")",")");var kr=0,ma=0,ha=0,Fb=1e3,Ul,ua,Gl=0,pn=0,Xl=0,pa=typeof performance=="object"&&performance.now?performance:Date,Lb=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ga(){return pn||(Lb(w6),pn=pa.now()+Xl)}function w6(){pn=0}function fa(){this._call=this._time=this._next=null}fa.prototype=Kl.prototype={constructor:fa,restart:function(e,o,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?ga():+t)+(o==null?0:+o),!this._next&&ua!==this&&(ua?ua._next=this:Ul=this,ua=this),this._call=e,this._time=t,Rh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rh())}};function Kl(e,o,t){var i=new fa;return i.restart(e,o,t),i}function Nb(){ga(),++kr;for(var e=Ul,o;e;)(o=pn-e._time)>=0&&e._call.call(void 0,o),e=e._next;--kr}function Ab(){pn=(Gl=pa.now())+Xl,kr=ma=0;try{Nb()}finally{kr=0,y6(),pn=0}}function S6(){var e=pa.now(),o=e-Gl;o>Fb&&(Xl-=o,Gl=e)}function y6(){for(var e,o=Ul,t,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:Ul=t);ua=e,Rh(i)}function Rh(e){if(!kr){ma&&(ma=clearTimeout(ma));var o=e-pn;o>24?(e<1/0&&(ma=setTimeout(Ab,e-pa.now()-Xl)),ha&&(ha=clearInterval(ha))):(ha||(Gl=pa.now(),ha=setInterval(S6,Fb)),kr=1,Lb(Ab))}}function Ql(e,o,t){var i=new fa;return o=o==null?0:+o,i.restart(n=>{i.stop(),e(n+o)},o,t),i}var C6=ph("start","end","cancel","interrupt"),M6=[],Vb=0,Pb=1,Yl=2,Zl=3,Bb=4,Jl=5,ba=6;function Lo(e,o,t,i,n,r){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;_6(e,t,{name:o,index:i,group:n,on:C6,tween:M6,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Vb})}function va(e,o){var t=bt(e,o);if(t.state>Vb)throw new Error("too late; already scheduled");return t}function Ct(e,o){var t=bt(e,o);if(t.state>Zl)throw new Error("too late; already running");return t}function bt(e,o){var t=e.__transition;if(!t||!(t=t[o]))throw new Error("transition not found");return t}function _6(e,o,t){var i=e.__transition,n;i[o]=t,t.timer=Kl(r,0,t.time);function r(d){t.state=Pb,t.timer.restart(a,t.delay,t.time),t.delay<=d&&a(d-t.delay)}function a(d){var c,m,u,p;if(t.state!==Pb)return l();for(c in i)if(p=i[c],p.name===t.name){if(p.state===Zl)return Ql(a);p.state===Bb?(p.state=ba,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[c]):+c<o&&(p.state=ba,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[c])}if(Ql(function(){t.state===Zl&&(t.state=Bb,t.timer.restart(s,t.delay,t.time),s(d))}),t.state=Yl,t.on.call("start",e,e.__data__,t.index,t.group),t.state===Yl){for(t.state=Zl,n=new Array(u=t.tween.length),c=0,m=-1;c<u;++c)(p=t.tween[c].value.call(e,e.__data__,t.index,t.group))&&(n[++m]=p);n.length=m+1}}function s(d){for(var c=d<t.duration?t.ease.call(null,d/t.duration):(t.timer.restart(l),t.state=Jl,1),m=-1,u=n.length;++m<u;)n[m].call(e,c);t.state===Jl&&(t.on.call("end",e,e.__data__,t.index,t.group),l())}function l(){t.state=ba,t.timer.stop(),delete i[o];for(var d in i)return;delete e.__transition}}function ec(e,o){var t=e.__transition,i,n,r=!0,a;if(t){o=o==null?null:o+"";for(a in t){if((i=t[a]).name!==o){r=!1;continue}n=i.state>Yl&&i.state<Jl,i.state=ba,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete t[a]}r&&delete e.__transition}}function Wb(e){return this.each(function(){ec(this,e)})}function E6(e,o){var t,i;return function(){var n=Ct(this,e),r=n.tween;if(r!==t){i=t=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===o){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function k6(e,o,t){var i,n;if(typeof t!="function")throw new Error;return function(){var r=Ct(this,e),a=r.tween;if(a!==i){n=(i=a).slice();for(var s={name:o,value:t},l=0,d=n.length;l<d;++l)if(n[l].name===o){n[l]=s;break}l===d&&n.push(s)}r.tween=n}}function Ob(e,o){var t=this._id;if(e+="",arguments.length<2){for(var i=bt(this.node(),t).tween,n=0,r=i.length,a;n<r;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((o==null?E6:k6)(t,e,o))}function qr(e,o,t){var i=e._id;return e.each(function(){var n=Ct(this,i);(n.value||(n.value={}))[o]=t.apply(this,arguments)}),function(n){return bt(n,i).value[o]}}function tc(e,o){var t;return(typeof o=="number"?yt:o instanceof hi?mn:(t=hi(o))?(o=t,mn):da)(e,o)}function q6(e){return function(){this.removeAttribute(e)}}function T6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function R6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttribute(e);return a===n?null:a===i?r:r=o(i=a,t)}}function I6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?r:r=o(i=a,t)}}function D6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function A6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function zb(e,o){var t=Oi(e),i=t==="transform"?Th:tc;return this.attrTween(e,typeof o=="function"?(t.local?A6:D6)(t,i,qr(this,"attr."+e,o)):o==null?(t.local?T6:q6)(t):(t.local?I6:R6)(t,i,o))}function F6(e,o){return function(t){this.setAttribute(e,o.call(this,t))}}function L6(e,o){return function(t){this.setAttributeNS(e.space,e.local,o.call(this,t))}}function N6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&L6(e,r)),t}return n._value=o,n}function P6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&F6(e,r)),t}return n._value=o,n}function $b(e,o){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(o==null)return this.tween(t,null);if(typeof o!="function")throw new Error;var i=Oi(e);return this.tween(t,(i.local?N6:P6)(i,o))}function B6(e,o){return function(){va(this,e).delay=+o.apply(this,arguments)}}function V6(e,o){return o=+o,function(){va(this,e).delay=o}}function jb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?B6:V6)(o,e)):bt(this.node(),o).delay}function W6(e,o){return function(){Ct(this,e).duration=+o.apply(this,arguments)}}function O6(e,o){return o=+o,function(){Ct(this,e).duration=o}}function Hb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?W6:O6)(o,e)):bt(this.node(),o).duration}function z6(e,o){if(typeof o!="function")throw new Error;return function(){Ct(this,e).ease=o}}function Ub(e){var o=this._id;return arguments.length?this.each(z6(o,e)):bt(this.node(),o).ease}function $6(e,o){return function(){var t=o.apply(this,arguments);if(typeof t!="function")throw new Error;Ct(this,e).ease=t}}function Gb(e){if(typeof e!="function")throw new Error;return this.each($6(this._id,e))}function Xb(e){typeof e!="function"&&(e=na(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new Lt(i,this._parents,this._name,this._id)}function Kb(e){if(e._id!==this._id)throw new Error;for(var o=this._groups,t=e._groups,i=o.length,n=t.length,r=Math.min(i,n),a=new Array(i),s=0;s<r;++s)for(var l=o[s],d=t[s],c=l.length,m=a[s]=new Array(c),u,p=0;p<c;++p)(u=l[p]||d[p])&&(m[p]=u);for(;s<i;++s)a[s]=o[s];return new Lt(a,this._parents,this._name,this._id)}function j6(e){return(e+"").trim().split(/^|\s+/).every(function(o){var t=o.indexOf(".");return t>=0&&(o=o.slice(0,t)),!o||o==="start"})}function H6(e,o,t){var i,n,r=j6(o)?va:Ct;return function(){var a=r(this,e),s=a.on;s!==i&&(n=(i=s).copy()).on(o,t),a.on=n}}function Qb(e,o){var t=this._id;return arguments.length<2?bt(this.node(),t).on.on(e):this.each(H6(t,e,o))}function U6(e){return function(){var o=this.parentNode;for(var t in this.__transition)if(+t!==e)return;o&&o.removeChild(this)}}function Zb(){return this.on("end.remove",U6(this._id))}function Yb(e){var o=this._name,t=this._id;typeof e!="function"&&(e=cn(e));for(var i=this._groups,n=i.length,r=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,d=r[a]=new Array(l),c,m,u=0;u<l;++u)(c=s[u])&&(m=e.call(c,c.__data__,u,s))&&("__data__"in c&&(m.__data__=c.__data__),d[u]=m,Lo(d[u],o,t,u,d,bt(c,t)));return new Lt(r,this._parents,o,t)}function Jb(e){var o=this._name,t=this._id;typeof e!="function"&&(e=oa(e));for(var i=this._groups,n=i.length,r=[],a=[],s=0;s<n;++s)for(var l=i[s],d=l.length,c,m=0;m<d;++m)if(c=l[m]){for(var u=e.call(c,c.__data__,m,l),p,f=bt(c,t),S=0,R=u.length;S<R;++S)(p=u[S])&&Lo(p,o,t,S,u,f);r.push(u),a.push(c)}return new Lt(r,a,o,t)}var G6=zi.prototype.constructor;function e3(){return new G6(this._groups,this._parents)}function X6(e,o){var t,i,n;return function(){var r=Fo(this,e),a=(this.style.removeProperty(e),Fo(this,e));return r===a?null:r===t&&a===i?n:n=o(t=r,i=a)}}function t3(e){return function(){this.style.removeProperty(e)}}function K6(e,o,t){var i,n=t+"",r;return function(){var a=Fo(this,e);return a===n?null:a===i?r:r=o(i=a,t)}}function Q6(e,o,t){var i,n,r;return function(){var a=Fo(this,e),s=t(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Fo(this,e))),a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s))}}function Z6(e,o){var t,i,n,r="style."+o,a="end."+r,s;return function(){var l=Ct(this,e),d=l.on,c=l.value[r]==null?s||(s=t3(o)):void 0;(d!==t||n!==c)&&(i=(t=d).copy()).on(a,n=c),l.on=i}}function i3(e,o,t){var i=(e+="")=="transform"?qh:tc;return o==null?this.styleTween(e,X6(e,i)).on("end.style."+e,t3(e)):typeof o=="function"?this.styleTween(e,Q6(e,i,qr(this,"style."+e,o))).each(Z6(this._id,e)):this.styleTween(e,K6(e,i,o),t).on("end.style."+e,null)}function Y6(e,o,t){return function(i){this.style.setProperty(e,o.call(this,i),t)}}function J6(e,o,t){var i,n;function r(){var a=o.apply(this,arguments);return a!==n&&(i=(n=a)&&Y6(e,a,t)),i}return r._value=o,r}function o3(e,o,t){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,J6(e,o,t??""))}function e8(e){return function(){this.textContent=e}}function t8(e){return function(){var o=e(this);this.textContent=o??""}}function n3(e){return this.tween("text",typeof e=="function"?t8(qr(this,"text",e)):e8(e==null?"":e+""))}function i8(e){return function(o){this.textContent=e.call(this,o)}}function o8(e){var o,t;function i(){var n=e.apply(this,arguments);return n!==t&&(o=(t=n)&&i8(n)),o}return i._value=e,i}function r3(e){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,o8(e))}function a3(){for(var e=this._name,o=this._id,t=ic(),i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)if(l=a[d]){var c=bt(l,o);Lo(l,e,t,d,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Lt(i,this._parents,e,t)}function s3(){var e,o,t=this,i=t._id,n=t.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--n===0&&r()}};t.each(function(){var d=Ct(this,i),c=d.on;c!==e&&(o=(e=c).copy(),o._.cancel.push(s),o._.interrupt.push(s),o._.end.push(l)),d.on=o}),n===0&&r()})}var n8=0;function Lt(e,o,t,i){this._groups=e,this._parents=o,this._name=t,this._id=i}function l3(e){return zi().transition(e)}function ic(){return++n8}var $i=zi.prototype;Lt.prototype=l3.prototype={constructor:Lt,select:Yb,selectAll:Jb,selectChild:$i.selectChild,selectChildren:$i.selectChildren,filter:Xb,merge:Kb,selection:e3,transition:a3,call:$i.call,nodes:$i.nodes,node:$i.node,size:$i.size,empty:$i.empty,each:$i.each,on:Qb,attr:zb,attrTween:$b,style:i3,styleTween:o3,text:n3,textTween:r3,remove:Zb,tween:Ob,delay:jb,duration:Hb,ease:Ub,easeVarying:Gb,end:s3,[Symbol.iterator]:$i[Symbol.iterator]};function oc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var r8={time:null,delay:0,duration:250,ease:oc};function a8(e,o){for(var t;!(t=e.__transition)||!(t=t[o]);)if(!(e=e.parentNode))throw new Error(`transition ${o} not found`);return t}function c3(e){var o,t;e instanceof Lt?(o=e._id,e=e._name):(o=ic(),(t=r8).time=ga(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&Lo(l,e,o,d,a,t||a8(l,o));return new Lt(i,this._parents,e,o)}zi.prototype.interrupt=Wb;zi.prototype.transition=c3;var{abs:pz,max:fz,min:gz}=Math;function d3(e){return[+e[0],+e[1]]}function s8(e){return[d3(e[0]),d3(e[1])]}var bz={name:"x",handles:["w","e"].map(Ih),input:function(e,o){return e==null?null:[[+e[0],o[0][1]],[+e[1],o[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},vz={name:"y",handles:["n","s"].map(Ih),input:function(e,o){return e==null?null:[[o[0][0],+e[0]],[o[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},xz={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ih),input:function(e){return e==null?null:s8(e)},output:function(e){return e}};function Ih(e){return{type:e}}var Dh=Math.PI,Ah=2*Dh,fn=1e-6,l8=Ah-fn;function h3(e){this._+=e[0];for(let o=1,t=e.length;o<t;++o)this._+=arguments[o]+e[o]}function c8(e){let o=Math.floor(e);if(!(o>=0))throw new Error(`invalid digits: ${e}`);if(o>15)return h3;let t=10**o;return function(i){this._+=i[0];for(let n=1,r=i.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+i[n]}}var gn=class{constructor(o){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=o==null?h3:c8(o)}moveTo(o,t){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(o,t){this._append`L${this._x1=+o},${this._y1=+t}`}quadraticCurveTo(o,t,i,n){this._append`Q${+o},${+t},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(o,t,i,n,r,a){this._append`C${+o},${+t},${+i},${+n},${this._x1=+r},${this._y1=+a}`}arcTo(o,t,i,n,r){if(o=+o,t=+t,i=+i,n=+n,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=i-o,d=n-t,c=a-o,m=s-t,u=c*c+m*m;if(this._x1===null)this._append`M${this._x1=o},${this._y1=t}`;else if(u>fn)if(!(Math.abs(m*l-d*c)>fn)||!r)this._append`L${this._x1=o},${this._y1=t}`;else{let p=i-a,f=n-s,S=l*l+d*d,R=p*p+f*f,L=Math.sqrt(S),j=Math.sqrt(u),q=r*Math.tan((Dh-Math.acos((S+u-R)/(2*L*j)))/2),P=q/j,O=q/L;Math.abs(P-1)>fn&&this._append`L${o+P*c},${t+P*m}`,this._append`A${r},${r},0,0,${+(m*p>c*f)},${this._x1=o+O*l},${this._y1=t+O*d}`}}arc(o,t,i,n,r,a){if(o=+o,t=+t,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),d=o+s,c=t+l,m=1^a,u=a?n-r:r-n;this._x1===null?this._append`M${d},${c}`:(Math.abs(this._x1-d)>fn||Math.abs(this._y1-c)>fn)&&this._append`L${d},${c}`,i&&(u<0&&(u=u%Ah+Ah),u>l8?this._append`A${i},${i},0,1,${m},${o-s},${t-l}A${i},${i},0,1,${m},${this._x1=d},${this._y1=c}`:u>fn&&this._append`A${i},${i},0,${+(u>=Dh)},${m},${this._x1=o+i*Math.cos(r)},${this._y1=t+i*Math.sin(r)}`)}rect(o,t,i,n){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function m3(){return new gn}m3.prototype=gn.prototype;function u3(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function bn(e,o){if(!isFinite(e)||e===0)return null;var t=(e=o?e.toExponential(o-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function Li(e){return e=bn(Math.abs(e)),e?e[1]:NaN}function p3(e,o){return function(t,i){for(var n=t.length,r=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return r.reverse().join(o)}}function f3(e){return function(o){return o.replace(/[0-9]/g,function(t){return e[+t]})}}var d8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function No(e){if(!(o=d8.exec(e)))throw new Error("invalid format: "+e);var o;return new nc({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}No.prototype=nc.prototype;function nc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}nc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function g3(e){e:for(var o=e.length,t=1,i=-1,n;t<o;++t)switch(e[t]){case".":i=n=t;break;case"0":i===0&&(i=t),n=t;break;default:if(!+e[t])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var xa;function b3(e,o){var t=bn(e,o);if(!t)return xa=void 0,e.toPrecision(o);var i=t[0],n=t[1],r=n-(xa=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+bn(e,Math.max(0,o+r-1))[0]}function Fh(e,o){var t=bn(e,o);if(!t)return e+"";var i=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var Lh={"%":(e,o)=>(e*100).toFixed(o),b:e=>Math.round(e).toString(2),c:e=>e+"",d:u3,e:(e,o)=>e.toExponential(o),f:(e,o)=>e.toFixed(o),g:(e,o)=>e.toPrecision(o),o:e=>Math.round(e).toString(8),p:(e,o)=>Fh(e*100,o),r:Fh,s:b3,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Nh(e){return e}var v3=Array.prototype.map,x3=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function w3(e){var o=e.grouping===void 0||e.thousands===void 0?Nh:p3(v3.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",r=e.numerals===void 0?Nh:f3(v3.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function d(m,u){m=No(m);var p=m.fill,f=m.align,S=m.sign,R=m.symbol,L=m.zero,j=m.width,q=m.comma,P=m.precision,O=m.trim,H=m.type;H==="n"?(q=!0,H="g"):Lh[H]||(P===void 0&&(P=12),O=!0,H="g"),(L||p==="0"&&f==="=")&&(L=!0,p="0",f="=");var G=(u&&u.prefix!==void 0?u.prefix:"")+(R==="$"?t:R==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),J=(R==="$"?i:/[%p]/.test(H)?a:"")+(u&&u.suffix!==void 0?u.suffix:""),X=Lh[H],me=/[defgprs%]/.test(H);P=P===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Ie($){var Ee=G,be=J,Fe,Oe,ve;if(H==="c")be=X($)+be,$="";else{$=+$;var oe=$<0||1/$<0;if($=isNaN($)?l:X(Math.abs($),P),O&&($=g3($)),oe&&+$==0&&S!=="+"&&(oe=!1),Ee=(oe?S==="("?S:s:S==="-"||S==="("?"":S)+Ee,be=(H==="s"&&!isNaN($)&&xa!==void 0?x3[8+xa/3]:"")+be+(oe&&S==="("?")":""),me){for(Fe=-1,Oe=$.length;++Fe<Oe;)if(ve=$.charCodeAt(Fe),48>ve||ve>57){be=(ve===46?n+$.slice(Fe+1):$.slice(Fe))+be,$=$.slice(0,Fe);break}}}q&&!L&&($=o($,1/0));var He=Ee.length+$.length+be.length,Ve=He<j?new Array(j-He+1).join(p):"";switch(q&&L&&($=o(Ve+$,Ve.length?j-be.length:1/0),Ve=""),f){case"<":$=Ee+$+be+Ve;break;case"=":$=Ee+Ve+$+be;break;case"^":$=Ve.slice(0,He=Ve.length>>1)+Ee+$+be+Ve.slice(He);break;default:$=Ve+Ee+$+be;break}return r($)}return Ie.toString=function(){return m+""},Ie}function c(m,u){var p=Math.max(-8,Math.min(8,Math.floor(Li(u)/3)))*3,f=Math.pow(10,-p),S=d((m=No(m),m.type="f",m),{suffix:x3[8+p/3]});return function(R){return S(f*R)}}return{format:d,formatPrefix:c}}var rc,vn,ac;Ph({thousands:",",grouping:[3],currency:["$",""]});function Ph(e){return rc=w3(e),vn=rc.format,ac=rc.formatPrefix,rc}function Bh(e){return Math.max(0,-Li(Math.abs(e)))}function Vh(e,o){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Li(o)/3)))*3-Li(Math.abs(e)))}function Wh(e,o){return e=Math.abs(e),o=Math.abs(o)-e,Math.max(0,Li(o)-Li(e))+1}function S3(e,o){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(o).domain(e);break}return this}function Oh(e){return function(){return e}}function zh(e){return+e}var y3=[0,1];function Tr(e){return e}function $h(e,o){return(o-=e=+e)?function(t){return(t-e)/o}:Oh(isNaN(o)?NaN:.5)}function h8(e,o){var t;return e>o&&(t=e,e=o,o=t),function(i){return Math.max(e,Math.min(o,i))}}function m8(e,o,t){var i=e[0],n=e[1],r=o[0],a=o[1];return n<i?(i=$h(n,i),r=t(a,r)):(i=$h(i,n),r=t(r,a)),function(s){return r(i(s))}}function u8(e,o,t){var i=Math.min(e.length,o.length)-1,n=new Array(i),r=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),o=o.slice().reverse());++a<i;)n[a]=$h(e[a],e[a+1]),r[a]=t(o[a],o[a+1]);return function(s){var l=sh(e,s,1,i)-1;return r[l](n[l](s))}}function C3(e,o){return o.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function p8(){var e=y3,o=y3,t=un,i,n,r,a=Tr,s,l,d;function c(){var u=Math.min(e.length,o.length);return a!==Tr&&(a=h8(e[0],e[u-1])),s=u>2?u8:m8,l=d=null,m}function m(u){return u==null||isNaN(u=+u)?r:(l||(l=s(e.map(i),o,t)))(i(a(u)))}return m.invert=function(u){return a(n((d||(d=s(o,e.map(i),yt)))(u)))},m.domain=function(u){return arguments.length?(e=Array.from(u,zh),c()):e.slice()},m.range=function(u){return arguments.length?(o=Array.from(u),c()):o.slice()},m.rangeRound=function(u){return o=Array.from(u),t=Eh,c()},m.clamp=function(u){return arguments.length?(a=u?!0:Tr,c()):a!==Tr},m.interpolate=function(u){return arguments.length?(t=u,c()):t},m.unknown=function(u){return arguments.length?(r=u,m):r},function(u,p){return i=u,n=p,c()}}function jh(){return p8()(Tr,Tr)}function Hh(e,o,t,i){var n=lh(e,o,t),r;switch(i=No(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(o));return i.precision==null&&!isNaN(r=Vh(n,a))&&(i.precision=r),ac(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(r=Wh(n,Math.max(Math.abs(e),Math.abs(o))))&&(i.precision=r-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(r=Bh(n))&&(i.precision=r-(i.type==="%")*2);break}}return vn(i)}function f8(e){var o=e.domain;return e.ticks=function(t){var i=o();return Il(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var n=o();return Hh(n[0],n[n.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=o(),n=0,r=i.length-1,a=i[n],s=i[r],l,d,c=10;for(s<a&&(d=a,a=s,s=d,d=n,n=r,r=d);c-- >0;){if(d=ea(a,s,t),d===l)return i[n]=a,i[r]=s,o(i);if(d>0)a=Math.floor(a/d)*d,s=Math.ceil(s/d)*d;else if(d<0)a=Math.ceil(a*d)/d,s=Math.floor(s*d)/d;else break;l=d}return e},e}function Rr(){var e=jh();return e.copy=function(){return C3(e,Rr())},S3.apply(e,arguments),f8(e)}function xn(e){return function(){return e}}function M3(e){let o=3;return e.digits=function(t){if(!arguments.length)return o;if(t==null)o=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);o=i}return e},()=>new gn(o)}var P$=Array.prototype.slice;function _3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E3(e){this._context=e}E3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:this._context.lineTo(e,o);break}}};function k3(e){return new E3(e)}function q3(e){return e[0]}function T3(e){return e[1]}function Uh(e,o){var t=xn(!0),i=null,n=k3,r=null,a=M3(s);e=typeof e=="function"?e:e===void 0?q3:xn(e),o=typeof o=="function"?o:o===void 0?T3:xn(o);function s(l){var d,c=(l=_3(l)).length,m,u=!1,p;for(i==null&&(r=n(p=a())),d=0;d<=c;++d)!(d<c&&t(m=l[d],d,l))===u&&((u=!u)?r.lineStart():r.lineEnd()),u&&r.point(+e(m,d,l),+o(m,d,l));if(p)return r=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:xn(+l),s):e},s.y=function(l){return arguments.length?(o=typeof l=="function"?l:xn(+l),s):o},s.defined=function(l){return arguments.length?(t=typeof l=="function"?l:xn(!!l),s):t},s.curve=function(l){return arguments.length?(n=l,i!=null&&(r=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=r=null:r=n(i=l),s):i},s}function R3(e,o){this._context=e,this._t=o}R3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(e,o);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,o)}break}}this._x=e,this._y=o}};function Gh(e){return new R3(e,0)}function Po(e,o,t){this.k=e,this.x=o,this.y=t}Po.prototype={constructor:Po,scale:function(e){return e===1?this:new Po(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new Po(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Xh=new Po(1,0,0);Kh.prototype=Po.prototype;function Kh(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Xh;return e.__zoom}var I3=(()=>{class e{constructor(){this.elementRef=T(Nt),this.diagramWidth=550,this.diagramHeight=250,this.showAxisLabels=!0,this.ranksAreStale=!0,this.pendingRender=null,this.popoverAncestor=null,this.popoverToggleListener=t=>{t.newState==="open"&&this.pendingRender!==null&&this.render(this.pendingRender==="full")}}ngOnChanges(t){if(this.values.length===0)return;let i=!!(t.values||t.isAttributeDirectionInverted||t.colorMetric||t.diagramWidth||t.diagramHeight||t.showAxisLabels);if(i&&(this.ranksAreStale=!0),this.isHiddenInClosedPopover()){this.pendingRender=this.pendingRender==="full"||i?"full":"areas";return}this.render(i)}ngAfterViewInit(){this.popoverAncestor=this.elementRef.nativeElement.closest("[popover]"),this.popoverAncestor?.addEventListener("toggle",this.popoverToggleListener)}ngOnDestroy(){this.popoverAncestor?.removeEventListener("toggle",this.popoverToggleListener)}render(t){this.ranksAreStale&&(this.percentileRanks=this.isAttributeDirectionInverted?this.calculateReversedPercentileRanks(this.values):this.calculatePercentileRanks(this.values),this.updatePercentileToMetricValueMap(),this.ranksAreStale=!1),(t||!this.hasRenderedDiagram()||!this.updateAreas())&&this.renderDiagram(),this.pendingRender=null}isHiddenInClosedPopover(){let t=this.popoverAncestor??this.elementRef.nativeElement.closest("[popover]");if(!t)return!1;try{return!t.matches(":popover-open")}catch{return!1}}hasRenderedDiagram(){return!this.rangeDiagramContainer().select("svg").empty()}updateAreas(){let t=this.rangeDiagramContainer().select("g");if(t.empty()||t.select(".left-area").empty())return!1;let i=this.createXScale(),n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));return t.select(".left-area").attr("width",n).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor),t.select(".middle-area").attr("x",n+this.framePadding).attr("width",r-n).style("fill",this.middleColor),t.select(".right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor),!0}updatePercentileToMetricValueMap(){this.percentileToMetricValueMap=new Map;let t=0;for(let i=0;i<=100;i++){for(;i>this.percentileRanks[t].x&&t<this.percentileRanks.length-1;)t++;this.percentileToMetricValueMap.set(i,this.percentileRanks[t].y)}}renderDiagram(){this.initializeDiagramDimesions(),this.clearDiagramContainer();let t=this.createSvg(),i=this.createGroup(t),n=this.createXScale(),r=this.createYScale();this.drawAxes(i,n,r),this.drawFrame(i),this.showAxisLabels&&this.drawLabels(i),this.drawAreas(i,n),this.drawLine(i),this.addCrossHair(i,n,r)}initializeDiagramDimesions(){this.svgWidth=this.diagramWidth,this.svgHeight=this.diagramHeight,this.frameMarginTop=10,this.frameMarginBottom=this.showAxisLabels?50:30,this.frameMarginLeft=this.showAxisLabels?50:40,this.frameMarginRight=10,this.framePadding=5,this.frameHeight=this.svgHeight-this.frameMarginTop-this.frameMarginBottom,this.frameWidth=this.svgWidth-this.frameMarginLeft-this.frameMarginRight,this.yLabelXOffset=80,this.xLabelYOffset=20}rangeDiagramContainer(){return xh(this.elementRef.nativeElement.querySelector("#cc-range-diagram-container"))}clearDiagramContainer(){this.rangeDiagramContainer().selectAll("*").remove()}createSvg(){return this.rangeDiagramContainer().append("svg").attr("width",this.svgWidth).attr("height",this.svgHeight)}createGroup(t){return t.append("g").attr("transform",`translate(${this.frameMarginLeft}, ${this.frameMarginTop})`).attr("display","flex").attr("justify-content","center")}drawFrame(t){t.append("path").attr("d",`M 0 0
3521
+ `}};var sl=(()=>{class e{constructor(t){this.ccStateSnapshot=t}getValue(){return this.ccStateSnapshot.get()}isLabelsPerMapActive(){return Ns(this.ccStateSnapshot.get())}static{this.\u0275fac=function(i){return new(i||e)(E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ll=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.labels=[],this.suppressedLabel=null}getLabels(){return this.labels}getSuppressedLabel(){return this.suppressedLabel}addLeafLabel(t,i){this.createLabel(t,i,!1)}addSelectionLabel(t){this.createLabel(t,0,!0)}createLabel(t,i,n){let{mapState:r}=this.stateAccessStore.getValue(),{scaling:a,showMetricLabelNodeName:s,showMetricLabelNameValue:l,labelMode:d,labelSize:c}=r,{heightMetric:m,colorMetric:u}=r,p=new Ke(a.x,a.y,a.z),f="";if(s||n&&!l)f=t.name;else if(!l)return;let S="";if(l){let G=d===Ni.Color?u:m;S=`${t.attributes[G]} ${G}`}let R=new al(f,S,c),L=R.cssObject;L.userData={node:t};let j=t.height+Math.abs(t.heightDelta??0),q=Math.max(j,i),P=(t.x0-gd+t.width/2)*p.x,O=(t.y0-gd+t.length/2)*p.z;L.position.set(P,(t.z0+q)*p.y,O);let H=new Ke(P,(t.z0+j)*p.y,O);this.threeSceneService.labels.add(L),this.labels.push({labelElement:R,node:t,buildingTop:H,appliedOffset:0,isSelectionLabel:n})}clearLabels(){this.threeSceneService.labels.clear(),this.labels=[],this.suppressedLabel=null}clearSelectionLabel(){let t=this.labels.findIndex(n=>n.isSelectionLabel);if(t===-1)return;let[i]=this.labels.splice(t,1);i===this.suppressedLabel&&(this.suppressedLabel=null),this.threeSceneService.labels.remove(i.labelElement.cssObject)}hasLabelForNode(t){return this.labels.some(i=>i.node===t)}suppressLabelForNode(t){this.restoreSuppressedLabel();let i=this.labels.find(n=>n.node===t);i&&(this.suppressedLabel=i,i.labelElement.setTransition("opacity 0.2s ease-out"),i.labelElement.setOpacity("0"))}restoreSuppressedLabel(){this.suppressedLabel&&(this.suppressedLabel.labelElement.setOpacity("1"),this.suppressedLabel=null)}static{this.\u0275fac=function(i){return new(i||e)(E(sl),E(ft))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var cl=(()=>{class e{constructor(t,i){this.threeRendererService=t,this.threeSceneService=i,this.connectorSegments=null,this.connectorPositions=null,this.connectorsDirty=!0,this.lastDrawnVertexCount=0,this.projectionVec=new Ke}drawConnectors(t,i){this.connectorSegments||this.initConnectors();let n=this.threeRendererService.camera;if(!n)return;let r=this.threeRendererService.labelRenderer?.domElement,a=r?r.clientHeight:window.innerHeight;if(a===0)return;let s=this.connectorPositions,l=0;for(let d of t){if(d.hidden||d.offset>100||d.label===i)continue;let c=d.label.buildingTop,m=d.label.labelElement.cssObject.position;if(m.y-c.y<.5)continue;if(l>=400)break;this.projectionVec.copy(m).project(n);let p=-20+d.offset;this.projectionVec.y-=p*2/a,this.projectionVec.unproject(n);let f=l*3;s[f]=c.x,s[f+1]=c.y,s[f+2]=c.z,l++;let S=l*3;s[S]=this.projectionVec.x,s[S+1]=this.projectionVec.y,s[S+2]=this.projectionVec.z,l++}this.connectorSegments.geometry.setDrawRange(0,l),this.connectorSegments.geometry.attributes.position.needsUpdate=!0,l!==this.lastDrawnVertexCount&&(this.connectorsDirty=!0),this.lastDrawnVertexCount=l}clearConnectors(){this.connectorSegments&&this.connectorSegments.geometry.setDrawRange(0,0),this.connectorsDirty=!0,this.lastDrawnVertexCount=0}isDirty(){return this.connectorsDirty}markClean(){this.connectorsDirty=!1}destroy(){this.connectorSegments&&(this.connectorSegments.geometry.dispose(),this.connectorSegments.material.dispose(),this.threeSceneService.scene.remove(this.connectorSegments),this.connectorSegments=null,this.connectorPositions=null)}initConnectors(){let t=400;this.connectorPositions=new Float32Array(t*3);let i=new Xt;i.setAttribute("position",new So(this.connectorPositions,3)),i.setDrawRange(0,0);let n=new Ms({color:11842740,transparent:!0,opacity:.9,depthTest:!0});this.connectorSegments=new Bp(i,n),this.connectorSegments.frustumCulled=!1,this.threeSceneService.scene.add(this.connectorSegments)}static{this.\u0275fac=function(i){return new(i||e)(E(kt),E(ft))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ig=(()=>{class e{constructor(t,i,n,r,a){this.threeRendererService=t,this.tooltipService=i,this.labelCreationService=n,this.stateAccessStore=r,this.connectorDrawingService=a,this._suppressLayout=!1,this.threeRendererService.afterRender$.subscribe(()=>this.updateLabelLayout())}setSuppressLayout(t){this._suppressLayout=t}updateLabelLayout(){let t=this.labelCreationService.getLabels();if(this._suppressLayout||t.length===0){this.connectorDrawingService.clearConnectors(),this.clearBadges(t);return}this.clearBadges(t);let i=this.collectLabelInfos(t),n=this.tooltipService.getRect();this.resolveCollisions(i),this.resolveTooltipCollisions(i,n),this.applyCollisionOffsets(i);let r=this.labelCreationService.getSuppressedLabel();this.connectorDrawingService.drawConnectors(i,r),this.connectorDrawingService.isDirty()&&(this.connectorDrawingService.markClean(),this.threeRendererService.render())}destroy(){this.clearBadges(this.labelCreationService.getLabels()),this.labelCreationService.clearLabels(),this.connectorDrawingService.destroy()}clearBadges(t){for(let i of t)i.labelElement.clearBadge()}collectLabelInfos(t){let i=[];for(let n of t){let r=n.labelElement.getContentRect(),a={top:r.top-n.appliedOffset,bottom:r.bottom-n.appliedOffset,left:r.left,right:r.right,width:r.width,height:r.height,x:r.x,y:r.y-n.appliedOffset};i.push({label:n,rect:a,offset:0,hidden:!1})}return i}resolveCollisions(t){let{mapState:i}=this.stateAccessStore.getValue();if(!i.groupLabelCollisions)return;let n=this.labelCreationService.getSuppressedLabel(),r=t.filter(l=>l.label!==n);if(r.length===0)return;let a=this.buildCollisionGroups(r,this.stateAccessStore.isLabelsPerMapActive()),s=i.labelMode===Ni.Color?i.colorMetric:i.heightMetric;for(let l of a){if(l.length<=1)continue;let d=this.pickGroupWinner(l,s);for(let c of l)c!==d&&(c.hidden=!0);d.label.labelElement.setBadge(l.length-1)}}buildCollisionGroups(t,i){let n=t.length,r=Array.from({length:n},(c,m)=>m),a=i?t.map(c=>xs(c.label.node.path)):void 0,s=c=>{for(;r[c]!==c;)r[c]=r[r[c]],c=r[c];return c},l=(c,m)=>{let u=s(c),p=s(m);u!==p&&(r[u]=p)};for(let c=0;c<n;c++)for(let m=c+1;m<n;m++)a!==void 0&&a[c]!==a[m]||this.rectsOverlap(t[c].rect,t[m].rect)&&l(c,m);let d=new Map;for(let c=0;c<n;c++){let m=s(c);d.has(m)||d.set(m,[]),d.get(m).push(t[c])}return[...d.values()]}rectsOverlap(t,i){return t.right>i.left&&t.left<i.right&&t.bottom>i.top&&t.top<i.bottom}pickGroupWinner(t,i){let n=t[0],r=n.label.node.attributes[i]??0;for(let a=1;a<t.length;a++){let s=t[a].label.node.attributes[i]??0;(s>r||s===r&&t[a].label.node.path<n.label.node.path)&&(r=s,n=t[a])}return n}resolveTooltipCollisions(t,i){if(!i)return;let n=12,r=i.left-n,a=i.right+n,s=i.top-n,l=i.bottom+n,d=this.labelCreationService.getSuppressedLabel();for(let c of t){if(c.hidden||c.label===d)continue;let m=c.rect.top+c.offset,u=c.rect.bottom+c.offset,p=c.rect.right>r&&c.rect.left<a,f=u>s&&m<l;if(p&&f){let S=l+4-m;S>0&&(c.offset+=S)}}}applyCollisionOffsets(t){let i=this.labelCreationService.getSuppressedLabel();for(let n of t){let r=n.label.labelElement,a=n.label===i;n.hidden||n.offset>100?(r.setOpacity("0"),r.setTransform(0),n.label.appliedOffset=0):(r.setOpacity(a?"0":"1"),r.setTransform(n.offset),n.label.appliedOffset=n.offset)}}static{this.\u0275fac=function(i){return new(i||e)(E(kt),E(or),E(ll),E(sl),E(cl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ag=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}setLabelMode(t){this.store.dispatch(ao({value:t}))}setAmountOfTopLabels(t){this.store.dispatch(Si({value:t}))}setLabelSize(t){this.store.dispatch(so({value:t}))}setLabelsPerMap(t){this.store.dispatch(lo({value:t}))}setShowMetricLabelNodeName(t){this.store.dispatch(po({value:t}))}setShowMetricLabelNameValue(t){this.store.dispatch(uo({value:t}))}setColorLabels(t){this.store.dispatch(_i({value:t}))}setGroupLabelCollisions(t){this.store.dispatch(ro({value:t}))}resetSettings(t){let i=l0(t,this.ccStateSnapshot.get());i.mapState?.amountOfTopLabels!==void 0&&(i.mapState.amountOfTopLabels=10),this.store.dispatch(Qt({value:i}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function J4(e,o){if(e&1){let t=we();y(0,"div",5)(1,"input",17),ie("change",function(){ae(t);let n=B();return se(n.setLabelsPerMap(!1))}),M(),y(2,"input",18),ie("change",function(){ae(t);let n=B();return se(n.setLabelsPerMap(!0))}),M()()}if(e&2){let t=B();h(),ce("checked",!t.labelsPerMap()),h(),ce("checked",t.labelsPerMap())}}function e5(e,o){if(e&1){let t=we();y(0,"div",14)(1,"span",19),g(2,"By Color Metric"),M(),y(3,"label",12)(4,"input",20),ie("change",function(n){ae(t);let r=B();return se(r.setColorLabel(n,"positive"))}),M(),pe(5,"span",21),y(6,"span",22),g(7),M()(),y(8,"label",12)(9,"input",23),ie("change",function(n){ae(t);let r=B();return se(r.setColorLabel(n,"neutral"))}),M(),pe(10,"span",21),y(11,"span",22),g(12),M()(),y(13,"label",12)(14,"input",24),ie("change",function(n){ae(t);let r=B();return se(r.setColorLabel(n,"negative"))}),M(),pe(15,"span",21),y(16,"span",22),g(17),M()()()}if(e&2){let t=B();h(4),ce("checked",t.colorLabels().positive)("disabled",t.colorCategoryCounts().positive===0),h(),ze("background-color",t.mapColors().positive),h(2),ge("(",t.colorCategoryCounts().positive,")"),h(2),ce("checked",t.colorLabels().neutral)("disabled",t.colorCategoryCounts().neutral===0),h(),ze("background-color",t.mapColors().neutral),h(2),ge("(",t.colorCategoryCounts().neutral,")"),h(2),ce("checked",t.colorLabels().negative)("disabled",t.colorCategoryCounts().negative===0),h(),ze("background-color",t.mapColors().negative),h(2),ge("(",t.colorCategoryCounts().negative,")")}}var $d=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.fileStoreReadWindow=T(Re),this.labelSettingsWriteStore=T(Ag),this.colorCategoryCountsStore=T(rr),this.LabelMode=Ni,this.MIN_LABEL_SIZE=.75,this.MAX_LABEL_SIZE=2.5,this.LABEL_SIZE_STEP=.25,this.resetSettingsKeys=["mapState.amountOfTopLabels","mapState.labelSize","mapState.showMetricLabelNodeName","mapState.showMetricLabelNameValue","mapState.colorLabels","mapState.labelMode","mapState.groupLabelCollisions","mapState.labelsPerMap"],this.amountOfTopLabels=D(this.mapStateReadWindow.amountOfTopLabels$,{requireSync:!0}),this.labelSize=D(this.mapStateReadWindow.labelSize$,{requireSync:!0}),this.showMetricLabelNodeName=D(this.mapStateReadWindow.showMetricLabelNodeName$,{requireSync:!0}),this.showMetricLabelNodeValue=D(this.mapStateReadWindow.showMetricLabelNameValue$,{requireSync:!0}),this.colorLabels=D(this.mapStateReadWindow.colorLabels$,{requireSync:!0}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.labelMode=D(this.mapStateReadWindow.labelMode$,{requireSync:!0}),this.colorCategoryCounts=D(this.colorCategoryCountsStore.colorCategoryCounts$,{requireSync:!0}),this.groupLabelCollisions=D(this.mapStateReadWindow.groupLabelCollisions$,{requireSync:!0}),this.labelsPerMap=D(this.mapStateReadWindow.labelsPerMap$,{requireSync:!0}),this.areMultipleMapsVisible=D(this.fileStoreReadWindow.areMultipleMapsVisible$,{requireSync:!0}),this.showColorLabels=Y(()=>this.labelMode()===Ni.Color&&!this.isDeltaState()),this.topLabelsTitle=Y(()=>{let t=`Display the labels of the ${this.amountOfTopLabels()} highest buildings`;return this.labelsPerMap()&&this.areMultipleMapsVisible()?`${t} per map`:t}),this.applyDebouncedTopLabels=Vi(t=>{this.labelSettingsWriteStore.setAmountOfTopLabels(t)},e.DEBOUNCE_TIME),this.applyDebouncedLabelSize=Vi(t=>{this.labelSettingsWriteStore.setLabelSize(t)},e.DEBOUNCE_TIME)}static{this.DEBOUNCE_TIME=400}handleTopLabelsInput(t){let i=c0(t,0,50,{round:!0});if(!Number.isNaN(i)){if(i===this.amountOfTopLabels()){this.applyDebouncedTopLabels.cancel();return}this.applyDebouncedTopLabels(i)}}handleLabelSizeInput(t){let i=Number.parseFloat(t.target.value);if(Number.isNaN(i))return;let n=Math.min(2.5,Math.max(.75,i)),r=Math.round(n/.25)*.25,a=Math.round(r*100)/100;if(a===this.labelSize()){this.applyDebouncedLabelSize.cancel();return}this.applyDebouncedLabelSize(a)}setShowMetricLabelNodeName(t){this.labelSettingsWriteStore.setShowMetricLabelNodeName(t.target.checked)}setShowMetricLabelNameValue(t){this.labelSettingsWriteStore.setShowMetricLabelNameValue(t.target.checked)}setColorLabel(t,i){this.labelSettingsWriteStore.setColorLabels({[i]:t.target.checked})}setLabelMode(t){this.labelSettingsWriteStore.setLabelMode(t)}setGroupLabelCollisions(t){this.labelSettingsWriteStore.setGroupLabelCollisions(t.target.checked)}setLabelsPerMap(t){this.labelSettingsWriteStore.setLabelsPerMap(t)}resetSettings(){this.labelSettingsWriteStore.resetSettings(this.resetSettingsKeys)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-label-settings-panel"]],hostAttrs:[1,"contents"],decls:33,vars:18,consts:[[3,"title"],[1,"text-sm"],[1,"flex","items-center","gap-2"],["type","range","aria-label","Top Labels","min","0","max","50",1,"range","range-primary","range-sm","flex-1",3,"input","value"],["type","number","aria-label","Top Labels","min","0","max","50",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value"],["aria-label","Top labels scope","title","Pick the top labels across all maps combined or separately for each map",1,"join","w-full"],["title","Scale floating label font size"],["type","range","aria-label","Label Size",1,"range","range-primary","range-sm","flex-1",3,"input","min","max","step","value"],["type","number","aria-label","Label Size",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","min","max","step","value"],["aria-label","Label mode",1,"join","w-full"],["type","radio","name","labelMode","aria-label","Height",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelMode","aria-label","Color",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],[1,"flex","flex-col","gap-1"],["title","Reset label settings to their defaults",1,"btn","btn-outline","btn-error","gap-2",3,"click"],[1,"fa","fa-undo"],["type","radio","name","labelsPerMap","aria-label","All maps",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelsPerMap","aria-label","Per map",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"text-xs","opacity-60","mb-0.5"],["type","checkbox","aria-label","positive color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"inline-block","w-4","h-4","rounded-sm"],[1,"text-xs","opacity-60"],["type","checkbox","aria-label","neutral color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["type","checkbox","aria-label","negative color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"span",1),g(2,"Top Labels"),M(),y(3,"div",2)(4,"input",3),ie("input",function(a){return n.handleTopLabelsInput(a)}),M(),y(5,"input",4),ie("input",function(a){return n.handleTopLabelsInput(a)}),M()()(),K(6,J4,3,2,"div",5),y(7,"div",6)(8,"span",1),g(9,"Label Size"),M(),y(10,"div",2)(11,"input",7),ie("input",function(a){return n.handleLabelSizeInput(a)}),M(),y(12,"input",8),ie("input",function(a){return n.handleLabelSizeInput(a)}),M()()(),y(13,"div",9)(14,"input",10),ie("change",function(){return n.setLabelMode(n.LabelMode.Height)}),M(),y(15,"input",11),ie("change",function(){return n.setLabelMode(n.LabelMode.Color)}),M()(),y(16,"label",12)(17,"input",13),ie("change",function(a){return n.setShowMetricLabelNodeName(a)}),M(),y(18,"span"),g(19,"Show node names"),M()(),y(20,"label",12)(21,"input",13),ie("change",function(a){return n.setShowMetricLabelNameValue(a)}),M(),y(22,"span"),g(23,"Show metric values"),M()(),y(24,"label",12)(25,"input",13),ie("change",function(a){return n.setGroupLabelCollisions(a)}),M(),y(26,"span"),g(27,"Group overlapping labels"),M()(),K(28,e5,18,15,"div",14),y(29,"button",15),ie("click",function(){return n.resetSettings()}),pe(30,"i",16),y(31,"span"),g(32,"Reset label settings"),M()()),i&2&&(ce("title",n.topLabelsTitle()),h(4),ce("value",n.amountOfTopLabels()),h(),ce("value",n.amountOfTopLabels()),h(),Q(n.areMultipleMapsVisible()?6:-1),h(5),ce("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(),ce("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),h(2),ce("checked",n.labelMode()===n.LabelMode.Height),h(),ce("checked",n.labelMode()===n.LabelMode.Color),h(2),ce("checked",n.showMetricLabelNodeName()),h(4),ce("checked",n.showMetricLabelNodeValue()),h(4),ce("checked",n.groupLabelCollisions()),h(3),Q(n.showColorLabels()?28:-1))},encapsulation:2})}}return e})();var dl=(()=>{class e{constructor(t,i,n){this.labelCreationService=t,this.labelCollisionService=i,this.connectorDrawingService=n}addLeafLabel(t,i){this.labelCreationService.addLeafLabel(t,i)}addSelectionLabel(t){this.labelCreationService.addSelectionLabel(t)}clearLabels(){this.labelCreationService.clearLabels(),this.connectorDrawingService.clearConnectors()}clearSelectionLabel(){this.labelCreationService.clearSelectionLabel()}hasLabelForNode(t){return this.labelCreationService.hasLabelForNode(t)}suppressLabelForNode(t){this.labelCreationService.suppressLabelForNode(t)}restoreSuppressedLabel(){this.labelCreationService.restoreSuppressedLabel()}setSuppressLayout(t){this.labelCollisionService.setSuppressLayout(t)}destroy(){this.labelCollisionService.destroy(),this.connectorDrawingService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(E(ll),E(Ig),E(cl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ng=(()=>{class e{constructor(t,i,n){this.codeMapStore=t,this.sharedViewReadWindow=i,this.threeSceneService=n,this.VERTICES_PER_LINE=5,this.arrows=new Array,this.HIGHLIGHT_BUILDING_DELAY=1,this.debounceCalculation=Vi(r=>this.resetEdgesOfBuildings(r),this.HIGHLIGHT_BUILDING_DELAY),this.hoveredNodeSubscription=this.sharedViewReadWindow.hoveredNodeId$.pipe(Le(r=>{if(r!==null){let a=this.threeSceneService.getMapMesh()?.getMeshDescription().getBuildingByPath(r);this.onBuildingHovered(a)}else this.onBuildingUnhovered()})).subscribe(),this.resetEdgesOfBuildings=r=>{if(!this.codeMapStore.getMapState().isEdgeMetricVisible){this.scale();return}this.clearArrows(),this.showEdgesOfBuildings(this.isEdgeApplicableForBuilding(r)?r:void 0),this.scale()},this.onBuildingSelected=r=>{this.isEdgeApplicableForBuilding(r.building)&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()},this.onBuildingDeselected=()=>{this.debounceCalculation.cancel(),this.clearArrows(),this.addEdgePreview()},this.threeSceneService.subscribe("onBuildingSelected",this.onBuildingSelected),this.threeSceneService.subscribe("onBuildingDeselected",this.onBuildingDeselected)}ngOnDestroy(){this.hoveredNodeSubscription.unsubscribe()}onBuildingHovered(t){this.debounceCalculation(t)}onBuildingUnhovered(){this.debounceCalculation.cancel();let{isEdgeMetricVisible:t}=this.codeMapStore.getMapState();t&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()}clearArrows(){for(let t of this.arrows)t.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()});this.arrows=[],this.threeSceneService.edgeArrows.children.length=0}addArrow(t,i,n){let r=this.codeMapStore.getMapState(),a=100*r.edgeHeight,s=this.createCurve(t,i,a),l=fd.getNumber(r.mapColors[n?"outgoingEdge":"incomingEdge"]);this.highlightBuilding(n?i:t),this.setCurveColor(s,l)}addEdgePreview(){let t=this.codeMapStore.getEdgeVisibility();for(let i of t){let n=this.map.get(i.fromNodeName),r=this.map.get(i.toNodeName);if(n&&r&&i.visible!==ni.none&&i.visible){let a=100*this.codeMapStore.getMapState().edgeHeight,s=this.createCurve(n,r,a);this.previewMode(s,i.visible)}}}addEdgeMapBasedOnNodes(t){this.map=this.getNodesAsMap(t)}scale(){let{scaling:t}=this.codeMapStore.getMapState();for(let i of this.arrows)i.scale.x=t.x,i.scale.y=t.y,i.scale.z=t.z}isEdgeApplicableForBuilding(t){return this.codeMapStore.getMapState().isEdgeMetricVisible&&t&&!t.node.flat}showEdgesOfBuildings(t){let i=new Map,n=this.threeSceneService.getSelectedBuilding();if(n){let{node:r}=n;i.set(r.path,r)}if(t){let{node:r}=t;i.set(r.path,r)}i.size>0?this.buildPairingEdges(i):this.addEdgePreview()}buildPairingEdges(t){let{showIncomingEdges:i,showOutgoingEdges:n,edgeMetric:r}=this.codeMapStore.getMapState();if(!i&&!n)return;let a=this.codeMapStore.getEdges();for(let s of a){if(s.attributes[r]===void 0)continue;let l=this.map.get(s.fromNodeName);if(l===void 0)continue;let d=this.map.get(s.toNodeName);d!==void 0&&(n&&t.has(l.path)?(this.addArrow(l,d,!0),this.threeSceneService.applyHighlights()):i&&t.has(d.path)&&(this.addArrow(l,d,!1),this.threeSceneService.applyHighlights()))}}createCurve(t,i,n){let r=t.outgoingEdgePoint.clone(),a=i.incomingEdgePoint.clone(),s=Math.max(r.y+i.height,a.y+1)+n;return r.setY(s),a.setY(s),new Vp(t.outgoingEdgePoint,r,a,i.incomingEdgePoint)}highlightBuilding(t){let i=this.threeSceneService.getMapMesh().getMeshDescription().getBuildingByPath(t.path);this.threeSceneService.addBuildingsToHighlightingList(i)}setCurveColor(t,i,n=50){let r=t.getPoints(n),a=this.buildLine(r,i);a.add(this.buildArrow(r)),this.threeSceneService.edgeArrows.add(a),this.arrows.push(a)}previewMode(t,i){if(i===ni.both||i===ni.from){let n=this.makeArrowFromBezier(t,!1);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}if(i===ni.both||i===ni.to){let n=this.makeArrowFromBezier(t,!0);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}}getNodesAsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}makeArrowFromBezier(t,i,n=50){let r=t.getPoints(n),{incomingEdge:a,outgoingEdge:s}=this.codeMapStore.getMapState().mapColors,l=i?a:s,d=i?r.slice(n+1-this.VERTICES_PER_LINE):r.slice(0,r.length-(n+1-this.VERTICES_PER_LINE));return this.buildEdge(d,fd.getNumber(l))}buildEdge(t,i){let n=this.buildLine(t,i);return n.add(this.buildArrow(t)),n}buildLine(t,i=0){let n=new Xt;n.setFromPoints(t);let r=new Ms({color:i,linewidth:1});return new Pp(n,r)}buildArrow(t,i=0,n=10,r=10){let a=t.at(-1).clone().sub(t.at(-2).clone()).normalize(),s=t.at(-1).clone();return a.y<0&&(s.y+=n+1),new jp(a,s,n+1,i,n,r)}static{this.\u0275fac=function(i){return new(i||e)(E(wr),E(Bt),E(ft))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Pg=(()=>{class e{constructor(){this.mapControls=T(qt),this.zoomMenuRequested=_e()}requestZoomMenu(t){t.preventDefault(),this.zoomMenuRequested.emit({x:t.clientX,y:t.clientY})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-toolbox-center-map-button"]],outputs:{zoomMenuRequested:"zoomMenuRequested"},decls:2,vars:0,consts:[["type","button","title","Center map \u2014 right-click to set the zoom level it uses","aria-label","Center map",1,"join-item","btn","btn-sm","btn-square",3,"click","contextmenu"],[1,"fa","fa-compass"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.mapControls.autoFitTo()})("contextmenu",function(a){return n.requestZoomMenu(a)}),pe(1,"i",1),M())},encapsulation:2})}}return e})();var Bg=(()=>{class e{constructor(t){this.store=t,this.defaultCenterMapZoom=ff,this.centerMapZoom=D(this.store.select(gf),{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var hl=(()=>{class e{constructor(t){this.store=t}setPresentationMode(t){this.store.dispatch(Sf({value:t}))}setCenterMapZoom(t){this.store.dispatch(pf({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Vg=(()=>{class e{constructor(){this.mapControls=T(qt),this.readStore=T(Bg),this.writeStore=T(hl),this.anchor=Z.required(),this.dismissed=_e(),this.centerMapZoom=this.readStore.centerMapZoom,this.minZoom=this.mapControls.MIN_ZOOM,this.maxZoom=this.mapControls.MAX_ZOOM}previewAndStore(t){this.writeStore.setCenterMapZoom(t),this.mapControls.setZoomPercentage(t)}useCurrentZoom(){this.writeStore.setCenterMapZoom(Math.round(this.mapControls.zoomPercentage$.value))}resetCenterMapZoom(){this.previewAndStore(this.readStore.defaultCenterMapZoom)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-center-map-zoom-menu"]],hostAttrs:[1,"contents"],inputs:{anchor:[1,"anchor"]},outputs:{dismissed:"dismissed"},decls:10,vars:4,consts:[[3,"dismissed","anchor"],["data-testid","center-map-zoom-menu",1,"flex","w-64","flex-col","gap-2","px-3","py-2"],[1,"text-sm","font-semibold"],["ariaLabel","Center map zoom in percent",3,"valueChange","min","max","value"],[1,"flex","gap-2"],["type","button",1,"btn","btn-xs","flex-1",3,"click"],["type","button",1,"btn","btn-ghost","btn-xs",3,"click"]],template:function(i,n){i&1&&(x(0,"cc-floating-menu",0),z("dismissed",function(){return n.dismissed.emit()}),x(1,"div",1)(2,"span",2),g(3,"Center map zoom"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.previewAndStore(a)}),v(),x(5,"div",4)(6,"button",5),z("click",function(){return n.useCurrentZoom()}),g(7,"Use current zoom"),v(),x(8,"button",6),z("click",function(){return n.resetCenterMapZoom()}),g(9,"Reset"),v()()()()),i&2&&(F("anchor",n.anchor()),h(4),F("min",n.minZoom)("max",n.maxZoom)("value",n.centerMapZoom()))},dependencies:[Lf,qo],encapsulation:2})}}return e})();var Wg=(()=>{class e{constructor(){this.preferencesReadWindow=T(sr),this.viewCubeToolboxWriteStore=T(hl),this.isPresentationMode=D(this.preferencesReadWindow.isPresentationMode$,{requireSync:!0}),this.tooltip=Y(()=>this.isPresentationMode()?"Disable flashlight hover effect":"Enable flashlight hover effect")}handleToggle(){this.viewCubeToolboxWriteStore.setPresentationMode(!this.isPresentationMode())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-toolbox-presentation-mode-button"]],decls:2,vars:3,consts:[["type","button","aria-label","Presentation mode",1,"join-item","btn","btn-sm","btn-square",3,"click","title"],[1,"fa","fa-lightbulb-o"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.handleToggle()}),pe(1,"i",1),M()),i&2&&(We("btn-active",n.isPresentationMode()),ce("title",n.tooltip()))},encapsulation:2})}}return e})();function i5(e,o){if(e&1){let t=we();x(0,"cc-center-map-zoom-menu",4),z("dismissed",function(){ae(t);let n=B();return se(n.zoomMenuAnchor.set(null))}),v()}e&2&&F("anchor",o)}var jd=(()=>{class e{constructor(){this.zoomMenuAnchor=Se(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-cube-toolbox"]],features:[bi([{provide:v0,useExisting:w0}])],decls:5,vars:1,consts:[[1,"join","shadow-md","absolute","top-0","left-1/2","-translate-x-1/2","bg-base-100","rounded"],[3,"zoomMenuRequested"],["view","metrics"],[3,"anchor"],[3,"dismissed","anchor"]],template:function(i,n){if(i&1&&(x(0,"div",0)(1,"cc-toolbox-center-map-button",1),z("zoomMenuRequested",function(a){return n.zoomMenuAnchor.set(a)}),v(),V(2,"cc-toolbox-screenshot-button",2)(3,"cc-toolbox-presentation-mode-button"),v(),K(4,i5,1,1,"cc-center-map-zoom-menu",3)),i&2){let r;h(4),Q((r=n.zoomMenuAnchor())?4:-1,r)}},dependencies:[Pg,x0,Wg,Vg],encapsulation:2})}}return e})();var Ro=()=>new ks({color:16580095}),tn=()=>new ks({color:16580095}),Yr=()=>new ks({color:16580095});var ml=class e{static buildCube(o){let t=1/o,i=(1-t)/2,n=new yo(t,i,i),r=new yo(i,t+i,i),a=new yo(i,i,i),s=new yo(t,t,i),l=new yo(t,t+i,i);return e.newBuildCubeGroup(n,r,a,s,l)}static newBuildCubeGroup(o,t,i,n,r){let a=new Qn,{group:s,frontLeft:l,frontCenter:d,frontRight:c,middleLeft:m,middleCenter:u,middleRight:p,backLeft:f,backCenter:S,backRight:R}=e.buildCubeTopFace(o,i,n);a.add(s);let{group:L,frontLeftEdge:j,frontCenterFace:q,frontRightEdge:P,middleLeftFace:O,middleRightFace:H,backLeftEdge:G,backCenterFace:J,backRightEdge:X}=e.buildCubeSides(t,r);return a.add(L),{group:a,top:{front:{left:l,center:d,right:c},middle:{left:m,center:u,right:p},back:{left:f,center:S,right:R}},sides:{front:{left:j,center:q,right:P},middle:{left:O,right:H},back:{left:G,center:J,right:X}}}}static buildCubeTopFace(o,t,i){let n=new lt(t,Yr()),r=new lt(o,Ro()),a=new lt(t,Yr()),s=new lt(o,Ro()),l=new lt(i,tn()),d=new lt(o,tn()),c=new lt(t,Yr()),m=new lt(o,Ro()),u=new lt(t,Yr()),p=i.parameters.height/2+t.parameters.height/2;n.position.x-=p,n.position.y-=p,r.position.y-=p,a.position.x+=p,a.position.y-=p,s.position.x-=p,s.rotation.z=Math.PI/2,d.position.x+=p,d.rotation.z=Math.PI/2,c.position.x-=p,c.position.y+=p,m.position.y+=p,u.position.x+=p,u.position.y+=p;let f=new Qn;return f.rotation.x=Math.PI/2,f.position.y+=p,f.add(n),f.add(r),f.add(a),f.add(s),f.add(l),f.add(d),f.add(c),f.add(m),f.add(u),{group:f,frontLeft:n,frontCenter:r,frontRight:a,middleLeft:s,middleCenter:l,middleRight:d,backLeft:c,backCenter:m,backRight:u}}static buildCubeSides(o,t){let i=new lt(o,Ro()),n=new lt(t,tn()),r=new lt(o,Ro()),a=new lt(t,tn()),s=new lt(t,tn()),l=new lt(o,Ro()),d=new lt(t,tn()),c=new lt(o,Ro()),m=t.parameters.width/2+o.parameters.width/2,u=o.parameters.width/2;i.position.x-=m,i.position.z+=m,n.position.z+=m,r.position.x+=m,r.position.z+=m,a.position.x-=m,a.rotation.y=Math.PI/2,s.position.x+=m,s.rotation.y=Math.PI/2,l.position.x-=m,l.position.z-=m,d.position.z-=m,c.position.x+=m,c.position.z-=m;let p=new Qn;return p.position.y-=u,p.add(i),p.add(n),p.add(r),p.add(a),p.add(s),p.add(l),p.add(d),p.add(c),{group:p,frontLeftEdge:i,frontCenterFace:n,frontRightEdge:r,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:d,backRightEdge:c}}};var Og=(()=>{class e{constructor(t,i){this.threeMapControlsService=t,this.cdr=i}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(t=>{this.zoomPercentage=t,this.cdr.detectChanges()})}onInput(t){let i=t.target,n=Number.parseFloat(i.value);this.threeMapControlsService.setZoomPercentage(n)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(i){return new(i||e)(ne(qt),ne(Ln))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"absolute","right-[5px]","top-[10px]","m-2.5","flex","h-[150px]","flex-col","items-center","gap-2.5"],["data-testid","zoomIn",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange","aria-label","Zoom level",1,"h-[100px]","w-[3px]","appearance-none","bg-neutral-500","text-neutral-500","opacity-70","outline-none","transition-opacity","duration-200","[-webkit-appearance:none]","[direction:rtl]","[writing-mode:vertical-lr]","[&::-moz-range-thumb]:h-[3px]","[&::-moz-range-thumb]:w-[10px]","[&::-moz-range-thumb]:cursor-pointer","[&::-moz-range-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:h-[3px]","[&::-webkit-slider-thumb]:w-[10px]","[&::-webkit-slider-thumb]:cursor-pointer","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:[-webkit-appearance:none]",3,"input","min","max","value"],["data-testid","zoomOut",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["id","zoomValue",1,"w-[30px]","text-center","text-[10px]","text-neutral-500"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.zoomIn()}),g(2," + "),M(),y(3,"input",2),ie("input",function(a){return n.onInput(a)}),M(),y(4,"button",3),ie("click",function(){return n.zoomOut()}),g(5," - "),M(),y(6,"span",4),g(7),M()()),i&2&&(h(3),ce("min",n.minZoom)("max",n.maxZoom)("value",n.zoomPercentage),h(4),ge("",n.zoomPercentage?.toFixed(0),"%"))},encapsulation:2})}}return e})();var Jr=(()=>{class e{constructor(t){this.threeMapControlsService=t,this.eventEmitter=new uf,this.currentlyHovered=null,this.isDragging=!1}init(t,i,n){this.cubeGroup=t,this.camera=i,this.renderer=n,this.initOrbitalControl(i,n),this.initRendererEventListeners(n)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(t,i){this.controls=new Ps(t,i.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(t){t.domElement.addEventListener("mousemove",i=>this.onDocumentMouseMove(i)),t.domElement.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.domElement.addEventListener("mousedown",i=>this.onDocumentMouseClick(i,"mousedown")),t.domElement.addEventListener("dblclick",i=>this.onDocumentMouseClick(i,"dblclick")),t.domElement.addEventListener("mouseleave",i=>this.onWindowMouseLeave(i)),t.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(t,i){this.isDragging=!0,this.checkMouseIntersection(t,i)}onWindowMouseLeave(t){(t.relatedTarget==null||!(t.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(t){this.controls.enableRotate=t}checkMouseIntersection(t,i){this.getCubeIntersectedByMouse(t)||this.eventEmitter.emit("viewCubeEventPropagation",{type:i,event:t})}getCubeIntersectedByMouse(t){let i=this.transformIntoCanvasVector(t),n=new qs;n.setFromCamera(i,this.camera);let r=[];for(let s of Ji(this.cubeGroup))xi(s)&&r.push(s.data);let[a]=n.intersectObjects(r);return a?a.object:null}transformIntoCanvasVector(t){let{domElement:i}=this.renderer,n=this.renderer.getPixelRatio(),r=i.getBoundingClientRect(),a=(t.clientX-r.left)/i.width*n*2-1,s=-((t.clientY-r.top)/i.height*n)*2+1;return new Ue(a,s)}propagateMovement(){if(this.isDragging){let t=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-t.x,-t.y,-t.z)}return this.isDragging}onDocumentMouseMove(t){if(this.propagateMovement())return;let i=this.getCubeIntersectedByMouse(t);i?this.currentlyHovered&&i.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(i):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:t}))}onDocumentMouseUp(t){this.isDragging=!1;let i=this.getCubeIntersectedByMouse(t);i?this.eventEmitter.emit("viewCubeClicked",{cube:i}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:t})}triggerViewCubeHoverEvent(t){this.currentlyHovered=t,Ri(Ti.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:t})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,Ri(Ti.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(t,i){this.eventEmitter.on(t,n=>{i(n)})}static{this.\u0275fac=function(i){return new(i||e)(E(qt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Hd=(()=>{class e{constructor(t,i,n){this.elementReference=t,this.threeMapControlsService=i,this.viewCubeMouseEvents=n,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=r=>{let a=this.calculateCameraPosition(r.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=r=>{this.hoverInfo={cube:r.cube,originalMaterial:r.cube.material},this.hoverInfo.cube.material.emissive=new Kn(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new Kn(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=r=>{switch(r.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let t=new Hp(1.3),i=-(this.LENGTH_VIEWCUBE/2)+.01;t.position.x+=i,t.position.y+=i,t.position.z+=i,this.scene.add(t)}initCube(){let{group:t,top:i,sides:n}=ml.buildCube(1.9);this.cubeGroup=t,this.cubeDefinition.top=i,this.cubeDefinition.sides=n;let r=new $p(this.cubeGroup,new Kn(0));this.scene.add(this.cubeGroup),this.scene.add(r)}setCameraPosition(t){this.camera.position.set(t.x,t.y,t.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(t){let i=this.threeMapControlsService.controls.target.clone();return t.position.clone().sub(i).normalize().multiplyScalar(3)}initScene(){this.scene=new Cs}initRenderer(t){this.renderer=new Ts({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),t.appendChild(this.renderer.domElement)}initCamera(){this.camera=new ys(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new Qn;let t=new Op(7368816,2.8),i=new pd(14737632,1.8);i.position.set(50,10,8).normalize();let n=new pd(14737632,1.8);n.position.set(-50,10,-8).normalize(),this.lights.add(t),this.lights.add(i),this.lights.add(n),this.scene.add(this.lights)}static{this.\u0275fac=function(i){return new(i||e)(ne(Nt),ne(qt),ne(Jr))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-cube"]],hostAttrs:[1,"absolute","right-0","top-[10px]","z-[11]","[transition:right_0.3s_ease]","[&.sideBarVisible]:right-[var(--cc-inspector-width)]"],decls:2,vars:0,template:function(i,n){i&1&&V(0,"cc-view-cube-toolbox")(1,"cc-zoom-slider")},dependencies:[jd,Og],encapsulation:2})}}return e})();var ul=(function(e){return e[e.LeftClick=0]="LeftClick",e[e.RightClick=2]="RightClick",e})(ul||{}),on=(()=>{class e{constructor(t,i,n,r,a,s,l,d,c,m,u){this.threeCameraService=t,this.threeRendererService=i,this.threeSceneService=n,this.codeMapStore=r,this.fileStoreReadWindow=a,this.sharedViewReadWindow=s,this.labelSettingsFacade=l,this.tooltipService=d,this.viewCubeMouseEvents=c,this.threeViewerService=m,this.idToBuilding=u,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new qs,this.subscriptions=[this.fileStoreReadWindow.visibleFileStates$.pipe(Le(()=>this.onFilesSelectionChanged())).subscribe(),this.sharedViewReadWindow.excludedNodes$.pipe(Le(p=>this.onExcludedNodesChanged(p))).subscribe(),this.sharedViewReadWindow.hoveredNodeId$.pipe(Le(p=>{p!==null?this.hoverNode(p):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=p=>{switch(p.type){case"mousemove":this.onDocumentMouseMove(p.event);break;case"mouseup":this.onDocumentMouseUp(p.event);break;case"mousedown":this.onDocumentMouseDown(p.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=p=>{this.mouse.x=p.clientX,this.mouse.y=p.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}start(){this.registerEventListeners(),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}registerEventListeners(){let t=this.threeRendererService.renderer.domElement;t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.addEventListener("mousedown",i=>this.onDocumentMouseDown(i)),t.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),t.addEventListener("mouseleave",i=>this.onDocumentMouseLeave(i)),t.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),t.addEventListener("wheel",Vi(()=>this.threeRendererService.render()))}hoverNode(t){if(this.isGrabbingOrMoving())return;let{buildings:i}=this.threeSceneService.getMapMesh().getMeshDescription();for(let n of i)if(n.node.path===t){this.hoverBuilding(n,!1);break}this.threeRendererService.render()}unhoverNode(t=!0){this.unhoverBuilding(t),this.threeRendererService.render()}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.tooltipService.hide()}onExcludedNodesChanged(t){let i=this.threeSceneService.getSelectedBuilding();this.tooltipService.hide(),i&&Gu(t).isExcludedLeaf(i.node.path)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){if(this.isGrabbingOrMoving()){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let t=this.threeSceneService.getMapMesh();if(t){this.threeCameraService.camera.updateMatrixWorld(!1);let i=this.transformHTMLToSceneCoordinates(),n=this.threeCameraService.camera;n.isPerspectiveCamera&&this.raycaster.setFromCamera(i,n),this.intersectedBuilding=t.checkMouseRayMeshIntersection(i,n),this.updateHighlight(this.threeSceneService.getHighlightedBuilding(),this.intersectedBuilding)}}}updateHighlight(t,i){t?.id!==i?.id?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),t&&i&&!this.isGrabbingOrMoving()?(this.threeSceneService.prepareHighlightTransition(),this.showTooltipForBuilding(i),this.hoverBuilding(i)):(this.unhoverBuilding(),i&&!this.isGrabbingOrMoving()&&(this.showTooltipForBuilding(i),this.hoverBuilding(i)))):!i&&this.codeMapStore.getHoveredNodeId()!==null?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding()):i&&this.tooltipService.isVisible()&&this.tooltipService.updatePosition(this.mouse.x,this.mouse.y)}drawLabelSelectedBuilding(t){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.labelSettingsFacade.clearSelectionLabel(),!(!t?.node?.isLeaf||this.labelSettingsFacade.hasLabelForNode(t.node))&&this.labelSettingsFacade.addSelectionLabel(t.node)}showTooltipForBuilding(t){this.labelSettingsFacade.hasLabelForNode(t.node)&&this.labelSettingsFacade.suppressLabelForNode(t.node),this.tooltipService.show(t.node,this.mouse.x,this.mouse.y)}enableOrbitalsRotation(t){this.threeViewerService.enableRotation(t),this.viewCubeMouseEvents.enableRotation(t)}onDocumentMouseEnter(){this.enableOrbitalsRotation(!0)}onDocumentMouseLeave(t){this.labelSettingsFacade.setSuppressLayout(!1),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding(),t.relatedTarget instanceof HTMLCanvasElement||this.enableOrbitalsRotation(!1)}onDocumentDoubleClick(){let t=this.threeSceneService.getHighlightedBuilding(),i=this.threeSceneService.getSelectedBuilding(),n=t?.node.link;if(n&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(n,"_blank"),i?.node.isLeaf){let r=i.node.link;if(r){window.open(r,"_blank");return}}}onDocumentMouseDown(t){t.button===ul.RightClick&&(this.isMoving=!0,Ri(Ti.Moving)),t.button===ul.LeftClick&&(this.isGrabbing=!0,Ri(Ti.Grabbing)),this.labelSettingsFacade.setSuppressLayout(!0),this.tooltipService.hide(),this.mouseOnLastClick={x:t.clientX,y:t.clientY},document.activeElement.blur()}onDocumentMouseUp(t){this.labelSettingsFacade.setSuppressLayout(!1),this.viewCubeMouseEvents.resetIsDragging(),t.button===ul.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?Ri(Ti.Pointer):Ri(Ti.Default)}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)&&this.codeMapStore.setRightClickedNodeData({nodeId:this.intersectedBuilding.node.path,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y,origin:"codeMap"}),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding),this.showTooltipForBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.labelSettingsFacade.clearSelectionLabel()),this.threeSceneService.clearConstantHighlight()),this.threeRendererService.render()}hasMouseMovedBeyondThreshold({x:t,y:i}){return Math.abs(this.mouse.x-t)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-i)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:t,y:i}){return this.mouse.x!==t||this.mouse.y!==i}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(t,i=!0){Ri(Ti.Pointer);let r=this.codeMapStore.getIdToNode().get(t.node.id);for(let{data:a}of Ji(r)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),i&&this.codeMapStore.setHoveredNodeId(t.node.path)}transformHTMLToSceneCoordinates(){let{renderer:t,renderer:{domElement:i}}=this.threeRendererService,n=t.getPixelRatio(),r=i.getBoundingClientRect(),a=this.mouse.x/i.width*n*2-1,s=-((this.mouse.y-r.top)/i.height*n)*2+1;return{x:a,y:s}}unhoverBuilding(t=!0){this.isGrabbingOrMoving()||Ri(Ti.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),t&&this.codeMapStore.setHoveredNodeId(null)}static{this.\u0275fac=function(i){return new(i||e)(E(ar),E(kt),E(ft),E(wr),E(Re),E(Bt),E(dl),E(or),E(Jr),E(lr),E(nr))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var r5=2,ea=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.codeMapStore=t,this.fileStoreReadWindow=i,this.threeSceneService=n,this.labelSettingsFacade=r,this.codeMapArrowService=a,this.threeStatsService=s,this.codeMapMouseEventService=l,this.colorCategoryCountsStore=d,this.nodesByColor={positive:[],neutral:[],negative:[]},this.subscription=this.fileStoreReadWindow.isLoadingFile$.pipe(Le(c=>c?this.onFileLoadingStarted():this.onFileLoadingFinished())).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}onFileLoadingStarted(){this.threeSceneService?.dispose()}onFileLoadingFinished(){this.threeStatsService?.resetPanels()}load(t,i=en){this.render(t,i),this.scaleMap(i)}render(t,i=en){i.geometry||this.visibleSortedNodes===void 0?this.rebuildBuildings(t):i.colors&&this.threeSceneService.recolorMapMesh(this.codeMapStore.getState()),i.colors&&this.getNodesMatchingColorSelector(this.unflattenedNodes),i.arrows&&this.setArrows(this.visibleSortedNodes)}rebuildBuildings(t){let i=this.getNodes(t),n=this.sortVisibleNodesByHeightDescending(i);this.visibleSortedNodes=n,this.unflattenedNodes=n.filter(({flat:a})=>!a);let r=this.codeMapStore.getState();if(this.threeSceneService.getMapMesh()?.canUpdateInPlace(n)){this.threeSceneService.updateMapMeshInPlace(i,n,r,wi(r.files));return}this.setNewMapMesh(i,n)}setNewMapMesh(t,i){let n=this.codeMapStore.getState(),r=new hf(i,n,wi(n.files));this.threeSceneService.setMapMesh(t,r)}scaleMap(t=en){this.codeMapMouseEventService.unhoverNode(),this.codeMapArrowService.scale(),this.threeSceneService.scaleHeight(),t.labels&&(this.labelSettingsFacade.clearLabels(),this.setLabels(this.unflattenedNodes))}getNodes(t){let i=this.codeMapStore.getState(),n=Co(i),{mapState:{layoutAlgorithm:r},files:a}=i,s=wi(a);switch(r){case Ja.StreetMap:case Ja.TreeMapStreet:return lf.createStreetLayoutNodes(t,i,n,_p(i),s);case Ja.SquarifiedTreeMap:return cf(t,i,n,s);default:return[]}}sortVisibleNodesByHeightDescending(t){return this.codeMapStore.getState().preferences.experimentalFeaturesEnabled?(this.setMinBuildingLength(t),t.filter(n=>n.visible&&n.width>0).sort((n,r)=>r.height-n.height)):t.filter(n=>n.visible&&n.length>0&&n.width>0).sort((n,r)=>r.height-n.height)}setMinBuildingLength(t){for(let i of t)i.length<=0&&(i.length=r5)}getNodesMatchingColorSelector(t){let i=this.codeMapStore.getState(),n=i.mapState.colorRange;this.nodesByColor={positive:[],negative:[],neutral:[]};for(let r of t)if(r.isLeaf){let a=r.attributes[i.mapState.colorMetric];i.mapState.colorMetric==="unary"?this.nodesByColor.positive.push(r):a!==null&&(a<n.from?this.nodesByColor.positive.push(r):a<n.to?this.nodesByColor.neutral.push(r):this.nodesByColor.negative.push(r))}this.colorCategoryCountsStore.setColorCategoryCounts({positive:this.nodesByColor.positive.length,neutral:this.nodesByColor.neutral.length,negative:this.nodesByColor.negative.length}),this.uncheckEmptyColorLabels()}uncheckEmptyColorLabels(){let t=this.codeMapStore.getState().mapState.colorLabels,i={};for(let n of cd)t[n]&&this.nodesByColor[n].length===0&&(i[n]=!1);Object.keys(i).length>0&&this.codeMapStore.setColorLabels(i)}setBuildingLabel(t,i){for(let n of t)this.labelSettingsFacade.addLeafLabel(n,i)}setLabels(t){if(this.labelSettingsFacade.clearLabels(),t===void 0||t.length===0)return;let i=this.codeMapStore.getState(),{showMetricLabelNodeName:n,showMetricLabelNameValue:r,colorLabels:a,amountOfTopLabels:s,labelMode:l}=i.mapState;if(n||r){let d=t[0].height,c=this.getTopNodeSelector(i,s);if(l===Ni.Color){let{colorMetric:m}=i.mapState,u=c(cd.filter(p=>a[p]).flatMap(p=>this.nodesByColor[p]).filter(p=>Number.isFinite(p.attributes[m])),p=>p.attributes[m]);this.setBuildingLabel(u,d)}else{let m=c(t.filter(u=>u.isLeaf),u=>u.height??0);this.setBuildingLabel(m,d)}}}getTopNodeSelector(t,i){return Ns(t)?(n,r)=>Cg(n,a=>xs(a.path),r,i):(n,r)=>Bd(n,r,i)}setArrows(t){this.codeMapArrowService.clearArrows(),this.codeMapArrowService.addEdgeMapBasedOnNodes(t),this.codeMapArrowService.addEdgePreview()}static{this.\u0275fac=function(i){return new(i||e)(E(wr),E(Re),E(ft),E(dl),E(Ng),E(kf),E(on),E(rr))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var l5=1e3/60,pl=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.store=t,this.actions$=i,this.threeRendererService=n,this.codeMapRenderService=r,this.threeViewerService=a,this.activeViewStore=s,this.viewReadinessStore=l,this.errorHandler=d,this.pendingInvalidation=null,this.lastRenderedMapNode=null,this.actionsRequiringRender$=this.actions$.pipe(st(...vg),Le(c=>{let m=xg(c);this.pendingInvalidation=this.pendingInvalidation?Sg([this.pendingInvalidation,m]):m})),this.mapDataChange$=St([this.store.select(Et),this.actionsRequiringRender$]).pipe(qe(([c])=>c)),this.dataChangedWhileMetricsViewIsShown$=this.mapDataChange$.pipe(ti(this.activeViewStore.activeView$),De(([,c])=>c==="metrics"),qe(([c])=>c)),this.switchedToStaleMetricsView$=this.activeViewStore.activeView$.pipe(De(c=>c==="metrics"&&this.viewReadinessStore.isStale("metrics")),Ht(()=>this.threeViewerService.isMapCanvasMounted$.pipe(De(Boolean),ut(1))),ti(this.store.select(Et)),qe(([,c])=>c)),this.renderCodeMap$=Ne(()=>Ki(this.dataChangedWhileMetricsViewIsShown$,this.switchedToStaleMetricsView$).pipe(De(c=>!!c.unifiedMapNode),lu(l5,iu,{leading:!1,trailing:!0}),Le(c=>this.renderMap(c)),Qi()),{dispatch:!1})}renderMap(t){try{this.codeMapRenderService.load(t.unifiedMapNode,this.consumeInvalidation(t.unifiedMapNode)),this.threeRendererService.render()}catch(i){this.errorHandler.handleError(i)}finally{js()}}consumeInvalidation(t){let i=t===this.lastRenderedMapNode?this.pendingInvalidation:null;return this.pendingInvalidation=null,this.lastRenderedMapNode=t,i??en}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(dt),E(kt),E(ea),E(lr),E(br),E(ur),E(cu))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var d5=350,$g=(()=>{class e{constructor(t,i,n,r){this.store=t,this.actions$=i,this.renderCodeMapEffect=n,this.viewReadinessStore=r,this.hideLoadingFileOnCommit$=Ne(()=>this.actions$.pipe(st(ri),qe(()=>cp({value:!1})))),this.markViewsStaleOnDataChange$=Ne(()=>Ki(this.store.select(Bn).pipe(pi(1)),this.actions$.pipe(st(ri))).pipe(Le(()=>{this.viewReadinessStore.markAllStale()})),{dispatch:!1}),this.markMetricsReadyOnRender$=Ne(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(jt(d5),De(()=>this.viewReadinessStore.isStale("metrics")),Le(()=>{this.viewReadinessStore.markReady("metrics")})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(dt),E(pl),E(ur))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var jg=[pl,bg,$g];var Sr=e=>(e=e.trim(),e.startsWith("*")||e.endsWith("*")||e.startsWith("/")||e.startsWith("./")?e:!e.startsWith('"')&&!e.endsWith('"')?e.startsWith("!")?e:`*${e}*`:e);var fl=e=>{let o=[],t=e.split(",");if(t[0].startsWith("!")){t[0]=t[0].slice(1);for(let i of t)i.length>0&&o.push({path:`!${Sr(i)}`});return o}for(let i of t){if(i.startsWith("!"))break;i.length>0&&o.push({path:Sr(i)})}return o};var Hg="ExtensionRuleAction",Ud=(e,...o)=>({type:Hg,action:{effect:e},extensions:o}),Ug=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.extensionPatternToRules$=this.actions$.pipe(st(Hg),qe(n=>({effect:n.action.effect,rules:fl(n.extensions.join(","))})),Qi()),this.ruleForExtensions$=Ne(()=>this.extensionPatternToRules$.pipe(De(({effect:n})=>n==="flatten"||n==="exclude"),Le(({effect:n,rules:r})=>{this.store.dispatch(n==="flatten"?bo({items:r}):go({items:r}))})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Gg=[Ug];var Xg=[];var Kg=(()=>{class e{constructor(t){this.store=t,this.updateAmountOfEdgePreviews$=Ne(()=>St([this.store.select(Fs),this.store.select(rs)]).pipe(pi(1),De(([i,n])=>n>i),qe(([i])=>Ci({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var h5=Ae(gp,bf,(e,o)=>({heightMetric:e,isLinked:o})),Qg=(()=>{class e{constructor(t){this.store=t,this.linkHeightAndColorMetric$=Ne(()=>this.store.select(h5).pipe(De(({isLinked:i})=>i),qe(({heightMetric:i})=>_t({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var yr=e=>{let o=e.maxValue-e.minValue,t=Math.round(o/3),i=t+e.minValue,n=t*2+e.minValue;return{from:i,to:n}};var Zg=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.resetColorRangeOnColorMetricChange$=Ne(()=>this.actions$.pipe(st(_t),Ht(()=>this.store.select(Mo).pipe(ut(1))),qe(n=>Ut({value:yr(n)}))))}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Yg=(()=>{class e{constructor(t){this.store=t,this.resetIsEdgeMetricVisible$=Ne(()=>this.store.select(Vn).pipe(ti(this.store.select(vp)),De(([,i])=>!i),qe(()=>zn())))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Zd=sd(i1(),1),wq=Zd.default.configure;var o1=Zd.default;var n1=(()=>{class e{constructor(t,i,n){this.store=t,this.mapStateReadWindow=i,this.metricsLensSourceReadWindow=n,this.updateMapColors$=Ne(()=>this.store.select(hp).pipe(qe(r=>{let a=this.metricsLensSourceReadWindow.getAttributeDescriptors(),s=this.mapStateReadWindow.getMapColors();if(a[r]?.direction===1){let l=JSON.parse(o1(s)),d=l.negative;return l.negative=l.positive,l.positive=d,ai({value:l})}return ai({value:s??Pt})})))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(xe),E(As))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var r1=[Zg,n1,Qg,Yg,Kg];var Cr=(()=>{class e{constructor(t){this.store=t}setStandard(t){this.store.dispatch(Yu({files:t}))}removeFiles(t){this.store.dispatch(Zu({fileNames:t}))}setDelta(t,i){this.store.dispatch(ip({referenceFile:t,comparisonFile:i}))}setDeltaReference(t){this.store.dispatch(tp({file:t}))}setDeltaComparison(t){this.store.dispatch(ep({file:t}))}switchReferenceAndComparison(){this.store.dispatch(Ju())}setFiles(t){this.store.dispatch(Qu({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var gl=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.filesRepo=i,this.navBarWriteStore=n,this.lastSetFilesOfPreviousMode=[],this.subscription=this.fileStoreReadWindow.files$.pipe(au(),De(([r,a])=>wi(r)!==wi(a)||a.length===0),Le(([r,a])=>{this.lastSetFilesOfPreviousMode=a.length===0?a:r})).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}toggle(){let t=this.filesRepo.getFiles();if(!wi(t)){this.lastSetFilesOfPreviousMode=this.filterNoneExisting(t,this.lastSetFilesOfPreviousMode);let n=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===oi.Reference)??t.find(a=>a.selectedAs===oi.Partial);if(n===void 0)return;let r=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===oi.Comparison);this.navBarWriteStore.setDelta(n.file,r?.file);return}if(this.lastSetFilesOfPreviousMode.length>0){this.navBarWriteStore.setFiles(this.lastSetFilesOfPreviousMode);return}let i=t.find(n=>n.selectedAs===oi.Reference)?.file;i!==void 0&&this.navBarWriteStore.setStandard([i])}filterNoneExisting(t,i){return i.filter(n=>t.find(r=>np(r.file,n.file)))}static{this.\u0275fac=function(i){return new(i||e)(E(Re),E(ap),E(Cr))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var S5="This file has no domain-language data \u2014 switched to the map view.",y5="Left compare mode \u2014 the domain view shows a single word cloud.",C5=0,a1=(()=>{class e{constructor(){this.store=T(he),this.router=T(Nn),this.toastService=T(h0),this.fileSelectionModeService=T(gl),this.unreachableReason$=St([this.store.select(C0),this.store.select(ns)]).pipe(qe(([t,i])=>({reason:this.toUnreachableReason(t,i),wasOnDomainRoute:this.isOnDomainRoute()})),jt(C5),Oa({bufferSize:1,refCount:!0})),this.navigated$=this.router.events.pipe(De(t=>t instanceof Iu)),this.redirectAwayFromUnreachableDomainView$=Ne(()=>this.unreachableReason$.pipe(De(({reason:t,wasOnDomainRoute:i})=>t!==null&&i&&this.isOnDomainRoute()),Le(({reason:t})=>this.redirectToMetricsView(t))),{dispatch:!1}),this.handleTheDomainViewBeingOpenedWhileUnreachable$=Ne(()=>this.navigated$.pipe(Ht(()=>this.unreachableReason$.pipe(ut(1))),De(({reason:t})=>t!==null&&this.isOnDomainRoute()),Le(({reason:t})=>this.makeTheDomainViewReachable(t))),{dispatch:!1})}makeTheDomainViewReachable(t){if(t==="delta"){this.leaveCompareMode();return}this.redirectToMetricsView(t)}leaveCompareMode(){this.fileSelectionModeService.toggle(),this.toastService.show(y5)}toUnreachableReason(t,i){return t?"missing-domain-data":i?"delta":null}redirectToMetricsView(t){this.router.navigateByUrl(Ii.metrics,{replaceUrl:!0}),t==="missing-domain-data"&&this.toastService.show(S5)}isOnDomainRoute(){return Bf(this.router.url)==="domain"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var s1=[a1];var l1=(()=>{class e{constructor(t,i){this.guard=t,this.errorDialogService=i,this.showErrorDialogIfExcludedNodesResultInEmptyMap$=Ne(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(De(n=>n.resultsInEmptyMap),Le(()=>{js(),this.errorDialogService.open({title:"Exclude Error",message:"Excluding all buildings is not possible."})})),{dispatch:!1}),this.addExcludedNodes$=Ne(()=>this.guard.doExcludedNodesResultInEmptyMap$.pipe(De(n=>!n.resultsInEmptyMap),qe(n=>go({items:n.items}))))}static{this.\u0275fac=function(i){return new(i||e)(E(Us),E(os))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var c1=[l1];var d1=e=>e.some(o=>o.name==="rloc")?"rloc":"unary";var M5=["rloc","real_lines_of_code","loc","lines_of_code","lines","statements","functions"],h1=["complexity","mcc","cognitive_complexity","sonar_complexity","sonar_cognitive_complexity","max_nesting_level","indentation_level"];function m1(e){return e.some(o=>o.maxValue>0)}function u1(e,o){let t=[],i;for(let n of e)if(n.maxValue&&(t.push(n.name),i=n.name,--o===0))return t;if(!i)throw new Error("there are no metrics available");for(;o-- >0;)t.push(i);return t}function p1(e){let o=[],t={AreaMetric:M5,HeightMetric:h1,ColorMetric:h1},i=new Set(e.map(n=>n.name));for(let n in t)for(let r of t[n])if(i.has(r)){o.push(r);break}return o}function f1(e,o,t,i,n,r=!1){let a=new Set(t.map(f=>f.name)),s=new Set(i.map(f=>f.name)),l=f=>!!f&&a.has(f),d=f=>!!f&&s.has(f),c=n?e:Hr,m=r?{areaMetric:null,heightMetric:null,colorMetric:null,distributionMetric:null,edgeMetric:null}:o,u=_5(c,m,t,l);if(u===null)return null;let p=m.edgeMetric;return d(c.edgeMetric)?p=c.edgeMetric:d(p)||(p=i[0]?.name),et(ke({},u),{edgeMetric:p})}function _5(e,o,t,i){let n=i(e.areaMetric)?e.areaMetric:o.areaMetric,r=i(e.heightMetric)?e.heightMetric:o.heightMetric,a=i(e.colorMetric)?e.colorMetric:o.colorMetric;if(i(n)&&i(r)&&i(a))return{areaMetric:n,heightMetric:r,colorMetric:a,distributionMetric:o.distributionMetric};if(!m1(t))return null;let[s,l,d]=E5(t);return{areaMetric:i(e.areaMetric)?e.areaMetric:s,heightMetric:i(e.heightMetric)?e.heightMetric:l,colorMetric:i(e.colorMetric)?e.colorMetric:d,distributionMetric:d1(t)}}function E5(e){let o=p1(e),[t,i,n]=o;return t&&i&&n?o:u1(e,3)}function g1(e){let o={};for(let t of e)for(let i of Object.keys(t))o[i]||(o[i]=t[i]);return o}function b1(e){let o={},t={};for(let i of e){for(let n of Object.keys(i.nodes))o[n]||(o[n]=i.nodes[n]);for(let n of Object.keys(i.edges))t[n]||(t[n]=i.edges[n])}return{nodes:o,edges:t}}var bl=class{constructor(){this.wordsByTextPerPath=new Map}add(o,t,i){let n=this.wordsByTextOf(o);for(let r of t){let a=n.get(r.text);n.set(r.text,a?i(a,r):ke({},r))}}toDomainLensData(){let o={};for(let[t,i]of this.wordsByTextPerPath)o[t]=[...i.values()];return o}wordsByTextOf(o){let t=this.wordsByTextPerPath.get(o);return t||(t=new Map,this.wordsByTextPerPath.set(o,t)),t}};function v1(e,o){if(e.length===1)return e[0].settings.fileSettings.domainWords;let t=new bl;for(let i of e)for(let[n,r]of Object.entries(i.settings.fileSettings.domainWords)){if(!o){t.add(n,r,wd);continue}t.add(Rp(i.fileMeta.fileName,n),r,wd),n===jr.rootPath&&t.add(jr.rootPath,r,S0)}return t.toDomainLensData()}function x1(e,o){if(e.length===1)return e[0].settings.fileSettings.markedPackages;let t=new Map;for(let i of e)if(i.settings.fileSettings.markedPackages)for(let n of i.settings.fileSettings.markedPackages){let r={path:o?vs(i.fileMeta.fileName,n.path):n.path,color:n.color};t.set(`${r.path}|${r.color}`,r)}return[...t.values()]}function w1(e,o){let t=new Map;for(let r of e)for(let a of r.settings.fileSettings.blacklist??[]){let s=o&&e.length>1?vs(r.fileMeta.fileName,a.path):a.path;t.set(`${s}|${a.type}`,{path:s,type:a.type})}let i=[],n=[];for(let{path:r,type:a}of t.values())(a==="flatten"?n:i).push({path:r});return{excludedNodes:i,flattenedNodes:n}}var S1=(()=>{class e{constructor(t,i,n,r,a,s,l){this.actions$=t,this.store=i,this.ccStateSnapshot=n,this.fileStoreReadWindow=r,this.mapStateReadWindow=a,this.queryParamsService=s,this.loadInitialFileStore=l,this.fileSetTriggers$=Ki(this.actions$.pipe(st(ri),qe(d=>({kind:"fileSet",provenance:d}))),this.store.select(Bn).pipe(pi(1),qe(()=>({kind:"fileSet",provenance:null})))).pipe(Qi()),this.fileSetChanged$=this.fileSetTriggers$.pipe(nu(this.fileSetTriggers$.pipe(jt(0))),De(d=>d.length>0),qe(d=>({kind:"fileSet",provenance:d.find(c=>c.provenance)?.provenance??null}))),this.reconcileFileSet$=Ne(()=>this.fileSetChanged$.pipe(Le(d=>{this.reconcile(d)})),{dispatch:!1}),this.reconcileMetricData$=Ne(()=>St([this.store.select(Co),this.store.select(Ds)]).pipe(pi(1),jt(0),Le(()=>{this.reconcile({kind:"metricData"})})),{dispatch:!1})}reconcile(t){t.kind==="fileSet"&&(this.mergeFileSettings(),this.updateFileRoot());let{nodeMetricData:i,edgeMetricData:n}=er(this.ccStateSnapshot.get());if(!i)return;let r=this.currentSelection(),a=f1(t.kind==="fileSet"?t.provenance?.urlMetrics??Hr:Hr,r,i,n,this.queryParamsService.hasFile(),t.kind==="fileSet"&&!!t.provenance?.forceDefaultMetrics);if(!a)return;this.applySelection(a,r);let s=a.colorMetric!==r.colorMetric;if(t.kind==="fileSet"||s){let l=Jp(i,a.colorMetric);this.store.dispatch(Ut({value:yr(l)}))}t.kind==="fileSet"&&(this.store.dispatch(Gn()),this.updateVisibleTopLabels(),this.applyRestoredSettings(t.provenance?.restoredSettings??null))}applyRestoredSettings(t){t&&(this.loadInitialFileStore.applyMetricsLensSource(t.metricsLensSource),this.loadInitialFileStore.applyDependencyLensSource(t.dependencyLensSource),this.loadInitialFileStore.applyDomainLensSource(t.domainLensSource),this.loadInitialFileStore.applySharedView(t.sharedView))}mergeFileSettings(){let t=this.fileStoreReadWindow.getFiles(),i=Pn(t),n=op(t),r=this.fileStoreReadWindow.getVisibleFileStates(),a=r.map(({file:d})=>d.settings.fileSettings.attributeTypes),s=r.map(({file:d})=>d.settings.fileSettings.attributeDescriptors),l=b1(a);this.store.dispatch(Qt({value:{sharedView:et(ke({},w1(i,n)),{markedPackages:x1(i,n)}),metricsLensSource:{attributeTypes:l.nodes,attributeDescriptors:g1(s)},dependencyLensSource:{attributeTypes:l.edges},domainLensSource:{words:v1(i,n)}}}))}updateFileRoot(){let t=this.fileStoreReadWindow.getReferenceFile();t&&jr.updateRoot(t.map.name)}currentSelection(){let{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}=this.mapStateReadWindow.getMapState();return{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}}applySelection(t,i){this.dispatchIfChanged(as,t.distributionMetric,i.distributionMetric),this.dispatchIfChanged(Mi,t.areaMetric,i.areaMetric),this.dispatchIfChanged(ki,t.heightMetric,i.heightMetric),this.dispatchIfChanged(_t,t.colorMetric,i.colorMetric),this.dispatchIfChanged(Gt,t.edgeMetric,i.edgeMetric)}dispatchIfChanged(t,i,n){i!==n&&this.store.dispatch(t({value:i}))}updateVisibleTopLabels(){let t=Bi(this.ccStateSnapshot.get()),i=this.mapStateReadWindow.getAmountOfTopLabels();this.store.dispatch(Si({value:Math.min(i,s0(t))}))}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he),E(Vt),E(Re),E(xe),E(Gs),E(u0))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var q5=2e3;function y1(e){if(Pf()||typeof requestIdleCallback!="function"){e();return}requestIdleCallback(()=>e(),{timeout:q5})}var T5=[_i,po,uo,ai,to,io,Hn,ho,mo,Cp,zn,$n,On,Wn,ls,co,oo,Ci,Si,so,cs,no,ao,ro,lo,Ei,Gt,Ut,jn,ki,as,_t,Mi],R5=[Pi,fs,Gn,gs,bs,us,ps,go,bo,Un,vo,Xn,xo,wo],I5=[Qp,Kp],A5=[Up],D5=[Uf,Gf,Xf,Yf,e0,Kf,Qf,Hf,t0,n0,jf,Jf,i0,o0,Zf],C1=[[...I5],[...A5],[...D5],[...T5],[...R5],[...qf],[...is],Qt].flat();var M1=500,F5=[...is,Qt],_1=(()=>{class e{constructor(t,i){this.actions$=t,this.ccStateSnapshot=i,this.saveCcState$=Ne(()=>this.actions$.pipe(De(n=>n.type!==Xo.type),st(...C1),jt(M1),Le(()=>this.saveWhenIdle(()=>p0(this.ccStateSnapshot.get())))),{dispatch:!1}),this.saveCcFiles$=Ne(()=>this.actions$.pipe(st(...F5),jt(M1),Le(()=>this.saveWhenIdle(()=>f0(this.ccStateSnapshot.get().files)))),{dispatch:!1})}saveWhenIdle(t){y1(()=>{t().catch(i=>console.error("Failed to persist the session:",i))})}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var E1=[Gt,ki,_t,Mi,Ku];var k1=(()=>{class e{constructor(t,i,n,r,a){this.actions$=t,this.mapStateReadWindow=i,this.fileStoreReadWindow=n,this.queryParamsService=r,this.store=a,this.saveMetricsInQueryParameters$=Ne(()=>this.actions$.pipe(st(...E1),ti(this.store.select(Ds)),qe(([,s])=>s&&s.length>0),jt(100),Le(s=>{this.updateMetricQueryParameters(s)})),{dispatch:!1})}updateMetricQueryParameters(t){let{edgeMetric:i,heightMetric:n,colorMetric:r,areaMetric:a}=this.mapStateReadWindow.getMapState();this.queryParamsService.write({areaMetric:a,heightMetric:n,colorMetric:r,edgeMetric:i,isEdgeMetricDefined:t,currentFilesAreSampleFiles:this.fileStoreReadWindow.getCurrentFilesAreSampleFiles()})}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(xe),E(Re),E(Gs),E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var q1=[S1,_1,k1];var vl=class{constructor(){this.detachedHandles=new Map}routeKey(o){return o.routeConfig?.path??null}shouldDetach(o){return this.routeKey(o)!==null}store(o,t){let i=this.routeKey(o);i!==null&&(t?this.detachedHandles.set(i,t):this.detachedHandles.delete(i))}shouldAttach(o){let t=this.routeKey(o);return t!==null&&this.detachedHandles.has(t)}retrieve(o){let t=this.routeKey(o);return t===null?null:this.detachedHandles.get(t)??null}shouldReuseRoute(o,t){return o.routeConfig===t.routeConfig}};var T1=(()=>{class e extends _u{constructor(){super(T(ld),T(Mu,{optional:!0})??void 0),this.platformLocation=T(ld)}prepareExternalUrl(t){let i=new URL(this.platformLocation.href);return i.hash=super.prepareExternalUrl(t),i.toString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var R1={metricsLensSource:Zp,dependencyLensSource:Gp,domainLensSource:$f,domainState:r0,preferences:_f,mapState:Mp,sharedView:Dp,files:lp,isLoadingFile:dp,currentFilesAreSampleFiles:sp},I1=e=>(o,t)=>{let i=zf(t)?a0(ke({},o),t.value):o;return e(i,t)};var A1=(()=>{class e{constructor(){this.actions$=T(dt),this.domainSelectionStore=T(M0),this.resetDomainSelectionAfterLoad$=Ne(()=>this.actions$.pipe(st(ri),Le(()=>this.domainSelectionStore.clear())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var D1=[A1];var F1=e=>({type:"RuleFromSearchPatternAction",action:{effect:e}}),L1=(()=>{class e{constructor(t,i,n){this.actions$=t,this.store=i,this.excludeGuard=n,this.searchPatternToRules$=this.actions$.pipe(st("RuleFromSearchPatternAction"),ti(this.store.select(fo)),qe(([r,a])=>({effect:r.action.effect,rules:fl(a)})),Qi()),this.flattenSearchPattern$=Ne(()=>this.searchPatternToRules$.pipe(De(({effect:r})=>r==="flatten"),Le(({rules:r})=>{this.store.dispatch(bo({items:r})),this.store.dispatch(Pi({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Ne(()=>this.searchPatternToRules$.pipe(De(({effect:r})=>r==="exclude"),Le(()=>{this.excludeGuard.doExcludedNodesResultInEmptyMap$.pipe(ut(1),De(({resultsInEmptyMap:r})=>!r),Le(()=>{this.store.dispatch(Pi({value:""}))})).subscribe()}),qe(({rules:r})=>Tp({items:r}))))}static{this.\u0275fac=function(i){return new(i||e)(E(dt),E(he),E(Us))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var N1=[L1];var L5=(e,o,t,i,n)=>{let r=[],a=Yd("area",e.areaMetric,o,n);a&&r.push(a);let s=Yd("height",e.heightMetric,o,n);s&&r.push(s);let l=Yd("color",e.colorMetric,o,n);l&&!i&&r.push(et(ke({},l),{inverted:t.isColorRangeInverted===!0}));let d=N5(e.edgeMetric,o,n);return d&&r.push(d),r},Yd=(e,o,t,i)=>{if(o)return{kind:e,metricName:o,value:i?.attributes?.[o],descriptor:t?.[o]}},N5=(e,o,t)=>{if(!e)return;let i=t?.edgeAttributes?.[e];if(i)return{kind:"edge",metricName:e,incoming:i.incoming??0,outgoing:i.outgoing??0,descriptor:o?.[e]}},P1=Ae(ir,Yn,ss,ns,Kt,L5);var P5=.3333333333333333,B5=2/3,Jd=(e,o,t,i)=>{if(o===void 0||t===void 0||t===o)return{fraction:1,severity:"neutral"};let n=V5((e-o)/(t-o));return{fraction:n,severity:W5(i===1?1-n:n)}},V5=e=>Math.min(1,Math.max(0,e)),W5=e=>e<P5?"success":e<B5?"warning":"error";var eh=e=>e===void 0||e===0||Number.isNaN(e),th=e=>eh(e.value)&&!e.delta,B1={fraction:0,severity:"neutral"},O5="unary",z5=(e,o,t,i)=>e?.attributes?Object.keys(e.attributes).filter(n=>n!==O5).sort((n,r)=>n.localeCompare(r)).map(n=>$5(n,e,o,t,i)):[],$5=(e,o,t,i,n)=>{let r=n?.[e],a=o.attributes[e];return{name:e,value:a,delta:o.deltas?.[e],mapBar:j5(e,a,t,r),rangeBar:H5(e,a,i,r),descriptor:r}},j5=(e,o,t,i)=>{if(eh(o))return B1;let n=t?.attributes?.[e];return Jd(o,0,n,i?.direction)},H5=(e,o,t,i)=>{if(eh(o))return B1;let n=t.nodeMetricData.find(r=>r.name===e);return Jd(o,n?.minValue,n?.maxValue,i?.direction)},V1=Ae(Kt,Et,Co,Yn,(e,o,t,i)=>z5(e,o.unifiedMapNode,{nodeMetricData:t},i));var Ao=(()=>{class e{constructor(t){this.store=t,this.selectedNode$=this.store.select(Kt),this.mappingBlocks$=this.store.select(P1),this.metricRows$=this.store.select(V1)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ci=(()=>{class e{constructor(){this.readStore=T(Ao),this.threeSceneService=T(ft),this.threeRendererService=T(kt),this.selectedNode=D(this.readStore.selectedNode$,{initialValue:void 0}),this.isVisible=Y(()=>this.selectedNode()!=null)}close(){this.threeSceneService.clearSelection(),this.threeRendererService.render()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var W1=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 U5(e,o){if(e&1&&(y(0,"span",2)(1,"span",3),g(2),M(),y(3,"span",4),g(4),M(),y(5,"span",5),g(6),M()()),e&2){let t=B();h(2),ge("\u0394",t.added),h(2),ge("\u0394",t.removed>0?-t.removed:0),h(2),ge("\u0394",t.changed)}}function G5(e,o){if(e&1&&(y(0,"span",1),g(1),M(),K(2,U5,7,3,"span",2)),e&2){let t=o,i=B();h(),Yi(" ",t.all," ",t.all===1?"file":"files"," "),h(),Q(i.isDeltaState()?2:-1)}}var O1=(()=>{class e{constructor(){this.isFolder=Z.required(),this.fileCount=Z(),this.isDeltaState=Z.required()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(y(0,"span",0),g(1),M(),K(2,G5,3,3)),i&2){let r;h(),Te(n.isFolder()?"folder":"file"),h(),Q((r=n.isFolder()&&n.fileCount())?2:-1,r)}},encapsulation:2})}}return e})();function X5(e,o){if(e&1&&(y(0,"p",0),g(1),M()),e&2){let t=B();h(),Te(t.parentPath())}}function K5(e,o){if(e&1&&(y(0,"a",2),pe(1,"i",3),M()),e&2){let t=o;ce("href",t,Rn)("title",t)}}var z1=(()=>{class e{constructor(){this.parentPath=Z.required(),this.nodeName=Z.required(),this.link=Z()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(K(0,X5,2,1,"p",0),y(1,"p",1),g(2),K(3,K5,2,2,"a",2),M()),i&2){let r;Q(n.parentPath()?0:-1),h(2),ge(" ",n.nodeName()," "),h(),Q((r=n.link())?3:-1,r)}},encapsulation:2})}}return e})();function Q5(e,o){if(e&1){let t=we();x(0,"div",4)(1,"div",5),V(2,"cc-inspector-node-path",6)(3,"cc-inspector-node-badges",7),v(),x(4,"button",8),z("click",function(){ae(t);let n=B();return se(n.copyPath())}),V(5,"i",9),v()()}if(e&2){let t=B();h(2),F("parentPath",t.parentPath())("nodeName",t.nodeName())("link",t.nodeLink()),h(),F("isFolder",t.isFolder())("fileCount",t.fileCount())("isDeltaState",t.isDeltaState()),h(),F("title",t.copied()?"Copied!":"Copy path"),h(),We("fa-copy",!t.copied())("fa-check",t.copied())}}var $1=(()=>{class e{static{this.COPY_FEEDBACK_MS=1500}constructor(){this.readStore=T(Ao),this.fileStoreReadWindow=T(Re),this.visibilityService=T(ci),this.selectedNode=D(this.readStore.selectedNode$,{requireSync:!0}),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.copied=Se(!1),this.nodeName=Y(()=>this.selectedNode()?.name??""),this.nodeLink=Y(()=>this.selectedNode()?.link),this.parentPath=Y(()=>{let t=this.selectedNode();return t?.path?t.path.slice(0,t.path.length-t.name.length):""}),this.isFolder=Y(()=>this.selectedNode()?.type===eo.FOLDER),this.fileCount=Y(()=>W1(this.selectedNode())),T(Tn).onDestroy(()=>clearTimeout(this.copyFeedbackTimeout))}close(){this.visibilityService.close()}async copyPath(){let t=this.selectedNode()?.path;t&&(await navigator.clipboard.writeText(t),this.copied.set(!0),clearTimeout(this.copyFeedbackTimeout),this.copyFeedbackTimeout=setTimeout(()=>this.copied.set(!1),e.COPY_FEEDBACK_MS))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Inspector"),v(),x(3,"button",2),z("click",function(){return n.close()}),V(4,"i",3),v()(),K(5,Q5,6,11,"div",4)),i&2&&(h(5),Q(n.selectedNode()?5:-1))},dependencies:[z1,O1],encapsulation:2})}}return e})();var an=e=>e===void 0||Number.isNaN(e)?"-":e.toLocaleString("en-US");function Z5(e,o){if(e&1&&(y(0,"a",4),pe(1,"i",7),M()),e&2){let t=B();ce("href",o,Rn),ot("data-testid","mapping-block-link-"+t.block().kind)}}function Y5(e,o){if(e&1&&(g(0),y(1,"span",8),g(2,"(in/out)"),M()),e&2){let t=B();ge(" ",t.edgeCountText()," ")}}function J5(e,o){if(e&1&&g(0),e&2){let t=B();ge(" ",t.formattedValue()," ")}}function eS(e,o){e&1&&(y(0,"span",6),g(1,"\xB7 inverted"),M())}var j1=(()=>{class e{constructor(){this.block=Z.required(),this.iconClasses=Y(()=>`${e.ICONS[this.block().kind]} text-xs text-primary`),this.formattedValue=Y(()=>an(this.block().value)),this.edgeCountText=Y(()=>`${an(this.block().incoming)}/${an(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(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(y(0,"div",0)(1,"span",1),g(2),M(),pe(3,"i",2),M(),y(4,"p",3),pt(5,"attributeDescriptorTooltip"),g(6),K(7,Z5,2,2,"a",4),M(),y(8,"p",5),K(9,Y5,3,1)(10,J5,1,1),K(11,eS,2,0,"span",6),M()),i&2){let r;h(2),Te(n.block().kind),h(),Dt(n.iconClasses()),h(),ce("title",Fn(5,10,n.block().descriptor,n.block().metricName)),ot("data-testid","mapping-block-name-"+n.block().kind),h(2),ge(" ",n.block().metricName," "),h(),Q((r=n.block().descriptor?.link)?7:-1,r),h(),ot("data-testid","mapping-block-value-"+n.block().kind),h(),Q(n.block().kind==="edge"?9:10),h(2),Q(n.block().inverted?11:-1)}},dependencies:[pr],encapsulation:2})}}return e})();var tS=(e,o)=>o.kind;function iS(e,o){if(e&1&&V(0,"cc-inspector-mapping-block",2),e&2){let t=o.$implicit;F("block",t)}}var H1=(()=>{class e{constructor(){this.readStore=T(Ao),this.mappingBlocks=D(this.readStore.mappingBlocks$,{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"span",0),g(1,"Metric Mapping"),v(),x(2,"div",1),Pe(3,iS,1,1,"cc-inspector-mapping-block",2,tS),v()),i&2&&(h(3),Be(n.mappingBlocks()))},dependencies:[j1],encapsulation:2})}}return e})();var xl=(()=>{class e{constructor(){this.comparisonMode=Se("map")}setComparisonMode(t){this.comparisonMode.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var U1=(()=>{class e{constructor(){this.comparisonModeService=T(xl),this.comparisonMode=this.comparisonModeService.comparisonMode}setComparisonMode(t){this.comparisonModeService.setComparisonMode(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.setComparisonMode("map")}),g(2," map "),M(),y(3,"button",2),ie("click",function(){return n.setComparisonMode("range")}),g(4," range "),M()()),i&2&&(h(),We("btn-active",n.comparisonMode()==="map"),h(2),We("btn-active",n.comparisonMode()==="range"))},encapsulation:2})}}return e})();function oS(e,o){e&1&&(y(0,"a",2),pe(1,"i",7),M()),e&2&&ce("href",o,Rn)}function nS(e,o){if(e&1&&(y(0,"span",8),g(1),M()),e&2){let t=B();ze("color",t.deltaColor()),h(),Te(t.formattedDelta())}}var wl=(()=>{class e{constructor(){this.row=Z.required(),this.comparisonMode=Z.required(),this.positiveDeltaColor=Z.required(),this.negativeDeltaColor=Z.required(),this.bar=Y(()=>this.comparisonMode()==="map"?this.row().mapBar:this.row().rangeBar),this.formattedValue=Y(()=>an(this.row().value)),this.hasDelta=Y(()=>!!this.row().delta),this.formattedDelta=Y(()=>`\u0394${an(this.row().delta)}`),this.deltaColor=Y(()=>(this.row().delta??0)>0?this.positiveDeltaColor():this.negativeDeltaColor()),this.barClasses=Y(()=>`h-full rounded ${e.SEVERITY_CLASSES[this.bar().severity]}`),this.barWidthPercentage=Y(()=>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(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(y(0,"div",0)(1,"span",1),pt(2,"attributeDescriptorTooltip"),g(3),K(4,oS,2,1,"a",2),M(),y(5,"span",3),K(6,nS,2,3,"span",4),g(7),M()(),y(8,"div",5),pe(9,"div",6),M()),i&2){let r;h(),ce("title",Fn(2,9,n.row().descriptor,n.row().name)),h(2),ge(" ",n.row().name," "),h(),Q((r=n.row().descriptor?.link)?4:-1,r),h(2),Q(n.hasDelta()?6:-1),h(),ge(" ",n.formattedValue()," "),h(2),Dt(n.barClasses()),ze("width",n.barWidthPercentage(),"%")}},dependencies:[pr],encapsulation:2})}}return e})();var rS=(e,o)=>o.name;function aS(e,o){if(e&1&&V(0,"cc-inspector-metric-row",3),e&2){let t=o.$implicit,i=B(3);F("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.positiveDeltaColor())("negativeDeltaColor",i.negativeDeltaColor())}}function sS(e,o){if(e&1&&(x(0,"div",2),Pe(1,aS,1,4,"cc-inspector-metric-row",3,rS),v()),e&2){let t=B(2);h(),Be(t.rows())}}function lS(e,o){if(e&1){let t=we();x(0,"button",0),z("click",function(){ae(t);let n=B();return se(n.toggleEmptyMetrics())}),V(1,"i",1),g(2),v(),K(3,sS,3,0,"div",2)}if(e&2){let t=B();h(),We("fa-chevron-right",!t.showEmptyMetrics())("fa-chevron-down",t.showEmptyMetrics()),h(),ge(" Empty metrics (",t.rows().length,") "),h(),Q(t.showEmptyMetrics()?3:-1)}}var G1=(()=>{class e{constructor(){this.rows=Z.required(),this.comparisonMode=Z.required(),this.positiveDeltaColor=Z.required(),this.negativeDeltaColor=Z.required(),this.showEmptyMetrics=Se(!1)}toggleEmptyMetrics(){this.showEmptyMetrics.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&K(0,lS,4,6),i&2&&Q(n.rows().length>0?0:-1)},dependencies:[wl],encapsulation:2})}}return e})();var cS=(e,o)=>o.name;function dS(e,o){e&1&&V(0,"cc-inspector-comparison-toggle")}function hS(e,o){e&1&&(x(0,"p",2),g(1,"No metrics available"),v())}function mS(e,o){if(e&1&&V(0,"cc-inspector-metric-row",4),e&2){let t=o.$implicit,i=B(2);F("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.mapColors().positiveDelta)("negativeDeltaColor",i.mapColors().negativeDelta)}}function uS(e,o){if(e&1&&(x(0,"div",3),Pe(1,mS,1,4,"cc-inspector-metric-row",4,cS),v(),V(3,"cc-inspector-empty-metrics",5)),e&2){let t=B();h(),Be(t.metricRowsWithValues()),h(2),F("rows",t.emptyMetricRows())("comparisonMode",t.comparisonMode())("positiveDeltaColor",t.mapColors().positiveDelta)("negativeDeltaColor",t.mapColors().negativeDelta)}}var X1=(()=>{class e{constructor(){this.readStore=T(Ao),this.mapStateReadWindow=T(xe),this.comparisonModeService=T(xl),this.metricRows=D(this.readStore.metricRows$,{requireSync:!0}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.comparisonMode=this.comparisonModeService.comparisonMode,this.metricRowsWithValues=Y(()=>this.metricRows().filter(t=>!th(t))),this.emptyMetricRows=Y(()=>this.metricRows().filter(t=>th(t)))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Metrics"),v(),K(3,dS,1,0,"cc-inspector-comparison-toggle"),v(),K(4,hS,2,0,"p",2)(5,uS,4,4)),i&2&&(h(3),Q(n.metricRows().length>0?3:-1),h(),Q(n.metricRows().length===0?4:5))},dependencies:[U1,G1,wl],encapsulation:2})}}return e})();var ih=(()=>{class e{constructor(){this.visibilityService=T(ci),this.isVisible=this.visibilityService.isVisible}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&2&&(ot("aria-hidden",!n.isVisible()),ze("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))"),We("translate-x-full",!n.isVisible())("pointer-events-none",!n.isVisible()))},decls:4,vars:0,consts:[[1,"min-h-0","flex-1","overflow-y-auto"]],template:function(i,n){i&1&&(V(0,"cc-inspector-header")(1,"cc-inspector-metric-mapping"),x(2,"div",0),V(3,"cc-inspector-metrics-list"),v())},dependencies:[$1,H1,X1],encapsulation:2})}}return e})();function pS(e,o){e&1&&(x(0,"div",1)(1,"div",2)(2,"span"),g(3," The graphics card stopped rendering the map, usually because it ran out of memory. Reload the page, and try a smaller map or a smaller browser window. "),v()()())}var oh=(()=>{class e{constructor(t,i,n,r,a){this.inspectorVisibilityService=t,this.fileStoreReadWindow=i,this.threeViewerService=n,this.codeMapMouseEventService=r,this.elementReference=a,this.isLoadingFile$=this.fileStoreReadWindow.isLoadingFile$,this.isContextLost$=this.threeViewerService.isContextLost$}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start()}ngOnDestroy(){this.threeViewerService.stopAnimate(),this.threeViewerService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(ne(ci),ne(Re),ne(lr),ne(on),ne(Nt))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-code-map"]],decls:5,vars:9,consts:[["id","codeMap",1,"fixed","left-0","top-[var(--cc-bars-height,49px)]","z-0","h-full","w-full"],[1,"pointer-events-none","fixed","inset-0","z-[1000]","flex","items-center","justify-center","p-4"],["role","alert",1,"alert","alert-error","pointer-events-auto","max-w-md"]],template:function(i,n){i&1&&(x(0,"div",0),pt(1,"async"),V(2,"cc-view-cube"),v(),K(3,pS,4,0,"div",1),pt(4,"async")),i&2&&(We("hidden",vi(1,5,n.isLoadingFile$)),h(2),We("sideBarVisible",n.inspectorVisibilityService.isVisible()),h(),Q(vi(4,7,n.isContextLost$)?3:-1))},dependencies:[Hd,Qa],encapsulation:2})}}return e})();var Sl=Ae(Et,yi,(e,o)=>Ws.getMetricDistribution(e.unifiedMapNode,o));var yl=Ae(tr,Kt,yi,Sl,(e,o,t,i)=>{let n=e||o;return!n||n.type===eo.FILE?i:Ws.getMetricDistribution(n,t)});var Cl=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(yl),this.metricDistribution$=this.store.select(Sl)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Q1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric$=this.mapStateReadWindow.areaMetric$,this.distributionMetric=pp}static{this.\u0275fac=function(i){return new(i||e)(ne(xe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-distribution-metric"]],hostAttrs:[1,"mx-[5px]","flex","min-w-max","items-center","gap-1.5","text-xs"],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(i,n){i&1&&(pe(0,"i",0),g(1),pt(2,"async")),i&2&&(h(),ge(" ",vi(2,1,n.areaMetric$),`
3522
+ `))},dependencies:[Qa],encapsulation:2})}}return e})();var Z1=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(yl),this.hoveredNode$=this.store.select(tr),this.selectedNode$=this.store.select(Kt),this.flattenedItems$=this.store.select(Ep)}dispatchRuleChange(t,i){Wi(this.store,t,i)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function vS(e){return`*.${e}`}function xS(e,o){return e===Bs?o.others.filter(t=>t.fileExtension!==Vs).map(t=>t.fileExtension):[e]}function Ml(e,o,t){return xS(e,o).map(n=>{let r=vS(n);return t?.type===eo.FOLDER?`${t.path}/**/${r}`:r})}var Y1=(()=>{class e{constructor(t){this.extensionRulesStore=t,this.operationContext$=St([this.extensionRulesStore.hoveredNodeMetricDistribution$,this.extensionRulesStore.hoveredNode$,this.extensionRulesStore.selectedNode$,this.extensionRulesStore.flattenedItems$]).pipe(qe(([i,n,r,a])=>({distribution:i,node:n||r,flattenedItems:a})))}show(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=Ml(t,i.distribution,i.node),r=this.createFlattenedItemsMap(i.flattenedItems),a=n.map(s=>r.get(s));this.extensionRulesStore.dispatchRuleChange("flatten",vo({items:a}))})}exclude(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=Ml(t,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("exclude",Ud("exclude",...n))})}flatten(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=Ml(t,i.distribution,i.node);this.extensionRulesStore.dispatchRuleChange("flatten",Ud("flatten",...n))})}getIsFlattenedByFileExtension(t){return this.operationContext$.pipe(qe(i=>Ml(t,i.distribution,i.node).every(r=>i.flattenedItems.some(a=>a.path===r))))}createFlattenedItemsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}static{this.\u0275fac=function(i){return new(i||e)(E(Z1))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var J1=(()=>{class e{constructor(t,i){this.threeSceneService=t,this.metricDistributionStore=i,this.metricDistribution$=this.metricDistributionStore.metricDistribution$,this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(ru(),De(n=>!!n)).subscribe(n=>{this.fileExtensionsOfOthers.clear();for(let r of n.others)this.fileExtensionsOfOthers.add(r.fileExtension);this.fileExtensionsOfNone.clear();for(let r of n.none)this.fileExtensionsOfNone.add(r.fileExtension)})}highlightExtension(t){switch(t){case Bs:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case Vs:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([t]));break}}clearHighlightingOnFileExtensions(){this.threeSceneService.applyClearHighlights()}static{this.\u0275fac=function(i){return new(i||e)(E(ft),E(Cl))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var yS=["menu"];function CS(e,o){if(e&1){let t=we();y(0,"button",10),ie("click",function(){ae(t);let n=B(2);return se(n.show(n.fileExtension()))}),pe(1,"i",11),y(2,"span",9),g(3,"Show"),M()()}}function MS(e,o){if(e&1){let t=we();y(0,"button",12),ie("click",function(){ae(t);let n=B(2);return se(n.flatten(n.fileExtension()))}),pe(1,"i",13),y(2,"span",9),g(3,"Flatten"),M()()}}function _S(e,o){if(e&1){let t=we();y(0,"div",4,0),ie("contextmenu",function(n){return n.preventDefault()}),K(2,CS,4,0,"button",5)(3,MS,4,0,"button",6),y(4,"button",7),ie("click",function(){ae(t);let n=B();return se(n.exclude(n.fileExtension()))}),pe(5,"i",8),y(6,"span",9),g(7,"Exclude"),M()()()}if(e&2){let t=o,i=B();ze("left",t.left,"px")("bottom",t.bottom,"px"),h(2),Q(i.isFlattened()?2:3)}}var ES=192,nh=4,e2=(()=>{class e{constructor(t,i){this.extensionRulesService=t,this.highlightBuildingsByFileExtensionService=i,this.item=Z.required(),this.showAbsoluteValues=Z.required(),this.toggleShowAbsoluteValues=_e(),this.isFlattened=Se(!1),this.menuPosition=Se(null),this.menuRef=Je("menu"),this.fileExtension=Y(()=>this.item().fileExtension),this.hasFileExtension=Y(()=>this.fileExtension()!=="None"),this.formattedTitle=Y(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.extensionRulesService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(t=>this.isFlattened.set(t))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}openContextMenu(t){if(t.preventDefault(),!this.hasFileExtension())return;let i=Math.max(nh,Math.min(t.clientX,window.innerWidth-ES-nh)),n=Math.max(nh,window.innerHeight-t.clientY);this.menuPosition.set({left:i,bottom:n})}closeContextMenu(){this.menuPosition.set(null)}onDocumentPointerDown(t){if(!this.menuPosition())return;let i=this.menuRef()?.nativeElement;i&&t.target instanceof Node&&i.contains(t.target)||this.closeContextMenu()}closeContextMenuOnViewportChange(){this.menuPosition()&&this.closeContextMenu()}flatten(t){this.extensionRulesService.flatten(t),this.closeContextMenu()}exclude(t){this.extensionRulesService.exclude(t),this.closeContextMenu()}show(t){this.extensionRulesService.show(t),this.closeContextMenu()}onHoverFileExtensionBar(t){this.highlightBuildingsByFileExtensionService.highlightExtension(t)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(t,i,n){return t&&i.absoluteMetricValue||!t&&i.relativeMetricValue?t?`${n} ${i.absoluteMetricValue.toLocaleString()}`:`${n} ${i.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(i){return new(i||e)(ne(Y1),ne(J1))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-file-extension-bar-segment"]],viewQuery:function(i,n){i&1&&rt(n.menuRef,yS,5),i&2&&at()},hostAttrs:[1,"min-w-max","cursor-pointer","overflow-hidden","text-center","text-white"],hostVars:6,hostBindings:function(i,n){i&1&&z("pointerdown",function(a){return n.onDocumentPointerDown(a)},Uo)("wheel",function(){return n.closeContextMenuOnViewportChange()},Uo)("resize",function(){return n.closeContextMenuOnViewportChange()},uu),i&2&&ze("background-color",n.backgroundColor)("flex-grow",n.flexGrow)("flex-basis",n.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:4,vars:3,consts:[["menu",""],[1,"cc-bar-section",3,"click","contextmenu"],["data-test-id","formattedTitle",1,"cc-bar-section-text","my-0.5","whitespace-nowrap","px-2.5","text-[10px]",3,"mouseover","mouseleave","title"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"left","bottom"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"contextmenu"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","excludeBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-ban"],[1,"truncate"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-eye"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-arrows-down-to-line"]],template:function(i,n){if(i&1&&(y(0,"span",1),ie("click",function(){return n.toggleShowAbsoluteValues.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),y(1,"div",2),ie("mouseover",function(){return n.onHoverFileExtensionBar(n.fileExtension())})("mouseleave",function(){return n.onUnhoverFileExtensionBar()}),g(2),M()(),K(3,_S,8,5,"div",3)),i&2){let r;h(),ce("title",n.formattedTitle()),h(),ge(" ",n.formattedTitle()," "),h(),Q((r=n.menuPosition())?3:-1,r)}},encapsulation:2})}}return e})();var kS=(e,o)=>o.fileExtension;function qS(e,o){if(e&1){let t=we();x(0,"cc-file-extension-bar-segment",4),z("toggleShowAbsoluteValues",function(){ae(t);let n=B();return se(n.toggleShowAbsoluteValues())}),v()}if(e&2){let t=o.$implicit,i=B();F("item",t)("showAbsoluteValues",i.showAbsoluteValues())}}var rh=(()=>{class e{constructor(){this.metricDistributionStore=T(Cl),this.showAbsoluteValues=Se(!1),this.metricDistribution=D(this.metricDistributionStore.hoveredNodeMetricDistribution$,{requireSync:!0})}toggleShowAbsoluteValues(){this.showAbsoluteValues.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-file-extension-bar"]],hostAttrs:[1,"fixed","left-0","right-0","z-[70]","block","bg-base-100"],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom","var(--cc-bottom-bar-height, 32px)")},features:[bi([{provide:fr,useValue:"--cc-file-extension-bar-height"}]),Zi([gr])],decls:5,vars:0,consts:[[1,"flex","h-[17px]","w-full"],["title","Distribution metric"],[1,"flex","w-full","gap-px"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(i,n){i&1&&(x(0,"div",0),V(1,"cc-distribution-metric",1),x(2,"div",2),Pe(3,qS,1,2,"cc-file-extension-bar-segment",3,kS),v()()),i&2&&(h(3),Be(n.metricDistribution().visible))},dependencies:[Q1,e2],encapsulation:2})}}return e})();var _l="var(--cc-bottom-bar-height, 32px) + var(--cc-file-extension-bar-height, 17px)";var El=(()=>{class e{static{this.NO_MATCHING="\u2013 (no matching buildings)"}transform(t,i,n,r){switch(t){case"positive":{let a=r==="unary",s=n.minValue===i.from,l=n.maxValue===i.from;return a?`${n.minValue} - ${n.maxValue}`:s?e.NO_MATCHING:l?`${n.minValue} to ${this.formatNumber(i.from)}`:`${n.minValue} to ${this.formatNumber(i.from-1)}`}case"neutral":{let a=i.from===i.to,s=i.to===n.maxValue;return a?e.NO_MATCHING:s?`${this.formatNumber(i.from)} to ${this.formatNumber(i.to)}`:`${this.formatNumber(i.from)} to ${this.formatNumber(i.to-1)}`}case"negative":return n.maxValue===i.to?e.NO_MATCHING:`${this.formatNumber(i.to)} to ${this.formatNumber(n.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(t){return(t||0).toLocaleString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=ja({name:"mapColorLabel",type:e,pure:!0})}}return e})();var i2=(()=>{class e{constructor(t){this.store=t,this.selectedColorMetricData$=this.store.select(Mo)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Do=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.legendMetricRangeStore=i,this.mapColorFor=Z.required(),this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=D(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=D(this.legendMetricRangeStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=Y(()=>this.mapColors()[this.mapColorFor()])}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(i2))}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(vu(0),pt(1,"mapColorLabel"),y(2,"div",0),Ho(),y(3,"svg",1),pe(4,"rect",2),M(),zr(),y(5,"span",3),g(6),M()()),i&2){let r=Ka(1,3,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric());h(3),ot("aria-label","Color for "+r),h(),ot("fill",n.color()),h(2),Te(r)}},dependencies:[El],encapsulation:2})}}return e})();var o2=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Color scale"),v(),V(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3)(5,"cc-legend-color-row",4),v())},dependencies:[Do],encapsulation:2})}}return e})();var n2=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({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(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Delta colors"),v(),V(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3),v())},dependencies:[Do],encapsulation:2})}}return e})();function RS(e,o){e&1&&(x(0,"div",0),V(1,"cc-legend-color-row",1)(2,"cc-legend-color-row",2),v())}var r2=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.edgeMetric=D(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(ne(xe))}}static{this.\u0275cmp=k({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(i,n){i&1&&K(0,RS,3,0,"div",0),i&2&&Q(n.edgeMetric()?0:-1)},dependencies:[Do],encapsulation:2})}}return e})();var a2=(()=>{class e{constructor(t){this.metricsLensFacade=t,this.label=Z.required(),this.metricName=Z.required(),this.attributeDescriptors=D(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.descriptor=Y(()=>this.attributeDescriptors()[this.metricName()]),this.title=Y(()=>this.descriptor()?.title||Hs.get(this.metricName())||this.metricName())}static{this.\u0275fac=function(i){return new(i||e)(ne(Jn))}}static{this.\u0275cmp=k({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(i,n){i&1&&(y(0,"div",0),pt(1,"attributeDescriptorTooltip"),y(2,"span",1),g(3),M(),y(4,"span",2),g(5),M()()),i&2&&(ce("title",Fn(1,3,n.descriptor(),n.metricName())),h(3),Te(n.label()),h(2),Te(n.title()))},dependencies:[pr],encapsulation:2})}}return e})();function AS(e,o){e&1&&V(0,"cc-legend-metric-row",4),e&2&&F("metricName",o)}var s2=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric=D(this.mapStateReadWindow.areaMetric$,{initialValue:""}),this.heightMetric=D(this.mapStateReadWindow.heightMetric$,{initialValue:""}),this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.edgeMetric=D(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(ne(xe))}}static{this.\u0275cmp=k({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(i,n){if(i&1&&(x(0,"div",0),V(1,"cc-legend-metric-row",1)(2,"cc-legend-metric-row",2)(3,"cc-legend-metric-row",3),K(4,AS,1,1,"cc-legend-metric-row",4),v()),i&2){let r;h(),F("metricName",n.areaMetric()??""),h(),F("metricName",n.heightMetric()??""),h(),F("metricName",n.colorMetric()??""),h(),Q((r=n.edgeMetric())?4:-1,r)}},dependencies:[a2],encapsulation:2})}}return e})();var l2=(()=>{class e{constructor(t){this.inspectorVisibilityService=t,this.isOpen=Z.required(),this.togglePanel=_e(),this.buttonBottom=`calc(${_l} + 32px)`,this.buttonRight=Y(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) - 28px)":"-28px")}static{this.\u0275fac=function(i){return new(i||e)(ne(ci))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-legend-toggle-button"]],hostAttrs:[1,"contents"],inputs:{isOpen:[1,"isOpen"]},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(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.togglePanel.emit()}),g(1,` LEGEND
3523
+ `),M()),i&2&&(ze("right",n.buttonRight())("bottom",n.buttonBottom),ce("title",n.isOpen()?"Hide panel":"Show panel"),ot("aria-expanded",n.isOpen()))},encapsulation:2})}}return e})();function DS(e,o){e&1&&V(0,"cc-legend-delta-colors-section")}function FS(e,o){e&1&&V(0,"cc-legend-metrics-section")(1,"cc-legend-color-scale-section")}function LS(e,o){if(e&1&&(x(0,"div",2)(1,"div",3),K(2,DS,1,0,"cc-legend-delta-colors-section")(3,FS,2,0),x(4,"div",4),V(5,"cc-legend-color-row",5),v(),V(6,"cc-legend-edge-colors-section"),v()()),e&2){let t=B();ze("right",t.panelRight())("bottom",t.panelBottom),h(2),Q(t.isDeltaState()?2:3)}}var ah=(()=>{class e{constructor(){this.elementReference=T(Nt),this.inspectorVisibilityService=T(ci),this.fileStoreReadWindow=T(Re),this.isOpen=Se(!1),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.panelBottom=`calc(${_l} + 12px)`,this.panelRight=Y(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) + 40px)":"40px"),this.mouseDownListener=t=>this.closeOnOutsideClick(t)}ngOnInit(){document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){document.removeEventListener("mousedown",this.mouseDownListener)}toggleIsOpen(){this.isOpen.update(t=>!t)}closeOnOutsideClick(t){this.isOpen()&&t.target instanceof Node&&!this.elementReference.nativeElement.contains(t.target)&&this.isOpen.set(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-legend-panel"]],decls:2,vars:2,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"],["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"],[1,"border-base-300","border-t","pt-2"],["mapColorFor","selected"]],template:function(i,n){i&1&&(K(0,LS,7,5,"div",0),x(1,"cc-legend-toggle-button",1),z("togglePanel",function(){return n.toggleIsOpen()}),v()),i&2&&(Q(n.isOpen()?0:-1),h(),F("isOpen",n.isOpen()))},dependencies:[s2,o2,n2,r2,Do,l2],encapsulation:2})}}return e})();var c2=(e,o)=>Ae(ir,Yp,(t,i)=>{let n=t[o];return i[e][n]==="relative"?"x\u0342":"\u03A3"});var NS=e=>{if(!e)return[];let o=[];for(let{data:t}of Ji(e))t.type===eo.FOLDER&&!t.isExcluded&&o.push(t.path);return o.sort((t,i)=>t.localeCompare(i))},d2=Ae(Et,e=>NS(e.unifiedMapNode));var PS=(e,o)=>{let t=new Map(e.map(i=>[i.path,0]));for(let i of o){if(!xi(i)||i.isExcluded)continue;let n=BS(t,i.path);n!==void 0&&t.set(n,t.get(n)+1)}return e.map(i=>et(ke({},i),{fileCount:t.get(i.path)})).sort((i,n)=>i.path.localeCompare(n.path))};function BS(e,o){let t=o;for(;t;){if(e.has(t))return t;let i=t.lastIndexOf("/");t=i>0?t.slice(0,i):""}}var h2=Ae(qp,Bi,PS);var m2=Ae(ss,e=>({leftColor:e.positive,middleColor:e.neutral,rightColor:e.negative}));var u2=Ae(Mo,up,(e,o)=>({values:e.values,min:e.minValue,max:e.maxValue,from:o.from,to:o.to}));var ht=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(er),this.primaryMetricNames$=this.store.select(ir),this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(Fs),this.selectedColorMetricData$=this.store.select(Mo),this.metricColorRangeColors$=this.store.select(m2),this.metricColorRangeValues$=this.store.select(u2),this.markedPackagesWithCounts$=this.store.select(h2),this.markableFolderPaths$=this.store.select(d2),this.hoveredNode$=this.store.select(tr),this.selectedNode$=this.store.select(Kt),this.accumulatedData$=this.store.select(Et)}attributeTypeLabel$(t,i){return this.store.select(c2(t,i))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qe=(()=>{class e{constructor(t){this.store=t}setAreaMetric(t){this.store.dispatch(Mi({value:t}))}setHeightMetric(t){this.store.dispatch(ki({value:t}))}setColorMetric(t){this.store.dispatch(_t({value:t}))}setEdgeMetric(t){this.store.dispatch(Gt({value:t}))}setMargin(t){this.store.dispatch(jn({value:t}))}setInvertArea(t){this.store.dispatch(Wn({value:t}))}setEnableFloorLabels(t){this.store.dispatch(no({value:t}))}setScaling(t){this.store.dispatch(co({value:t}))}setInvertHeight(t){this.store.dispatch(On({value:t}))}setColorRange(t){this.store.dispatch(Ut({value:t}))}setColorMode(t){this.store.dispatch(Ei({value:t}))}setMapColors(t){this.store.dispatch(ai({value:t}))}invertColorRange(){this.store.dispatch(to())}invertDeltaColors(){this.store.dispatch(io())}setEdgeHeight(t){this.store.dispatch(oo({value:t}))}setAmountOfEdgePreviews(t){this.store.dispatch(Ci({value:t}))}toggleEdgeMetricVisible(){this.store.dispatch(zn())}setShowIncomingEdges(t){this.store.dispatch(ho({value:t}))}setShowOutgoingEdges(t){this.store.dispatch(mo({value:t}))}setShowOnlyBuildingsWithEdges(t){this.store.dispatch(Hn({value:t}))}toggleIsHeightAndColorMetricLinked(){this.store.dispatch(wf())}markPackage(t){this.store.dispatch(xo({packages:[t]}))}unmarkPackage(t){this.store.dispatch(wo({path:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var p2=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.popoverId=Z.required(),this.anchorName=Z.required(),this.margin=D(this.mapStateReadWindow.margin$,{initialValue:0}),this.enableFloorLabels=D(this.mapStateReadWindow.enableFloorLabels$,{initialValue:!1}),this.isInvertedArea=D(this.mapStateReadWindow.invertArea$,{initialValue:!1}),this.resetKeys=["mapState.margin","mapState.invertArea","mapState.enableFloorLabels"]}setMargin(t){this.metricsBarWriteStore.setMargin(t)}setEnableFloorLabel(t){let i=t.target.checked;this.metricsBarWriteStore.setEnableFloorLabels(i)}toggleInvertingArea(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertArea(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-area-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:14,vars:8,consts:[[3,"popoverId","anchorName"],["title","Amount of space between buildings in percent"],[1,"text-sm"],["ariaLabel","Margin",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["tooltip","Reset area metric settings to their defaults","label","Reset area metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),g(3,"Margin"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.setMargin(a)}),v()(),x(5,"label",4)(6,"input",5),z("change",function(a){return n.setEnableFloorLabel(a)}),v(),x(7,"span"),g(8,"Enable Floor Labels"),v()(),x(9,"label",4)(10,"input",5),z("change",function(a){return n.toggleInvertingArea(a)}),v(),x(11,"span"),g(12,"Invert Area"),v()(),V(13,"cc-reset-settings-button",6),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),F("min",1)("max",100)("value",n.margin()),h(2),F("checked",n.enableFloorLabels()),h(4),F("checked",n.isInvertedArea()),h(3),F("settingsKeys",n.resetKeys))},dependencies:[ko,Ai,qo],encapsulation:2})}}return e})();var _r=(()=>{class e{constructor(){this.metricsBarReadStore=T(ht),this.metricsLensFacade=T(Jn),this.popoverId=Z.required(),this.anchorName=Z.required(),this.placeholder=Z("Search metric"),this.kind=Z("node"),this.selected=Z(null),this.metricSelected=_e(),this.metricData=D(this.metricsBarReadStore.metricData$,{initialValue:{nodeMetricData:[],edgeMetricData:[],nodeEdgeMetricsMap:new Map}}),this.descriptors=D(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.options=Y(()=>{let t=this.metricData();return this.kind()==="edge"?t.edgeMetricData:t.nodeMetricData})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-bar-select-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],placeholder:[1,"placeholder"],kind:[1,"kind"],selected:[1,"selected"]},outputs:{metricSelected:"metricSelected"},decls:1,vars:6,consts:[[3,"metricSelected","popoverId","anchorName","placeholder","options","descriptors","selected"]],template:function(i,n){i&1&&(x(0,"cc-metric-select-popover",0),z("metricSelected",function(a){return n.metricSelected.emit(a)}),v()),i&2&&F("popoverId",n.popoverId())("anchorName",n.anchorName())("placeholder",n.placeholder())("options",n.options())("descriptors",n.descriptors())("selected",n.selected())},dependencies:[Wf],encapsulation:2})}}return e})();var Er=(()=>{class e{constructor(t,i,n){this.metricsBarReadStore=t,this.mapStateReadWindow=i,this.codeMapRenderService=n;let r=this.metricsBarReadStore.hoveredNode$,a=this.metricsBarReadStore.selectedNode$,s=this.createTopLevelNodeObservable();this.node$=St([r,a,s]).pipe(qe(([l,d,c])=>l??d??c),Oa({bufferSize:1,refCount:!0}))}createNodeObservable(){return this.node$}createTopLevelNodeObservable(){return St([this.metricsBarReadStore.accumulatedData$,this.mapStateReadWindow.areaMetric$,this.mapStateReadWindow.heightMetric$]).pipe(De(([t])=>!!t.unifiedMapNode),qe(([t])=>this.findTopLevelNode(t)))}findTopLevelNode(t){let i=this.codeMapRenderService.getNodes(t.unifiedMapNode),n=this.codeMapRenderService.sortVisibleNodesByHeightDescending(i);if(n.length!==0)return n.reduce((r,a)=>r.attributes.unary>a.attributes.unary?r:a,n[0])}static{this.\u0275fac=function(i){return new(i||e)(E(ht),E(xe),E(ea))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var kl=(()=>{class e{constructor(){this.nodeSelectionService=T(Er),this.metricsBarReadStore=T(ht),this.metricFor=Z.required(),this.attributeType=Z("nodes"),this.node=D(this.nodeSelectionService.createNodeObservable()),this.isNodeALeaf=Y(()=>{let t=this.node();return t?"isLeaf"in t?t.isLeaf:xi(t):!1}),this.selectorInputs=Y(()=>({attributeType:this.attributeType(),metricFor:this.metricFor()})),this.attributeTypeLabel=D(Nu(this.selectorInputs).pipe(Ht(({attributeType:t,metricFor:i})=>this.metricsBarReadStore.attributeTypeLabel$(t,i))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-chooser-type"]],inputs:{metricFor:[1,"metricFor"],attributeType:[1,"attributeType"]},decls:2,vars:2,consts:[[3,"hidden"]],template:function(i,n){i&1&&(y(0,"span",0),g(1),M()),i&2&&(ce("hidden",n.isNodeALeaf()),h(),ge(" ",n.attributeTypeLabel(),`
3524
+ `))},encapsulation:2})}}return e})();function VS(e,o){if(e&1&&(x(0,"span",4),g(1),v()),e&2){let t=o;Dt(t.styleClass),h(),ge("\u0394",t.label)}}function WS(e,o){if(e&1&&(x(0,"span",2),V(1,"cc-metric-chooser-type",3),v(),x(2,"span",4),g(3),v(),K(4,VS,2,3,"span",5)),e&2){let t,i=o,n=B();h(),F("metricFor",n.metricFor()),h(2),Te(i.value),h(),Q((t=i.delta)?4:-1,t)}}function OS(e,o){e&1&&(x(0,"span",1),g(1,"\xA0"),v())}var ql=(()=>{class e{constructor(){this.nodeSelectionService=T(Er),this.metricsBarReadStore=T(ht),this.metricFor=Z.required(),this.node=D(this.nodeSelectionService.createNodeObservable()),this.primaryMetricNames=D(this.metricsBarReadStore.primaryMetricNames$),this.metricName=Y(()=>this.primaryMetricNames()?.[this.metricFor()]??null),this.display=Y(()=>zS(this.node(),this.metricName(),this.metricFor()))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-meta-value"]],inputs:{metricFor:[1,"metricFor"]},decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],["aria-hidden","true"],[1,"opacity-60"],[3,"metricFor"],[1,"font-medium"],[1,"font-medium",3,"class"]],template:function(i,n){if(i&1&&(x(0,"div",0),K(1,WS,5,3)(2,OS,2,0,"span",1),v()),i&2){let r;h(),Q((r=n.display())?1:2,r)}},dependencies:[kl],encapsulation:2})}}return e})();function zS(e,o,t){return!e||!o?null:{value:$S(e,o),delta:jS(e,o,t)}}function $S(e,o){let t=e.attributes?.[o];return typeof t=="number"?t.toLocaleString():"\u2014"}function jS(e,o,t){if(!("deltas"in e)||!e.deltas)return null;let i=e.deltas[o];return typeof i!="number"?null:{label:i.toLocaleString(),styleClass:HS(i,t)}}function HS(e,o){return o==="heightMetric"&&e>0?"text-success":e<0?"text-error":"text-base-content"}var US=["*"],Tl=(()=>{class e{constructor(){this.label=Z.required(),this.metricName=Z(""),this.metricFor=Z.required(),this.placeholder=Z(""),this.searchPopoverId=Z.required(),this.searchAnchorName=Z.required(),this.settingsPopoverId=Z.required(),this.settingsAnchorName=Z.required(),this.testIdPrefix=Z.required(),this.metricSelected=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],metricName:[1,"metricName"],metricFor:[1,"metricFor"],placeholder:[1,"placeholder"],searchPopoverId:[1,"searchPopoverId"],searchAnchorName:[1,"searchAnchorName"],settingsPopoverId:[1,"settingsPopoverId"],settingsAnchorName:[1,"settingsAnchorName"],testIdPrefix:[1,"testIdPrefix"]},outputs:{metricSelected:"metricSelected"},ngContentSelectors:US,decls:5,vars:14,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],[3,"metricFor"],["kind","node",3,"metricSelected","popoverId","anchorName","placeholder","selected"]],template:function(i,n){i&1&&(fu(),x(0,"cc-axis-card",0)(1,"div",1),V(2,"cc-metric-meta-value",2),v()(),x(3,"cc-metric-bar-select-popover",3),z("metricSelected",function(a){return n.metricSelected.emit(a)}),v(),gu(4)),i&2&&(F("label",n.label())("metricName",n.metricName())("hasCog",!0)("cogPopoverId",n.settingsPopoverId())("cogAnchorName",n.settingsAnchorName())("searchPopoverId",n.searchPopoverId())("searchAnchorName",n.searchAnchorName())("testId",n.testIdPrefix())("cogTestId",n.testIdPrefix()+"-cog"),h(2),F("metricFor",n.metricFor()),h(),F("popoverId",n.searchPopoverId())("anchorName",n.searchAnchorName())("placeholder",n.placeholder())("selected",n.metricName()))},dependencies:[_o,ql,_r],encapsulation:2})}}return e})();var f2=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-area",this.searchAnchorName="metric-segment-area",this.settingsPopoverId="metric-settings-popover-area",this.settingsAnchorName="metric-segment-area-cog",this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.areaMetric=D(this.mapStateReadWindow.areaMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setAreaMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-area-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Area","metricFor","areaMetric","placeholder","Area Metric (highest value)","testIdPrefix","metric-segment-area",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(x(0,"cc-metric-segment",0),z("metricSelected",function(a){return n.handleMetricSelected(a)}),V(1,"cc-area-settings-popover",1),v()),i&2&&(F("metricName",n.areaMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[Tl,p2],encapsulation:2})}}return e})();function GS(e,o){if(e&1&&(x(0,"span",3),g(1),v()),e&2){let t=B();h(),Te(t.count())}}var g2=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.mapColorFor=Z.required(),this.count=Z(null),this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=D(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=D(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=Y(()=>this.mapColors()[this.mapColorFor()])}handleColorChange(t){this.metricsBarWriteStore.setMapColors({[this.mapColorFor()]:t})}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(ht),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-band-row"]],inputs:{mapColorFor:[1,"mapColorFor"],count:[1,"count"]},decls:6,vars:9,consts:[[1,"flex","items-center","gap-2"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"cc-inline-color-picker",1),z("colorChange",function(a){return n.handleColorChange(a)}),v(),x(2,"span",2),g(3),pt(4,"mapColorLabel"),v(),K(5,GS,2,1,"span",3),v()),i&2&&(h(),F("hexColor",n.color())("ariaLabel","Recolor "+n.mapColorFor()),h(2),ge(" ",Ka(4,4,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric())," "),h(2),Q(n.count()!==null?5:-1))},dependencies:[Eo,El],encapsulation:2})}}return e})();function XS(e,o){if(e&1&&V(0,"cc-color-band-row",3)(1,"cc-color-band-row",4)(2,"cc-color-band-row",5),e&2){let t=B();F("count",t.colorCategoryCounts().positive),h(),F("count",t.colorCategoryCounts().neutral),h(),F("count",t.colorCategoryCounts().negative)}}function KS(e,o){e&1&&V(0,"cc-color-band-row",6)(1,"cc-color-band-row",7)}var b2=(()=>{class e{constructor(t,i){this.fileStoreReadWindow=t,this.colorCategoryCountsStore=i,this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.colorCategoryCounts=D(this.colorCategoryCountsStore.colorCategoryCounts$,{initialValue:{positive:0,neutral:0,negative:0}})}static{this.\u0275fac=function(i){return new(i||e)(ne(Re),ne(rr))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-bands-section"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","selected"],["mapColorFor","positive",3,"count"],["mapColorFor","neutral",3,"count"],["mapColorFor","negative",3,"count"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Bands"),v(),K(3,XS,3,3)(4,KS,2,0),V(5,"cc-color-band-row",2),v()),i&2&&(h(3),Q(n.isDeltaState()?4:3))},dependencies:[g2],encapsulation:2})}}return e})();function ln(e,o){return e==null||o==null?NaN:e<o?-1:e>o?1:e>=o?0:NaN}function sh(e,o){return e==null||o==null?NaN:o<e?-1:o>e?1:o>=e?0:NaN}function Rl(e){let o,t,i;e.length!==2?(o=ln,t=(s,l)=>ln(e(s),l),i=(s,l)=>e(s)-l):(o=e===ln||e===sh?e:QS,t=e,i=e);function n(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let m=d+c>>>1;t(s[m],l)<0?d=m+1:c=m}while(d<c)}return d}function r(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let m=d+c>>>1;t(s[m],l)<=0?d=m+1:c=m}while(d<c)}return d}function a(s,l,d=0,c=s.length){let m=n(s,l,d,c-1);return m>d&&i(s[m-1],l)>-i(s[m],l)?m-1:m}return{left:n,center:a,right:r}}function QS(){return 0}function lh(e){return e===null?NaN:+e}var v2=Rl(ln),x2=v2.right,ZS=v2.left,YS=Rl(lh).center,ch=x2;function Il(e,o){let t,i;if(o===void 0)for(let n of e)n!=null&&(t===void 0?n>=n&&(t=i=n):(t>n&&(t=n),i<n&&(i=n)));else{let n=-1;for(let r of e)(r=o(r,++n,e))!=null&&(t===void 0?r>=r&&(t=i=r):(t>r&&(t=r),i<r&&(i=r)))}return[t,i]}var JS=Math.sqrt(50),ey=Math.sqrt(10),ty=Math.sqrt(2);function Al(e,o,t){let i=(o-e)/Math.max(0,t),n=Math.floor(Math.log10(i)),r=i/Math.pow(10,n),a=r>=JS?10:r>=ey?5:r>=ty?2:1,s,l,d;return n<0?(d=Math.pow(10,-n)/a,s=Math.round(e*d),l=Math.round(o*d),s/d<e&&++s,l/d>o&&--l,d=-d):(d=Math.pow(10,n)*a,s=Math.round(e/d),l=Math.round(o/d),s*d<e&&++s,l*d>o&&--l),l<s&&.5<=t&&t<2?Al(e,o,t*2):[s,l,d]}function Dl(e,o,t){if(o=+o,e=+e,t=+t,!(t>0))return[];if(e===o)return[e];let i=o<e,[n,r,a]=i?Al(o,e,t):Al(e,o,t);if(!(r>=n))return[];let s=r-n+1,l=new Array(s);if(i)if(a<0)for(let d=0;d<s;++d)l[d]=(r-d)/-a;else for(let d=0;d<s;++d)l[d]=(r-d)*a;else if(a<0)for(let d=0;d<s;++d)l[d]=(n+d)/-a;else for(let d=0;d<s;++d)l[d]=(n+d)*a;return l}function ia(e,o,t){return o=+o,e=+e,t=+t,Al(e,o,t)[2]}function dh(e,o,t){o=+o,e=+e,t=+t;let i=o<e,n=i?ia(o,e,t):ia(e,o,t);return(i?-1:1)*(n<0?1/-n:n)}function oa(e,o){let t;if(o===void 0)for(let i of e)i!=null&&(t<i||t===void 0&&i>=i)&&(t=i);else{let i=-1;for(let n of e)(n=o(n,++i,e))!=null&&(t<n||t===void 0&&n>=n)&&(t=n)}return t}function w2(e){return e}var hh=1,mh=2,uh=3,na=4,S2=1e-6;function iy(e){return"translate("+e+",0)"}function oy(e){return"translate(0,"+e+")"}function ny(e){return o=>+e(o)}function ry(e,o){return o=Math.max(0,e.bandwidth()-o*2)/2,e.round()&&(o=Math.round(o)),t=>+e(t)+o}function ay(){return!this.__axis}function y2(e,o){var t=[],i=null,n=null,r=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=e===hh||e===na?-1:1,c=e===na||e===mh?"x":"y",m=e===hh||e===uh?iy:oy;function u(p){var f=i??(o.ticks?o.ticks.apply(o,t):o.domain()),S=n??(o.tickFormat?o.tickFormat.apply(o,t):w2),R=Math.max(r,0)+s,L=o.range(),j=+L[0]+l,q=+L[L.length-1]+l,P=(o.bandwidth?ry:ny)(o.copy(),l),O=p.selection?p.selection():p,H=O.selectAll(".domain").data([null]),G=O.selectAll(".tick").data(f,o).order(),J=G.exit(),X=G.enter().append("g").attr("class","tick"),me=G.select("line"),Ie=G.select("text");H=H.merge(H.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(X),me=me.merge(X.append("line").attr("stroke","currentColor").attr(c+"2",d*r)),Ie=Ie.merge(X.append("text").attr("fill","currentColor").attr(c,d*R).attr("dy",e===hh?"0em":e===uh?"0.71em":"0.32em")),p!==O&&(H=H.transition(p),G=G.transition(p),me=me.transition(p),Ie=Ie.transition(p),J=J.transition(p).attr("opacity",S2).attr("transform",function($){return isFinite($=P($))?m($+l):this.getAttribute("transform")}),X.attr("opacity",S2).attr("transform",function($){var Ee=this.parentNode.__axis;return m((Ee&&isFinite(Ee=Ee($))?Ee:P($))+l)})),J.remove(),H.attr("d",e===na||e===mh?a?"M"+d*a+","+j+"H"+l+"V"+q+"H"+d*a:"M"+l+","+j+"V"+q:a?"M"+j+","+d*a+"V"+l+"H"+q+"V"+d*a:"M"+j+","+l+"H"+q),G.attr("opacity",1).attr("transform",function($){return m(P($)+l)}),me.attr(c+"2",d*r),Ie.attr(c,d*R).text(S),O.filter(ay).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===mh?"start":e===na?"end":"middle"),O.each(function(){this.__axis=P})}return u.scale=function(p){return arguments.length?(o=p,u):o},u.ticks=function(){return t=Array.from(arguments),u},u.tickArguments=function(p){return arguments.length?(t=p==null?[]:Array.from(p),u):t.slice()},u.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),u):i&&i.slice()},u.tickFormat=function(p){return arguments.length?(n=p,u):n},u.tickSize=function(p){return arguments.length?(r=a=+p,u):r},u.tickSizeInner=function(p){return arguments.length?(r=+p,u):r},u.tickSizeOuter=function(p){return arguments.length?(a=+p,u):a},u.tickPadding=function(p){return arguments.length?(s=+p,u):s},u.offset=function(p){return arguments.length?(l=+p,u):l},u}function ph(e){return y2(uh,e)}function fh(e){return y2(na,e)}var sy={value:()=>{}};function M2(){for(var e=0,o=arguments.length,t={},i;e<o;++e){if(!(i=arguments[e]+"")||i in t||/[\s.]/.test(i))throw new Error("illegal type: "+i);t[i]=[]}return new Fl(t)}function Fl(e){this._=e}function ly(e,o){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}})}Fl.prototype=M2.prototype={constructor:Fl,on:function(e,o){var t=this._,i=ly(e+"",t),n,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((n=(e=i[r]).type)&&(n=cy(t[n],e.name)))return n;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++r<a;)if(n=(e=i[r]).type)t[n]=C2(t[n],e.name,o);else if(o==null)for(n in t)t[n]=C2(t[n],e.name,null);return this},copy:function(){var e={},o=this._;for(var t in o)e[t]=o[t].slice();return new Fl(e)},call:function(e,o){if((n=arguments.length-2)>0)for(var t=new Array(n),i=0,n,r;i<n;++i)t[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,n=r.length;i<n;++i)r[i].value.apply(o,t)},apply:function(e,o,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,r=i.length;n<r;++n)i[n].value.apply(o,t)}};function cy(e,o){for(var t=0,i=e.length,n;t<i;++t)if((n=e[t]).name===o)return n.value}function C2(e,o,t){for(var i=0,n=e.length;i<n;++i)if(e[i].name===o){e[i]=sy,e=e.slice(0,i).concat(e.slice(i+1));break}return t!=null&&e.push({name:o,value:t}),e}var gh=M2;var Ll="http://www.w3.org/1999/xhtml",bh={svg:"http://www.w3.org/2000/svg",xhtml:Ll,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oi(e){var o=e+="",t=o.indexOf(":");return t>=0&&(o=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),bh.hasOwnProperty(o)?{space:bh[o],local:e}:e}function dy(e){return function(){var o=this.ownerDocument,t=this.namespaceURI;return t===Ll&&o.documentElement.namespaceURI===Ll?o.createElement(e):o.createElementNS(t,e)}}function hy(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nl(e){var o=Oi(e);return(o.local?hy:dy)(o)}function my(){}function cn(e){return e==null?my:function(){return this.querySelector(e)}}function _2(e){typeof e!="function"&&(e=cn(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=new Array(a),l,d,c=0;c<a;++c)(l=r[c])&&(d=e.call(l,l.__data__,c,r))&&("__data__"in l&&(d.__data__=l.__data__),s[c]=d);return new mt(i,this._parents)}function vh(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function uy(){return[]}function ra(e){return e==null?uy:function(){return this.querySelectorAll(e)}}function py(e){return function(){return vh(e.apply(this,arguments))}}function E2(e){typeof e=="function"?e=py(e):e=ra(e);for(var o=this._groups,t=o.length,i=[],n=[],r=0;r<t;++r)for(var a=o[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&(i.push(e.call(l,l.__data__,d,a)),n.push(l));return new mt(i,n)}function aa(e){return function(){return this.matches(e)}}function Pl(e){return function(o){return o.matches(e)}}var fy=Array.prototype.find;function gy(e){return function(){return fy.call(this.children,e)}}function by(){return this.firstElementChild}function k2(e){return this.select(e==null?by:gy(typeof e=="function"?e:Pl(e)))}var vy=Array.prototype.filter;function xy(){return Array.from(this.children)}function wy(e){return function(){return vy.call(this.children,e)}}function q2(e){return this.selectAll(e==null?xy:wy(typeof e=="function"?e:Pl(e)))}function T2(e){typeof e!="function"&&(e=aa(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new mt(i,this._parents)}function Bl(e){return new Array(e.length)}function R2(){return new mt(this._enter||this._groups.map(Bl),this._parents)}function sa(e,o){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=o}sa.prototype={constructor:sa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,o){return this._parent.insertBefore(e,o)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function I2(e){return function(){return e}}function Sy(e,o,t,i,n,r){for(var a=0,s,l=o.length,d=r.length;a<d;++a)(s=o[a])?(s.__data__=r[a],i[a]=s):t[a]=new sa(e,r[a]);for(;a<l;++a)(s=o[a])&&(n[a]=s)}function yy(e,o,t,i,n,r,a){var s,l,d=new Map,c=o.length,m=r.length,u=new Array(c),p;for(s=0;s<c;++s)(l=o[s])&&(u[s]=p=a.call(l,l.__data__,s,o)+"",d.has(p)?n[s]=l:d.set(p,l));for(s=0;s<m;++s)p=a.call(e,r[s],s,r)+"",(l=d.get(p))?(i[s]=l,l.__data__=r[s],d.delete(p)):t[s]=new sa(e,r[s]);for(s=0;s<c;++s)(l=o[s])&&d.get(u[s])===l&&(n[s]=l)}function Cy(e){return e.__data__}function A2(e,o){if(!arguments.length)return Array.from(this,Cy);var t=o?yy:Sy,i=this._parents,n=this._groups;typeof e!="function"&&(e=I2(e));for(var r=n.length,a=new Array(r),s=new Array(r),l=new Array(r),d=0;d<r;++d){var c=i[d],m=n[d],u=m.length,p=My(e.call(c,c&&c.__data__,d,i)),f=p.length,S=s[d]=new Array(f),R=a[d]=new Array(f),L=l[d]=new Array(u);t(c,m,S,R,L,p,o);for(var j=0,q=0,P,O;j<f;++j)if(P=S[j]){for(j>=q&&(q=j+1);!(O=R[q])&&++q<f;);P._next=O||null}}return a=new mt(a,i),a._enter=s,a._exit=l,a}function My(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function D2(){return new mt(this._exit||this._groups.map(Bl),this._parents)}function F2(e,o,t){var i=this.enter(),n=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(n=o(n),n&&(n=n.selection())),t==null?r.remove():t(r),i&&n?i.merge(n).order():n}function L2(e){for(var o=e.selection?e.selection():e,t=this._groups,i=o._groups,n=t.length,r=i.length,a=Math.min(n,r),s=new Array(n),l=0;l<a;++l)for(var d=t[l],c=i[l],m=d.length,u=s[l]=new Array(m),p,f=0;f<m;++f)(p=d[f]||c[f])&&(u[f]=p);for(;l<n;++l)s[l]=t[l];return new mt(s,this._parents)}function N2(){for(var e=this._groups,o=-1,t=e.length;++o<t;)for(var i=e[o],n=i.length-1,r=i[n],a;--n>=0;)(a=i[n])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function P2(e){e||(e=_y);function o(m,u){return m&&u?e(m.__data__,u.__data__):!m-!u}for(var t=this._groups,i=t.length,n=new Array(i),r=0;r<i;++r){for(var a=t[r],s=a.length,l=n[r]=new Array(s),d,c=0;c<s;++c)(d=a[c])&&(l[c]=d);l.sort(o)}return new mt(n,this._parents).order()}function _y(e,o){return e<o?-1:e>o?1:e>=o?0:NaN}function B2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function V2(){return Array.from(this)}function W2(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length;n<r;++n){var a=i[n];if(a)return a}return null}function O2(){let e=0;for(let o of this)++e;return e}function z2(){return!this.node()}function $2(e){for(var o=this._groups,t=0,i=o.length;t<i;++t)for(var n=o[t],r=0,a=n.length,s;r<a;++r)(s=n[r])&&e.call(s,s.__data__,r,n);return this}function Ey(e){return function(){this.removeAttribute(e)}}function ky(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qy(e,o){return function(){this.setAttribute(e,o)}}function Ty(e,o){return function(){this.setAttributeNS(e.space,e.local,o)}}function Ry(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function Iy(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function j2(e,o){var t=Oi(e);if(arguments.length<2){var i=this.node();return t.local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}return this.each((o==null?t.local?ky:Ey:typeof o=="function"?t.local?Iy:Ry:t.local?Ty:qy)(t,o))}function Vl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ay(e){return function(){this.style.removeProperty(e)}}function Dy(e,o,t){return function(){this.style.setProperty(e,o,t)}}function Fy(e,o,t){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,t)}}function H2(e,o,t){return arguments.length>1?this.each((o==null?Ay:typeof o=="function"?Fy:Dy)(e,o,t??"")):Fo(this.node(),e)}function Fo(e,o){return e.style.getPropertyValue(o)||Vl(e).getComputedStyle(e,null).getPropertyValue(o)}function Ly(e){return function(){delete this[e]}}function Ny(e,o){return function(){this[e]=o}}function Py(e,o){return function(){var t=o.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function U2(e,o){return arguments.length>1?this.each((o==null?Ly:typeof o=="function"?Py:Ny)(e,o)):this.node()[e]}function G2(e){return e.trim().split(/^|\s+/)}function xh(e){return e.classList||new X2(e)}function X2(e){this._node=e,this._names=G2(e.getAttribute("class")||"")}X2.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function K2(e,o){for(var t=xh(e),i=-1,n=o.length;++i<n;)t.add(o[i])}function Q2(e,o){for(var t=xh(e),i=-1,n=o.length;++i<n;)t.remove(o[i])}function By(e){return function(){K2(this,e)}}function Vy(e){return function(){Q2(this,e)}}function Wy(e,o){return function(){(o.apply(this,arguments)?K2:Q2)(this,e)}}function Z2(e,o){var t=G2(e+"");if(arguments.length<2){for(var i=xh(this.node()),n=-1,r=t.length;++n<r;)if(!i.contains(t[n]))return!1;return!0}return this.each((typeof o=="function"?Wy:o?By:Vy)(t,o))}function Oy(){this.textContent=""}function zy(e){return function(){this.textContent=e}}function $y(e){return function(){var o=e.apply(this,arguments);this.textContent=o??""}}function Y2(e){return arguments.length?this.each(e==null?Oy:(typeof e=="function"?$y:zy)(e)):this.node().textContent}function jy(){this.innerHTML=""}function Hy(e){return function(){this.innerHTML=e}}function Uy(e){return function(){var o=e.apply(this,arguments);this.innerHTML=o??""}}function J2(e){return arguments.length?this.each(e==null?jy:(typeof e=="function"?Uy:Hy)(e)):this.node().innerHTML}function Gy(){this.nextSibling&&this.parentNode.appendChild(this)}function eb(){return this.each(Gy)}function Xy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tb(){return this.each(Xy)}function ib(e){var o=typeof e=="function"?e:Nl(e);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function Ky(){return null}function ob(e,o){var t=typeof e=="function"?e:Nl(e),i=o==null?Ky:typeof o=="function"?o:cn(o);return this.select(function(){return this.insertBefore(t.apply(this,arguments),i.apply(this,arguments)||null)})}function Qy(){var e=this.parentNode;e&&e.removeChild(this)}function nb(){return this.each(Qy)}function Zy(){var e=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function Yy(){var e=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function rb(e){return this.select(e?Yy:Zy)}function ab(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Jy(e){return function(o){e.call(this,o,this.__data__)}}function e6(e){return e.trim().split(/^|\s+/).map(function(o){var t="",i=o.indexOf(".");return i>=0&&(t=o.slice(i+1),o=o.slice(0,i)),{type:o,name:t}})}function t6(e){return function(){var o=this.__on;if(o){for(var t=0,i=-1,n=o.length,r;t<n;++t)r=o[t],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):o[++i]=r;++i?o.length=i:delete this.__on}}}function i6(e,o,t){return function(){var i=this.__on,n,r=Jy(o);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=t),n.value=o;return}}this.addEventListener(e.type,r,t),n={type:e.type,name:e.name,value:o,listener:r,options:t},i?i.push(n):this.__on=[n]}}function sb(e,o,t){var i=e6(e+""),n,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,d=s.length,c;l<d;++l)for(n=0,c=s[l];n<r;++n)if((a=i[n]).type===c.type&&a.name===c.name)return c.value}return}for(s=o?i6:t6,n=0;n<r;++n)this.each(s(i[n],o,t));return this}function lb(e,o,t){var i=Vl(e),n=i.CustomEvent;typeof n=="function"?n=new n(o,t):(n=i.document.createEvent("Event"),t?(n.initEvent(o,t.bubbles,t.cancelable),n.detail=t.detail):n.initEvent(o,!1,!1)),e.dispatchEvent(n)}function o6(e,o){return function(){return lb(this,e,o)}}function n6(e,o){return function(){return lb(this,e,o.apply(this,arguments))}}function cb(e,o){return this.each((typeof o=="function"?n6:o6)(e,o))}function*db(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length,a;n<r;++n)(a=i[n])&&(yield a)}var wh=[null];function mt(e,o){this._groups=e,this._parents=o}function hb(){return new mt([[document.documentElement]],wh)}function r6(){return this}mt.prototype=hb.prototype={constructor:mt,select:_2,selectAll:E2,selectChild:k2,selectChildren:q2,filter:T2,data:A2,enter:R2,exit:D2,join:F2,merge:L2,selection:r6,order:N2,sort:P2,call:B2,nodes:V2,node:W2,size:O2,empty:z2,each:$2,attr:j2,style:H2,property:U2,classed:Z2,text:Y2,html:J2,raise:eb,lower:tb,append:ib,insert:ob,remove:nb,clone:rb,datum:ab,on:sb,dispatch:cb,[Symbol.iterator]:db};var zi=hb;function Sh(e){return typeof e=="string"?new mt([[document.querySelector(e)]],[document.documentElement]):new mt([[e]],wh)}function mb(e){let o;for(;o=e.sourceEvent;)e=o;return e}function yh(e,o){if(e=mb(e),o===void 0&&(o=e.currentTarget),o){var t=o.ownerSVGElement||o;if(t.createSVGPoint){var i=t.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var n=o.getBoundingClientRect();return[e.clientX-n.left-o.clientLeft,e.clientY-n.top-o.clientTop]}}return[e.pageX,e.pageY]}function Wl(e,o,t){e.prototype=o.prototype=t,t.constructor=e}function Ch(e,o){var t=Object.create(e.prototype);for(var i in o)t[i]=o[i];return t}function da(){}var la=.7,$l=1/la,kr="\\s*([+-]?\\d+)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a6=/^#([0-9a-f]{3,8})$/,s6=new RegExp(`^rgb\\(${kr},${kr},${kr}\\)$`),l6=new RegExp(`^rgb\\(${Fi},${Fi},${Fi}\\)$`),c6=new RegExp(`^rgba\\(${kr},${kr},${kr},${ca}\\)$`),d6=new RegExp(`^rgba\\(${Fi},${Fi},${Fi},${ca}\\)$`),h6=new RegExp(`^hsl\\(${ca},${Fi},${Fi}\\)$`),m6=new RegExp(`^hsla\\(${ca},${Fi},${Fi},${ca}\\)$`),ub={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Wl(da,hi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pb,formatHex:pb,formatHex8:u6,formatHsl:p6,formatRgb:fb,toString:fb});function pb(){return this.rgb().formatHex()}function u6(){return this.rgb().formatHex8()}function p6(){return Sb(this).formatHsl()}function fb(){return this.rgb().formatRgb()}function hi(e){var o,t;return e=(e+"").trim().toLowerCase(),(o=a6.exec(e))?(t=o[1].length,o=parseInt(o[1],16),t===6?gb(o):t===3?new Wt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):t===8?Ol(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):t===4?Ol(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=s6.exec(e))?new Wt(o[1],o[2],o[3],1):(o=l6.exec(e))?new Wt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=c6.exec(e))?Ol(o[1],o[2],o[3],o[4]):(o=d6.exec(e))?Ol(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=h6.exec(e))?xb(o[1],o[2]/100,o[3]/100,1):(o=m6.exec(e))?xb(o[1],o[2]/100,o[3]/100,o[4]):ub.hasOwnProperty(e)?gb(ub[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function gb(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function Ol(e,o,t,i){return i<=0&&(e=o=t=NaN),new Wt(e,o,t,i)}function f6(e){return e instanceof da||(e=hi(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function qr(e,o,t,i){return arguments.length===1?f6(e):new Wt(e,o,t,i??1)}function Wt(e,o,t,i){this.r=+e,this.g=+o,this.b=+t,this.opacity=+i}Wl(Wt,qr,Ch(da,{brighter(e){return e=e==null?$l:Math.pow($l,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?la:Math.pow(la,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(hn(this.r),hn(this.g),hn(this.b),jl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bb,formatHex:bb,formatHex8:g6,formatRgb:vb,toString:vb}));function bb(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function g6(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function vb(){let e=jl(this.opacity);return`${e===1?"rgb(":"rgba("}${hn(this.r)}, ${hn(this.g)}, ${hn(this.b)}${e===1?")":`, ${e})`}`}function jl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dn(e){return e=hn(e),(e<16?"0":"")+e.toString(16)}function xb(e,o,t,i){return i<=0?e=o=t=NaN:t<=0||t>=1?e=o=NaN:o<=0&&(e=NaN),new di(e,o,t,i)}function Sb(e){if(e instanceof di)return new di(e.h,e.s,e.l,e.opacity);if(e instanceof da||(e=hi(e)),!e)return new di;if(e instanceof di)return e;e=e.rgb();var o=e.r/255,t=e.g/255,i=e.b/255,n=Math.min(o,t,i),r=Math.max(o,t,i),a=NaN,s=r-n,l=(r+n)/2;return s?(o===r?a=(t-i)/s+(t<i)*6:t===r?a=(i-o)/s+2:a=(o-t)/s+4,s/=l<.5?r+n:2-r-n,a*=60):s=l>0&&l<1?0:a,new di(a,s,l,e.opacity)}function yb(e,o,t,i){return arguments.length===1?Sb(e):new di(e,o,t,i??1)}function di(e,o,t,i){this.h=+e,this.s=+o,this.l=+t,this.opacity=+i}Wl(di,yb,Ch(da,{brighter(e){return e=e==null?$l:Math.pow($l,e),new di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?la:Math.pow(la,e),new di(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*o,n=2*t-i;return new Wt(Mh(e>=240?e-240:e+120,n,i),Mh(e,n,i),Mh(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new di(wb(this.h),zl(this.s),zl(this.l),jl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=jl(this.opacity);return`${e===1?"hsl(":"hsla("}${wb(this.h)}, ${zl(this.s)*100}%, ${zl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wb(e){return e=(e||0)%360,e<0?e+360:e}function zl(e){return Math.max(0,Math.min(1,e||0))}function Mh(e,o,t){return(e<60?o+(t-o)*e/60:e<180?t:e<240?o+(t-o)*(240-e)/60:o)*255}function _h(e,o,t,i,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*o+(4-6*r+3*a)*t+(1+3*e+3*r-3*a)*i+a*n)/6}function Cb(e){var o=e.length-1;return function(t){var i=t<=0?t=0:t>=1?(t=1,o-1):Math.floor(t*o),n=e[i],r=e[i+1],a=i>0?e[i-1]:2*n-r,s=i<o-1?e[i+2]:2*r-n;return _h((t-i/o)*o,a,n,r,s)}}function Mb(e){var o=e.length;return function(t){var i=Math.floor(((t%=1)<0?++t:t)*o),n=e[(i+o-1)%o],r=e[i%o],a=e[(i+1)%o],s=e[(i+2)%o];return _h((t-i/o)*o,n,r,a,s)}}var ha=e=>()=>e;function b6(e,o){return function(t){return e+t*o}}function v6(e,o,t){return e=Math.pow(e,t),o=Math.pow(o,t)-e,t=1/t,function(i){return Math.pow(e+i*o,t)}}function _b(e){return(e=+e)==1?Hl:function(o,t){return t-o?v6(o,t,e):ha(isNaN(o)?t:o)}}function Hl(e,o){var t=o-e;return t?b6(e,t):ha(isNaN(e)?o:e)}var mn=(function e(o){var t=_b(o);function i(n,r){var a=t((n=qr(n)).r,(r=qr(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),d=Hl(n.opacity,r.opacity);return function(c){return n.r=a(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return i.gamma=e,i})(1);function Eb(e){return function(o){var t=o.length,i=new Array(t),n=new Array(t),r=new Array(t),a,s;for(a=0;a<t;++a)s=qr(o[a]),i[a]=s.r||0,n[a]=s.g||0,r[a]=s.b||0;return i=e(i),n=e(n),r=e(r),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=r(l),s+""}}}var x6=Eb(Cb),w6=Eb(Mb);function kb(e,o){o||(o=[]);var t=e?Math.min(o.length,e.length):0,i=o.slice(),n;return function(r){for(n=0;n<t;++n)i[n]=e[n]*(1-r)+o[n]*r;return i}}function qb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Tb(e,o){var t=o?o.length:0,i=e?Math.min(t,e.length):0,n=new Array(i),r=new Array(t),a;for(a=0;a<i;++a)n[a]=un(e[a],o[a]);for(;a<t;++a)r[a]=o[a];return function(s){for(a=0;a<i;++a)r[a]=n[a](s);return r}}function Rb(e,o){var t=new Date;return e=+e,o=+o,function(i){return t.setTime(e*(1-i)+o*i),t}}function yt(e,o){return e=+e,o=+o,function(t){return e*(1-t)+o*t}}function Ib(e,o){var t={},i={},n;(e===null||typeof e!="object")&&(e={}),(o===null||typeof o!="object")&&(o={});for(n in o)n in e?t[n]=un(e[n],o[n]):i[n]=o[n];return function(r){for(n in t)i[n]=t[n](r);return i}}var kh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Eh=new RegExp(kh.source,"g");function S6(e){return function(){return e}}function y6(e){return function(o){return e(o)+""}}function ma(e,o){var t=kh.lastIndex=Eh.lastIndex=0,i,n,r,a=-1,s=[],l=[];for(e=e+"",o=o+"";(i=kh.exec(e))&&(n=Eh.exec(o));)(r=n.index)>t&&(r=o.slice(t,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:yt(i,n)})),t=Eh.lastIndex;return t<o.length&&(r=o.slice(t),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?y6(l[0].x):S6(o):(o=l.length,function(d){for(var c=0,m;c<o;++c)s[(m=l[c]).i]=m.x(d);return s.join("")})}function un(e,o){var t=typeof o,i;return o==null||t==="boolean"?ha(o):(t==="number"?yt:t==="string"?(i=hi(o))?(o=i,mn):ma:o instanceof hi?mn:o instanceof Date?Rb:qb(o)?kb:Array.isArray(o)?Tb:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?Ib:yt)(e,o)}function qh(e,o){return e=+e,o=+o,function(t){return Math.round(e*(1-t)+o*t)}}var Ab=180/Math.PI,Ul={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Th(e,o,t,i,n,r){var a,s,l;return(a=Math.sqrt(e*e+o*o))&&(e/=a,o/=a),(l=e*t+o*i)&&(t-=e*l,i-=o*l),(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s,l/=s),e*i<o*t&&(e=-e,o=-o,l=-l,a=-a),{translateX:n,translateY:r,rotate:Math.atan2(o,e)*Ab,skewX:Math.atan(l)*Ab,scaleX:a,scaleY:s}}var Gl;function Db(e){let o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return o.isIdentity?Ul:Th(o.a,o.b,o.c,o.d,o.e,o.f)}function Fb(e){return e==null?Ul:(Gl||(Gl=document.createElementNS("http://www.w3.org/2000/svg","g")),Gl.setAttribute("transform",e),(e=Gl.transform.baseVal.consolidate())?(e=e.matrix,Th(e.a,e.b,e.c,e.d,e.e,e.f)):Ul)}function Lb(e,o,t,i){function n(d){return d.length?d.pop()+" ":""}function r(d,c,m,u,p,f){if(d!==m||c!==u){var S=p.push("translate(",null,o,null,t);f.push({i:S-4,x:yt(d,m)},{i:S-2,x:yt(c,u)})}else(m||u)&&p.push("translate("+m+o+u+t)}function a(d,c,m,u){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),u.push({i:m.push(n(m)+"rotate(",null,i)-2,x:yt(d,c)})):c&&m.push(n(m)+"rotate("+c+i)}function s(d,c,m,u){d!==c?u.push({i:m.push(n(m)+"skewX(",null,i)-2,x:yt(d,c)}):c&&m.push(n(m)+"skewX("+c+i)}function l(d,c,m,u,p,f){if(d!==m||c!==u){var S=p.push(n(p)+"scale(",null,",",null,")");f.push({i:S-4,x:yt(d,m)},{i:S-2,x:yt(c,u)})}else(m!==1||u!==1)&&p.push(n(p)+"scale("+m+","+u+")")}return function(d,c){var m=[],u=[];return d=e(d),c=e(c),r(d.translateX,d.translateY,c.translateX,c.translateY,m,u),a(d.rotate,c.rotate,m,u),s(d.skewX,c.skewX,m,u),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,m,u),d=c=null,function(p){for(var f=-1,S=u.length,R;++f<S;)m[(R=u[f]).i]=R.x(p);return m.join("")}}}var Rh=Lb(Db,"px, ","px)","deg)"),Ih=Lb(Fb,", ",")",")");var Tr=0,pa=0,ua=0,Pb=1e3,Xl,fa,Kl=0,pn=0,Ql=0,ga=typeof performance=="object"&&performance.now?performance:Date,Bb=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function va(){return pn||(Bb(C6),pn=ga.now()+Ql)}function C6(){pn=0}function ba(){this._call=this._time=this._next=null}ba.prototype=Zl.prototype={constructor:ba,restart:function(e,o,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?va():+t)+(o==null?0:+o),!this._next&&fa!==this&&(fa?fa._next=this:Xl=this,fa=this),this._call=e,this._time=t,Ah()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ah())}};function Zl(e,o,t){var i=new ba;return i.restart(e,o,t),i}function Vb(){va(),++Tr;for(var e=Xl,o;e;)(o=pn-e._time)>=0&&e._call.call(void 0,o),e=e._next;--Tr}function Nb(){pn=(Kl=ga.now())+Ql,Tr=pa=0;try{Vb()}finally{Tr=0,_6(),pn=0}}function M6(){var e=ga.now(),o=e-Kl;o>Pb&&(Ql-=o,Kl=e)}function _6(){for(var e,o=Xl,t,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:Xl=t);fa=e,Ah(i)}function Ah(e){if(!Tr){pa&&(pa=clearTimeout(pa));var o=e-pn;o>24?(e<1/0&&(pa=setTimeout(Nb,e-ga.now()-Ql)),ua&&(ua=clearInterval(ua))):(ua||(Kl=ga.now(),ua=setInterval(M6,Pb)),Tr=1,Bb(Nb))}}function Yl(e,o,t){var i=new ba;return o=o==null?0:+o,i.restart(n=>{i.stop(),e(n+o)},o,t),i}var E6=gh("start","end","cancel","interrupt"),k6=[],zb=0,Wb=1,ec=2,Jl=3,Ob=4,tc=5,xa=6;function Lo(e,o,t,i,n,r){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;q6(e,t,{name:o,index:i,group:n,on:E6,tween:k6,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:zb})}function wa(e,o){var t=bt(e,o);if(t.state>zb)throw new Error("too late; already scheduled");return t}function Ct(e,o){var t=bt(e,o);if(t.state>Jl)throw new Error("too late; already running");return t}function bt(e,o){var t=e.__transition;if(!t||!(t=t[o]))throw new Error("transition not found");return t}function q6(e,o,t){var i=e.__transition,n;i[o]=t,t.timer=Zl(r,0,t.time);function r(d){t.state=Wb,t.timer.restart(a,t.delay,t.time),t.delay<=d&&a(d-t.delay)}function a(d){var c,m,u,p;if(t.state!==Wb)return l();for(c in i)if(p=i[c],p.name===t.name){if(p.state===Jl)return Yl(a);p.state===Ob?(p.state=xa,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[c]):+c<o&&(p.state=xa,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[c])}if(Yl(function(){t.state===Jl&&(t.state=Ob,t.timer.restart(s,t.delay,t.time),s(d))}),t.state=ec,t.on.call("start",e,e.__data__,t.index,t.group),t.state===ec){for(t.state=Jl,n=new Array(u=t.tween.length),c=0,m=-1;c<u;++c)(p=t.tween[c].value.call(e,e.__data__,t.index,t.group))&&(n[++m]=p);n.length=m+1}}function s(d){for(var c=d<t.duration?t.ease.call(null,d/t.duration):(t.timer.restart(l),t.state=tc,1),m=-1,u=n.length;++m<u;)n[m].call(e,c);t.state===tc&&(t.on.call("end",e,e.__data__,t.index,t.group),l())}function l(){t.state=xa,t.timer.stop(),delete i[o];for(var d in i)return;delete e.__transition}}function ic(e,o){var t=e.__transition,i,n,r=!0,a;if(t){o=o==null?null:o+"";for(a in t){if((i=t[a]).name!==o){r=!1;continue}n=i.state>ec&&i.state<tc,i.state=xa,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete t[a]}r&&delete e.__transition}}function $b(e){return this.each(function(){ic(this,e)})}function T6(e,o){var t,i;return function(){var n=Ct(this,e),r=n.tween;if(r!==t){i=t=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===o){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function R6(e,o,t){var i,n;if(typeof t!="function")throw new Error;return function(){var r=Ct(this,e),a=r.tween;if(a!==i){n=(i=a).slice();for(var s={name:o,value:t},l=0,d=n.length;l<d;++l)if(n[l].name===o){n[l]=s;break}l===d&&n.push(s)}r.tween=n}}function jb(e,o){var t=this._id;if(e+="",arguments.length<2){for(var i=bt(this.node(),t).tween,n=0,r=i.length,a;n<r;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((o==null?T6:R6)(t,e,o))}function Rr(e,o,t){var i=e._id;return e.each(function(){var n=Ct(this,i);(n.value||(n.value={}))[o]=t.apply(this,arguments)}),function(n){return bt(n,i).value[o]}}function oc(e,o){var t;return(typeof o=="number"?yt:o instanceof hi?mn:(t=hi(o))?(o=t,mn):ma)(e,o)}function I6(e){return function(){this.removeAttribute(e)}}function A6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function D6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttribute(e);return a===n?null:a===i?r:r=o(i=a,t)}}function F6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?r:r=o(i=a,t)}}function L6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function N6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function Hb(e,o){var t=Oi(e),i=t==="transform"?Ih:oc;return this.attrTween(e,typeof o=="function"?(t.local?N6:L6)(t,i,Rr(this,"attr."+e,o)):o==null?(t.local?A6:I6)(t):(t.local?F6:D6)(t,i,o))}function P6(e,o){return function(t){this.setAttribute(e,o.call(this,t))}}function B6(e,o){return function(t){this.setAttributeNS(e.space,e.local,o.call(this,t))}}function V6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&B6(e,r)),t}return n._value=o,n}function W6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&P6(e,r)),t}return n._value=o,n}function Ub(e,o){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(o==null)return this.tween(t,null);if(typeof o!="function")throw new Error;var i=Oi(e);return this.tween(t,(i.local?V6:W6)(i,o))}function O6(e,o){return function(){wa(this,e).delay=+o.apply(this,arguments)}}function z6(e,o){return o=+o,function(){wa(this,e).delay=o}}function Gb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?O6:z6)(o,e)):bt(this.node(),o).delay}function $6(e,o){return function(){Ct(this,e).duration=+o.apply(this,arguments)}}function j6(e,o){return o=+o,function(){Ct(this,e).duration=o}}function Xb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?$6:j6)(o,e)):bt(this.node(),o).duration}function H6(e,o){if(typeof o!="function")throw new Error;return function(){Ct(this,e).ease=o}}function Kb(e){var o=this._id;return arguments.length?this.each(H6(o,e)):bt(this.node(),o).ease}function U6(e,o){return function(){var t=o.apply(this,arguments);if(typeof t!="function")throw new Error;Ct(this,e).ease=t}}function Qb(e){if(typeof e!="function")throw new Error;return this.each(U6(this._id,e))}function Zb(e){typeof e!="function"&&(e=aa(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new Lt(i,this._parents,this._name,this._id)}function Yb(e){if(e._id!==this._id)throw new Error;for(var o=this._groups,t=e._groups,i=o.length,n=t.length,r=Math.min(i,n),a=new Array(i),s=0;s<r;++s)for(var l=o[s],d=t[s],c=l.length,m=a[s]=new Array(c),u,p=0;p<c;++p)(u=l[p]||d[p])&&(m[p]=u);for(;s<i;++s)a[s]=o[s];return new Lt(a,this._parents,this._name,this._id)}function G6(e){return(e+"").trim().split(/^|\s+/).every(function(o){var t=o.indexOf(".");return t>=0&&(o=o.slice(0,t)),!o||o==="start"})}function X6(e,o,t){var i,n,r=G6(o)?wa:Ct;return function(){var a=r(this,e),s=a.on;s!==i&&(n=(i=s).copy()).on(o,t),a.on=n}}function Jb(e,o){var t=this._id;return arguments.length<2?bt(this.node(),t).on.on(e):this.each(X6(t,e,o))}function K6(e){return function(){var o=this.parentNode;for(var t in this.__transition)if(+t!==e)return;o&&o.removeChild(this)}}function e3(){return this.on("end.remove",K6(this._id))}function t3(e){var o=this._name,t=this._id;typeof e!="function"&&(e=cn(e));for(var i=this._groups,n=i.length,r=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,d=r[a]=new Array(l),c,m,u=0;u<l;++u)(c=s[u])&&(m=e.call(c,c.__data__,u,s))&&("__data__"in c&&(m.__data__=c.__data__),d[u]=m,Lo(d[u],o,t,u,d,bt(c,t)));return new Lt(r,this._parents,o,t)}function i3(e){var o=this._name,t=this._id;typeof e!="function"&&(e=ra(e));for(var i=this._groups,n=i.length,r=[],a=[],s=0;s<n;++s)for(var l=i[s],d=l.length,c,m=0;m<d;++m)if(c=l[m]){for(var u=e.call(c,c.__data__,m,l),p,f=bt(c,t),S=0,R=u.length;S<R;++S)(p=u[S])&&Lo(p,o,t,S,u,f);r.push(u),a.push(c)}return new Lt(r,a,o,t)}var Q6=zi.prototype.constructor;function o3(){return new Q6(this._groups,this._parents)}function Z6(e,o){var t,i,n;return function(){var r=Fo(this,e),a=(this.style.removeProperty(e),Fo(this,e));return r===a?null:r===t&&a===i?n:n=o(t=r,i=a)}}function n3(e){return function(){this.style.removeProperty(e)}}function Y6(e,o,t){var i,n=t+"",r;return function(){var a=Fo(this,e);return a===n?null:a===i?r:r=o(i=a,t)}}function J6(e,o,t){var i,n,r;return function(){var a=Fo(this,e),s=t(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Fo(this,e))),a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s))}}function e8(e,o){var t,i,n,r="style."+o,a="end."+r,s;return function(){var l=Ct(this,e),d=l.on,c=l.value[r]==null?s||(s=n3(o)):void 0;(d!==t||n!==c)&&(i=(t=d).copy()).on(a,n=c),l.on=i}}function r3(e,o,t){var i=(e+="")=="transform"?Rh:oc;return o==null?this.styleTween(e,Z6(e,i)).on("end.style."+e,n3(e)):typeof o=="function"?this.styleTween(e,J6(e,i,Rr(this,"style."+e,o))).each(e8(this._id,e)):this.styleTween(e,Y6(e,i,o),t).on("end.style."+e,null)}function t8(e,o,t){return function(i){this.style.setProperty(e,o.call(this,i),t)}}function i8(e,o,t){var i,n;function r(){var a=o.apply(this,arguments);return a!==n&&(i=(n=a)&&t8(e,a,t)),i}return r._value=o,r}function a3(e,o,t){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,i8(e,o,t??""))}function o8(e){return function(){this.textContent=e}}function n8(e){return function(){var o=e(this);this.textContent=o??""}}function s3(e){return this.tween("text",typeof e=="function"?n8(Rr(this,"text",e)):o8(e==null?"":e+""))}function r8(e){return function(o){this.textContent=e.call(this,o)}}function a8(e){var o,t;function i(){var n=e.apply(this,arguments);return n!==t&&(o=(t=n)&&r8(n)),o}return i._value=e,i}function l3(e){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,a8(e))}function c3(){for(var e=this._name,o=this._id,t=nc(),i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)if(l=a[d]){var c=bt(l,o);Lo(l,e,t,d,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Lt(i,this._parents,e,t)}function d3(){var e,o,t=this,i=t._id,n=t.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--n===0&&r()}};t.each(function(){var d=Ct(this,i),c=d.on;c!==e&&(o=(e=c).copy(),o._.cancel.push(s),o._.interrupt.push(s),o._.end.push(l)),d.on=o}),n===0&&r()})}var s8=0;function Lt(e,o,t,i){this._groups=e,this._parents=o,this._name=t,this._id=i}function h3(e){return zi().transition(e)}function nc(){return++s8}var $i=zi.prototype;Lt.prototype=h3.prototype={constructor:Lt,select:t3,selectAll:i3,selectChild:$i.selectChild,selectChildren:$i.selectChildren,filter:Zb,merge:Yb,selection:o3,transition:c3,call:$i.call,nodes:$i.nodes,node:$i.node,size:$i.size,empty:$i.empty,each:$i.each,on:Jb,attr:Hb,attrTween:Ub,style:r3,styleTween:a3,text:s3,textTween:l3,remove:e3,tween:jb,delay:Gb,duration:Xb,ease:Kb,easeVarying:Qb,end:d3,[Symbol.iterator]:$i[Symbol.iterator]};function rc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var l8={time:null,delay:0,duration:250,ease:rc};function c8(e,o){for(var t;!(t=e.__transition)||!(t=t[o]);)if(!(e=e.parentNode))throw new Error(`transition ${o} not found`);return t}function m3(e){var o,t;e instanceof Lt?(o=e._id,e=e._name):(o=nc(),(t=l8).time=va(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&Lo(l,e,o,d,a,t||c8(l,o));return new Lt(i,this._parents,e,o)}zi.prototype.interrupt=$b;zi.prototype.transition=m3;var{abs:bz,max:vz,min:xz}=Math;function u3(e){return[+e[0],+e[1]]}function d8(e){return[u3(e[0]),u3(e[1])]}var wz={name:"x",handles:["w","e"].map(Dh),input:function(e,o){return e==null?null:[[+e[0],o[0][1]],[+e[1],o[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Sz={name:"y",handles:["n","s"].map(Dh),input:function(e,o){return e==null?null:[[o[0][0],+e[0]],[o[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},yz={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Dh),input:function(e){return e==null?null:d8(e)},output:function(e){return e}};function Dh(e){return{type:e}}var Fh=Math.PI,Lh=2*Fh,fn=1e-6,h8=Lh-fn;function p3(e){this._+=e[0];for(let o=1,t=e.length;o<t;++o)this._+=arguments[o]+e[o]}function m8(e){let o=Math.floor(e);if(!(o>=0))throw new Error(`invalid digits: ${e}`);if(o>15)return p3;let t=10**o;return function(i){this._+=i[0];for(let n=1,r=i.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+i[n]}}var gn=class{constructor(o){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=o==null?p3:m8(o)}moveTo(o,t){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(o,t){this._append`L${this._x1=+o},${this._y1=+t}`}quadraticCurveTo(o,t,i,n){this._append`Q${+o},${+t},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(o,t,i,n,r,a){this._append`C${+o},${+t},${+i},${+n},${this._x1=+r},${this._y1=+a}`}arcTo(o,t,i,n,r){if(o=+o,t=+t,i=+i,n=+n,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=i-o,d=n-t,c=a-o,m=s-t,u=c*c+m*m;if(this._x1===null)this._append`M${this._x1=o},${this._y1=t}`;else if(u>fn)if(!(Math.abs(m*l-d*c)>fn)||!r)this._append`L${this._x1=o},${this._y1=t}`;else{let p=i-a,f=n-s,S=l*l+d*d,R=p*p+f*f,L=Math.sqrt(S),j=Math.sqrt(u),q=r*Math.tan((Fh-Math.acos((S+u-R)/(2*L*j)))/2),P=q/j,O=q/L;Math.abs(P-1)>fn&&this._append`L${o+P*c},${t+P*m}`,this._append`A${r},${r},0,0,${+(m*p>c*f)},${this._x1=o+O*l},${this._y1=t+O*d}`}}arc(o,t,i,n,r,a){if(o=+o,t=+t,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),d=o+s,c=t+l,m=1^a,u=a?n-r:r-n;this._x1===null?this._append`M${d},${c}`:(Math.abs(this._x1-d)>fn||Math.abs(this._y1-c)>fn)&&this._append`L${d},${c}`,i&&(u<0&&(u=u%Lh+Lh),u>h8?this._append`A${i},${i},0,1,${m},${o-s},${t-l}A${i},${i},0,1,${m},${this._x1=d},${this._y1=c}`:u>fn&&this._append`A${i},${i},0,${+(u>=Fh)},${m},${this._x1=o+i*Math.cos(r)},${this._y1=t+i*Math.sin(r)}`)}rect(o,t,i,n){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function f3(){return new gn}f3.prototype=gn.prototype;function g3(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function bn(e,o){if(!isFinite(e)||e===0)return null;var t=(e=o?e.toExponential(o-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function Li(e){return e=bn(Math.abs(e)),e?e[1]:NaN}function b3(e,o){return function(t,i){for(var n=t.length,r=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return r.reverse().join(o)}}function v3(e){return function(o){return o.replace(/[0-9]/g,function(t){return e[+t]})}}var u8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function No(e){if(!(o=u8.exec(e)))throw new Error("invalid format: "+e);var o;return new ac({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}No.prototype=ac.prototype;function ac(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ac.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function x3(e){e:for(var o=e.length,t=1,i=-1,n;t<o;++t)switch(e[t]){case".":i=n=t;break;case"0":i===0&&(i=t),n=t;break;default:if(!+e[t])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var Sa;function w3(e,o){var t=bn(e,o);if(!t)return Sa=void 0,e.toPrecision(o);var i=t[0],n=t[1],r=n-(Sa=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+bn(e,Math.max(0,o+r-1))[0]}function Nh(e,o){var t=bn(e,o);if(!t)return e+"";var i=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var Ph={"%":(e,o)=>(e*100).toFixed(o),b:e=>Math.round(e).toString(2),c:e=>e+"",d:g3,e:(e,o)=>e.toExponential(o),f:(e,o)=>e.toFixed(o),g:(e,o)=>e.toPrecision(o),o:e=>Math.round(e).toString(8),p:(e,o)=>Nh(e*100,o),r:Nh,s:w3,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Bh(e){return e}var S3=Array.prototype.map,y3=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function C3(e){var o=e.grouping===void 0||e.thousands===void 0?Bh:b3(S3.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",r=e.numerals===void 0?Bh:v3(S3.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function d(m,u){m=No(m);var p=m.fill,f=m.align,S=m.sign,R=m.symbol,L=m.zero,j=m.width,q=m.comma,P=m.precision,O=m.trim,H=m.type;H==="n"?(q=!0,H="g"):Ph[H]||(P===void 0&&(P=12),O=!0,H="g"),(L||p==="0"&&f==="=")&&(L=!0,p="0",f="=");var G=(u&&u.prefix!==void 0?u.prefix:"")+(R==="$"?t:R==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),J=(R==="$"?i:/[%p]/.test(H)?a:"")+(u&&u.suffix!==void 0?u.suffix:""),X=Ph[H],me=/[defgprs%]/.test(H);P=P===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Ie($){var Ee=G,be=J,Fe,Oe,ve;if(H==="c")be=X($)+be,$="";else{$=+$;var oe=$<0||1/$<0;if($=isNaN($)?l:X(Math.abs($),P),O&&($=x3($)),oe&&+$==0&&S!=="+"&&(oe=!1),Ee=(oe?S==="("?S:s:S==="-"||S==="("?"":S)+Ee,be=(H==="s"&&!isNaN($)&&Sa!==void 0?y3[8+Sa/3]:"")+be+(oe&&S==="("?")":""),me){for(Fe=-1,Oe=$.length;++Fe<Oe;)if(ve=$.charCodeAt(Fe),48>ve||ve>57){be=(ve===46?n+$.slice(Fe+1):$.slice(Fe))+be,$=$.slice(0,Fe);break}}}q&&!L&&($=o($,1/0));var He=Ee.length+$.length+be.length,Ve=He<j?new Array(j-He+1).join(p):"";switch(q&&L&&($=o(Ve+$,Ve.length?j-be.length:1/0),Ve=""),f){case"<":$=Ee+$+be+Ve;break;case"=":$=Ee+Ve+$+be;break;case"^":$=Ve.slice(0,He=Ve.length>>1)+Ee+$+be+Ve.slice(He);break;default:$=Ve+Ee+$+be;break}return r($)}return Ie.toString=function(){return m+""},Ie}function c(m,u){var p=Math.max(-8,Math.min(8,Math.floor(Li(u)/3)))*3,f=Math.pow(10,-p),S=d((m=No(m),m.type="f",m),{suffix:y3[8+p/3]});return function(R){return S(f*R)}}return{format:d,formatPrefix:c}}var sc,vn,lc;Vh({thousands:",",grouping:[3],currency:["$",""]});function Vh(e){return sc=C3(e),vn=sc.format,lc=sc.formatPrefix,sc}function Wh(e){return Math.max(0,-Li(Math.abs(e)))}function Oh(e,o){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Li(o)/3)))*3-Li(Math.abs(e)))}function zh(e,o){return e=Math.abs(e),o=Math.abs(o)-e,Math.max(0,Li(o)-Li(e))+1}function M3(e,o){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(o).domain(e);break}return this}function $h(e){return function(){return e}}function jh(e){return+e}var _3=[0,1];function Ir(e){return e}function Hh(e,o){return(o-=e=+e)?function(t){return(t-e)/o}:$h(isNaN(o)?NaN:.5)}function p8(e,o){var t;return e>o&&(t=e,e=o,o=t),function(i){return Math.max(e,Math.min(o,i))}}function f8(e,o,t){var i=e[0],n=e[1],r=o[0],a=o[1];return n<i?(i=Hh(n,i),r=t(a,r)):(i=Hh(i,n),r=t(r,a)),function(s){return r(i(s))}}function g8(e,o,t){var i=Math.min(e.length,o.length)-1,n=new Array(i),r=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),o=o.slice().reverse());++a<i;)n[a]=Hh(e[a],e[a+1]),r[a]=t(o[a],o[a+1]);return function(s){var l=ch(e,s,1,i)-1;return r[l](n[l](s))}}function E3(e,o){return o.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function b8(){var e=_3,o=_3,t=un,i,n,r,a=Ir,s,l,d;function c(){var u=Math.min(e.length,o.length);return a!==Ir&&(a=p8(e[0],e[u-1])),s=u>2?g8:f8,l=d=null,m}function m(u){return u==null||isNaN(u=+u)?r:(l||(l=s(e.map(i),o,t)))(i(a(u)))}return m.invert=function(u){return a(n((d||(d=s(o,e.map(i),yt)))(u)))},m.domain=function(u){return arguments.length?(e=Array.from(u,jh),c()):e.slice()},m.range=function(u){return arguments.length?(o=Array.from(u),c()):o.slice()},m.rangeRound=function(u){return o=Array.from(u),t=qh,c()},m.clamp=function(u){return arguments.length?(a=u?!0:Ir,c()):a!==Ir},m.interpolate=function(u){return arguments.length?(t=u,c()):t},m.unknown=function(u){return arguments.length?(r=u,m):r},function(u,p){return i=u,n=p,c()}}function Uh(){return b8()(Ir,Ir)}function Gh(e,o,t,i){var n=dh(e,o,t),r;switch(i=No(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(o));return i.precision==null&&!isNaN(r=Oh(n,a))&&(i.precision=r),lc(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(r=zh(n,Math.max(Math.abs(e),Math.abs(o))))&&(i.precision=r-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(r=Wh(n))&&(i.precision=r-(i.type==="%")*2);break}}return vn(i)}function v8(e){var o=e.domain;return e.ticks=function(t){var i=o();return Dl(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var n=o();return Gh(n[0],n[n.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=o(),n=0,r=i.length-1,a=i[n],s=i[r],l,d,c=10;for(s<a&&(d=a,a=s,s=d,d=n,n=r,r=d);c-- >0;){if(d=ia(a,s,t),d===l)return i[n]=a,i[r]=s,o(i);if(d>0)a=Math.floor(a/d)*d,s=Math.ceil(s/d)*d;else if(d<0)a=Math.ceil(a*d)/d,s=Math.floor(s*d)/d;else break;l=d}return e},e}function Ar(){var e=Uh();return e.copy=function(){return E3(e,Ar())},M3.apply(e,arguments),v8(e)}function xn(e){return function(){return e}}function k3(e){let o=3;return e.digits=function(t){if(!arguments.length)return o;if(t==null)o=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);o=i}return e},()=>new gn(o)}var W$=Array.prototype.slice;function q3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function T3(e){this._context=e}T3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:this._context.lineTo(e,o);break}}};function R3(e){return new T3(e)}function I3(e){return e[0]}function A3(e){return e[1]}function Xh(e,o){var t=xn(!0),i=null,n=R3,r=null,a=k3(s);e=typeof e=="function"?e:e===void 0?I3:xn(e),o=typeof o=="function"?o:o===void 0?A3:xn(o);function s(l){var d,c=(l=q3(l)).length,m,u=!1,p;for(i==null&&(r=n(p=a())),d=0;d<=c;++d)!(d<c&&t(m=l[d],d,l))===u&&((u=!u)?r.lineStart():r.lineEnd()),u&&r.point(+e(m,d,l),+o(m,d,l));if(p)return r=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:xn(+l),s):e},s.y=function(l){return arguments.length?(o=typeof l=="function"?l:xn(+l),s):o},s.defined=function(l){return arguments.length?(t=typeof l=="function"?l:xn(!!l),s):t},s.curve=function(l){return arguments.length?(n=l,i!=null&&(r=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=r=null:r=n(i=l),s):i},s}function D3(e,o){this._context=e,this._t=o}D3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(e,o);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,o)}break}}this._x=e,this._y=o}};function Kh(e){return new D3(e,0)}function Po(e,o,t){this.k=e,this.x=o,this.y=t}Po.prototype={constructor:Po,scale:function(e){return e===1?this:new Po(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new Po(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Qh=new Po(1,0,0);Zh.prototype=Po.prototype;function Zh(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qh;return e.__zoom}var F3=(()=>{class e{constructor(){this.elementRef=T(Nt),this.diagramWidth=550,this.diagramHeight=250,this.showAxisLabels=!0,this.ranksAreStale=!0,this.pendingRender=null,this.popoverAncestor=null,this.popoverToggleListener=t=>{t.newState==="open"&&this.pendingRender!==null&&this.render(this.pendingRender==="full")}}ngOnChanges(t){if(this.values.length===0)return;let i=!!(t.values||t.isAttributeDirectionInverted||t.colorMetric||t.diagramWidth||t.diagramHeight||t.showAxisLabels);if(i&&(this.ranksAreStale=!0),this.isHiddenInClosedPopover()){this.pendingRender=this.pendingRender==="full"||i?"full":"areas";return}this.render(i)}ngAfterViewInit(){this.popoverAncestor=this.elementRef.nativeElement.closest("[popover]"),this.popoverAncestor?.addEventListener("toggle",this.popoverToggleListener)}ngOnDestroy(){this.popoverAncestor?.removeEventListener("toggle",this.popoverToggleListener)}render(t){this.ranksAreStale&&(this.percentileRanks=this.isAttributeDirectionInverted?this.calculateReversedPercentileRanks(this.values):this.calculatePercentileRanks(this.values),this.updatePercentileToMetricValueMap(),this.ranksAreStale=!1),(t||!this.hasRenderedDiagram()||!this.updateAreas())&&this.renderDiagram(),this.pendingRender=null}isHiddenInClosedPopover(){let t=this.popoverAncestor??this.elementRef.nativeElement.closest("[popover]");if(!t)return!1;try{return!t.matches(":popover-open")}catch{return!1}}hasRenderedDiagram(){return!this.rangeDiagramContainer().select("svg").empty()}updateAreas(){let t=this.rangeDiagramContainer().select("g");if(t.empty()||t.select(".left-area").empty())return!1;let i=this.createXScale(),n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));return t.select(".left-area").attr("width",n).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor),t.select(".middle-area").attr("x",n+this.framePadding).attr("width",r-n).style("fill",this.middleColor),t.select(".right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor),!0}updatePercentileToMetricValueMap(){this.percentileToMetricValueMap=new Map;let t=0;for(let i=0;i<=100;i++){for(;i>this.percentileRanks[t].x&&t<this.percentileRanks.length-1;)t++;this.percentileToMetricValueMap.set(i,this.percentileRanks[t].y)}}renderDiagram(){this.initializeDiagramDimesions(),this.clearDiagramContainer();let t=this.createSvg(),i=this.createGroup(t),n=this.createXScale(),r=this.createYScale();this.drawAxes(i,n,r),this.drawFrame(i),this.showAxisLabels&&this.drawLabels(i),this.drawAreas(i,n),this.drawLine(i),this.addCrossHair(i,n,r)}initializeDiagramDimesions(){this.svgWidth=this.diagramWidth,this.svgHeight=this.diagramHeight,this.frameMarginTop=10,this.frameMarginBottom=this.showAxisLabels?50:30,this.frameMarginLeft=this.showAxisLabels?50:40,this.frameMarginRight=10,this.framePadding=5,this.frameHeight=this.svgHeight-this.frameMarginTop-this.frameMarginBottom,this.frameWidth=this.svgWidth-this.frameMarginLeft-this.frameMarginRight,this.yLabelXOffset=80,this.xLabelYOffset=20}rangeDiagramContainer(){return Sh(this.elementRef.nativeElement.querySelector("#cc-range-diagram-container"))}clearDiagramContainer(){this.rangeDiagramContainer().selectAll("*").remove()}createSvg(){return this.rangeDiagramContainer().append("svg").attr("width",this.svgWidth).attr("height",this.svgHeight)}createGroup(t){return t.append("g").attr("transform",`translate(${this.frameMarginLeft}, ${this.frameMarginTop})`).attr("display","flex").attr("justify-content","center")}drawFrame(t){t.append("path").attr("d",`M 0 0
3515
3525
  h${this.frameWidth}
3516
3526
  v${this.frameHeight}
3517
3527
  h${-this.frameWidth}
3518
- v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(t,i,n){t.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(mh(i).ticks(5)).attr("font-size","13px").attr("color","#888"),t.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(uh(n).ticks(5).tickFormat(function(r){return r>=1e4?`${vn(".0f")(r/1e3)}k`:r>=1e3?`${vn(".1f")(r/1e3)}k`:r.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return Rr().domain(Tl(this.percentileRanks,t=>t.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let t=[0,ta(this.percentileRanks,n=>n.y)],i=[ta(this.percentileRanks,n=>n.y),0];return Rr().domain(this.isAttributeDirectionInverted?i:t).range([this.frameHeight-2*this.framePadding,0])}drawLabels(t){t.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),t.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(t,i){let n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));t.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",n).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),t.append("rect").attr("class","middle-area").attr("x",n+this.framePadding).attr("width",r-n).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),t.append("rect").attr("class","right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(t){t.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",Uh().curve(Gh).x(i=>this.createXScale()(i.x)).y(i=>this.createYScale()(i.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(t){let i=[...t].sort((a,s)=>a-s),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r}calculateReversedPercentileRanks(t){let i=[...t].sort((a,s)=>s-a),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(t){if(t===this.minValue)return 0;if(t===this.maxValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y<t)i=n.x;else return i??0;return 100}calculateReversedPercentileFromMetricValue(t){if(t===this.maxValue)return 0;if(t===this.minValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y>t)i=n.x;else return i??0;return 100}addCrossHair(t,i,n){let r=t.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=t.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=t.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=t.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),d=t.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(d,i,n,r,a,s,l),this.addOnMouseOutEvent(d,r,a,s,l)}addOnMouseMoveEvent(t,i,n,r,a,s,l){t.on("mousemove",d=>{let c=wh(d)[0],m=Math.round(i.invert(c-this.framePadding));m=Math.max(0,Math.min(m,100));let u=this.percentileToMetricValueMap.get(m),p=n(u)+this.framePadding,f=c<this.frameWidth/2?c+10:c-80,S=p<this.frameHeight/2?p+20:p-20;r.style("display","block").attr("x",f).attr("y",S).text(`Quantile: ${m}`).append("tspan").attr("x",f).attr("dy","1.2em").text(`Value: ${u}`),a.attr("x1",c).attr("x2",c).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",c).attr("x2",c).attr("y1",p).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",c).attr("y1",p).attr("y2",p).style("display","block")})}addOnMouseOutEvent(t,i,n,r,a){t.on("mouseout",()=>{i.style("display","none"),n.style("display","none"),r.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-color-range-diagram"]],hostAttrs:[1,"flex","justify-center"],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted",diagramWidth:"diagramWidth",diagramHeight:"diagramHeight",showAxisLabels:"showAxisLabels"},features:[Wa],decls:1,vars:0,consts:[["id","cc-range-diagram-container"]],template:function(i,n){i&1&&pe(0,"div",0)},encapsulation:2,changeDetection:0})}}return e})();var b8=["minLabel"],v8=["maxLabel"],x8=["currentLeftLabel"],w8=["currentRightLabel"],S8=["combinedCurrentLeftRightLabel"],Qh=4,D3=(()=>{class e{constructor(t){this.changeDetector=t,this.hideMinLabel=!1,this.hideMaxLabel=!1,this.doLeftRightLabelOverlap=!1}ngAfterViewChecked(){this.updateLabelDisplays()}updateLabelDisplays(){let t=this.minLabel.nativeElement.getBoundingClientRect().width,i=this.currentLeftLabel.nativeElement.getBoundingClientRect().width;this.currentLeftLabelLeftPosition=this.sliderRangePosition.leftEnd-i/2;let n=this.currentRightLabel.nativeElement.getBoundingClientRect().width,r=this.sliderWidth-this.maxLabel.nativeElement.getBoundingClientRect().width;this.currentRightLabelLeftPosition=this.sliderRangePosition.rightStart-n/2,this.hideMinLabel=this.currentLeftLabelLeftPosition<=t+Qh,this.hideMaxLabel=this.currentRightLabelLeftPosition+n+Qh>=r;let a=this.currentLeftLabelLeftPosition+i;this.doLeftRightLabelOverlap=a+Qh>=this.currentRightLabelLeftPosition;let s=(a+this.currentRightLabelLeftPosition)/2,l=this.combinedCurrentLeftRightLabel.nativeElement.getBoundingClientRect().width;this.combinedCurrentLeftRightLabelLeftPosition=s-l/2,this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||e)(ne(An))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-range-slider-labels"]],viewQuery:function(i,n){if(i&1&&$a(b8,5)(v8,5)(x8,5)(w8,5)(S8,5),i&2){let r;fi(r=gi())&&(n.minLabel=r.first),fi(r=gi())&&(n.maxLabel=r.first),fi(r=gi())&&(n.currentLeftLabel=r.first),fi(r=gi())&&(n.currentRightLabel=r.first),fi(r=gi())&&(n.combinedCurrentLeftRightLabel=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",leftValueLabel:"leftValueLabel",rightValueLabel:"rightValueLabel",sliderRangePosition:"sliderRangePosition",sliderWidth:"sliderWidth"},decls:15,vars:26,consts:[["minLabel",""],["currentLeftLabel",""],["currentRightLabel",""],["combinedCurrentLeftRightLabel",""],["maxLabel",""],[1,"absolute","-top-6","leading-6","text-sm","text-base-content/60"]],template:function(i,n){i&1&&(y(0,"div",5,0),g(2),M(),y(3,"div",5,1),g(5),M(),y(6,"div",5,2),g(8),M(),y(9,"div",5,3),g(11),M(),y(12,"div",5,4),g(14),M()),i&2&&(ze("left",0,"px")("visibility",n.hideMinLabel?"hidden":"visible"),h(2),ge(" ",n.minValue,`
3528
+ v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(t,i,n){t.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(ph(i).ticks(5)).attr("font-size","13px").attr("color","#888"),t.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(fh(n).ticks(5).tickFormat(function(r){return r>=1e4?`${vn(".0f")(r/1e3)}k`:r>=1e3?`${vn(".1f")(r/1e3)}k`:r.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return Ar().domain(Il(this.percentileRanks,t=>t.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let t=[0,oa(this.percentileRanks,n=>n.y)],i=[oa(this.percentileRanks,n=>n.y),0];return Ar().domain(this.isAttributeDirectionInverted?i:t).range([this.frameHeight-2*this.framePadding,0])}drawLabels(t){t.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),t.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(t,i){let n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));t.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",n).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),t.append("rect").attr("class","middle-area").attr("x",n+this.framePadding).attr("width",r-n).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),t.append("rect").attr("class","right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(t){t.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",Xh().curve(Kh).x(i=>this.createXScale()(i.x)).y(i=>this.createYScale()(i.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(t){let i=[...t].sort((a,s)=>a-s),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r}calculateReversedPercentileRanks(t){let i=[...t].sort((a,s)=>s-a),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(t){if(t===this.minValue)return 0;if(t===this.maxValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y<t)i=n.x;else return i??0;return 100}calculateReversedPercentileFromMetricValue(t){if(t===this.maxValue)return 0;if(t===this.minValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y>t)i=n.x;else return i??0;return 100}addCrossHair(t,i,n){let r=t.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=t.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=t.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=t.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),d=t.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(d,i,n,r,a,s,l),this.addOnMouseOutEvent(d,r,a,s,l)}addOnMouseMoveEvent(t,i,n,r,a,s,l){t.on("mousemove",d=>{let c=yh(d)[0],m=Math.round(i.invert(c-this.framePadding));m=Math.max(0,Math.min(m,100));let u=this.percentileToMetricValueMap.get(m),p=n(u)+this.framePadding,f=c<this.frameWidth/2?c+10:c-80,S=p<this.frameHeight/2?p+20:p-20;r.style("display","block").attr("x",f).attr("y",S).text(`Quantile: ${m}`).append("tspan").attr("x",f).attr("dy","1.2em").text(`Value: ${u}`),a.attr("x1",c).attr("x2",c).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",c).attr("x2",c).attr("y1",p).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",c).attr("y1",p).attr("y2",p).style("display","block")})}addOnMouseOutEvent(t,i,n,r,a){t.on("mouseout",()=>{i.style("display","none"),n.style("display","none"),r.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-color-range-diagram"]],hostAttrs:[1,"flex","justify-center"],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted",diagramWidth:"diagramWidth",diagramHeight:"diagramHeight",showAxisLabels:"showAxisLabels"},features:[za],decls:1,vars:0,consts:[["id","cc-range-diagram-container"]],template:function(i,n){i&1&&pe(0,"div",0)},encapsulation:2})}}return e})();var w8=["minLabel"],S8=["maxLabel"],y8=["currentLeftLabel"],C8=["currentRightLabel"],M8=["combinedCurrentLeftRightLabel"],Yh=4,L3=(()=>{class e{constructor(t){this.changeDetector=t,this.hideMinLabel=!1,this.hideMaxLabel=!1,this.doLeftRightLabelOverlap=!1}ngAfterViewChecked(){this.updateLabelDisplays()}updateLabelDisplays(){let t=this.minLabel.nativeElement.getBoundingClientRect().width,i=this.currentLeftLabel.nativeElement.getBoundingClientRect().width;this.currentLeftLabelLeftPosition=this.sliderRangePosition.leftEnd-i/2;let n=this.currentRightLabel.nativeElement.getBoundingClientRect().width,r=this.sliderWidth-this.maxLabel.nativeElement.getBoundingClientRect().width;this.currentRightLabelLeftPosition=this.sliderRangePosition.rightStart-n/2,this.hideMinLabel=this.currentLeftLabelLeftPosition<=t+Yh,this.hideMaxLabel=this.currentRightLabelLeftPosition+n+Yh>=r;let a=this.currentLeftLabelLeftPosition+i;this.doLeftRightLabelOverlap=a+Yh>=this.currentRightLabelLeftPosition;let s=(a+this.currentRightLabelLeftPosition)/2,l=this.combinedCurrentLeftRightLabel.nativeElement.getBoundingClientRect().width;this.combinedCurrentLeftRightLabelLeftPosition=s-l/2,this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||e)(ne(Ln))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-range-slider-labels"]],viewQuery:function(i,n){if(i&1&&Ha(w8,5)(S8,5)(y8,5)(C8,5)(M8,5),i&2){let r;fi(r=gi())&&(n.minLabel=r.first),fi(r=gi())&&(n.maxLabel=r.first),fi(r=gi())&&(n.currentLeftLabel=r.first),fi(r=gi())&&(n.currentRightLabel=r.first),fi(r=gi())&&(n.combinedCurrentLeftRightLabel=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",leftValueLabel:"leftValueLabel",rightValueLabel:"rightValueLabel",sliderRangePosition:"sliderRangePosition",sliderWidth:"sliderWidth"},decls:15,vars:26,consts:[["minLabel",""],["currentLeftLabel",""],["currentRightLabel",""],["combinedCurrentLeftRightLabel",""],["maxLabel",""],[1,"absolute","-top-6","leading-6","text-sm","text-base-content/60"]],template:function(i,n){i&1&&(y(0,"div",5,0),g(2),M(),y(3,"div",5,1),g(5),M(),y(6,"div",5,2),g(8),M(),y(9,"div",5,3),g(11),M(),y(12,"div",5,4),g(14),M()),i&2&&(ze("left",0,"px")("visibility",n.hideMinLabel?"hidden":"visible"),h(2),ge(" ",n.minValue,`
3519
3529
  `),h(),ze("left",n.currentLeftLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"hidden":"visible"),h(2),ge(" ",n.leftValueLabel,`
3520
3530
  `),h(),ze("left",n.currentRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"hidden":"visible"),h(2),ge(" ",n.rightValueLabel,`
3521
3531
  `),h(),ze("left",n.combinedCurrentLeftRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"visible":"hidden"),h(2),Yi(" ",n.leftValueLabel," - ",n.rightValueLabel,`
3522
3532
  `),h(),ze("right",0,"px")("visibility",n.hideMaxLabel?"hidden":"visible"),h(2),ge(" ",n.maxValue,`
3523
- `))},encapsulation:2,changeDetection:0})}}return e})();var Ir=(e,o,t)=>Math.min(Math.max(e,o),t),A3=({minValue:e,maxValue:o,currentLeftValue:t,currentRightValue:i,sliderWidth:n})=>{let r=o-e;if(r<=0)return{leftEnd:n,rightStart:n};let a=(t-e)/r,s=(i-e)/r,l=Ir(a*n,0,n),d=Ir(s*n,l,n);return{leftEnd:l,rightStart:d}},y8=({thumbX:e,minValue:o,maxValue:t,sliderWidth:i})=>{let n=(t-o)/i,r=o+e*n;return Math.round(r)},F3=e=>N3(e,{lowerBound:0,upperBound:e.otherThumbX}),L3=e=>N3(e,{lowerBound:e.otherThumbX,upperBound:e.sliderWidth}),N3=({deltaX:e,thumbScreenX:o,thumbRadius:t,sliderBoundingClientRectX:i,sliderWidth:n,minValue:r,maxValue:a},{lowerBound:s,upperBound:l})=>{let d=o+e-i+t,c=Ir(d,s,l);return{updatedThumbX:c,upcomingValue:y8({thumbX:c,minValue:r,maxValue:a,sliderWidth:n})}};var C8=["rangeSliderContainer"],M8=["leftThumb"],_8=["rightThumb"],P3=(()=>{class e{get segmentWidths(){let t=Ir(this.sliderRangePosition.leftEnd,0,this.actualSliderWidth),i=Ir(this.sliderRangePosition.rightStart,t,this.actualSliderWidth);return{left:t,middle:i-t,right:this.actualSliderWidth-i}}constructor(t){this.changeDetectorRef=t,this.sliderWidth=150,this.sliderRangePosition={leftEnd:0,rightStart:0},this.thumbRadius=7,this.actualSliderWidth=this.sliderWidth,this.currentlySliding=void 0,this.activeMouseMoveHandler=null,this.activeMouseUpHandler=null,this.handleLeftThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=F3({deltaX:i.movementX,thumbScreenX:this.leftThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.rightStart,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:n.updatedThumbX,rightStart:this.sliderRangePosition.rightStart},this.upcomingLeftValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newLeftValue:n.upcomingValue})},this.handleRightThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=L3({deltaX:i.movementX,thumbScreenX:this.rightThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.leftEnd,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:this.sliderRangePosition.leftEnd,rightStart:n.updatedThumbX},this.upcomingRightValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newRightValue:n.upcomingValue})}}ngOnChanges(t){t.sliderWidth&&(this.actualSliderWidth=this.sliderWidth),this.currentlySliding||(t.currentLeftValue&&(this.upcomingLeftValue=this.currentLeftValue),t.currentRightValue&&(this.upcomingRightValue=this.currentRightValue),this.updateSliderRangePosition())}ngAfterViewInit(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{let i=t.at(-1).contentRect.width;i>0&&i!==this.actualSliderWidth&&(this.actualSliderWidth=i,this.currentlySliding||this.updateSliderRangePosition(),this.changeDetectorRef.markForCheck())}),this.resizeObserver.observe(this.sliderContainer.nativeElement))}ngOnDestroy(){this.stopSliding(),this.resizeObserver?.disconnect()}setCurrentlySliding(t){switch(this.stopSliding(),this.currentlySliding=t,this.currentlySliding){case"leftThumb":this.activeMouseMoveHandler=this.handleLeftThumbMoved,this.rightThumb.nativeElement.style.zIndex="0",this.leftThumb.nativeElement.style.zIndex="1";break;case"rightThumb":this.activeMouseMoveHandler=this.handleRightThumbMoved,this.leftThumb.nativeElement.style.zIndex="0",this.rightThumb.nativeElement.style.zIndex="1";break;default:return}this.activeMouseUpHandler=()=>this.stopSliding(),document.addEventListener("mousemove",this.activeMouseMoveHandler),document.addEventListener("mouseup",this.activeMouseUpHandler)}stopSliding(){this.currentlySliding=void 0,this.activeMouseMoveHandler&&(document.removeEventListener("mousemove",this.activeMouseMoveHandler),this.activeMouseMoveHandler=null),this.activeMouseUpHandler&&(document.removeEventListener("mouseup",this.activeMouseUpHandler),this.activeMouseUpHandler=null)}handleLeftThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingLeftValue,this.minValue,this.upcomingRightValue);i===void 0||i===this.upcomingLeftValue||(t.preventDefault(),this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleRightThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingRightValue,this.upcomingLeftValue,this.maxValue);i===void 0||i===this.upcomingRightValue||(t.preventDefault(),this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}calculateValueFromKeyboard(t,i,n,r){let a;switch(t.key){case"ArrowLeft":case"ArrowDown":a=i-1;break;case"ArrowRight":case"ArrowUp":a=i+1;break;case"Home":a=n;break;case"End":a=r;break;default:return}return Math.max(n,Math.min(r,a))}handleCurrentLeftInputChanged(t){let i=bd(t,this.minValue,this.upcomingRightValue,this.upcomingLeftValue);i!==void 0&&(this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleCurrentRightInputChanged(t){let i=bd(t,this.upcomingLeftValue,this.maxValue,this.upcomingRightValue);i!==void 0&&(this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}updateSliderRangePosition(){this.sliderRangePosition=A3({minValue:this.minValue,maxValue:this.maxValue,currentLeftValue:this.upcomingLeftValue??this.currentLeftValue,currentRightValue:this.upcomingRightValue??this.currentRightValue,sliderWidth:this.actualSliderWidth})}abortSlidingWhenHidden(){return this.sliderContainer.nativeElement.getBoundingClientRect().width===0?(this.stopSliding(),!0):!1}static{this.\u0275fac=function(i){return new(i||e)(ne(An))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-color-range-slider"]],viewQuery:function(i,n){if(i&1&&$a(C8,5)(M8,5)(_8,5),i&2){let r;fi(r=gi())&&(n.sliderContainer=r.first),fi(r=gi())&&(n.leftThumb=r.first),fi(r=gi())&&(n.rightThumb=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",handleValueChange:"handleValueChange",sliderWidth:"sliderWidth"},features:[Wa],decls:15,vars:34,consts:[["rangeSliderContainer",""],["leftThumb",""],["rightThumb",""],[1,"flex","items-center","gap-2"],["type","number","aria-label","Lower color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"],[1,"flex","flex-1","mx-2","relative","leading-[48px]"],[1,"inline-block","border-b-4","border-solid"],["aria-hidden","true",1,"cursor-pointer","absolute","-top-1","rounded-full","border-[7px]","border-primary",3,"mousedown"],["type","range","step","1","aria-label","Lower color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],["type","range","step","1","aria-label","Upper color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],[3,"minValue","maxValue","leftValueLabel","rightValueLabel","sliderRangePosition","sliderWidth"],["type","number","aria-label","Upper color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"]],template:function(i,n){i&1&&(x(0,"div",3)(1,"input",4),z("input",function(a){return n.handleCurrentLeftInputChanged(a)}),v(),x(2,"div",5,0),V(4,"span",6)(5,"span",6)(6,"span",6),x(7,"div",7,1),z("mousedown",function(){return n.setCurrentlySliding("leftThumb")}),v(),x(9,"div",7,2),z("mousedown",function(){return n.setCurrentlySliding("rightThumb")}),v(),x(11,"input",8),z("keydown",function(a){return n.handleLeftThumbKeydown(a)}),v(),x(12,"input",9),z("keydown",function(a){return n.handleRightThumbKeydown(a)}),v(),V(13,"cc-range-slider-labels",10),v(),x(14,"input",11),z("input",function(a){return n.handleCurrentRightInputChanged(a)}),v()()),i&2&&(h(),F("value",n.currentLeftValue)("min",n.minValue)("max",n.upcomingRightValue),h(3),ze("width",n.segmentWidths.left,"px")("border-bottom-color",n.leftColor),h(),ze("width",n.segmentWidths.middle,"px")("border-bottom-color",n.middleColor),h(),ze("width",n.segmentWidths.right,"px")("border-bottom-color",n.rightColor),h(),ze("left",n.sliderRangePosition.leftEnd-n.thumbRadius,"px"),h(2),ze("left",n.sliderRangePosition.rightStart-n.thumbRadius,"px"),h(2),F("min",n.minValue)("max",n.currentRightValue)("value",n.currentLeftValue),h(),F("min",n.currentLeftValue)("max",n.maxValue)("value",n.currentRightValue),h(),F("minValue",n.minValue)("maxValue",n.maxValue)("leftValueLabel",n.upcomingLeftValue)("rightValueLabel",n.upcomingRightValue)("sliderRangePosition",n.sliderRangePosition)("sliderWidth",n.actualSliderWidth),h(),F("value",n.currentRightValue)("min",n.upcomingLeftValue)("max",n.maxValue))},dependencies:[D3],encapsulation:2,changeDetection:0})}}return e})();var B3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.metricsLensFacade=r,this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.sliderValues=A(this.metricsBarReadStore.metricColorRangeValues$,{initialValue:{values:[],min:0,max:0,from:0,to:0}}),this.sliderColors=A(this.metricsBarReadStore.metricColorRangeColors$,{initialValue:{leftColor:"#000",middleColor:"#000",rightColor:"#000"}}),this.isAttributeDirectionInversed=A(St([this.mapStateReadWindow.colorMetric$,this.metricsLensFacade.descriptors$]).pipe(qe(([a,s])=>s[a]?.direction===1)),{initialValue:!1}),this.pendingLeftValue=null,this.pendingRightValue=null,this.commitColorRange=Vi(()=>{let a={};this.pendingLeftValue!==null&&(a.from=this.pendingLeftValue),this.pendingRightValue!==null&&(a.to=this.pendingRightValue),this.pendingLeftValue=null,this.pendingRightValue=null,this.metricsBarWriteStore.setColorRange(a)},s0),this.handleValueChange=({newLeftValue:a,newRightValue:s})=>{this.pendingLeftValue=a??this.pendingLeftValue,this.pendingRightValue=s??this.pendingRightValue,this.commitColorRange()}}ngOnDestroy(){this.commitColorRange.flush()}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(ht),ne(Qe),ne(Zn))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-range-section"]],hostAttrs:[1,"contents"],decls:7,vars:23,consts:[[1,"block",3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","sliderWidth"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"truncate","text-xs","opacity-60"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted","diagramWidth","diagramHeight","showAxisLabels"]],template:function(i,n){i&1&&(V(0,"cc-metric-color-range-slider",0),x(1,"div",1)(2,"span",2),g(3,"Distribution"),v(),x(4,"span",3),g(5),v()(),V(6,"cc-metric-color-range-diagram",4)),i&2&&(F("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("handleValueChange",n.handleValueChange)("sliderWidth",220),h(5),ge("",n.colorMetric()," \xD7 quantile %"),h(),F("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("colorMetric",n.colorMetric())("values",n.sliderValues().values)("isAttributeDirectionInverted",n.isAttributeDirectionInversed())("diagramWidth",380)("diagramHeight",190)("showAxisLabels",!1))},dependencies:[P3,I3],encapsulation:2,changeDetection:0})}}return e})();function E8(e,o){if(e&1){let t=we();y(0,"button",6),ie("click",function(){ae(t);let n=B();return se(n.resetThresholds())}),pe(1,"i",7),M()}}var V3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.metricsBarReadStore=n,this.metricsBarWriteStore=r,this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.selectedColorMetricData=A(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.canResetThresholds=Y(()=>!this.isDeltaState()&&this.colorMetric()!=="unary"),this.swatchGradient=Y(()=>{let a=this.mapColors();return this.isDeltaState()?`linear-gradient(90deg, ${a.positiveDelta}, ${a.negativeDelta})`:`linear-gradient(90deg, ${a.positive}, ${a.neutral}, ${a.negative})`})}resetThresholds(){this.metricsBarWriteStore.setColorRange(wr(this.selectedColorMetricData()))}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(Re),ne(ht),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-settings-header"]],hostAttrs:[1,"contents"],decls:8,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","min-w-0","items-center","gap-2"],[1,"inline-block","h-3.5","w-3.5","shrink-0","rounded-full"],[1,"truncate","text-sm"],[1,"font-semibold","text-primary"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-undo"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1),pe(2,"span",2),y(3,"span",3),g(4,"Color by "),y(5,"span",4),g(6),M()()(),K(7,E8,2,0,"button",5),M()),i&2&&(h(2),ze("background",n.swatchGradient()),h(4),Te(n.colorMetric()),h(),Q(n.canResetThresholds()?7:-1))},encapsulation:2,changeDetection:0})}}return e})();var W3=(()=>{class e{constructor(){this.override=Z.required(),this.recolorOverride=_e(),this.unpinOverride=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-folder-override-row"]],hostAttrs:[1,"contents"],inputs:{override:[1,"override"]},outputs:{recolorOverride:"recolorOverride",unpinOverride:"unpinOverride"},decls:8,vars:7,consts:[[1,"flex","shrink-0","items-center","gap-2","rounded-md","border","border-base-300","px-2","py-1",3,"title"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums",3,"title"],[1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-times"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"cc-inline-color-picker",1),z("colorChange",function(a){return n.recolorOverride.emit(a)}),v(),x(2,"span",2),g(3),v(),x(4,"span",3),g(5),v(),x(6,"button",4),z("click",function(){return n.unpinOverride.emit()}),V(7,"i",5),v()()),i&2&&(F("title",n.override().path),h(),F("hexColor",n.override().color)("ariaLabel","Recolor "+n.override().path),h(2),Te(n.override().path),h(),F("title",n.override().fileCount+" files"),h(),Te(n.override().fileCount),h(),F("title","Unpin "+n.override().path))},dependencies:[Eo],encapsulation:2,changeDetection:0})}}return e})();var k8=["pinInput"];function q8(e,o){if(e&1){let t=we();y(0,"button",2),ie("click",function(){ae(t);let n=B();return se(n.startPinning())}),pe(1,"i",3),y(2,"span"),g(3,"Pin a folder color\u2026"),M()()}}function T8(e,o){if(e&1){let t=we();y(0,"li",8)(1,"button",10),ie("mousedown",function(n){return n.preventDefault()})("click",function(){let n=ae(t).$implicit,r=B(2);return se(r.handlePin(n))}),y(2,"span",11),g(3),M()()()}if(e&2){let t=o.$implicit;h(),ce("title",t),h(2),Te(t)}}function R8(e,o){e&1&&(y(0,"li",9),g(1,"No folders found"),M())}function I8(e,o){if(e&1){let t=we();y(0,"div",4),pe(1,"i",5),y(2,"input",6,0),ie("input",function(n){ae(t);let r=B();return se(r.handleSearchTermChange(n.target.value))})("keydown.escape",function(n){ae(t);let r=B();return se(r.handleSearchEscape(n))})("blur",function(){ae(t);let n=B();return se(n.handleSearchBlur())}),M()(),y(4,"ul",7),Pe(5,T8,4,2,"li",8,ii,!1,R8,2,0,"li",9),M()}if(e&2){let t=B();h(2),ce("value",t.searchTerm()),h(3),Be(t.folderSuggestions())}}var D8=8,O3=(()=>{class e{constructor(t){this.metricsBarReadStore=t,this.pinFolder=_e(),this.folderPaths=A(this.metricsBarReadStore.markableFolderPaths$,{initialValue:[]}),this.overrides=A(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.isPinning=Se(!1),this.searchTerm=Se(""),this.pinInput=Je("pinInput"),this.folderSuggestions=Y(()=>{let i=this.searchTerm().toLowerCase(),n=new Set(this.overrides().map(a=>a.path)),r=[];for(let a of this.folderPaths())if(!(n.has(a)||!a.toLowerCase().includes(i))&&(r.push(a),r.length>=D8))break;return r})}startPinning(){this.isPinning.set(!0),setTimeout(()=>this.pinInput()?.nativeElement.focus())}stopPinning(){this.isPinning.set(!1),this.searchTerm.set("")}handleSearchTermChange(t){this.searchTerm.set(t)}handleSearchBlur(){this.searchTerm().trim()===""&&this.stopPinning()}handleSearchEscape(t){t.preventDefault(),this.stopPinning()}handlePin(t){this.pinFolder.emit(t),this.stopPinning()}static{this.\u0275fac=function(i){return new(i||e)(ne(ht))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-pin-folder-search"]],viewQuery:function(i,n){i&1&&rt(n.pinInput,k8,5),i&2&&at()},hostAttrs:[1,"contents"],outputs:{pinFolder:"pinFolder"},decls:2,vars:1,consts:[["pinInput",""],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal"],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal",3,"click"],[1,"fa","fa-plus"],[1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","placeholder","Search folders\u2026","aria-label","Search folders",1,"grow",3,"input","keydown.escape","blur","value"],[1,"m-0","flex","max-h-40","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex"],[1,"px-2","py-1","text-xs","opacity-60"],[1,"btn","btn-ghost","btn-xs","w-full","flex-nowrap","justify-start","font-normal",3,"mousedown","click","title"],[1,"min-w-0","truncate"]],template:function(i,n){i&1&&K(0,q8,4,0,"button",1)(1,I8,8,2),i&2&&Q(n.isPinning()?1:0)},encapsulation:2,changeDetection:0})}}return e})();var A8=(e,o)=>o.path;function F8(e,o){if(e&1&&(x(0,"span",2),g(1),v()),e&2){let t=B();h(),ge("",t.overrides().length," pinned")}}function L8(e,o){if(e&1){let t=we();x(0,"cc-folder-override-row",7),z("recolorOverride",function(n){let r=ae(t).$implicit,a=B(2);return se(a.handleRecolor(r.path,n))})("unpinOverride",function(){let n=ae(t).$implicit,r=B(2);return se(r.handleUnpin(n.path))}),v()}if(e&2){let t=o.$implicit;F("override",t)}}function N8(e,o){if(e&1&&(x(0,"div",4),Pe(1,L8,1,1,"cc-folder-override-row",6,A8),v()),e&2){let t=B();h(),Be(t.overrides())}}var z3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.overrides=A(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{initialValue:Pt})}handlePin(t){this.metricsBarWriteStore.markPackage({path:t,color:this.nextMarkingColor(t)})}handleRecolor(t,i){this.metricsBarWriteStore.markPackage({path:t,color:i})}handleUnpin(t){this.metricsBarWriteStore.unmarkPackage(t)}nextMarkingColor(t){let i=this.mapColors().markingColors,n=this.findMarkedParentColor(t),r=i.filter(s=>s!==n);if(r.length===0)return i[0];let a=new Set(this.overrides().map(s=>s.color));return r.find(s=>!a.has(s))??r[this.overrides().length%r.length]}findMarkedParentColor(t){let i,n=0;for(let r of this.overrides())t.startsWith(`${r.path}/`)&&r.path.length>n&&(i=r.color,n=r.path.length);return i}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(ht),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-folder-overrides"]],hostAttrs:[1,"contents"],decls:8,vars:2,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"text-xs","opacity-60"],[1,"m-0","text-xs","opacity-60"],[1,"flex","max-h-36","flex-col","gap-0.5","overflow-y-auto"],[3,"pinFolder"],[3,"override"],[3,"recolorOverride","unpinOverride","override"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Folder Overrides"),v(),K(3,F8,2,1,"span",2),v(),x(4,"p",3),g(5,"These folders\u2019 floors are tinted with the pinned color."),v(),K(6,N8,3,0,"div",4),x(7,"cc-pin-folder-search",5),z("pinFolder",function(a){return n.handlePin(a)}),v()),i&2&&(h(3),Q(n.overrides().length>0?3:-1),h(3),Q(n.overrides().length>0?6:-1))},dependencies:[W3,O3],encapsulation:2,changeDetection:0})}}return e})();var $3=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.metricsBarWriteStore=i,this.groupName=Z.required(),this.colorMode=A(this.mapStateReadWindow.colorMode$,{initialValue:"absolute"})}handleColorModeChange(t){this.metricsBarWriteStore.setColorMode(t)}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-gradient-mode-picker"]],hostAttrs:[1,"contents"],inputs:{groupName:[1,"groupName"]},decls:8,vars:8,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Gradient mode",1,"join","w-full"],["type","radio","aria-label","Absolute",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Focused",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Weighted",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Relative",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"span",1),g(2,"Gradient Mode"),M(),y(3,"div",2)(4,"input",3),ie("change",function(){return n.handleColorModeChange("absolute")}),M(),y(5,"input",4),ie("change",function(){return n.handleColorModeChange("focusedGradient")}),M(),y(6,"input",5),ie("change",function(){return n.handleColorModeChange("weightedGradient")}),M(),y(7,"input",6),ie("change",function(){return n.handleColorModeChange("trueGradient")}),M()()()),i&2&&(h(4),ce("name",n.groupName())("checked",n.colorMode()==="absolute"),h(),ce("name",n.groupName())("checked",n.colorMode()==="focusedGradient"),h(),ce("name",n.groupName())("checked",n.colorMode()==="weightedGradient"),h(),ce("name",n.groupName())("checked",n.colorMode()==="trueGradient"))},encapsulation:2,changeDetection:0})}}return e})();function P8(e,o){if(e&1){let t=we();x(0,"label",1)(1,"input",3),z("change",function(){ae(t);let n=B();return se(n.handleIsColorRangeInvertedChange())}),v(),x(2,"span",4),g(3,"Invert colors"),v()()}if(e&2){let t=B();h(),F("checked",t.isColorRangeInverted())}}function B8(e,o){if(e&1){let t=we();x(0,"label",1)(1,"input",3),z("change",function(){ae(t);let n=B();return se(n.handleAreDeltaColorsInvertedChange())}),v(),x(2,"span",4),g(3,"Invert colors"),v()()}if(e&2){let t=B();h(),F("checked",t.areDeltaColorsInverted())}}var j3=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.mapStateReadWindow=i,this.metricsBarWriteStore=n,this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.isColorRangeInverted=Y(()=>this.mapColors().isColorRangeInverted??!1),this.areDeltaColorsInverted=Y(()=>this.mapColors().areDeltaColorsInverted??!1)}handleIsColorRangeInvertedChange(){this.metricsBarWriteStore.invertColorRange()}handleAreDeltaColorsInvertedChange(){this.metricsBarWriteStore.invertDeltaColors()}resetColorsKeys(){return this.isDeltaState()?["mapState.mapColors.positiveDelta","mapState.mapColors.negativeDelta","mapState.mapColors.selected","mapState.mapColors.areDeltaColorsInverted"]:["mapState.mapColors.positive","mapState.mapColors.negative","mapState.mapColors.neutral","mapState.mapColors.selected","mapState.mapColors.isColorRangeInverted","mapState.colorMode"]}static{this.\u0275fac=function(i){return new(i||e)(ne(Re),ne(xe),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-invert-reset-row"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","cursor-pointer","items-center","gap-2"],["label","Reset colors",3,"settingsKeys","tooltip","small"],["type","checkbox",1,"toggle","toggle-sm","toggle-primary",3,"change","checked"],[1,"text-sm"]],template:function(i,n){i&1&&(x(0,"div",0),K(1,P8,4,1,"label",1)(2,B8,4,1,"label",1),V(3,"cc-reset-settings-button",2),v()),i&2&&(h(),Q(n.isDeltaState()?2:1),h(2),F("settingsKeys",n.resetColorsKeys())("tooltip",n.isDeltaState()?"Reset color values to default":"Reset color values and gradient mode to default")("small",!0))},dependencies:[ko],encapsulation:2,changeDetection:0})}}return e})();function V8(e,o){if(e&1&&V(0,"cc-color-range-section")(1,"cc-gradient-mode-picker",1),e&2){let t=B();h(),F("groupName",t.popoverId()+"-gradient-mode")}}var sc=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.popoverId=Z.required(),this.anchorName=Z.required(),this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasRangeSection=Y(()=>!this.isDeltaState()&&this.colorMetric()!=="unary")}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(Re))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[[3,"popoverId","anchorName","widthClass"],[3,"groupName"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0),V(1,"cc-color-settings-header"),K(2,V8,2,1),V(3,"cc-color-bands-section")(4,"cc-invert-reset-row")(5,"cc-folder-overrides"),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName())("widthClass","max-w-[95vw] "+(n.hasRangeSection()?"w-[420px]":"w-80")),h(2),Q(n.hasRangeSection()?2:-1))},dependencies:[Di,V3,B3,$3,p2,j3,z3],encapsulation:2,changeDetection:0})}}return e})();var H3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.preferencesReadWindow=i,this.metricsBarWriteStore=n,this.searchPopoverId="metric-select-popover-color",this.searchAnchorName="metric-segment-color",this.settingsPopoverId="metric-settings-popover-color",this.settingsAnchorName="metric-segment-color-cog",this.colorMetric=A(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isLinked=A(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1})}handleMetricSelected(t){this.metricsBarWriteStore.setColorMetric(t)}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(rr),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-segment"]],hostAttrs:[1,"contents"],decls:5,vars:14,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","disabled","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],["metricFor","colorMetric"],["placeholder","Color Metric (highest value)","kind","node",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(x(0,"cc-axis-card",0)(1,"div",1),V(2,"cc-metric-meta-value",2),v()(),x(3,"cc-metric-bar-select-popover",3),z("metricSelected",function(a){return n.handleMetricSelected(a)}),v(),V(4,"cc-color-settings-popover",4)),i&2&&(F("metricName",n.colorMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("disabled",n.isLinked())("testId","metric-segment-color")("cogTestId","metric-segment-color-cog"),h(3),F("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.colorMetric()),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[_o,Cr,El,sc],encapsulation:2,changeDetection:0})}}return e})();var U3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.isEdgeMetricVisible=A(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0})}toggle(){this.metricsBarWriteStore.toggleEdgeMetricVisible()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-edge-metric-toggle"]],decls:4,vars:1,consts:[[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(y(0,"label",0)(1,"input",1),ie("change",function(){return n.toggle()}),M(),y(2,"span"),g(3,"Disable edge metric"),M()()),i&2&&(h(),ce("checked",!n.isEdgeMetricVisible()))},encapsulation:2,changeDetection:0})}}return e})();var G3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarReadStore=T(ht),this.metricsBarWriteStore=T(Qe),this.popoverId=Z.required(),this.anchorName=Z.required(),this.amountOfBuildingsWithSelectedEdgeMetric=A(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$,{initialValue:0}),this.edgePreviewLabel=A(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$.pipe(qe(t=>`Preview the edges of up to ${t} buildings with the highest amount of incoming and outgoing edges`)),{initialValue:""}),this.amountOfEdgePreviews=A(this.mapStateReadWindow.amountOfEdgePreviews$,{initialValue:0}),this.edgeHeight=A(this.mapStateReadWindow.edgeHeight$,{initialValue:1}),this.showOutgoingEdges=A(this.mapStateReadWindow.showOutgoingEdges$,{initialValue:!1}),this.showIncomingEdges=A(this.mapStateReadWindow.showIncomingEdges$,{initialValue:!1}),this.showOnlyBuildingsWithEdges=A(this.mapStateReadWindow.showOnlyBuildingsWithEdges$,{initialValue:!1}),this.mapColors=A(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.outgoingEdgeColor=Y(()=>this.mapColors().outgoingEdge),this.incomingEdgeColor=Y(()=>this.mapColors().incomingEdge),this.resetKeys=["mapState.amountOfEdgePreviews","mapState.edgeHeight","mapState.mapColors.outgoingEdge","mapState.showOutgoingEdges","mapState.mapColors.incomingEdge","mapState.showIncomingEdges","mapState.showOnlyBuildingsWithEdges","mapState.isEdgeMetricVisible"]}setAmountOfEdgePreviews(t){this.metricsBarWriteStore.setAmountOfEdgePreviews(t)}setEdgeHeight(t){this.metricsBarWriteStore.setEdgeHeight(t)}setShowOutgoingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOutgoingEdges(i)}setShowIncomingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowIncomingEdges(i)}setShowOnlyBuildingsWithEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOnlyBuildingsWithEdges(i)}setMapColor(t,i){this.metricsBarWriteStore.setMapColors({[t]:i})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-edge-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:32,vars:18,consts:[["widthClass","w-80",3,"popoverId","anchorName"],[3,"title"],[1,"text-sm"],["ariaLabel","Edge preview amount",3,"valueChange","min","max","value","disabled"],["title","Adjust the curve height"],["ariaLabel","Edge height",3,"valueChange","min","max","value","disabled"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","gap-2"],["ariaLabel","Outgoing edge color",3,"colorChange","hexColor"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["ariaLabel","Incoming edge color",3,"colorChange","hexColor"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),g(3,"Preview"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.setAmountOfEdgePreviews(a)}),v()(),x(5,"div",4)(6,"span",2),g(7,"Height"),v(),x(8,"cc-slider-number-input",5),z("valueChange",function(a){return n.setEdgeHeight(a)}),v()(),x(9,"div",6)(10,"div",7)(11,"cc-inline-color-picker",8),z("colorChange",function(a){return n.setMapColor("outgoingEdge",a)}),v(),x(12,"span",9),g(13,"Outgoing Edge"),v(),x(14,"label",10)(15,"input",11),z("change",function(a){return n.setShowOutgoingEdges(a)}),v(),x(16,"span"),g(17,"Show"),v()()(),x(18,"div",7)(19,"cc-inline-color-picker",12),z("colorChange",function(a){return n.setMapColor("incomingEdge",a)}),v(),x(20,"span",9),g(21,"Incoming Edge"),v(),x(22,"label",10)(23,"input",11),z("change",function(a){return n.setShowIncomingEdges(a)}),v(),x(24,"span"),g(25,"Show"),v()()()(),x(26,"label",10)(27,"input",13),z("change",function(a){return n.setShowOnlyBuildingsWithEdges(a)}),v(),x(28,"span"),g(29,"Only show nodes with edges"),v()(),V(30,"cc-edge-metric-toggle")(31,"cc-reset-settings-button",14),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName()),h(),F("title",n.edgePreviewLabel()),h(3),F("min",0)("max",n.amountOfBuildingsWithSelectedEdgeMetric())("value",n.amountOfEdgePreviews())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),F("min",1)("max",9)("value",n.edgeHeight())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(3),F("hexColor",n.outgoingEdgeColor()),h(4),F("checked",n.showOutgoingEdges()),h(4),F("hexColor",n.incomingEdgeColor()),h(4),F("checked",n.showIncomingEdges()),h(4),F("checked",n.showOnlyBuildingsWithEdges())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),F("settingsKeys",n.resetKeys))},dependencies:[Eo,ko,U3,Di,qo],encapsulation:2,changeDetection:0})}}return e})();function W8(e,o){e&1&&(V(0,"cc-metric-chooser-type",5),x(1,"span"),g(2),v()),e&2&&(F("metricFor","edgeMetric"),h(2),Te(o))}function O8(e,o){e&1&&(x(0,"span",2),g(1,"\xA0"),v())}var K3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.nodeSelectionService=T(Mr),this.searchPopoverId="metric-select-popover-edge",this.searchAnchorName="metric-segment-edges",this.settingsPopoverId="metric-settings-popover-edge",this.settingsAnchorName="metric-segment-edges-cog",this.edgeMetric=A(this.mapStateReadWindow.edgeMetric$,{initialValue:""}),this.isEdgeMetricVisible=A(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0}),this.hoveredNode=A(this.nodeSelectionService.createNodeObservable()),this.hoveredEdgeValue=Y(()=>{let t=this.hoveredNode(),i=this.edgeMetric();if(!t||!i)return null;let n=t.edgeAttributes?.[i];return n?`${X3(n.incoming)} / ${X3(n.outgoing)}`:null})}handleMetricSelected(t){this.metricsBarWriteStore.setEdgeMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-edge-segment"]],hostAttrs:[1,"contents"],decls:6,vars:15,consts:[["label","Edges",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","dimmed","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","opacity-60","leading-tight","min-h-4"],["aria-hidden","true"],["placeholder","Edge Metric (highest value)","kind","edge",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"],["attributeType","edges",3,"metricFor"]],template:function(i,n){if(i&1&&(x(0,"cc-axis-card",0)(1,"div",1),K(2,W8,3,2)(3,O8,2,0,"span",2),v()(),x(4,"cc-metric-bar-select-popover",3),z("metricSelected",function(a){return n.handleMetricSelected(a)}),v(),V(5,"cc-edge-settings-popover",4)),i&2){let r;F("metricName",n.edgeMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("dimmed",!n.isEdgeMetricVisible())("testId","metric-segment-edges")("cogTestId","metric-segment-edges-cog"),h(2),Q((r=n.hoveredEdgeValue())?2:3,r),h(2),F("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.edgeMetric()),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName)}},dependencies:[_o,_l,Cr,G3],encapsulation:2,changeDetection:0})}}return e})();function X3(e){return typeof e=="number"?e.toLocaleString():"-"}function z8(e,o){if(e&1){let t=we();x(0,"label",4)(1,"input",6),z("change",function(n){ae(t);let r=B();return se(r.toggleInvertHeight(n))}),v(),x(2,"span"),g(3,"Invert Height"),v()()}if(e&2){let t=B();h(),F("checked",t.invertHeight())}}var Q3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.fileStoreReadWindow=T(Re),this.metricsBarWriteStore=T(Qe),this.popoverId=Z.required(),this.anchorName=Z.required(),this.scalingY=A(this.mapStateReadWindow.scaling$,{initialValue:{x:1,y:1,z:1}}),this.invertHeight=A(this.mapStateReadWindow.invertHeight$,{initialValue:!1}),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.resetKeys=["mapState.scaling.y","mapState.invertHeight"]}setScalingY(t){this.metricsBarWriteStore.setScaling({y:t})}toggleInvertHeight(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertHeight(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-height-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:7,vars:7,consts:[[3,"popoverId","anchorName"],["title","Height scaling"],[1,"text-sm"],["ariaLabel","Height",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["tooltip","Reset height metric settings to their defaults","label","Reset height metric settings",3,"settingsKeys"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),g(3,"Height"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.setScalingY(a)}),v()(),K(5,z8,4,1,"label",4),V(6,"cc-reset-settings-button",5),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),F("min",1)("max",25)("value",n.scalingY().y),h(),Q(n.isDeltaState()?-1:5),h(),F("settingsKeys",n.resetKeys))},dependencies:[ko,Di,qo],encapsulation:2,changeDetection:0})}}return e})();var Z3=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-height",this.searchAnchorName="metric-segment-height",this.settingsPopoverId="metric-settings-popover-height",this.settingsAnchorName="metric-segment-height-cog",this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.heightMetric=A(this.mapStateReadWindow.heightMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setHeightMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-height-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Height","metricFor","heightMetric","placeholder","Height Metric (highest value)","testIdPrefix","metric-segment-height",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(x(0,"cc-metric-segment",0),z("metricSelected",function(a){return n.handleMetricSelected(a)}),V(1,"cc-height-settings-popover",1),v()),i&2&&(F("metricName",n.heightMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[kl,Q3],encapsulation:2,changeDetection:0})}}return e})();var Rt={areaMetric:{group:"area",label:"Area metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.areaMetric,patch:e=>({mapState:{areaMetric:e.areaMetric}})},margin:{group:"area",label:"Margin",read:e=>e.state.mapState.margin,patch:e=>({mapState:{margin:e.margin}})},invertArea:{group:"area",label:"Invert area",read:e=>e.state.mapState.invertArea,patch:e=>({mapState:{invertArea:e.invertArea}})},enableFloorLabels:{group:"area",label:"Floor labels",read:e=>e.state.mapState.enableFloorLabels,patch:e=>({mapState:{enableFloorLabels:e.enableFloorLabels}})},heightMetric:{group:"height",label:"Height metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.heightMetric,patch:e=>({mapState:{heightMetric:e.heightMetric}})},heightScaling:{group:"height",label:"Height scaling",read:e=>e.state.mapState.scaling.y,patch:e=>({mapState:{scaling:{y:e.heightScaling}}})},invertHeight:{group:"height",label:"Invert height",read:e=>e.state.mapState.invertHeight,patch:e=>({mapState:{invertHeight:e.invertHeight}})},colorMetric:{group:"color",label:"Color metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.colorMetric,patch:e=>({mapState:{colorMetric:e.colorMetric}})},isColorMetricLinkedToHeightMetric:{group:"color",label:"Color follows height metric",isAppliedFirst:!0,read:e=>e.state.preferences.isColorMetricLinkedToHeightMetric,patch:e=>({preferences:{isColorMetricLinkedToHeightMetric:e.isColorMetricLinkedToHeightMetric}})},colorRange:{group:"color",label:"Color range",read:e=>ke({},e.state.mapState.colorRange),patch:e=>({mapState:{colorRange:e.colorRange}})},colorMode:{group:"color",label:"Gradient mode",read:e=>e.state.mapState.colorMode,patch:e=>({mapState:{colorMode:e.colorMode}})},mapColors:{group:"color",label:"Colors",read:e=>$8(e.state.mapState.mapColors),patch:e=>({mapState:{mapColors:e.mapColors}})},markedPackages:{group:"color",label:"Folder color overrides",read:e=>[...e.state.sharedView.markedPackages],patch:e=>({sharedView:{markedPackages:[...e.markedPackages]}})},edgeMetric:{group:"edge",label:"Edge metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.edgeMetric,patch:e=>({mapState:{edgeMetric:e.edgeMetric}})},isEdgeMetricVisible:{group:"edge",label:"Edge metric enabled",read:e=>e.state.mapState.isEdgeMetricVisible,patch:e=>({mapState:{isEdgeMetricVisible:e.isEdgeMetricVisible}})},amountOfEdgePreviews:{group:"edge",label:"Edge previews",read:e=>e.state.mapState.amountOfEdgePreviews,patch:e=>({mapState:{amountOfEdgePreviews:e.amountOfEdgePreviews}})},edgeHeight:{group:"edge",label:"Edge curve height",read:e=>e.state.mapState.edgeHeight,patch:e=>({mapState:{edgeHeight:e.edgeHeight}})},showOutgoingEdges:{group:"edge",label:"Show outgoing edges",read:e=>e.state.mapState.showOutgoingEdges,patch:e=>({mapState:{showOutgoingEdges:e.showOutgoingEdges}})},showIncomingEdges:{group:"edge",label:"Show incoming edges",read:e=>e.state.mapState.showIncomingEdges,patch:e=>({mapState:{showIncomingEdges:e.showIncomingEdges}})},showOnlyBuildingsWithEdges:{group:"edge",label:"Only nodes with edges",read:e=>e.state.mapState.showOnlyBuildingsWithEdges,patch:e=>({mapState:{showOnlyBuildingsWithEdges:e.showOnlyBuildingsWithEdges}})},edgeColors:{group:"edge",label:"Edge colors",read:e=>({outgoingEdge:e.state.mapState.mapColors.outgoingEdge,incomingEdge:e.state.mapState.mapColors.incomingEdge}),patch:e=>({mapState:{mapColors:ke({},e.edgeColors)}})},amountOfTopLabels:{group:"labels",label:"Top labels",read:e=>e.state.mapState.amountOfTopLabels,patch:e=>({mapState:{amountOfTopLabels:e.amountOfTopLabels}})},labelsPerMap:{group:"labels",label:"Top labels scope",read:e=>e.state.mapState.labelsPerMap,patch:e=>({mapState:{labelsPerMap:e.labelsPerMap}})},labelSize:{group:"labels",label:"Label size",read:e=>e.state.mapState.labelSize,patch:e=>({mapState:{labelSize:e.labelSize}})},labelMode:{group:"labels",label:"Label mode",read:e=>e.state.mapState.labelMode,patch:e=>({mapState:{labelMode:e.labelMode}})},showMetricLabelNodeName:{group:"labels",label:"Show node names",read:e=>e.state.mapState.showMetricLabelNodeName,patch:e=>({mapState:{showMetricLabelNodeName:e.showMetricLabelNodeName}})},showMetricLabelNameValue:{group:"labels",label:"Show metric values",read:e=>e.state.mapState.showMetricLabelNameValue,patch:e=>({mapState:{showMetricLabelNameValue:e.showMetricLabelNameValue}})},groupLabelCollisions:{group:"labels",label:"Group overlapping labels",read:e=>e.state.mapState.groupLabelCollisions,patch:e=>({mapState:{groupLabelCollisions:e.groupLabelCollisions}})},colorLabels:{group:"labels",label:"Labels by color metric",read:e=>ke({},e.state.mapState.colorLabels),patch:e=>({mapState:{colorLabels:e.colorLabels}})},camera:{group:"camera",label:"Position and zoom",read:e=>({position:ke({},e.camera.position),target:ke({},e.camera.target)})},excludedNodes:{group:"filters",label:"Excluded nodes",read:e=>[...e.state.sharedView.excludedNodes],patch:e=>({sharedView:{excludedNodes:[...e.excludedNodes]}})},flattenedNodes:{group:"filters",label:"Flattened nodes",read:e=>[...e.state.sharedView.flattenedNodes],patch:e=>({sharedView:{flattenedNodes:[...e.flattenedNodes]}})},metricRules:{group:"filters",label:"Flattened and excluded by metric",read:e=>[...e.state.sharedView.metricRules],patch:e=>({sharedView:{metricRules:[...e.metricRules]}})},focusedNodePath:{group:"filters",label:"Focused folder",read:e=>[...e.state.sharedView.focusedNodePath],patch:e=>({sharedView:{focusedNodePath:[...e.focusedNodePath]}})}};function $8(e){let n=e,{outgoingEdge:o,incomingEdge:t}=n;return qn(n,["outgoingEdge","incomingEdge"])}var wn=Object.keys(Rt),wa={area:"Area",height:"Height",color:"Color",edge:"Edges",labels:"Labels",camera:"Camera",filters:"Filters"},lc=Object.keys(wa),cc={area:"fa-th-large",height:"fa-bar-chart",color:"fa-paint-brush",edge:"fa-share-alt",labels:"fa-tags",camera:"fa-video-camera",filters:"fa-filter"};function Zh(e){return!!Rt[e].isMetricSelection}var nG=wn.filter(Zh);function Yh(e){return!!Rt[e].isAppliedFirst}function Y3(e,o){return Object.fromEntries(Object.entries(e).filter(([t])=>o.has(t)))}function J3(e,o){let t={};for(let i of wn){if(!o.has(i))continue;let n=Rt[i].read(e);n!==void 0&&(t[i]=n)}return t}var dc=".ccscenario",hc=3;function Jh(e){return wn.filter(o=>e.settings[o]!==void 0)}function ev(e){let o=new Set(Jh(e).map(t=>Rt[t].group));return lc.filter(t=>o.has(t))}function tv(e){return et(ke(ke({schemaVersion:hc,name:e.name},e.description?{description:e.description}:{}),e.mapFileNames?.length>0?{mapFileNames:e.mapFileNames}:{}),{settings:e.settings})}function iv(e){return{id:crypto.randomUUID(),name:e.name,description:e.description,mapFileNames:e.mapFileNames,createdAt:Date.now(),settings:e.settings}}var nv=(e,o)=>o.key;function j8(e,o){if(e&1){let t=we();y(0,"label",8)(1,"input",12),ie("change",function(n){let r=ae(t).$implicit,a=B(2);return se(a.toggleSetting(r.key,n.target.checked))}),M(),y(2,"span",13),g(3),M()()}if(e&2){let t=o.$implicit;h(),ce("checked",t.selected),ot("data-testid","scenario-setting-"+t.key),h(2),Te(t.label)}}function H8(e,o){if(e&1){let t=we();y(0,"div",7)(1,"label",8)(2,"input",9),ie("change",function(n){let r=ae(t).$implicit,a=B();return se(a.toggleGroup(r,n.target.checked))}),M(),pe(3,"i"),y(4,"span",10),g(5),M()(),y(6,"div",11),Pe(7,j8,4,3,"label",8,nv),M()()}if(e&2){let t=o.$implicit;h(2),ce("checked",t.allSelected)("indeterminate",t.someSelected&&!t.allSelected),ot("data-testid","scenario-group-"+t.key),h(),At(In("fa ",t.icon," w-4 text-center opacity-60")),h(2),Te(t.label),h(2),Be(t.settings)}}var mc=(()=>{class e{constructor(){this.availableKeys=Z.required(),this.defaultKeys=Z.required(),this.selectedKeys=wu.required(),this.isDefaultSelection=Y(()=>{let t=this.selectedKeys(),i=this.defaultKeys();return t.size===i.length&&i.every(n=>t.has(n))}),this.groups=Y(()=>{let t=this.selectedKeys(),i=this.availableKeys();return lc.map(n=>this.toPickerGroup(n,i,t)).filter(n=>n.settings.length>0)})}selectAll(){this.selectedKeys.set(new Set(this.availableKeys()))}selectNone(){this.selectedKeys.set(new Set)}resetSelection(){this.selectedKeys.set(new Set(this.defaultKeys()))}toggleSetting(t,i){this.selectedKeys.update(n=>ov(n,[t],i))}toggleGroup(t,i){this.selectedKeys.update(n=>ov(n,t.settings.map(r=>r.key),i))}toPickerGroup(t,i,n){let r=i.filter(a=>Rt[a].group===t).map(a=>({key:a,label:Rt[a].label,selected:n.has(a)}));return{key:t,label:wa[t],icon:cc[t],settings:r,allSelected:r.length>0&&r.every(a=>a.selected),someSelected:r.some(a=>a.selected)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-settings-picker"]],inputs:{availableKeys:[1,"availableKeys"],defaultKeys:[1,"defaultKeys"],selectedKeys:[1,"selectedKeys"]},outputs:{selectedKeys:"selectedKeysChange"},decls:13,vars:1,consts:[[1,"mb-1","flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wide","opacity-60"],[1,"join"],["type","button","data-testid","scenario-settings-select-all",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-select-none",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-reset",1,"btn","btn-xs","join-item",3,"click","disabled"],[1,"flex","flex-col","gap-2","max-h-64","overflow-y-auto","pr-1"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","indeterminate"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-0.5","pl-7"],["type","checkbox",1,"checkbox","checkbox-xs","checkbox-primary",3,"change","checked"],[1,"text-xs"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"span",1),g(2,"Toggle all"),M(),y(3,"div",2)(4,"button",3),ie("click",function(){return n.selectAll()}),g(5," On "),M(),y(6,"button",4),ie("click",function(){return n.selectNone()}),g(7," Off "),M(),y(8,"button",5),ie("click",function(){return n.resetSelection()}),g(9," Reset "),M()()(),y(10,"div",6),Pe(11,H8,9,7,"div",7,nv),M()),i&2&&(h(8),ce("disabled",n.isDefaultSelection()),h(3),Be(n.groups()))},encapsulation:2,changeDetection:0})}}return e})();function ov(e,o,t){let i=new Set(e);for(let n of o)t?i.add(n):i.delete(n);return i}function uc(e){return`${e} ${e===1?"setting":"settings"}`}var pc=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}getValue(){return this.ccStateSnapshot.get()}setStatePatch(t){this.store.dispatch(Qt({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var U8=["areaMetric","heightMetric","colorMetric"],fc=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.threeRendererService=r}getAvailableMetricNames(t){return{nodeMetrics:new Set(t.nodeMetricData.map(i=>i.name)),edgeMetrics:new Set(t.edgeMetricData.map(i=>i.name))}}getMissingMetrics(t,i){let n=this.getAvailableMetricNames(i),r=U8.map(a=>t[a]).filter(a=>!!a);return{nodeMetrics:[...new Set(r.filter(a=>!n.nodeMetrics.has(a)))],edgeMetrics:t.edgeMetric&&!n.edgeMetrics.has(t.edgeMetric)?[t.edgeMetric]:[]}}hasMissingMetrics(t){return t.nodeMetrics.length>0||t.edgeMetrics.length>0}buildOrderedStatePatches(t,i,n){let r=this.getApplicableKeys(t,i,n);return[this.mergePatchesOf(t,r.filter(Yh)),this.mergePatchesOf(t,r.filter(a=>!Yh(a)))].filter(a=>Object.keys(a).length>0)}getCameraVectors(t){if(!t.camera)return;let{position:i,target:n}=t.camera;return{position:new Ke(i.x,i.y,i.z),target:new Ke(n.x,n.y,n.z)}}async applyScenario(t,i,n){fd(!0);try{let r=i.has("camera")?this.getCameraVectors(t.settings):void 0,a=r!==void 0,s=this.buildOrderedStatePatches(t.settings,i,n),l=a&&s.length>0?this.scenariosStore.getValue().preferences.resetCameraIfNewFileIsLoaded:void 0;l&&s.length>0&&(s[0].preferences=et(ke({},s[0].preferences),{resetCameraIfNewFileIsLoaded:!1}));for(let d of s)this.scenariosStore.setStatePatch(d),await new Promise(c=>setTimeout(c));if(a&&this.threeCameraService.camera){let{position:d,target:c}=r;this.threeCameraService.camera.position.set(d.x,d.y,d.z),this.threeMapControlsService.setControlTarget(c),this.threeCameraService.camera.lookAt(c),this.threeCameraService.camera.updateProjectionMatrix(),this.threeMapControlsService.updateControls()}l&&setTimeout(()=>{this.scenariosStore.setStatePatch({preferences:{resetCameraIfNewFileIsLoaded:!0}})}),this.threeRendererService.render()}finally{fd(!1)}}getApplicableKeys(t,i,n){let r=n?this.getAvailableMetricNames(n):void 0;return[...i].filter(a=>t[a]!==void 0&&Rt[a].patch!==void 0&&this.isMetricAvailable(a,t,r))}isMetricAvailable(t,i,n){if(!n||!Zh(t))return!0;let r=i[t]??"";return t==="edgeMetric"?r===""||n.edgeMetrics.has(r):n.nodeMetrics.has(r)}mergePatchesOf(t,i){let n={};for(let r of i){let a=Rt[r].patch;a&&(n=sv(n,a(t)))}return n}static{this.\u0275fac=function(i){return new(i||e)(E(pc),E(nr),E(qt),E(kt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function sv(e,o){let t=ke({},e);for(let[i,n]of Object.entries(o)){let r=t[i];t[i]=av(n)&&av(r)?sv(ke({},r),n):n}return t}function av(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var G8=["dialog"];function X8(e,o){if(e&1&&(x(0,"div",4)(1,"span",13),V(2,"i",14),x(3,"span",15),g(4),v()()()),e&2){let t=B();h(),F("title",t.scenario().mapFileNames.join(", ")),h(3),Te(t.scenario().mapFileNames.join(", "))}}function K8(e,o){if(e&1&&(x(0,"li"),g(1),v()),e&2){let t=o.$implicit;h(),ge("",t," (node metric)")}}function Q8(e,o){if(e&1&&(x(0,"li"),g(1),v()),e&2){let t=o.$implicit;h(),ge("",t," (edge metric)")}}function Z8(e,o){if(e&1&&(x(0,"div",7),V(1,"i",16),x(2,"div")(3,"strong"),g(4,"Some metrics are not available in the current map and will not be applied:"),v(),x(5,"ul",17),Pe(6,K8,2,1,"li",null,ii),Pe(8,Q8,2,1,"li",null,ii),v()()()),e&2){let t=B();h(6),Be(t.missingMetrics().nodeMetrics),h(2),Be(t.missingMetrics().edgeMetrics)}}var em=(()=>{class e{constructor(t){this.scenarioApplier=t,this.scenario=Z.required(),this.metricData=Z.required(),this.closed=_e(),this.dialogElement=Je.required("dialog"),this.availableKeys=Y(()=>Jh(this.scenario())),this.defaultKeys=Y(()=>this.availableKeys().filter(i=>Rt[i].group!=="camera")),this.selectedKeys=xu(()=>new Set(this.defaultKeys())),this.missingMetrics=Y(()=>this.scenarioApplier.getMissingMetrics(Y3(this.scenario().settings,this.selectedKeys()),this.metricData())),this.hasMissing=Y(()=>this.scenarioApplier.hasMissingMetrics(this.missingMetrics())),this.hasAnySelected=Y(()=>this.selectedKeys().size>0),this.applySelectedLabel=Y(()=>`Apply ${uc(this.selectedKeys().size)}`),this.destroyRef=T(Tn)}ngAfterViewInit(){let t=this.dialogElement().nativeElement,i=()=>this.closed.emit();t.addEventListener("close",i),this.destroyRef.onDestroy(()=>t.removeEventListener("close",i)),t.showModal()}async apply(){await this.applyKeys(this.selectedKeys())}async applyAll(){await this.applyKeys(new Set(this.availableKeys()))}async applyKeys(t){this.dialogElement().nativeElement.close(),await this.scenarioApplier.applyScenario(this.scenario(),t,this.metricData())}close(){this.dialogElement().nativeElement.close()}static{this.\u0275fac=function(i){return new(i||e)(ne(fc))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-apply-scenario-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,G8,5),i&2&&at()},inputs:{scenario:[1,"scenario"],metricData:[1,"metricData"]},outputs:{closed:"closed"},decls:20,vars:9,consts:[["dialog",""],["aria-labelledby","apply-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","apply-scenario-title",1,"text-xl","font-bold","mb-1","truncate",3,"title"],[1,"mb-3"],[1,"text-sm","text-base-content/60","mb-3"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"alert","alert-warning","mt-4","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["title","Apply everything this scenario holds, the camera included","data-testid","apply-scenario-all",1,"btn","btn-outline",3,"click"],["data-testid","apply-scenario-selected",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[1,"badge","badge-sm","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[1,"fa","fa-exclamation-triangle"],[1,"list-disc","pl-5","mt-1"]],template:function(i,n){if(i&1){let r=we();x(0,"dialog",1,0)(2,"div",2)(3,"h2",3),g(4),v(),K(5,X8,5,2,"div",4),x(6,"p",5),g(7,"Select which settings to apply:"),v(),x(8,"cc-scenario-settings-picker",6),Ua("selectedKeysChange",function(s){return ae(r),Ha(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),v(),K(9,Z8,10,0,"div",7),x(10,"div",8)(11,"button",9),z("click",function(){return n.close()}),g(12,"Cancel"),v(),x(13,"button",10),z("click",function(){return n.applyAll()}),g(14," Apply all "),v(),x(15,"button",11),z("click",function(){return n.apply()}),g(16),v()()(),x(17,"form",12)(18,"button"),g(19,"close"),v()()()}if(i&2){let r;h(3),F("title","Apply: "+n.scenario().name),h(),ge("Apply: ",n.scenario().name),h(),Q((r=n.scenario().mapFileNames)!=null&&r.length?5:-1),h(3),F("availableKeys",n.availableKeys())("defaultKeys",n.defaultKeys()),ja("selectedKeys",n.selectedKeys),h(),Q(n.hasMissing()?9:-1),h(6),F("disabled",!n.hasAnySelected()),h(),ge(" ",n.applySelectedLabel()," ")}},dependencies:[dr,cr,sr,lr,mc],encapsulation:2,changeDetection:0})}}return e})();function dv(e){return e.settings?Y8(e.settings):e7(e.sections??{})}function Y8(e){let o=e;if(!o.blacklist)return e;let n=o,{blacklist:t}=n,i=qn(n,["blacklist"]);return uv(et(ke({},i),{excludedNodes:t.filter(r=>r.type!=="flatten").map(({path:r})=>({path:r})),flattenedNodes:t.filter(r=>r.type==="flatten").map(({path:r})=>({path:r}))}))}function hv(e){let i=e,{sections:o}=i,t=qn(i,["sections"]);return et(ke({},t),{settings:dv(e)})}var J8=new Set([1,2,hc]);function mv(e){let o=e;if(!(!o?.name||!J8.has(o.schemaVersion))&&!(!o.sections&&!o.settings))return{schemaVersion:hc,name:o.name,description:o.description,mapFileNames:o.mapFileNames,settings:dv(o)}}function e7(e){let{metrics:o,colors:t,camera:i,filters:n,labelsAndFolders:r}=e,c=t?.mapColors??{},{outgoingEdge:a,incomingEdge:s}=c,l=qn(c,["outgoingEdge","incomingEdge"]),d=a!==void 0||s!==void 0;return uv({areaMetric:o?.areaMetric,enableFloorLabels:r?.enableFloorLabels,heightMetric:o?.heightMetric,colorMetric:o?.colorMetric,isColorMetricLinkedToHeightMetric:o?.isColorMetricLinkedToHeightMetric,colorRange:t?.colorRange,colorMode:t?.colorMode,mapColors:Object.keys(l).length>0?l:void 0,markedPackages:r?.markedPackages,edgeMetric:o?.edgeMetric,edgeColors:d?{outgoingEdge:a,incomingEdge:s}:void 0,amountOfTopLabels:r?.amountOfTopLabels,labelSize:r?.labelSize,labelMode:r?.labelMode,showMetricLabelNodeName:r?.showMetricLabelNodeName,showMetricLabelNameValue:r?.showMetricLabelNameValue,groupLabelCollisions:r?.groupLabelCollisions,colorLabels:r?.colorLabels,camera:i,excludedNodes:n?.blacklist?.filter(m=>m.type!=="flatten"),flattenedNodes:n?.blacklist?.filter(m=>m.type==="flatten"),focusedNodePath:n?.focusedNodePath})}function uv(e){return Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0))}var gc=(()=>{class e{async readAll(){return(await(await Hr()).getAll(jr)).map(hv)}async add(t){let n=(await Hr()).transaction(jr,"readwrite");await Promise.all([n.store.add(t),n.done])}async update(t){let n=(await Hr()).transaction(jr,"readwrite");await Promise.all([n.store.put(t),n.done])}async delete(t){let n=(await Hr()).transaction(jr,"readwrite");await Promise.all([n.store.delete(t),n.done])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var fv={position:{x:0,y:300,z:1e3},target:{x:0,y:0,z:0}},bc={positive:"#69AE40",neutral:"#ddcc00",negative:"#820E0E"},t7={positive:bc.negative,neutral:bc.neutral,negative:bc.positive,isColorRangeInverted:!0},i7=[{id:"built-in-rloc",name:"Real Lines of Code",description:"Visualize code size using real lines of code",metric:"rloc",colorRange:{from:250,to:500}},{id:"built-in-complexity",name:"Complexity",description:"Visualize cyclomatic complexity",metric:"complexity",colorRange:{from:50,to:100}},{id:"built-in-comment-lines",name:"Comment Lines",description:"Visualize comment density",metric:"comment_lines",colorRange:{from:50,to:100}},{id:"built-in-code-smells",name:"Code Smells",description:"Visualize code smell density",metric:"sonar_code_smells",colorRange:{from:10,to:50}},{id:"built-in-logic-complexity",name:"Logic Complexity",description:"Visualize cognitive/logic complexity",metric:"logic_complexity",colorRange:{from:40,to:80}},{id:"built-in-max-complexity-per-function",name:"Max Complexity per Function",description:"Visualize maximum complexity per function",metric:"max_complexity_per_function",colorRange:{from:10,to:20}},{id:"built-in-authors",name:"Authors",description:"Visualize the number of authors per file",metric:"number_of_authors",colorRange:{from:2,to:3},colorMode:Go.absolute,mapColors:t7}],gv=i7.map(e=>({id:e.id,name:e.name,description:e.description,createdAt:0,isBuiltIn:!0,settings:{areaMetric:"rloc",heightMetric:e.metric,colorMetric:e.metric,isColorMetricLinkedToHeightMetric:!0,colorRange:e.colorRange,colorMode:e.colorMode??Go.weightedGradient,mapColors:e.mapColors??bc}})),ji=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.db=r,this.scenarios$=new Jm([])}async loadScenarios(){try{let t=await this.db.readAll();t.sort((i,n)=>n.createdAt-i.createdAt),this.scenarios$.next([...t,...gv])}catch(t){console.error("Failed to load scenarios from IndexedDB:",t),this.scenarios$.next([...gv])}}async saveScenario(t){let i=this.buildScenario(t,this.readCurrentSource());try{await this.db.add(i),await this.loadScenarios()}catch(n){console.error("Failed to save scenario:",n)}return i}async removeScenario(t){try{await this.db.delete(t),await this.loadScenarios()}catch(i){console.error("Failed to remove scenario:",i)}}buildScenario(t,i){return{id:crypto.randomUUID(),name:t.name,description:t.description,mapFileNames:t.mapFileNames,createdAt:Date.now(),settings:J3(i,t.selectedKeys)}}readCurrentSource(){return{state:this.scenariosStore.getValue(),camera:this.readCurrentCamera()}}readCurrentCamera(){let t=this.threeCameraService.camera?.position,i=this.threeMapControlsService.controls?.target;return{position:t?{x:t.x,y:t.y,z:t.z}:fv.position,target:i?{x:i.x,y:i.y,z:i.z}:fv.target}}static{this.\u0275fac=function(i){return new(i||e)(E(pc),E(nr),E(qt),E(gc))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var o7=["dialog"];function n7(e,o){e&1&&(x(0,"span",8),g(1,"A name is required."),v())}var im=wn.filter(e=>Rt[e].group!=="camera"),om=(()=>{class e{constructor(t,i){this.scenariosService=t,this.fileStoreReadWindow=i,this.dialogElement=Je.required("dialog"),this.name=Se(""),this.description=Se(""),this.bindToMap=Se(!1),this.nameValid=Y(()=>this.name().trim().length>0),this.availableKeys=wn,this.defaultKeys=im,this.selectedKeys=Se(new Set(im)),this.selectionSummary=Y(()=>`${this.selectedKeys().size} of ${this.availableKeys.length} settings`),this.saveLabel=Y(()=>`Save ${uc(this.selectedKeys().size)}`),this.visibleFileNames=A(this.fileStoreReadWindow.files$.pipe(qe(n=>Ln(n).map(r=>r.fileMeta.fileName))),{initialValue:[]}),this.hasFiles=Y(()=>this.visibleFileNames().length>0)}open(){this.name.set(""),this.description.set(""),this.bindToMap.set(!1),this.selectedKeys.set(new Set(im)),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}async save(){if(!this.nameValid()||this.selectedKeys().size===0)return;let t=this.bindToMap()&&this.hasFiles()?this.visibleFileNames():void 0;await this.scenariosService.saveScenario({name:this.name(),description:this.description()||void 0,mapFileNames:t,selectedKeys:this.selectedKeys()}),this.close()}static{this.\u0275fac=function(i){return new(i||e)(ne(ji),ne(Re))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-save-scenario-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,o7,5),i&2&&at()},decls:38,vars:13,consts:[["dialog",""],["aria-labelledby","save-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","save-scenario-title",1,"text-xl","font-bold","mb-4"],[1,"form-control","mb-4"],["for","scenario-name",1,"label"],[1,"label-text"],["id","scenario-name","placeholder","Enter scenario name",1,"input","input-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label-text-alt","text-error"],["for","scenario-description",1,"label"],["id","scenario-description","rows","3","placeholder","Describe what this scenario captures",1,"textarea","textarea-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label","cursor-pointer","justify-start","gap-3"],["type","checkbox",1,"checkbox","checkbox-sm",3,"ngModelChange","ngModel","disabled"],[1,"mb-4","rounded-md","border","border-base-300","p-2"],["data-testid","save-scenario-extended-settings",1,"cursor-pointer","text-sm"],[1,"text-xs","opacity-60"],[1,"m-0","mt-2","text-xs","opacity-60"],[1,"mt-2"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"modal-action"],[1,"btn",3,"click"],["data-testid","save-scenario-submit",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){if(i&1){let r=we();x(0,"dialog",1,0)(2,"div",2)(3,"h2",3),g(4,"Save Scenario"),v(),x(5,"div",4)(6,"label",5)(7,"span",6),g(8,"Scenario Name"),v()(),x(9,"input",7),z("ngModelChange",function(s){return n.name.set(s)}),v(),K(10,n7,2,0,"span",8),v(),x(11,"div",4)(12,"label",9)(13,"span",6),g(14,"Description (optional)"),v()(),x(15,"textarea",10),z("ngModelChange",function(s){return n.description.set(s)}),v()(),x(16,"div",4)(17,"label",11)(18,"input",12),z("ngModelChange",function(s){return n.bindToMap.set(s)}),v(),x(19,"span",6),g(20," Bind to current maps "),v()()(),x(21,"details",13)(22,"summary",14),g(23," Extended settings "),x(24,"span",15),g(25),v()(),x(26,"p",16),g(27,"Uncheck what this scenario should not carry."),v(),x(28,"div",17)(29,"cc-scenario-settings-picker",18),Ua("selectedKeysChange",function(s){return ae(r),Ha(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),v()()(),x(30,"div",19)(31,"button",20),z("click",function(){return n.close()}),g(32,"Cancel"),v(),x(33,"button",21),z("click",function(){return n.save()}),g(34),v()()(),x(35,"form",22)(36,"button",23),z("click",function(){return n.close()}),g(37,"close"),v()()()}i&2&&(h(9),F("ngModel",n.name()),h(),Q(!n.nameValid()&&n.name().length>0?10:-1),h(5),F("ngModel",n.description()),h(2),We("opacity-40",!n.hasFiles()),h(),F("ngModel",n.bindToMap())("disabled",!n.hasFiles()),h(7),ge("(",n.selectionSummary(),")"),h(4),F("availableKeys",n.availableKeys)("defaultKeys",n.defaultKeys),ja("selectedKeys",n.selectedKeys),h(4),F("disabled",!n.nameValid()||n.selectedKeys().size===0),h(),ge(" ",n.saveLabel()," "))},dependencies:[dr,cr,Vs,Af,Ws,sr,Os,lr,mc],encapsulation:2,changeDetection:0})}}return e})();var r7=["dialog"],vc=(()=>{class e{constructor(){this.scenarioName=Z.required(),this.confirmed=_e(),this.cancelled=_e(),this.dialogElement=Je.required("dialog")}open(){this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}confirm(){this.close(),this.confirmed.emit()}cancel(){this.close(),this.cancelled.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-delete-confirm-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,r7,5),i&2&&at()},inputs:{scenarioName:[1,"scenarioName"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:15,vars:1,consts:[["dialog",""],["aria-labelledby","delete-confirm-title",1,"modal"],[1,"modal-box","max-w-sm"],["id","delete-confirm-title",1,"text-lg","font-bold","mb-2"],[1,"modal-action"],[1,"btn",3,"click"],[1,"btn","btn-error",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){i&1&&(y(0,"dialog",1,0)(2,"div",2)(3,"h3",3),g(4,"Delete Scenario"),M(),y(5,"p"),g(6),M(),y(7,"div",4)(8,"button",5),ie("click",function(){return n.cancel()}),g(9,"Cancel"),M(),y(10,"button",6),ie("click",function(){return n.confirm()}),g(11,"Delete"),M()()(),y(12,"form",7)(13,"button",8),ie("click",function(){return n.cancel()}),g(14,"close"),M()()()),i&2&&(h(6),ge('Are you sure you want to delete "',n.scenarioName(),'"?'))},encapsulation:2,changeDetection:0})}}return e})();var a7=["dialog"];function s7(e,o){if(e&1&&(y(0,"li"),g(1),M()),e&2){let t=o.$implicit;h(),Te(t)}}function l7(e,o){if(e&1&&(y(0,"div",5)(1,"div"),pe(2,"i",11),y(3,"strong"),g(4,"Already existing:"),M(),y(5,"ul",12),Pe(6,s7,2,1,"li",null,ii),M()()()),e&2){let t=B();h(6),Be(t.feedback().duplicates)}}function c7(e,o){if(e&1&&(y(0,"li"),g(1),M()),e&2){let t=o.$implicit;h(),Te(t)}}function d7(e,o){if(e&1&&(y(0,"div",6)(1,"div"),pe(2,"i",13),y(3,"strong"),g(4,"Invalid scenario files:"),M(),y(5,"ul",12),Pe(6,c7,2,1,"li",null,ii),M()()()),e&2){let t=B();h(6),Be(t.feedback().invalid)}}function h7(e,o){if(e&1&&(y(0,"li"),g(1),M()),e&2){let t=o.$implicit;h(),Te(t)}}function m7(e,o){if(e&1&&(y(0,"div",6)(1,"div"),pe(2,"i",13),y(3,"strong"),g(4,"Could not read (bad format):"),M(),y(5,"ul",12),Pe(6,h7,2,1,"li",null,ii),M()()()),e&2){let t=B();h(6),Be(t.feedback().parseErrors)}}var xc=(()=>{class e{constructor(){this.closed=_e(),this.dialogElement=Je.required("dialog"),this.feedback=Se({duplicates:[],invalid:[],parseErrors:[]})}open(t){let{duplicates:i,invalid:n,parseErrors:r}=t;(i.length>0||n.length>0||r.length>0)&&(this.feedback.set({duplicates:i,invalid:n,parseErrors:r}),this.dialogElement().nativeElement.showModal())}close(){this.dialogElement().nativeElement.close(),this.feedback.set({duplicates:[],invalid:[],parseErrors:[]}),this.closed.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-import-feedback-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,a7,5),i&2&&at()},outputs:{closed:"closed"},decls:15,vars:3,consts:[["dialog",""],["aria-labelledby","import-feedback-title",1,"modal"],[1,"modal-box","max-w-lg"],["id","import-feedback-title",1,"text-lg","font-bold","mb-2"],[1,"flex","flex-col","gap-2"],[1,"alert","alert-warning","text-sm"],[1,"alert","alert-error","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"],[1,"fa","fa-exclamation-triangle","mr-1"],[1,"list-disc","list-inside","ml-1"],[1,"fa","fa-exclamation-circle","mr-1"]],template:function(i,n){i&1&&(y(0,"dialog",1,0)(2,"div",2)(3,"h3",3),g(4,"Import Results"),M(),y(5,"div",4),K(6,l7,8,0,"div",5),K(7,d7,8,0,"div",6),K(8,m7,8,0,"div",6),M(),y(9,"div",7)(10,"button",8),ie("click",function(){return n.close()}),g(11,"OK"),M()()(),y(12,"form",9)(13,"button",10),ie("click",function(){return n.close()}),g(14,"close"),M()()()),i&2&&(h(6),Q(n.feedback().duplicates.length?6:-1),h(),Q(n.feedback().invalid.length?7:-1),h(),Q(n.feedback().parseErrors.length?8:-1))},encapsulation:2,changeDetection:0})}}return e})();function u7(e,o){if(e&1){let t=we();y(0,"button",0),ie("click",function(n){return ae(t),B().exportRequested.emit(),se(n.stopPropagation())}),pe(1,"i",1),M(),y(2,"button",2),ie("click",function(n){return ae(t),B().deleteRequested.emit(),se(n.stopPropagation())}),pe(3,"i",3),M()}}var bv=(()=>{class e{constructor(){this.isBuiltIn=Z.required(),this.exportRequested=_e(),this.deleteRequested=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-item-actions"]],inputs:{isBuiltIn:[1,"isBuiltIn"]},outputs:{exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:1,vars:1,consts:[["title","Export scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-download"],["title","Delete scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&K(0,u7,4,0),i&2&&Q(n.isBuiltIn()?-1:0)},encapsulation:2,changeDetection:0})}}return e})();function p7(e,o){e&1&&(y(0,"span",1),g(1,"Built-in"),M())}function f7(e,o){if(e&1&&(y(0,"span",2),g(1),M()),e&2){let t=B();h(),Te(t.view().formattedDate)}}function g7(e,o){if(e&1&&(y(0,"span",3),pe(1,"i",6),y(2,"span",7),g(3),M()()),e&2){let t=B();ce("title","Bound to "+t.view().scenario.mapFileNames.join(", ")),h(3),Te(t.view().scenario.mapFileNames.join(", "))}}function b7(e,o){if(e&1&&pe(0,"i",8),e&2){let t=o.$implicit,i=B();At(In("fa ",i.groupIcons[t])),ce("title",i.groupLabels[t])}}var vv=(()=>{class e{constructor(){this.view=Z.required(),this.groupLabels=wa,this.groupIcons=cc}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-item-badges"]],hostAttrs:[1,"block","overflow-hidden"],inputs:{view:[1,"view"]},decls:7,vars:2,consts:[[1,"flex","items-center","gap-3","mt-1","min-w-0"],[1,"badge","badge-xs","badge-info"],[1,"text-[11px]","text-base-content/40"],[1,"badge","badge-xs","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"flex","gap-1.5","text-[11px]","text-base-content/40"],[3,"class","title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[3,"title"]],template:function(i,n){i&1&&(y(0,"div",0),K(1,p7,2,0,"span",1)(2,f7,2,1,"span",2),K(3,g7,4,2,"span",3),y(4,"span",4),Pe(5,b7,1,4,"i",5,ii),M()()),i&2&&(h(),Q(n.view().scenario.isBuiltIn?1:2),h(2),Q(n.view().mapBound?3:-1),h(2),Be(n.view().groupKeys))},encapsulation:2,changeDetection:0})}}return e})();function v7(e,o){e&1&&(x(0,"span",3),V(1,"i",7),v())}function x7(e,o){if(e&1&&(x(0,"div",4),g(1),v()),e&2){let t=B();h(),Te(t.view().scenario.description)}}var xv=(()=>{class e{constructor(){this.view=Z.required(),this.applyRequested=_e(),this.exportRequested=_e(),this.deleteRequested=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-item"]],inputs:{view:[1,"view"]},outputs:{applyRequested:"applyRequested",exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:8,vars:8,consts:[["type","button",1,"flex","items-center","w-full","px-4","py-2","border-t","border-base-300","hover:bg-base-200","cursor-pointer","bg-transparent","text-left",3,"click"],[1,"flex-1","min-w-0"],[1,"font-medium","text-sm","truncate",3,"title"],["title","Some metrics in this scenario are not available",1,"text-warning","ml-1"],[1,"text-xs","text-base-content/50","truncate"],[3,"view"],[3,"exportRequested","deleteRequested","isBuiltIn"],[1,"fa","fa-exclamation-triangle","text-xs"]],template:function(i,n){i&1&&(x(0,"button",0),z("click",function(){return n.applyRequested.emit()}),x(1,"div",1)(2,"div",2),g(3),K(4,v7,2,0,"span",3),v(),K(5,x7,2,1,"div",4),V(6,"cc-scenario-item-badges",5),v(),x(7,"cc-scenario-item-actions",6),z("exportRequested",function(){return n.exportRequested.emit()})("deleteRequested",function(){return n.deleteRequested.emit()}),v()()),i&2&&(h(),We("opacity-40",n.view().mapMismatch),h(),F("title",n.view().scenario.name),h(),ge(" ",n.view().scenario.name," "),h(),Q(n.view().warning?4:-1),h(),Q(n.view().scenario.description?5:-1),h(),F("view",n.view()),h(),F("isBuiltIn",!!n.view().scenario.isBuiltIn))},dependencies:[vv,bv],encapsulation:2,changeDetection:0})}}return e})();var Dr=class{static downloadData(o,t){let i=new Blob([o],{type:"text/json"}),n=document.createElement("a");n.download=t,n.href=window.URL.createObjectURL(i),n.dataset.downloadurl=["text/json",n.download,n.href].join(":"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,view:window}))}};var wv=(()=>{class e{constructor(t,i){this.scenariosService=t,this.db=i}exportScenario(t){let i=tv(t),n=t.name.replaceAll(/[^\w-]/g,"_");Dr.downloadData(JSON.stringify(i,null,2),n+dc)}async importScenarioFiles(t){let i=this.scenariosService.scenarios$.getValue(),n={imported:0,duplicates:[],invalid:[],parseErrors:[]};for(let r of t){let a;try{let l=await r.text();a=mv(JSON.parse(l))}catch{n.parseErrors.push(r.name);continue}if(!a){n.invalid.push(r.name);continue}if(this.isDuplicate(a,i)){n.duplicates.push(a.name);continue}let s=iv(a);i.push(s),await this.db.add(s),n.imported++}return n.imported>0&&await this.scenariosService.loadScenarios(),n}isDuplicate(t,i){return i.some(n=>n.name===t.name&&ip(n.settings,t.settings))}static{this.\u0275fac=function(i){return new(i||e)(E(ji),E(gc))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Sv=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(Yn)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var y7=[{priority:0,label:"Current Map",icon:"fa-map-pin"},{priority:1,label:"Global",icon:"fa-globe"},{priority:2,label:"Built-in",icon:"fa-cube"},{priority:3,label:"Other Maps",icon:"fa-map-o"}],yv=(()=>{class e{constructor(t){this.scenarioApplier=t}groupScenarios(t,i){let n=new Map;for(let r of t){let a=this.getScenarioPriority(r,i),s=n.get(a);s?s.push(r):n.set(a,[r])}return y7.filter(r=>n.has(r.priority)).map(r=>({label:r.label,icon:r.icon,scenarios:n.get(r.priority)??[]}))}toScenarioView(t,i,n){let r=(t.mapFileNames?.length??0)>0,a=r&&!t.mapFileNames.some(l=>i.has(l)),s=this.scenarioApplier.hasMissingMetrics(this.scenarioApplier.getMissingMetrics(t.settings,n));return{scenario:t,warning:s,mapMismatch:a,mapBound:r,groupKeys:ev(t),formattedDate:new Date(t.createdAt).toLocaleDateString()}}getScenarioPriority(t,i){let n=(t.mapFileNames?.length??0)>0;return n&&t.mapFileNames?.some(r=>i.has(r))?0:!n&&!t.isBuiltIn?1:t.isBuiltIn?2:3}static{this.\u0275fac=function(i){return new(i||e)(E(fc))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var M7=["dialog"],_7=["fileInput"],E7=(e,o)=>o.label,k7=(e,o)=>o.scenario.id;function q7(e,o){e&1&&(x(0,"p",13),g(1,"No scenarios found."),v())}function T7(e,o){if(e&1){let t=we();x(0,"cc-scenario-item",25),z("applyRequested",function(){let n=ae(t).$implicit,r=B(2);return se(r.applyScenario(n.scenario))})("exportRequested",function(){let n=ae(t).$implicit,r=B(2);return se(r.exportScenario(n.scenario))})("deleteRequested",function(){let n=ae(t).$implicit,r=B(2);return se(r.requestDelete(n.scenario))}),v()}if(e&2){let t=o.$implicit;F("view",t)}}function R7(e,o){if(e&1&&(x(0,"div",19),V(1,"input",20),x(2,"div",21),V(3,"i"),g(4),x(5,"span",22),g(6),v()(),x(7,"div",23),Pe(8,T7,1,1,"cc-scenario-item",24,k7),v()()),e&2){let t=o.$implicit,i=o.$index;We("mt-1",i!==0),h(),F("checked",i===0),ot("aria-label",t.label),h(2),At(In("fa ",t.icon," mr-2")),h(),ge(" ",t.label," "),h(2),Te(t.scenarios.length),h(2),Be(t.scenarios)}}var nm=(()=>{class e{constructor(t,i,n,r,a){this.scenariosService=t,this.importExportService=i,this.scenarioDialogStore=n,this.fileStoreReadWindow=r,this.helpers=a,this.dialogElement=Je.required("dialog"),this.deleteConfirmDialogRef=Je.required(vc),this.importFeedbackDialogRef=Je.required(xc),this.fileInput=Je.required("fileInput"),this.applyRequested=_e(),this.deleteTarget=Se(null),this.acceptExtensions=`${dc},.json`,this.scenarios=A(this.scenariosService.scenarios$,{initialValue:[]}),this.metricData=A(this.scenarioDialogStore.metricData$,{requireSync:!0}),this.searchTerm=Se(""),this.visibleFileNames=A(this.fileStoreReadWindow.files$.pipe(qe(s=>new Set(Ln(s).map(l=>l.fileMeta.fileName)))),{initialValue:new Set}),this.filteredScenarios=Y(()=>{let s=this.searchTerm().toLowerCase(),l=this.scenarios(),d=this.visibleFileNames();return(s?l.filter(m=>m.name.toLowerCase().includes(s)||m.description?.toLowerCase().includes(s)):[...l]).sort((m,u)=>this.helpers.getScenarioPriority(m,d)-this.helpers.getScenarioPriority(u,d))}),this.groupedScenarios=Y(()=>{let s=this.visibleFileNames(),l=this.metricData();return this.helpers.groupScenarios(this.filteredScenarios(),s).map(c=>et(ke({},c),{scenarios:c.scenarios.map(m=>this.helpers.toScenarioView(m,s,l))}))})}async open(){await this.scenariosService.loadScenarios(),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}applyScenario(t){this.close(),this.applyRequested.emit({scenario:t,metricData:this.metricData()})}exportScenario(t){this.importExportService.exportScenario(t)}openImportDialog(){this.fileInput().nativeElement.click()}async handleImportFiles(t){let i=t.target;if(!i.files||i.files.length===0)return;let n=await this.importExportService.importScenarioFiles(i.files);i.value="",this.importFeedbackDialogRef().open(n)}requestDelete(t){this.deleteTarget.set(t),this.deleteConfirmDialogRef().open()}cancelDelete(){this.deleteTarget.set(null)}async confirmDelete(){let t=this.deleteTarget();t&&(this.deleteTarget.set(null),await this.scenariosService.removeScenario(t.id))}static{this.\u0275fac=function(i){return new(i||e)(ne(ji),ne(wv),ne(Sv),ne(Re),ne(yv))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-list-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,M7,5)(n.deleteConfirmDialogRef,vc,5)(n.importFeedbackDialogRef,xc,5)(n.fileInput,_7,5),i&2&&at(4)},outputs:{applyRequested:"applyRequested"},decls:23,vars:4,consts:[["dialog",""],["fileInput",""],["aria-labelledby","scenario-list-title",1,"modal"],[1,"modal-box","max-w-xl"],[1,"flex","items-center","justify-between","mb-4"],["id","scenario-list-title",1,"text-xl","font-bold"],[1,"flex","items-center","gap-1"],["title","Import scenarios",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-upload"],[1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-close"],["type","file","aria-label","Import scenarios","multiple","",1,"hidden",3,"change","accept"],["placeholder","Search scenarios...","aria-label","Search scenarios",1,"input","input-bordered","w-full","mb-4",3,"ngModelChange","ngModel"],[1,"text-center","py-8","text-base-content/50"],[1,"max-h-[60vh]","overflow-y-auto"],[1,"collapse","collapse-arrow","border","border-base-300",3,"mt-1"],["method","dialog",1,"modal-backdrop"],[3,"click"],[3,"confirmed","cancelled","scenarioName"],[1,"collapse","collapse-arrow","border","border-base-300"],["type","radio","name","scenario-accordion",3,"checked"],[1,"collapse-title","font-semibold","text-sm","bg-primary","text-primary-content"],[1,"badge","badge-sm","ml-2"],[1,"collapse-content","px-0"],[3,"view"],[3,"applyRequested","exportRequested","deleteRequested","view"]],template:function(i,n){if(i&1&&(x(0,"dialog",2,0)(2,"div",3)(3,"div",4)(4,"h2",5),g(5,"Scenarios"),v(),x(6,"div",6)(7,"button",7),z("click",function(){return n.openImportDialog()}),V(8,"i",8),v(),x(9,"button",9),z("click",function(){return n.close()}),V(10,"i",10),v()()(),x(11,"input",11,1),z("change",function(a){return n.handleImportFiles(a)}),v(),x(13,"input",12),z("ngModelChange",function(a){return n.searchTerm.set(a)}),v(),K(14,q7,2,0,"p",13),x(15,"div",14),Pe(16,R7,10,9,"div",15,E7),v()(),x(18,"form",16)(19,"button",17),z("click",function(){return n.close()}),g(20,"close"),v()()(),x(21,"cc-delete-confirm-dialog",18),z("confirmed",function(){return n.confirmDelete()})("cancelled",function(){return n.cancelDelete()}),v(),V(22,"cc-import-feedback-dialog")),i&2){let r;h(11),F("accept",n.acceptExtensions),h(2),F("ngModel",n.searchTerm()),h(),Q(n.filteredScenarios().length===0?14:-1),h(2),Be(n.groupedScenarios()),h(5),F("scenarioName",((r=n.deleteTarget())==null?null:r.name)??"")}},dependencies:[dr,cr,Vs,Ws,sr,Os,lr,vc,xc,xv],encapsulation:2,changeDetection:0})}}return e})();var I7=["listDialog"],D7=["saveDialog"];function A7(e,o){if(e&1){let t=we();x(0,"cc-apply-scenario-dialog",16),z("closed",function(){ae(t);let n=B();return se(n.handleApplyClosed())}),v()}if(e&2){let t=o;F("scenario",t.scenario)("metricData",t.metricData)}}var Cv=(()=>{class e{constructor(){this.scenariosService=T(ji),this.listDialog=Je.required("listDialog"),this.saveDialog=Je.required("saveDialog"),this.applyTarget=Se(null),this.scenarios=A(this.scenariosService.scenarios$,{initialValue:[]}),this.scenariosCountLabel=Y(()=>{let t=this.scenarios().length;return`${t} ${t===1?"scenario":"scenarios"} available`})}async ngOnInit(){await this.scenariosService.loadScenarios()}openScenarioList(){this.listDialog().open()}openSaveDialog(){this.saveDialog().open()}handleApplyRequested(t){this.applyTarget.set(t)}handleApplyClosed(){this.applyTarget.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-labels-scenarios-segment"]],viewQuery:function(i,n){i&1&&rt(n.listDialog,I7,5)(n.saveDialog,D7,5),i&2&&at(2)},hostAttrs:[1,"group","flex","flex-col","items-stretch","px-3","py-2","transition-colors","relative"],decls:23,vars:2,consts:[["listDialog",""],["saveDialog",""],[1,"flex","flex-col","items-stretch","gap-1.5","px-2","py-1","rounded-md","transition-colors","max-w-[220px]","min-w-[160px]"],["data-testid","metric-segment-labels",1,"flex","flex-col","gap-1"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wide","opacity-70"],["type","button","popovertarget","metric-settings-popover-labels","data-anchor-name","metric-segment-labels","title","Label Settings",1,"btn","btn-ghost","btn-xs","btn-square",2,"anchor-name","--metric-segment-labels"],[1,"fa","fa-cog","text-[10px]"],[1,"border-t","border-base-300","-mx-1"],["data-testid","metric-segment-scenario",1,"flex","flex-col","gap-1"],["type","button","title","Save current state as scenario","data-testid","metric-segment-scenario-save",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-plus","text-[10px]"],["type","button","title","Open saved scenarios",1,"text-sm","font-semibold","leading-tight","text-center","bg-transparent","border-0","p-0","rounded-sm","cursor-pointer","hover:bg-base-200","whitespace-nowrap","overflow-hidden","text-ellipsis",3,"click"],["popoverId","metric-settings-popover-labels","anchorName","metric-segment-labels","widthClass","w-80"],[3,"applyRequested"],[3,"scenario","metricData"],[3,"closed","scenario","metricData"]],template:function(i,n){if(i&1&&(x(0,"div",2)(1,"div",3)(2,"div",4)(3,"span",5),g(4,"Labels"),v(),x(5,"button",6),V(6,"i",7),v()()(),V(7,"div",8),x(8,"div",9)(9,"div",4)(10,"span",5),g(11,"Scenarios"),v(),x(12,"button",10),z("click",function(){return n.openSaveDialog()}),V(13,"i",11),v()(),x(14,"button",12),z("click",function(){return n.openScenarioList()}),g(15),v()()(),x(16,"cc-settings-popover-shell",13),V(17,"cc-label-settings-panel"),v(),x(18,"cc-scenario-list-dialog",14,0),z("applyRequested",function(a){return n.handleApplyRequested(a)}),v(),V(20,"cc-save-scenario-dialog",null,1),K(22,A7,1,2,"cc-apply-scenario-dialog",15)),i&2){let r;h(15),ge(" ",n.scenariosCountLabel()," "),h(7),Q((r=n.applyTarget())?22:-1,r)}},dependencies:[Od,nm,om,em,Di],encapsulation:2,changeDetection:0})}}return e})();var Mv=(()=>{class e{constructor(){this.preferencesReadWindow=T(rr),this.metricsBarWriteStore=T(Qe),this.isLinked=A(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.iconClass=Y(()=>this.isLinked()?"fa fa-link":"fa fa-unlink"),this.title=Y(()=>this.isLinked()?"Unlink Height and Color Metric":"Link Height and Color Metric"),this.buttonClass=Y(()=>this.isLinked()?"btn btn-circle btn-sm ring-2 ring-primary text-primary bg-primary/10 border-0":"btn btn-circle btn-sm ring-1 ring-base-300 text-base-content/60 border-0 cc-link-button-dashed")}toggle(){this.metricsBarWriteStore.toggleIsHeightAndColorMetricLinked()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-link-color-height-button"]],hostAttrs:[1,"self-center","px-1"],decls:2,vars:8,consts:[["type","button",3,"click","title"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.toggle()}),pe(1,"i"),M()),i&2&&(At(n.buttonClass()),ce("title",n.title()),ot("aria-label",n.title())("data-testid","metric-link-button")("aria-pressed",n.isLinked()),h(),At(n.iconClass()))},encapsulation:2,changeDetection:0})}}return e})();function F7(e,o){e&1&&V(0,"cc-link-color-height-button")(1,"cc-color-segment")}function L7(e,o){if(e&1&&V(0,"cc-axis-card",0)(1,"cc-color-settings-popover",1),e&2){let t=B();F("metricName","Settings")("hasCog",!0)("cogPopoverId",t.deltaColorSettingsPopoverId)("cogAnchorName",t.deltaColorSettingsAnchorName)("testId","metric-segment-color-settings")("cogTestId","metric-segment-color-settings-cog"),h(),F("popoverId",t.deltaColorSettingsPopoverId)("anchorName",t.deltaColorSettingsAnchorName)}}function N7(e,o){e&1&&V(0,"cc-edge-segment")}var rm=(()=>{class e{constructor(){this.barBottom=Ef,this.fileStoreReadWindow=T(Re),this.metricsBarReadStore=T(ht),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasEdgeMetric=A(this.metricsBarReadStore.metricData$.pipe(qe(t=>t.edgeMetricData.length>0)),{initialValue:!1}),this.showColorMetricSegment=Y(()=>!this.isDeltaState()),this.deltaColorSettingsPopoverId="metric-settings-popover-color-delta",this.deltaColorSettingsAnchorName="metric-segment-color-settings"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metrics-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom",n.barBottom)},features:[bi([{provide:ur,useValue:cf}]),Zi([kf,pr])],decls:6,vars:2,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(V(0,"cc-area-segment")(1,"cc-height-segment"),K(2,F7,2,0)(3,L7,2,8),K(4,N7,1,0,"cc-edge-segment"),V(5,"cc-labels-scenarios-segment")),i&2&&(h(2),Q(n.showColorMetricSegment()?2:3),h(2),Q(n.hasEdgeMetric()?4:-1))},dependencies:[m2,_o,H3,sc,K3,Z3,Cv,Mv],encapsulation:2,changeDetection:0})}}return e})();var am=(()=>{class e extends W0{constructor(){super(...arguments),this.areaMetric=A(T(xe).areaMetric$,{requireSync:!0}),this.pathToNode=T(he).selectSignal(Yp)}isEnabledFor(t){let i=this.pathToNode().get(t);return i!==void 0&&Ja(i,this.areaMetric())}static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=cu(e)))(n||e)}})()}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var P7=(e,o,t,i)=>{let n=e.length>0?e.filter(d=>xi(d)):o,r=0,a=0,s=0,l=0;for(let d of n)i(d)&&r++,d.isExcluded&&a++,!i(d)&&!d.isExcluded&&(s++,Ja(d,t)||l++);return{shown:s,flattened:r,excluded:a,noArea:l}},_v=De(of,Bi,yi,As,P7);var sm=(()=>{class e{constructor(){this.store=T(he),this.counts$=this.store.select(_v)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Ev=De(Hp,e=>e?.map?Ji(e.map).descendants().map(({data:o})=>o).filter(o=>xi(o)):[]);var Sa=De(Ev,e=>{let o=new Map;for(let t of B7(e))o.set(t,e.map(i=>i.attributes?.[t]??0).filter(i=>typeof i=="number"&&!Number.isNaN(i)));return o});function B7(e){let o=new Set;for(let t of e)for(let i of Object.keys(t.attributes??{}))i!==Vu&&o.add(i);return o}var lm=(()=>{class e{constructor(){this.store=T(he),this.metricValues$=this.store.select(Sa),this.descriptors$=this.store.select(Qn)}addRule(t){Wi(this.store,t.type,vs({rule:et(ke({},t),{id:V7()})}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();function V7(){return`metric-rule-${crypto.randomUUID()}`}var cm=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.sharedViewReadWindow=T(Bt),this.store=T(he),this.idToBuildingService=T(ir),this.areaMetric=A(this.mapStateReadWindow.areaMetric$,{requireSync:!0}),this.buildingIds=A(this.idToBuildingService.buildingIds$,{requireSync:!0}),this.rootUnary=A(this.store.select(Jp),{requireSync:!0}),this.markedPackages=A(this.sharedViewReadWindow.markedPackages$,{requireSync:!0}),this.isFlattened=A(this.store.select(As),{requireSync:!0})}project(t){return O0(t,{areaMetric:this.areaMetric(),buildingIds:this.buildingIds(),rootUnary:this.rootUnary(),isFlattened:this.isFlattened(),hidesExcludedNodes:!0,markedPackages:this.markedPackages()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Av=rd($w());var kv=e=>/[*?]/.test(e);var W7={gt:">",gte:"\u2265",lt:"<",lte:"\u2264",eq:"="};function qv(e){if(e.operator==="between"){let o=Math.min(e.value,e.upperValue??e.value),t=Math.max(e.value,e.upperValue??e.value);return`${e.metric} ${o}\u2026${t}`}return`${e.metric} ${W7[e.operator]} ${e.value}`}var O7=(e,o)=>(o.get(e.metric)??[]).filter(t=>Wu(e,t)).length,Tv=(e,o,t)=>e.filter(i=>i.type===t).map(i=>({id:i.id,label:qv(i),affectedCount:O7(i,o),kind:"METRIC",metricRule:i})),Rv=De(ld,Sa,(e,o)=>Tv(e,o,"flatten")),Iv=De(ld,Sa,(e,o)=>Tv(e,o,"exclude"));var Fv=(e,o,t)=>{if(e.length===0)return[];let i=o.map(a=>Ou(a.path)),{rules:n,combinedPositivePrefilter:r}=z7(e);return $7(n,r,i),n.map(({item:a,affectedCount:s})=>({id:`${t}/${a.path}`,label:a.path,item:a,effect:t,affectedCount:s,kind:kv(a.path)?"RULE":"MANUAL"})).sort((a,s)=>a.label.localeCompare(s.label))};function z7(e){let o=(0,Av.default)();return{rules:e.map(i=>{let{ignoredNodePaths:n,condition:r}=zu(i.path);return r&&$u(o,i.path),{item:i,ignoredNodePaths:n,condition:r,affectedCount:0}}),combinedPositivePrefilter:o}}function $7(e,o,t){let i=e.filter(r=>r.condition),n=e.filter(r=>!r.condition);for(let r of t)i.length>0&&o.ignores(r)&&Dv(i,r,!0),Dv(n,r,!1)}function Dv(e,o,t){for(let i of e)i.ignoredNodePaths.ignores(o)===t&&i.affectedCount++}var Lv=De(cs,Bi,Rv,(e,o,t)=>[...t,...Fv(e,o,"flatten")]),Nv=De(ls,Bi,Iv,(e,o,t)=>[...t,...Fv(e,o,"exclude")]);var Pv=(e,o)=>{let t=o.trim().split(",");return o.trim().startsWith("!")?(t[0]=t[0].slice(1),t.some(i=>e.some(n=>`!${xr(i)}`===n.path))):t.some(i=>e.some(n=>xr(i)===n.path))};var wc=De(fo,F0);var Bv=e=>De(fo,wc,e,(o,t,i)=>t||Pv(i,o)),Vv=Bv(cs),Wv=Bv(ls);var dm=(()=>{class e{constructor(){this.store=T(he),this.flattenRules$=this.store.select(Lv),this.excludeRules$=this.store.select(Nv),this.isFlattenPatternDisabled$=this.store.select(Vv),this.isExcludePatternDisabled$=this.store.select(Wv)}removeRule(t){if(t.kind==="METRIC"){Wi(this.store,t.metricRule.type,xs({id:t.metricRule.id}));return}let i=t.effect==="flatten"?vo({items:[t.item]}):jn({items:[t.item]});Wi(this.store,t.effect,i)}clearRules(t){Wi(this.store,t,ds({ruleEffect:t}))}ruleFromSearchPattern(t){Wi(this.store,t,I1(t))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Ov={patternSelector:fo,setPattern:Pi,isPatternEmptySelector:wc,searchedNodePathsSelector:nf};var hm=(()=>{class e{constructor(){this.store=T(he),this.sharedViewReadWindow=T(Bt),this.threeSceneService=T(ft),this.idToBuildingService=T(ir),this.threeRendererService=T(kt),this.codeMapMouseEventService=T(on),this.codeMapTooltipService=T(tr),this.selectedBuildingId=A(this.sharedViewReadWindow.selectedBuildingId$,{requireSync:!0}),this.hoveredNodeId=A(this.sharedViewReadWindow.hoveredNodeId$,{requireSync:!0})}isSelected(t){return this.selectedBuildingId()===t.path}isHovered(t){return this.hoveredNodeId()===t.path}select(t){this.store.dispatch(cd({value:t.path}));let i=this.idToBuildingService.get(t.id);this.codeMapMouseEventService.drawLabelSelectedBuilding(i),this.threeSceneService.selectBuilding(i),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}deselect(){this.store.dispatch(cd({value:null})),this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}hover(t,i){this.store.dispatch(Xo({value:t.path})),this.codeMapMouseEventService.hoverNode(t.path),this.codeMapTooltipService.show(t,i.right,i.top)}hoverEnd(){this.store.dispatch(Xo({value:null})),this.codeMapMouseEventService.unhoverNode(),this.codeMapTooltipService.hide()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var zv={options:Object.values(Ya),optionSelector:ff,ascendingSelector:gf,setOption:wf,toggleAscending:()=>Sf()};var $v=(e,o)=>e!==Ya.AREA_SIZE?De(Et,t=>xd(wd(t.unifiedMapNode),e,o)):De(Et,yi,(t,i)=>xd(wd(t.unifiedMapNode),e,o,i));var mm=(()=>{class e{constructor(){this.store=T(he)}rootNodeFor(t,i){return this.store.select($v(t,i))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var j7=2e3,jv=(()=>{class e{constructor(){this.actions$=T(dt),this.sharedViewReadWindow=T(Bt),this.revealService=T(Xs),this.actions$.pipe(st(ri),Ht(()=>this.sharedViewReadWindow.selectedBuildingId$.pipe(Ae(Boolean),ut(1),ru(tu(j7)))),Du()).subscribe(t=>this.revealService.revealNode(t,{expand:!1}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Oa({type:e,selectors:[["","ccRevealsSelectedNodeAfterLoad",""]]})}}return e})();var Hv=(()=>{class e{constructor(){this.store=T(he),this.selection=T(Gs),this.revealService=T(Xs),z0("metrics",t=>this.showNode(t))}showNode(t){this.store.select(tf(t)).pipe(ut(1)).subscribe(i=>{i&&(this.selection.select(i),this.revealService.revealNode(t))})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Oa({type:e,selectors:[["","ccShowsHandedOverNode",""]]})}}return e})();var Uv=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metrics-view"]],features:[bi([cm,{provide:R0,useExisting:cm},hm,{provide:Gs,useExisting:hm},am,{provide:I0,useExisting:am},mm,{provide:T0,useExisting:mm},sm,{provide:q0,useExisting:sm},dm,{provide:E0,useExisting:dm},lm,{provide:_0,useExisting:lm},N0(zv),L0(Ov),{provide:C0,useValue:M0},{provide:B0,useValue:P0},A0("metrics"),Bf()]),Zi([jv,Hv])],decls:10,vars:0,consts:[["view","metrics"],["collapsedContent","",1,"flex-1","min-w-0"]],template:function(i,n){i&1&&(V(0,"cc-loading-file-progress-spinner",0)(1,"cc-code-map"),x(2,"cc-sidebar-explorer"),V(3,"cc-explorer-search-bar",1),v(),V(4,"cc-sidebar-inspector")(5,"cc-node-context-menu")(6,"cc-metrics-bar")(7,"cc-legend-panel")(8,"cc-file-extension-bar")(9,"cc-bottom-bar"))},dependencies:[oh,rm,V0,D0,k0,eh,th,nh,y0,Nf],encapsulation:2,changeDetection:0})}}return e})();var G7=[{path:gd.metrics,component:Uv},{path:gd.domain,loadComponent:()=>import("./chunk-RP4KWM5M.js").then(e=>e.DomainViewComponent)}],X7={provide:Su,useClass:E1},K7=[Iu(G7),X7],um={providers:[Eu(ku()),Fu(k1,{metaReducers:[q1]}),...K7,{provide:Ru,useClass:gl},Lu([...Og,...i1,...Hg,...jg,...n1,...a1,..._1,...R1,...A1]),{provide:mu,useFactory:e=>()=>e.synchronizeVersion(),deps:[mg],multi:!0}]};var Sc=class{parse(o,t={}){t=Object.assign({binary:!1},t);let i=t.binary,n=[],r=0;o.traverse(function(L){if(L.isMesh){let j=L.geometry,q=j.index,P=j.getAttribute("position");r+=q!==null?q.count/3:P.count/3,n.push({object3d:L,geometry:j})}});let a,s=80;if(i===!0){let L=r*2+r*3*4*4+80+4,j=new ArrayBuffer(L);a=new DataView(j),a.setUint32(s,r,!0),s+=4}else a="",a+=`solid exported
3533
+ `))},encapsulation:2})}}return e})();var Dr=(e,o,t)=>Math.min(Math.max(e,o),t),N3=({minValue:e,maxValue:o,currentLeftValue:t,currentRightValue:i,sliderWidth:n})=>{let r=o-e;if(r<=0)return{leftEnd:n,rightStart:n};let a=(t-e)/r,s=(i-e)/r,l=Dr(a*n,0,n),d=Dr(s*n,l,n);return{leftEnd:l,rightStart:d}},_8=({thumbX:e,minValue:o,maxValue:t,sliderWidth:i})=>{let n=(t-o)/i,r=o+e*n;return Math.round(r)},P3=e=>V3(e,{lowerBound:0,upperBound:e.otherThumbX}),B3=e=>V3(e,{lowerBound:e.otherThumbX,upperBound:e.sliderWidth}),V3=({deltaX:e,thumbScreenX:o,thumbRadius:t,sliderBoundingClientRectX:i,sliderWidth:n,minValue:r,maxValue:a},{lowerBound:s,upperBound:l})=>{let d=o+e-i+t,c=Dr(d,s,l);return{updatedThumbX:c,upcomingValue:_8({thumbX:c,minValue:r,maxValue:a,sliderWidth:n})}};var E8=["rangeSliderContainer"],k8=["leftThumb"],q8=["rightThumb"],W3=(()=>{class e{get segmentWidths(){let t=Dr(this.sliderRangePosition.leftEnd,0,this.actualSliderWidth),i=Dr(this.sliderRangePosition.rightStart,t,this.actualSliderWidth);return{left:t,middle:i-t,right:this.actualSliderWidth-i}}constructor(t){this.changeDetectorRef=t,this.sliderWidth=150,this.sliderRangePosition={leftEnd:0,rightStart:0},this.thumbRadius=7,this.actualSliderWidth=this.sliderWidth,this.currentlySliding=void 0,this.activeMouseMoveHandler=null,this.activeMouseUpHandler=null,this.handleLeftThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=P3({deltaX:i.movementX,thumbScreenX:this.leftThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.rightStart,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:n.updatedThumbX,rightStart:this.sliderRangePosition.rightStart},this.upcomingLeftValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newLeftValue:n.upcomingValue})},this.handleRightThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=B3({deltaX:i.movementX,thumbScreenX:this.rightThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.leftEnd,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:this.sliderRangePosition.leftEnd,rightStart:n.updatedThumbX},this.upcomingRightValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newRightValue:n.upcomingValue})}}ngOnChanges(t){t.sliderWidth&&(this.actualSliderWidth=this.sliderWidth),this.currentlySliding||(t.currentLeftValue&&(this.upcomingLeftValue=this.currentLeftValue),t.currentRightValue&&(this.upcomingRightValue=this.currentRightValue),this.updateSliderRangePosition())}ngAfterViewInit(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{let i=t.at(-1).contentRect.width;i>0&&i!==this.actualSliderWidth&&(this.actualSliderWidth=i,this.currentlySliding||this.updateSliderRangePosition(),this.changeDetectorRef.markForCheck())}),this.resizeObserver.observe(this.sliderContainer.nativeElement))}ngOnDestroy(){this.stopSliding(),this.resizeObserver?.disconnect()}setCurrentlySliding(t){switch(this.stopSliding(),this.currentlySliding=t,this.currentlySliding){case"leftThumb":this.activeMouseMoveHandler=this.handleLeftThumbMoved,this.rightThumb.nativeElement.style.zIndex="0",this.leftThumb.nativeElement.style.zIndex="1";break;case"rightThumb":this.activeMouseMoveHandler=this.handleRightThumbMoved,this.leftThumb.nativeElement.style.zIndex="0",this.rightThumb.nativeElement.style.zIndex="1";break;default:return}this.activeMouseUpHandler=()=>this.stopSliding(),document.addEventListener("mousemove",this.activeMouseMoveHandler),document.addEventListener("mouseup",this.activeMouseUpHandler)}stopSliding(){this.currentlySliding=void 0,this.activeMouseMoveHandler&&(document.removeEventListener("mousemove",this.activeMouseMoveHandler),this.activeMouseMoveHandler=null),this.activeMouseUpHandler&&(document.removeEventListener("mouseup",this.activeMouseUpHandler),this.activeMouseUpHandler=null)}handleLeftThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingLeftValue,this.minValue,this.upcomingRightValue);i===void 0||i===this.upcomingLeftValue||(t.preventDefault(),this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleRightThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingRightValue,this.upcomingLeftValue,this.maxValue);i===void 0||i===this.upcomingRightValue||(t.preventDefault(),this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}calculateValueFromKeyboard(t,i,n,r){let a;switch(t.key){case"ArrowLeft":case"ArrowDown":a=i-1;break;case"ArrowRight":case"ArrowUp":a=i+1;break;case"Home":a=n;break;case"End":a=r;break;default:return}return Math.max(n,Math.min(r,a))}handleCurrentLeftInputChanged(t){let i=xd(t,this.minValue,this.upcomingRightValue,this.upcomingLeftValue);i!==void 0&&(this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleCurrentRightInputChanged(t){let i=xd(t,this.upcomingLeftValue,this.maxValue,this.upcomingRightValue);i!==void 0&&(this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}updateSliderRangePosition(){this.sliderRangePosition=N3({minValue:this.minValue,maxValue:this.maxValue,currentLeftValue:this.upcomingLeftValue??this.currentLeftValue,currentRightValue:this.upcomingRightValue??this.currentRightValue,sliderWidth:this.actualSliderWidth})}abortSlidingWhenHidden(){return this.sliderContainer.nativeElement.getBoundingClientRect().width===0?(this.stopSliding(),!0):!1}static{this.\u0275fac=function(i){return new(i||e)(ne(Ln))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metric-color-range-slider"]],viewQuery:function(i,n){if(i&1&&Ha(E8,5)(k8,5)(q8,5),i&2){let r;fi(r=gi())&&(n.sliderContainer=r.first),fi(r=gi())&&(n.leftThumb=r.first),fi(r=gi())&&(n.rightThumb=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",handleValueChange:"handleValueChange",sliderWidth:"sliderWidth"},features:[za],decls:15,vars:34,consts:[["rangeSliderContainer",""],["leftThumb",""],["rightThumb",""],[1,"flex","items-center","gap-2"],["type","number","aria-label","Lower color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"],[1,"flex","flex-1","mx-2","relative","leading-[48px]"],[1,"inline-block","border-b-4","border-solid"],["aria-hidden","true",1,"cursor-pointer","absolute","-top-1","rounded-full","border-[7px]","border-primary",3,"mousedown"],["type","range","step","1","aria-label","Lower color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],["type","range","step","1","aria-label","Upper color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],[3,"minValue","maxValue","leftValueLabel","rightValueLabel","sliderRangePosition","sliderWidth"],["type","number","aria-label","Upper color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"]],template:function(i,n){i&1&&(x(0,"div",3)(1,"input",4),z("input",function(a){return n.handleCurrentLeftInputChanged(a)}),v(),x(2,"div",5,0),V(4,"span",6)(5,"span",6)(6,"span",6),x(7,"div",7,1),z("mousedown",function(){return n.setCurrentlySliding("leftThumb")}),v(),x(9,"div",7,2),z("mousedown",function(){return n.setCurrentlySliding("rightThumb")}),v(),x(11,"input",8),z("keydown",function(a){return n.handleLeftThumbKeydown(a)}),v(),x(12,"input",9),z("keydown",function(a){return n.handleRightThumbKeydown(a)}),v(),V(13,"cc-range-slider-labels",10),v(),x(14,"input",11),z("input",function(a){return n.handleCurrentRightInputChanged(a)}),v()()),i&2&&(h(),F("value",n.currentLeftValue)("min",n.minValue)("max",n.upcomingRightValue),h(3),ze("width",n.segmentWidths.left,"px")("border-bottom-color",n.leftColor),h(),ze("width",n.segmentWidths.middle,"px")("border-bottom-color",n.middleColor),h(),ze("width",n.segmentWidths.right,"px")("border-bottom-color",n.rightColor),h(),ze("left",n.sliderRangePosition.leftEnd-n.thumbRadius,"px"),h(2),ze("left",n.sliderRangePosition.rightStart-n.thumbRadius,"px"),h(2),F("min",n.minValue)("max",n.currentRightValue)("value",n.currentLeftValue),h(),F("min",n.currentLeftValue)("max",n.maxValue)("value",n.currentRightValue),h(),F("minValue",n.minValue)("maxValue",n.maxValue)("leftValueLabel",n.upcomingLeftValue)("rightValueLabel",n.upcomingRightValue)("sliderRangePosition",n.sliderRangePosition)("sliderWidth",n.actualSliderWidth),h(),F("value",n.currentRightValue)("min",n.upcomingLeftValue)("max",n.maxValue))},dependencies:[L3],encapsulation:2})}}return e})();var O3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.metricsLensFacade=r,this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.sliderValues=D(this.metricsBarReadStore.metricColorRangeValues$,{initialValue:{values:[],min:0,max:0,from:0,to:0}}),this.sliderColors=D(this.metricsBarReadStore.metricColorRangeColors$,{initialValue:{leftColor:"#000",middleColor:"#000",rightColor:"#000"}}),this.isAttributeDirectionInversed=D(St([this.mapStateReadWindow.colorMetric$,this.metricsLensFacade.descriptors$]).pipe(qe(([a,s])=>s[a]?.direction===1)),{initialValue:!1}),this.pendingLeftValue=null,this.pendingRightValue=null,this.commitColorRange=Vi(()=>{let a={};this.pendingLeftValue!==null&&(a.from=this.pendingLeftValue),this.pendingRightValue!==null&&(a.to=this.pendingRightValue),this.pendingLeftValue=null,this.pendingRightValue=null,this.metricsBarWriteStore.setColorRange(a)},d0),this.handleValueChange=({newLeftValue:a,newRightValue:s})=>{this.pendingLeftValue=a??this.pendingLeftValue,this.pendingRightValue=s??this.pendingRightValue,this.commitColorRange()}}ngOnDestroy(){this.commitColorRange.flush()}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(ht),ne(Qe),ne(Jn))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-range-section"]],hostAttrs:[1,"contents"],decls:7,vars:23,consts:[[1,"block",3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","sliderWidth"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"truncate","text-xs","opacity-60"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted","diagramWidth","diagramHeight","showAxisLabels"]],template:function(i,n){i&1&&(V(0,"cc-metric-color-range-slider",0),x(1,"div",1)(2,"span",2),g(3,"Distribution"),v(),x(4,"span",3),g(5),v()(),V(6,"cc-metric-color-range-diagram",4)),i&2&&(F("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("handleValueChange",n.handleValueChange)("sliderWidth",220),h(5),ge("",n.colorMetric()," \xD7 quantile %"),h(),F("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("colorMetric",n.colorMetric())("values",n.sliderValues().values)("isAttributeDirectionInverted",n.isAttributeDirectionInversed())("diagramWidth",380)("diagramHeight",190)("showAxisLabels",!1))},dependencies:[W3,F3],encapsulation:2})}}return e})();function T8(e,o){if(e&1){let t=we();y(0,"button",6),ie("click",function(){ae(t);let n=B();return se(n.resetThresholds())}),pe(1,"i",7),M()}}var z3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.metricsBarReadStore=n,this.metricsBarWriteStore=r,this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.selectedColorMetricData=D(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.canResetThresholds=Y(()=>!this.isDeltaState()&&this.colorMetric()!=="unary"),this.swatchGradient=Y(()=>{let a=this.mapColors();return this.isDeltaState()?`linear-gradient(90deg, ${a.positiveDelta}, ${a.negativeDelta})`:`linear-gradient(90deg, ${a.positive}, ${a.neutral}, ${a.negative})`})}resetThresholds(){this.metricsBarWriteStore.setColorRange(yr(this.selectedColorMetricData()))}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(Re),ne(ht),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-settings-header"]],hostAttrs:[1,"contents"],decls:8,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","min-w-0","items-center","gap-2"],[1,"inline-block","h-3.5","w-3.5","shrink-0","rounded-full"],[1,"truncate","text-sm"],[1,"font-semibold","text-primary"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-undo"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1),pe(2,"span",2),y(3,"span",3),g(4,"Color by "),y(5,"span",4),g(6),M()()(),K(7,T8,2,0,"button",5),M()),i&2&&(h(2),ze("background",n.swatchGradient()),h(4),Te(n.colorMetric()),h(),Q(n.canResetThresholds()?7:-1))},encapsulation:2})}}return e})();var $3=(()=>{class e{constructor(){this.override=Z.required(),this.recolorOverride=_e(),this.unpinOverride=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-folder-override-row"]],hostAttrs:[1,"contents"],inputs:{override:[1,"override"]},outputs:{recolorOverride:"recolorOverride",unpinOverride:"unpinOverride"},decls:8,vars:7,consts:[[1,"flex","shrink-0","items-center","gap-2","rounded-md","border","border-base-300","px-2","py-1",3,"title"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums",3,"title"],[1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-times"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"cc-inline-color-picker",1),z("colorChange",function(a){return n.recolorOverride.emit(a)}),v(),x(2,"span",2),g(3),v(),x(4,"span",3),g(5),v(),x(6,"button",4),z("click",function(){return n.unpinOverride.emit()}),V(7,"i",5),v()()),i&2&&(F("title",n.override().path),h(),F("hexColor",n.override().color)("ariaLabel","Recolor "+n.override().path),h(2),Te(n.override().path),h(),F("title",n.override().fileCount+" files"),h(),Te(n.override().fileCount),h(),F("title","Unpin "+n.override().path))},dependencies:[Eo],encapsulation:2})}}return e})();var R8=["pinInput"];function I8(e,o){if(e&1){let t=we();y(0,"button",2),ie("click",function(){ae(t);let n=B();return se(n.startPinning())}),pe(1,"i",3),y(2,"span"),g(3,"Pin a folder color\u2026"),M()()}}function A8(e,o){if(e&1){let t=we();y(0,"li",8)(1,"button",10),ie("mousedown",function(n){return n.preventDefault()})("click",function(){let n=ae(t).$implicit,r=B(2);return se(r.handlePin(n))}),y(2,"span",11),g(3),M()()()}if(e&2){let t=o.$implicit;h(),ce("title",t),h(2),Te(t)}}function D8(e,o){e&1&&(y(0,"li",9),g(1,"No folders found"),M())}function F8(e,o){if(e&1){let t=we();y(0,"div",4),pe(1,"i",5),y(2,"input",6,0),ie("input",function(n){ae(t);let r=B();return se(r.handleSearchTermChange(n.target.value))})("keydown.escape",function(n){ae(t);let r=B();return se(r.handleSearchEscape(n))})("blur",function(){ae(t);let n=B();return se(n.handleSearchBlur())}),M()(),y(4,"ul",7),Pe(5,A8,4,2,"li",8,ii,!1,D8,2,0,"li",9),M()}if(e&2){let t=B();h(2),ce("value",t.searchTerm()),h(3),Be(t.folderSuggestions())}}var L8=8,j3=(()=>{class e{constructor(t){this.metricsBarReadStore=t,this.pinFolder=_e(),this.folderPaths=D(this.metricsBarReadStore.markableFolderPaths$,{initialValue:[]}),this.overrides=D(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.isPinning=Se(!1),this.searchTerm=Se(""),this.pinInput=Je("pinInput"),this.folderSuggestions=Y(()=>{let i=this.searchTerm().toLowerCase(),n=new Set(this.overrides().map(a=>a.path)),r=[];for(let a of this.folderPaths())if(!(n.has(a)||!a.toLowerCase().includes(i))&&(r.push(a),r.length>=L8))break;return r})}startPinning(){this.isPinning.set(!0),setTimeout(()=>this.pinInput()?.nativeElement.focus())}stopPinning(){this.isPinning.set(!1),this.searchTerm.set("")}handleSearchTermChange(t){this.searchTerm.set(t)}handleSearchBlur(){this.searchTerm().trim()===""&&this.stopPinning()}handleSearchEscape(t){t.preventDefault(),this.stopPinning()}handlePin(t){this.pinFolder.emit(t),this.stopPinning()}static{this.\u0275fac=function(i){return new(i||e)(ne(ht))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-pin-folder-search"]],viewQuery:function(i,n){i&1&&rt(n.pinInput,R8,5),i&2&&at()},hostAttrs:[1,"contents"],outputs:{pinFolder:"pinFolder"},decls:2,vars:1,consts:[["pinInput",""],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal"],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal",3,"click"],[1,"fa","fa-plus"],[1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","placeholder","Search folders\u2026","aria-label","Search folders",1,"grow",3,"input","keydown.escape","blur","value"],[1,"m-0","flex","max-h-40","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex"],[1,"px-2","py-1","text-xs","opacity-60"],[1,"btn","btn-ghost","btn-xs","w-full","flex-nowrap","justify-start","font-normal",3,"mousedown","click","title"],[1,"min-w-0","truncate"]],template:function(i,n){i&1&&K(0,I8,4,0,"button",1)(1,F8,8,2),i&2&&Q(n.isPinning()?1:0)},encapsulation:2})}}return e})();var N8=(e,o)=>o.path;function P8(e,o){if(e&1&&(x(0,"span",2),g(1),v()),e&2){let t=B();h(),ge("",t.overrides().length," pinned")}}function B8(e,o){if(e&1){let t=we();x(0,"cc-folder-override-row",7),z("recolorOverride",function(n){let r=ae(t).$implicit,a=B(2);return se(a.handleRecolor(r.path,n))})("unpinOverride",function(){let n=ae(t).$implicit,r=B(2);return se(r.handleUnpin(n.path))}),v()}if(e&2){let t=o.$implicit;F("override",t)}}function V8(e,o){if(e&1&&(x(0,"div",4),Pe(1,B8,1,1,"cc-folder-override-row",6,N8),v()),e&2){let t=B();h(),Be(t.overrides())}}var H3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.overrides=D(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{initialValue:Pt})}handlePin(t){this.metricsBarWriteStore.markPackage({path:t,color:this.nextMarkingColor(t)})}handleRecolor(t,i){this.metricsBarWriteStore.markPackage({path:t,color:i})}handleUnpin(t){this.metricsBarWriteStore.unmarkPackage(t)}nextMarkingColor(t){let i=this.mapColors().markingColors,n=this.findMarkedParentColor(t),r=i.filter(s=>s!==n);if(r.length===0)return i[0];let a=new Set(this.overrides().map(s=>s.color));return r.find(s=>!a.has(s))??r[this.overrides().length%r.length]}findMarkedParentColor(t){let i,n=0;for(let r of this.overrides())t.startsWith(`${r.path}/`)&&r.path.length>n&&(i=r.color,n=r.path.length);return i}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(ht),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-folder-overrides"]],hostAttrs:[1,"contents"],decls:8,vars:2,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"text-xs","opacity-60"],[1,"m-0","text-xs","opacity-60"],[1,"flex","max-h-36","flex-col","gap-0.5","overflow-y-auto"],[3,"pinFolder"],[3,"override"],[3,"recolorOverride","unpinOverride","override"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"span",1),g(2,"Folder Overrides"),v(),K(3,P8,2,1,"span",2),v(),x(4,"p",3),g(5,"These folders\u2019 floors are tinted with the pinned color."),v(),K(6,V8,3,0,"div",4),x(7,"cc-pin-folder-search",5),z("pinFolder",function(a){return n.handlePin(a)}),v()),i&2&&(h(3),Q(n.overrides().length>0?3:-1),h(3),Q(n.overrides().length>0?6:-1))},dependencies:[$3,j3],encapsulation:2})}}return e})();var U3=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.metricsBarWriteStore=i,this.groupName=Z.required(),this.colorMode=D(this.mapStateReadWindow.colorMode$,{initialValue:"absolute"})}handleColorModeChange(t){this.metricsBarWriteStore.setColorMode(t)}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-gradient-mode-picker"]],hostAttrs:[1,"contents"],inputs:{groupName:[1,"groupName"]},decls:8,vars:8,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Gradient mode",1,"join","w-full"],["type","radio","aria-label","Absolute",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Focused",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Weighted",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Relative",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"span",1),g(2,"Gradient Mode"),M(),y(3,"div",2)(4,"input",3),ie("change",function(){return n.handleColorModeChange("absolute")}),M(),y(5,"input",4),ie("change",function(){return n.handleColorModeChange("focusedGradient")}),M(),y(6,"input",5),ie("change",function(){return n.handleColorModeChange("weightedGradient")}),M(),y(7,"input",6),ie("change",function(){return n.handleColorModeChange("trueGradient")}),M()()()),i&2&&(h(4),ce("name",n.groupName())("checked",n.colorMode()==="absolute"),h(),ce("name",n.groupName())("checked",n.colorMode()==="focusedGradient"),h(),ce("name",n.groupName())("checked",n.colorMode()==="weightedGradient"),h(),ce("name",n.groupName())("checked",n.colorMode()==="trueGradient"))},encapsulation:2})}}return e})();function W8(e,o){if(e&1){let t=we();x(0,"label",1)(1,"input",3),z("change",function(){ae(t);let n=B();return se(n.handleIsColorRangeInvertedChange())}),v(),x(2,"span",4),g(3,"Invert colors"),v()()}if(e&2){let t=B();h(),F("checked",t.isColorRangeInverted())}}function O8(e,o){if(e&1){let t=we();x(0,"label",1)(1,"input",3),z("change",function(){ae(t);let n=B();return se(n.handleAreDeltaColorsInvertedChange())}),v(),x(2,"span",4),g(3,"Invert colors"),v()()}if(e&2){let t=B();h(),F("checked",t.areDeltaColorsInverted())}}var G3=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.mapStateReadWindow=i,this.metricsBarWriteStore=n,this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.isColorRangeInverted=Y(()=>this.mapColors().isColorRangeInverted??!1),this.areDeltaColorsInverted=Y(()=>this.mapColors().areDeltaColorsInverted??!1)}handleIsColorRangeInvertedChange(){this.metricsBarWriteStore.invertColorRange()}handleAreDeltaColorsInvertedChange(){this.metricsBarWriteStore.invertDeltaColors()}resetColorsKeys(){return this.isDeltaState()?["mapState.mapColors.positiveDelta","mapState.mapColors.negativeDelta","mapState.mapColors.selected","mapState.mapColors.areDeltaColorsInverted"]:["mapState.mapColors.positive","mapState.mapColors.negative","mapState.mapColors.neutral","mapState.mapColors.selected","mapState.mapColors.isColorRangeInverted","mapState.colorMode"]}static{this.\u0275fac=function(i){return new(i||e)(ne(Re),ne(xe),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-invert-reset-row"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","cursor-pointer","items-center","gap-2"],["label","Reset colors",3,"settingsKeys","tooltip","small"],["type","checkbox",1,"toggle","toggle-sm","toggle-primary",3,"change","checked"],[1,"text-sm"]],template:function(i,n){i&1&&(x(0,"div",0),K(1,W8,4,1,"label",1)(2,O8,4,1,"label",1),V(3,"cc-reset-settings-button",2),v()),i&2&&(h(),Q(n.isDeltaState()?2:1),h(2),F("settingsKeys",n.resetColorsKeys())("tooltip",n.isDeltaState()?"Reset color values to default":"Reset color values and gradient mode to default")("small",!0))},dependencies:[ko],encapsulation:2})}}return e})();function z8(e,o){if(e&1&&V(0,"cc-color-range-section")(1,"cc-gradient-mode-picker",1),e&2){let t=B();h(),F("groupName",t.popoverId()+"-gradient-mode")}}var cc=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.popoverId=Z.required(),this.anchorName=Z.required(),this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasRangeSection=Y(()=>!this.isDeltaState()&&this.colorMetric()!=="unary")}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(Re))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[[3,"popoverId","anchorName","widthClass"],[3,"groupName"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0),V(1,"cc-color-settings-header"),K(2,z8,2,1),V(3,"cc-color-bands-section")(4,"cc-invert-reset-row")(5,"cc-folder-overrides"),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName())("widthClass","max-w-[95vw] "+(n.hasRangeSection()?"w-[420px]":"w-80")),h(2),Q(n.hasRangeSection()?2:-1))},dependencies:[Ai,z3,O3,U3,b2,G3,H3],encapsulation:2})}}return e})();var X3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.preferencesReadWindow=i,this.metricsBarWriteStore=n,this.searchPopoverId="metric-select-popover-color",this.searchAnchorName="metric-segment-color",this.settingsPopoverId="metric-settings-popover-color",this.settingsAnchorName="metric-segment-color-cog",this.colorMetric=D(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isLinked=D(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1})}handleMetricSelected(t){this.metricsBarWriteStore.setColorMetric(t)}static{this.\u0275fac=function(i){return new(i||e)(ne(xe),ne(sr),ne(Qe))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-color-segment"]],hostAttrs:[1,"contents"],decls:5,vars:14,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","disabled","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],["metricFor","colorMetric"],["placeholder","Color Metric (highest value)","kind","node",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(x(0,"cc-axis-card",0)(1,"div",1),V(2,"cc-metric-meta-value",2),v()(),x(3,"cc-metric-bar-select-popover",3),z("metricSelected",function(a){return n.handleMetricSelected(a)}),v(),V(4,"cc-color-settings-popover",4)),i&2&&(F("metricName",n.colorMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("disabled",n.isLinked())("testId","metric-segment-color")("cogTestId","metric-segment-color-cog"),h(3),F("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.colorMetric()),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[_o,_r,ql,cc],encapsulation:2})}}return e})();var K3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.isEdgeMetricVisible=D(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0})}toggle(){this.metricsBarWriteStore.toggleEdgeMetricVisible()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-edge-metric-toggle"]],decls:4,vars:1,consts:[[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(y(0,"label",0)(1,"input",1),ie("change",function(){return n.toggle()}),M(),y(2,"span"),g(3,"Disable edge metric"),M()()),i&2&&(h(),ce("checked",!n.isEdgeMetricVisible()))},encapsulation:2})}}return e})();var Q3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarReadStore=T(ht),this.metricsBarWriteStore=T(Qe),this.popoverId=Z.required(),this.anchorName=Z.required(),this.amountOfBuildingsWithSelectedEdgeMetric=D(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$,{initialValue:0}),this.edgePreviewLabel=D(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$.pipe(qe(t=>`Preview the edges of up to ${t} buildings with the highest amount of incoming and outgoing edges`)),{initialValue:""}),this.amountOfEdgePreviews=D(this.mapStateReadWindow.amountOfEdgePreviews$,{initialValue:0}),this.edgeHeight=D(this.mapStateReadWindow.edgeHeight$,{initialValue:1}),this.showOutgoingEdges=D(this.mapStateReadWindow.showOutgoingEdges$,{initialValue:!1}),this.showIncomingEdges=D(this.mapStateReadWindow.showIncomingEdges$,{initialValue:!1}),this.showOnlyBuildingsWithEdges=D(this.mapStateReadWindow.showOnlyBuildingsWithEdges$,{initialValue:!1}),this.mapColors=D(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.outgoingEdgeColor=Y(()=>this.mapColors().outgoingEdge),this.incomingEdgeColor=Y(()=>this.mapColors().incomingEdge),this.resetKeys=["mapState.amountOfEdgePreviews","mapState.edgeHeight","mapState.mapColors.outgoingEdge","mapState.showOutgoingEdges","mapState.mapColors.incomingEdge","mapState.showIncomingEdges","mapState.showOnlyBuildingsWithEdges","mapState.isEdgeMetricVisible"]}setAmountOfEdgePreviews(t){this.metricsBarWriteStore.setAmountOfEdgePreviews(t)}setEdgeHeight(t){this.metricsBarWriteStore.setEdgeHeight(t)}setShowOutgoingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOutgoingEdges(i)}setShowIncomingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowIncomingEdges(i)}setShowOnlyBuildingsWithEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOnlyBuildingsWithEdges(i)}setMapColor(t,i){this.metricsBarWriteStore.setMapColors({[t]:i})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-edge-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:32,vars:18,consts:[["widthClass","w-80",3,"popoverId","anchorName"],[3,"title"],[1,"text-sm"],["ariaLabel","Edge preview amount",3,"valueChange","min","max","value","disabled"],["title","Adjust the curve height"],["ariaLabel","Edge height",3,"valueChange","min","max","value","disabled"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","gap-2"],["ariaLabel","Outgoing edge color",3,"colorChange","hexColor"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["ariaLabel","Incoming edge color",3,"colorChange","hexColor"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),g(3,"Preview"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.setAmountOfEdgePreviews(a)}),v()(),x(5,"div",4)(6,"span",2),g(7,"Height"),v(),x(8,"cc-slider-number-input",5),z("valueChange",function(a){return n.setEdgeHeight(a)}),v()(),x(9,"div",6)(10,"div",7)(11,"cc-inline-color-picker",8),z("colorChange",function(a){return n.setMapColor("outgoingEdge",a)}),v(),x(12,"span",9),g(13,"Outgoing Edge"),v(),x(14,"label",10)(15,"input",11),z("change",function(a){return n.setShowOutgoingEdges(a)}),v(),x(16,"span"),g(17,"Show"),v()()(),x(18,"div",7)(19,"cc-inline-color-picker",12),z("colorChange",function(a){return n.setMapColor("incomingEdge",a)}),v(),x(20,"span",9),g(21,"Incoming Edge"),v(),x(22,"label",10)(23,"input",11),z("change",function(a){return n.setShowIncomingEdges(a)}),v(),x(24,"span"),g(25,"Show"),v()()()(),x(26,"label",10)(27,"input",13),z("change",function(a){return n.setShowOnlyBuildingsWithEdges(a)}),v(),x(28,"span"),g(29,"Only show nodes with edges"),v()(),V(30,"cc-edge-metric-toggle")(31,"cc-reset-settings-button",14),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName()),h(),F("title",n.edgePreviewLabel()),h(3),F("min",0)("max",n.amountOfBuildingsWithSelectedEdgeMetric())("value",n.amountOfEdgePreviews())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),F("min",1)("max",9)("value",n.edgeHeight())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(3),F("hexColor",n.outgoingEdgeColor()),h(4),F("checked",n.showOutgoingEdges()),h(4),F("hexColor",n.incomingEdgeColor()),h(4),F("checked",n.showIncomingEdges()),h(4),F("checked",n.showOnlyBuildingsWithEdges())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),h(4),F("settingsKeys",n.resetKeys))},dependencies:[Eo,ko,K3,Ai,qo],encapsulation:2})}}return e})();function $8(e,o){e&1&&(V(0,"cc-metric-chooser-type",5),x(1,"span"),g(2),v()),e&2&&(F("metricFor","edgeMetric"),h(2),Te(o))}function j8(e,o){e&1&&(x(0,"span",2),g(1,"\xA0"),v())}var Y3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.nodeSelectionService=T(Er),this.searchPopoverId="metric-select-popover-edge",this.searchAnchorName="metric-segment-edges",this.settingsPopoverId="metric-settings-popover-edge",this.settingsAnchorName="metric-segment-edges-cog",this.edgeMetric=D(this.mapStateReadWindow.edgeMetric$,{initialValue:""}),this.isEdgeMetricVisible=D(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0}),this.hoveredNode=D(this.nodeSelectionService.createNodeObservable()),this.hoveredEdgeValue=Y(()=>{let t=this.hoveredNode(),i=this.edgeMetric();if(!t||!i)return null;let n=t.edgeAttributes?.[i];return n?`${Z3(n.incoming)} / ${Z3(n.outgoing)}`:null})}handleMetricSelected(t){this.metricsBarWriteStore.setEdgeMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-edge-segment"]],hostAttrs:[1,"contents"],decls:6,vars:15,consts:[["label","Edges",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","dimmed","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","opacity-60","leading-tight","min-h-4"],["aria-hidden","true"],["placeholder","Edge Metric (highest value)","kind","edge",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"],["attributeType","edges",3,"metricFor"]],template:function(i,n){if(i&1&&(x(0,"cc-axis-card",0)(1,"div",1),K(2,$8,3,2)(3,j8,2,0,"span",2),v()(),x(4,"cc-metric-bar-select-popover",3),z("metricSelected",function(a){return n.handleMetricSelected(a)}),v(),V(5,"cc-edge-settings-popover",4)),i&2){let r;F("metricName",n.edgeMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("dimmed",!n.isEdgeMetricVisible())("testId","metric-segment-edges")("cogTestId","metric-segment-edges-cog"),h(2),Q((r=n.hoveredEdgeValue())?2:3,r),h(2),F("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.edgeMetric()),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName)}},dependencies:[_o,kl,_r,Q3],encapsulation:2})}}return e})();function Z3(e){return typeof e=="number"?e.toLocaleString():"-"}function H8(e,o){if(e&1){let t=we();x(0,"label",4)(1,"input",6),z("change",function(n){ae(t);let r=B();return se(r.toggleInvertHeight(n))}),v(),x(2,"span"),g(3,"Invert Height"),v()()}if(e&2){let t=B();h(),F("checked",t.invertHeight())}}var J3=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.fileStoreReadWindow=T(Re),this.metricsBarWriteStore=T(Qe),this.popoverId=Z.required(),this.anchorName=Z.required(),this.scalingY=D(this.mapStateReadWindow.scaling$,{initialValue:{x:1,y:1,z:1}}),this.invertHeight=D(this.mapStateReadWindow.invertHeight$,{initialValue:!1}),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.resetKeys=["mapState.scaling.y","mapState.invertHeight"]}setScalingY(t){this.metricsBarWriteStore.setScaling({y:t})}toggleInvertHeight(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertHeight(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-height-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:7,vars:7,consts:[[3,"popoverId","anchorName"],["title","Height scaling"],[1,"text-sm"],["ariaLabel","Height",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["tooltip","Reset height metric settings to their defaults","label","Reset height metric settings",3,"settingsKeys"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(x(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),g(3,"Height"),v(),x(4,"cc-slider-number-input",3),z("valueChange",function(a){return n.setScalingY(a)}),v()(),K(5,H8,4,1,"label",4),V(6,"cc-reset-settings-button",5),v()),i&2&&(F("popoverId",n.popoverId())("anchorName",n.anchorName()),h(4),F("min",1)("max",25)("value",n.scalingY().y),h(),Q(n.isDeltaState()?-1:5),h(),F("settingsKeys",n.resetKeys))},dependencies:[ko,Ai,qo],encapsulation:2})}}return e})();var ev=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-height",this.searchAnchorName="metric-segment-height",this.settingsPopoverId="metric-settings-popover-height",this.settingsAnchorName="metric-segment-height-cog",this.mapStateReadWindow=T(xe),this.metricsBarWriteStore=T(Qe),this.heightMetric=D(this.mapStateReadWindow.heightMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setHeightMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-height-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Height","metricFor","heightMetric","placeholder","Height Metric (highest value)","testIdPrefix","metric-segment-height",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(x(0,"cc-metric-segment",0),z("metricSelected",function(a){return n.handleMetricSelected(a)}),V(1,"cc-height-settings-popover",1),v()),i&2&&(F("metricName",n.heightMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),h(),F("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[Tl,J3],encapsulation:2})}}return e})();var Rt={areaMetric:{group:"area",label:"Area metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.areaMetric,patch:e=>({mapState:{areaMetric:e.areaMetric}})},margin:{group:"area",label:"Margin",read:e=>e.state.mapState.margin,patch:e=>({mapState:{margin:e.margin}})},invertArea:{group:"area",label:"Invert area",read:e=>e.state.mapState.invertArea,patch:e=>({mapState:{invertArea:e.invertArea}})},enableFloorLabels:{group:"area",label:"Floor labels",read:e=>e.state.mapState.enableFloorLabels,patch:e=>({mapState:{enableFloorLabels:e.enableFloorLabels}})},heightMetric:{group:"height",label:"Height metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.heightMetric,patch:e=>({mapState:{heightMetric:e.heightMetric}})},heightScaling:{group:"height",label:"Height scaling",read:e=>e.state.mapState.scaling.y,patch:e=>({mapState:{scaling:{y:e.heightScaling}}})},invertHeight:{group:"height",label:"Invert height",read:e=>e.state.mapState.invertHeight,patch:e=>({mapState:{invertHeight:e.invertHeight}})},colorMetric:{group:"color",label:"Color metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.colorMetric,patch:e=>({mapState:{colorMetric:e.colorMetric}})},isColorMetricLinkedToHeightMetric:{group:"color",label:"Color follows height metric",isAppliedFirst:!0,read:e=>e.state.preferences.isColorMetricLinkedToHeightMetric,patch:e=>({preferences:{isColorMetricLinkedToHeightMetric:e.isColorMetricLinkedToHeightMetric}})},colorRange:{group:"color",label:"Color range",read:e=>ke({},e.state.mapState.colorRange),patch:e=>({mapState:{colorRange:e.colorRange}})},colorMode:{group:"color",label:"Gradient mode",read:e=>e.state.mapState.colorMode,patch:e=>({mapState:{colorMode:e.colorMode}})},mapColors:{group:"color",label:"Colors",read:e=>U8(e.state.mapState.mapColors),patch:e=>({mapState:{mapColors:e.mapColors}})},markedPackages:{group:"color",label:"Folder color overrides",read:e=>[...e.state.sharedView.markedPackages],patch:e=>({sharedView:{markedPackages:[...e.markedPackages]}})},edgeMetric:{group:"edge",label:"Edge metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.edgeMetric,patch:e=>({mapState:{edgeMetric:e.edgeMetric}})},isEdgeMetricVisible:{group:"edge",label:"Edge metric enabled",read:e=>e.state.mapState.isEdgeMetricVisible,patch:e=>({mapState:{isEdgeMetricVisible:e.isEdgeMetricVisible}})},amountOfEdgePreviews:{group:"edge",label:"Edge previews",read:e=>e.state.mapState.amountOfEdgePreviews,patch:e=>({mapState:{amountOfEdgePreviews:e.amountOfEdgePreviews}})},edgeHeight:{group:"edge",label:"Edge curve height",read:e=>e.state.mapState.edgeHeight,patch:e=>({mapState:{edgeHeight:e.edgeHeight}})},showOutgoingEdges:{group:"edge",label:"Show outgoing edges",read:e=>e.state.mapState.showOutgoingEdges,patch:e=>({mapState:{showOutgoingEdges:e.showOutgoingEdges}})},showIncomingEdges:{group:"edge",label:"Show incoming edges",read:e=>e.state.mapState.showIncomingEdges,patch:e=>({mapState:{showIncomingEdges:e.showIncomingEdges}})},showOnlyBuildingsWithEdges:{group:"edge",label:"Only nodes with edges",read:e=>e.state.mapState.showOnlyBuildingsWithEdges,patch:e=>({mapState:{showOnlyBuildingsWithEdges:e.showOnlyBuildingsWithEdges}})},edgeColors:{group:"edge",label:"Edge colors",read:e=>({outgoingEdge:e.state.mapState.mapColors.outgoingEdge,incomingEdge:e.state.mapState.mapColors.incomingEdge}),patch:e=>({mapState:{mapColors:ke({},e.edgeColors)}})},amountOfTopLabels:{group:"labels",label:"Top labels",read:e=>e.state.mapState.amountOfTopLabels,patch:e=>({mapState:{amountOfTopLabels:e.amountOfTopLabels}})},labelsPerMap:{group:"labels",label:"Top labels scope",read:e=>e.state.mapState.labelsPerMap,patch:e=>({mapState:{labelsPerMap:e.labelsPerMap}})},labelSize:{group:"labels",label:"Label size",read:e=>e.state.mapState.labelSize,patch:e=>({mapState:{labelSize:e.labelSize}})},labelMode:{group:"labels",label:"Label mode",read:e=>e.state.mapState.labelMode,patch:e=>({mapState:{labelMode:e.labelMode}})},showMetricLabelNodeName:{group:"labels",label:"Show node names",read:e=>e.state.mapState.showMetricLabelNodeName,patch:e=>({mapState:{showMetricLabelNodeName:e.showMetricLabelNodeName}})},showMetricLabelNameValue:{group:"labels",label:"Show metric values",read:e=>e.state.mapState.showMetricLabelNameValue,patch:e=>({mapState:{showMetricLabelNameValue:e.showMetricLabelNameValue}})},groupLabelCollisions:{group:"labels",label:"Group overlapping labels",read:e=>e.state.mapState.groupLabelCollisions,patch:e=>({mapState:{groupLabelCollisions:e.groupLabelCollisions}})},colorLabels:{group:"labels",label:"Labels by color metric",read:e=>ke({},e.state.mapState.colorLabels),patch:e=>({mapState:{colorLabels:e.colorLabels}})},camera:{group:"camera",label:"Position and zoom",read:e=>({position:ke({},e.camera.position),target:ke({},e.camera.target)})},excludedNodes:{group:"filters",label:"Excluded nodes",read:e=>[...e.state.sharedView.excludedNodes],patch:e=>({sharedView:{excludedNodes:[...e.excludedNodes]}})},flattenedNodes:{group:"filters",label:"Flattened nodes",read:e=>[...e.state.sharedView.flattenedNodes],patch:e=>({sharedView:{flattenedNodes:[...e.flattenedNodes]}})},metricRules:{group:"filters",label:"Flattened and excluded by metric",read:e=>[...e.state.sharedView.metricRules],patch:e=>({sharedView:{metricRules:[...e.metricRules]}})},focusedNodePath:{group:"filters",label:"Focused folder",read:e=>[...e.state.sharedView.focusedNodePath],patch:e=>({sharedView:{focusedNodePath:[...e.focusedNodePath]}})}};function U8(e){let n=e,{outgoingEdge:o,incomingEdge:t}=n;return qn(n,["outgoingEdge","incomingEdge"])}var wn=Object.keys(Rt),ya={area:"Area",height:"Height",color:"Color",edge:"Edges",labels:"Labels",camera:"Camera",filters:"Filters"},dc=Object.keys(ya),hc={area:"fa-th-large",height:"fa-bar-chart",color:"fa-paint-brush",edge:"fa-share-alt",labels:"fa-tags",camera:"fa-video-camera",filters:"fa-filter"};function Jh(e){return!!Rt[e].isMetricSelection}var sG=wn.filter(Jh);function em(e){return!!Rt[e].isAppliedFirst}function tv(e,o){return Object.fromEntries(Object.entries(e).filter(([t])=>o.has(t)))}function iv(e,o){let t={};for(let i of wn){if(!o.has(i))continue;let n=Rt[i].read(e);n!==void 0&&(t[i]=n)}return t}var mc=".ccscenario",uc=3;function tm(e){return wn.filter(o=>e.settings[o]!==void 0)}function ov(e){let o=new Set(tm(e).map(t=>Rt[t].group));return dc.filter(t=>o.has(t))}function nv(e){return et(ke(ke({schemaVersion:uc,name:e.name},e.description?{description:e.description}:{}),e.mapFileNames?.length>0?{mapFileNames:e.mapFileNames}:{}),{settings:e.settings})}function rv(e){return{id:crypto.randomUUID(),name:e.name,description:e.description,mapFileNames:e.mapFileNames,createdAt:Date.now(),settings:e.settings}}var sv=(e,o)=>o.key;function G8(e,o){if(e&1){let t=we();y(0,"label",8)(1,"input",12),ie("change",function(n){let r=ae(t).$implicit,a=B(2);return se(a.toggleSetting(r.key,n.target.checked))}),M(),y(2,"span",13),g(3),M()()}if(e&2){let t=o.$implicit;h(),ce("checked",t.selected),ot("data-testid","scenario-setting-"+t.key),h(2),Te(t.label)}}function X8(e,o){if(e&1){let t=we();y(0,"div",7)(1,"label",8)(2,"input",9),ie("change",function(n){let r=ae(t).$implicit,a=B();return se(a.toggleGroup(r,n.target.checked))}),M(),pe(3,"i"),y(4,"span",10),g(5),M()(),y(6,"div",11),Pe(7,G8,4,3,"label",8,sv),M()()}if(e&2){let t=o.$implicit;h(2),ce("checked",t.allSelected)("indeterminate",t.someSelected&&!t.allSelected),ot("data-testid","scenario-group-"+t.key),h(),Dt(Dn("fa ",t.icon," w-4 text-center opacity-60")),h(2),Te(t.label),h(2),Be(t.settings)}}var pc=(()=>{class e{constructor(){this.availableKeys=Z.required(),this.defaultKeys=Z.required(),this.selectedKeys=yu.required(),this.isDefaultSelection=Y(()=>{let t=this.selectedKeys(),i=this.defaultKeys();return t.size===i.length&&i.every(n=>t.has(n))}),this.groups=Y(()=>{let t=this.selectedKeys(),i=this.availableKeys();return dc.map(n=>this.toPickerGroup(n,i,t)).filter(n=>n.settings.length>0)})}selectAll(){this.selectedKeys.set(new Set(this.availableKeys()))}selectNone(){this.selectedKeys.set(new Set)}resetSelection(){this.selectedKeys.set(new Set(this.defaultKeys()))}toggleSetting(t,i){this.selectedKeys.update(n=>av(n,[t],i))}toggleGroup(t,i){this.selectedKeys.update(n=>av(n,t.settings.map(r=>r.key),i))}toPickerGroup(t,i,n){let r=i.filter(a=>Rt[a].group===t).map(a=>({key:a,label:Rt[a].label,selected:n.has(a)}));return{key:t,label:ya[t],icon:hc[t],settings:r,allSelected:r.length>0&&r.every(a=>a.selected),someSelected:r.some(a=>a.selected)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-settings-picker"]],inputs:{availableKeys:[1,"availableKeys"],defaultKeys:[1,"defaultKeys"],selectedKeys:[1,"selectedKeys"]},outputs:{selectedKeys:"selectedKeysChange"},decls:13,vars:1,consts:[[1,"mb-1","flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wide","opacity-60"],[1,"join"],["type","button","data-testid","scenario-settings-select-all",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-select-none",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-reset",1,"btn","btn-xs","join-item",3,"click","disabled"],[1,"flex","flex-col","gap-2","max-h-64","overflow-y-auto","pr-1"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","indeterminate"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-0.5","pl-7"],["type","checkbox",1,"checkbox","checkbox-xs","checkbox-primary",3,"change","checked"],[1,"text-xs"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"span",1),g(2,"Toggle all"),M(),y(3,"div",2)(4,"button",3),ie("click",function(){return n.selectAll()}),g(5," On "),M(),y(6,"button",4),ie("click",function(){return n.selectNone()}),g(7," Off "),M(),y(8,"button",5),ie("click",function(){return n.resetSelection()}),g(9," Reset "),M()()(),y(10,"div",6),Pe(11,X8,9,7,"div",7,sv),M()),i&2&&(h(8),ce("disabled",n.isDefaultSelection()),h(3),Be(n.groups()))},encapsulation:2})}}return e})();function av(e,o,t){let i=new Set(e);for(let n of o)t?i.add(n):i.delete(n);return i}function fc(e){return`${e} ${e===1?"setting":"settings"}`}var gc=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}getValue(){return this.ccStateSnapshot.get()}setStatePatch(t){this.store.dispatch(Qt({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var K8=["areaMetric","heightMetric","colorMetric"],bc=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.threeRendererService=r}getAvailableMetricNames(t){return{nodeMetrics:new Set(t.nodeMetricData.map(i=>i.name)),edgeMetrics:new Set(t.edgeMetricData.map(i=>i.name))}}getMissingMetrics(t,i){let n=this.getAvailableMetricNames(i),r=K8.map(a=>t[a]).filter(a=>!!a);return{nodeMetrics:[...new Set(r.filter(a=>!n.nodeMetrics.has(a)))],edgeMetrics:t.edgeMetric&&!n.edgeMetrics.has(t.edgeMetric)?[t.edgeMetric]:[]}}hasMissingMetrics(t){return t.nodeMetrics.length>0||t.edgeMetrics.length>0}buildOrderedStatePatches(t,i,n){let r=this.getApplicableKeys(t,i,n);return[this.mergePatchesOf(t,r.filter(em)),this.mergePatchesOf(t,r.filter(a=>!em(a)))].filter(a=>Object.keys(a).length>0)}getCameraVectors(t){if(!t.camera)return;let{position:i,target:n}=t.camera;return{position:new Ke(i.x,i.y,i.z),target:new Ke(n.x,n.y,n.z)}}async applyScenario(t,i,n){bd(!0);try{let r=i.has("camera")?this.getCameraVectors(t.settings):void 0,a=r!==void 0,s=this.buildOrderedStatePatches(t.settings,i,n),l=a&&s.length>0?this.scenariosStore.getValue().preferences.resetCameraIfNewFileIsLoaded:void 0;l&&s.length>0&&(s[0].preferences=et(ke({},s[0].preferences),{resetCameraIfNewFileIsLoaded:!1}));for(let d of s)this.scenariosStore.setStatePatch(d),await new Promise(c=>setTimeout(c));if(a&&this.threeCameraService.camera){let{position:d,target:c}=r;this.threeCameraService.camera.position.set(d.x,d.y,d.z),this.threeMapControlsService.setControlTarget(c),this.threeCameraService.camera.lookAt(c),this.threeCameraService.camera.updateProjectionMatrix(),this.threeMapControlsService.updateControls()}l&&setTimeout(()=>{this.scenariosStore.setStatePatch({preferences:{resetCameraIfNewFileIsLoaded:!0}})}),this.threeRendererService.render()}finally{bd(!1)}}getApplicableKeys(t,i,n){let r=n?this.getAvailableMetricNames(n):void 0;return[...i].filter(a=>t[a]!==void 0&&Rt[a].patch!==void 0&&this.isMetricAvailable(a,t,r))}isMetricAvailable(t,i,n){if(!n||!Jh(t))return!0;let r=i[t]??"";return t==="edgeMetric"?r===""||n.edgeMetrics.has(r):n.nodeMetrics.has(r)}mergePatchesOf(t,i){let n={};for(let r of i){let a=Rt[r].patch;a&&(n=dv(n,a(t)))}return n}static{this.\u0275fac=function(i){return new(i||e)(E(gc),E(ar),E(qt),E(kt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function dv(e,o){let t=ke({},e);for(let[i,n]of Object.entries(o)){let r=t[i];t[i]=cv(n)&&cv(r)?dv(ke({},r),n):n}return t}function cv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Q8=["dialog"];function Z8(e,o){if(e&1&&(x(0,"div",4)(1,"span",13),V(2,"i",14),x(3,"span",15),g(4),v()()()),e&2){let t=B();h(),F("title",t.scenario().mapFileNames.join(", ")),h(3),Te(t.scenario().mapFileNames.join(", "))}}function Y8(e,o){if(e&1&&(x(0,"li"),g(1),v()),e&2){let t=o.$implicit;h(),ge("",t," (node metric)")}}function J8(e,o){if(e&1&&(x(0,"li"),g(1),v()),e&2){let t=o.$implicit;h(),ge("",t," (edge metric)")}}function e7(e,o){if(e&1&&(x(0,"div",7),V(1,"i",16),x(2,"div")(3,"strong"),g(4,"Some metrics are not available in the current map and will not be applied:"),v(),x(5,"ul",17),Pe(6,Y8,2,1,"li",null,ii),Pe(8,J8,2,1,"li",null,ii),v()()()),e&2){let t=B();h(6),Be(t.missingMetrics().nodeMetrics),h(2),Be(t.missingMetrics().edgeMetrics)}}var im=(()=>{class e{constructor(t){this.scenarioApplier=t,this.scenario=Z.required(),this.metricData=Z.required(),this.closed=_e(),this.dialogElement=Je.required("dialog"),this.availableKeys=Y(()=>tm(this.scenario())),this.defaultKeys=Y(()=>this.availableKeys().filter(i=>Rt[i].group!=="camera")),this.selectedKeys=Su(()=>new Set(this.defaultKeys())),this.missingMetrics=Y(()=>this.scenarioApplier.getMissingMetrics(tv(this.scenario().settings,this.selectedKeys()),this.metricData())),this.hasMissing=Y(()=>this.scenarioApplier.hasMissingMetrics(this.missingMetrics())),this.hasAnySelected=Y(()=>this.selectedKeys().size>0),this.applySelectedLabel=Y(()=>`Apply ${fc(this.selectedKeys().size)}`),this.destroyRef=T(Tn)}ngAfterViewInit(){let t=this.dialogElement().nativeElement,i=()=>this.closed.emit();t.addEventListener("close",i),this.destroyRef.onDestroy(()=>t.removeEventListener("close",i)),t.showModal()}async apply(){await this.applyKeys(this.selectedKeys())}async applyAll(){await this.applyKeys(new Set(this.availableKeys()))}async applyKeys(t){this.dialogElement().nativeElement.close(),await this.scenarioApplier.applyScenario(this.scenario(),t,this.metricData())}close(){this.dialogElement().nativeElement.close()}static{this.\u0275fac=function(i){return new(i||e)(ne(bc))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-apply-scenario-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,Q8,5),i&2&&at()},inputs:{scenario:[1,"scenario"],metricData:[1,"metricData"]},outputs:{closed:"closed"},decls:20,vars:9,consts:[["dialog",""],["aria-labelledby","apply-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","apply-scenario-title",1,"text-xl","font-bold","mb-1","truncate",3,"title"],[1,"mb-3"],[1,"text-sm","text-base-content/60","mb-3"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"alert","alert-warning","mt-4","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["title","Apply everything this scenario holds, the camera included","data-testid","apply-scenario-all",1,"btn","btn-outline",3,"click"],["data-testid","apply-scenario-selected",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[1,"badge","badge-sm","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[1,"fa","fa-exclamation-triangle"],[1,"list-disc","pl-5","mt-1"]],template:function(i,n){if(i&1){let r=we();x(0,"dialog",1,0)(2,"div",2)(3,"h2",3),g(4),v(),K(5,Z8,5,2,"div",4),x(6,"p",5),g(7,"Select which settings to apply:"),v(),x(8,"cc-scenario-settings-picker",6),Xa("selectedKeysChange",function(s){return ae(r),Ga(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),v(),K(9,e7,10,0,"div",7),x(10,"div",8)(11,"button",9),z("click",function(){return n.close()}),g(12,"Cancel"),v(),x(13,"button",10),z("click",function(){return n.applyAll()}),g(14," Apply all "),v(),x(15,"button",11),z("click",function(){return n.apply()}),g(16),v()()(),x(17,"form",12)(18,"button"),g(19,"close"),v()()()}i&2&&(h(3),F("title","Apply: "+n.scenario().name),h(),ge("Apply: ",n.scenario().name),h(),Q(n.scenario().mapFileNames?.length?5:-1),h(3),F("availableKeys",n.availableKeys())("defaultKeys",n.defaultKeys()),Ua("selectedKeys",n.selectedKeys),h(),Q(n.hasMissing()?9:-1),h(6),F("disabled",!n.hasAnySelected()),h(),ge(" ",n.applySelectedLabel()," "))},dependencies:[mr,hr,cr,dr,pc],encapsulation:2})}}return e})();function uv(e){return e.settings?t7(e.settings):o7(e.sections??{})}function t7(e){let o=e;if(!o.blacklist)return e;let n=o,{blacklist:t}=n,i=qn(n,["blacklist"]);return gv(et(ke({},i),{excludedNodes:t.filter(r=>r.type!=="flatten").map(({path:r})=>({path:r})),flattenedNodes:t.filter(r=>r.type==="flatten").map(({path:r})=>({path:r}))}))}function pv(e){let i=e,{sections:o}=i,t=qn(i,["sections"]);return et(ke({},t),{settings:uv(e)})}var i7=new Set([1,2,uc]);function fv(e){let o=e;if(!(!o?.name||!i7.has(o.schemaVersion))&&!(!o.sections&&!o.settings))return{schemaVersion:uc,name:o.name,description:o.description,mapFileNames:o.mapFileNames,settings:uv(o)}}function o7(e){let{metrics:o,colors:t,camera:i,filters:n,labelsAndFolders:r}=e,c=t?.mapColors??{},{outgoingEdge:a,incomingEdge:s}=c,l=qn(c,["outgoingEdge","incomingEdge"]),d=a!==void 0||s!==void 0;return gv({areaMetric:o?.areaMetric,enableFloorLabels:r?.enableFloorLabels,heightMetric:o?.heightMetric,colorMetric:o?.colorMetric,isColorMetricLinkedToHeightMetric:o?.isColorMetricLinkedToHeightMetric,colorRange:t?.colorRange,colorMode:t?.colorMode,mapColors:Object.keys(l).length>0?l:void 0,markedPackages:r?.markedPackages,edgeMetric:o?.edgeMetric,edgeColors:d?{outgoingEdge:a,incomingEdge:s}:void 0,amountOfTopLabels:r?.amountOfTopLabels,labelSize:r?.labelSize,labelMode:r?.labelMode,showMetricLabelNodeName:r?.showMetricLabelNodeName,showMetricLabelNameValue:r?.showMetricLabelNameValue,groupLabelCollisions:r?.groupLabelCollisions,colorLabels:r?.colorLabels,camera:i,excludedNodes:n?.blacklist?.filter(m=>m.type!=="flatten"),flattenedNodes:n?.blacklist?.filter(m=>m.type==="flatten"),focusedNodePath:n?.focusedNodePath})}function gv(e){return Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0))}var vc=(()=>{class e{async readAll(){return(await(await Gr()).getAll(Ur)).map(pv)}async add(t){let n=(await Gr()).transaction(Ur,"readwrite");await Promise.all([n.store.add(t),n.done])}async update(t){let n=(await Gr()).transaction(Ur,"readwrite");await Promise.all([n.store.put(t),n.done])}async delete(t){let n=(await Gr()).transaction(Ur,"readwrite");await Promise.all([n.store.delete(t),n.done])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var vv={position:{x:0,y:300,z:1e3},target:{x:0,y:0,z:0}},xc={positive:"#69AE40",neutral:"#ddcc00",negative:"#820E0E"},n7={positive:xc.negative,neutral:xc.neutral,negative:xc.positive,isColorRangeInverted:!0},r7=[{id:"built-in-rloc",name:"Real Lines of Code",description:"Visualize code size using real lines of code",metric:"rloc",colorRange:{from:250,to:500}},{id:"built-in-complexity",name:"Complexity",description:"Visualize cyclomatic complexity",metric:"complexity",colorRange:{from:50,to:100}},{id:"built-in-comment-lines",name:"Comment Lines",description:"Visualize comment density",metric:"comment_lines",colorRange:{from:50,to:100}},{id:"built-in-code-smells",name:"Code Smells",description:"Visualize code smell density",metric:"sonar_code_smells",colorRange:{from:10,to:50}},{id:"built-in-logic-complexity",name:"Logic Complexity",description:"Visualize cognitive/logic complexity",metric:"logic_complexity",colorRange:{from:40,to:80}},{id:"built-in-max-complexity-per-function",name:"Max Complexity per Function",description:"Visualize maximum complexity per function",metric:"max_complexity_per_function",colorRange:{from:10,to:20}},{id:"built-in-authors",name:"Authors",description:"Visualize the number of authors per file",metric:"number_of_authors",colorRange:{from:2,to:3},colorMode:Go.absolute,mapColors:n7}],xv=r7.map(e=>({id:e.id,name:e.name,description:e.description,createdAt:0,isBuiltIn:!0,settings:{areaMetric:"rloc",heightMetric:e.metric,colorMetric:e.metric,isColorMetricLinkedToHeightMetric:!0,colorRange:e.colorRange,colorMode:e.colorMode??Go.weightedGradient,mapColors:e.mapColors??xc}})),ji=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.db=r,this.scenarios$=new tu([])}async loadScenarios(){try{let t=await this.db.readAll();t.sort((i,n)=>n.createdAt-i.createdAt),this.scenarios$.next([...t,...xv])}catch(t){console.error("Failed to load scenarios from IndexedDB:",t),this.scenarios$.next([...xv])}}async saveScenario(t){let i=this.buildScenario(t,this.readCurrentSource());try{await this.db.add(i),await this.loadScenarios()}catch(n){console.error("Failed to save scenario:",n)}return i}async removeScenario(t){try{await this.db.delete(t),await this.loadScenarios()}catch(i){console.error("Failed to remove scenario:",i)}}buildScenario(t,i){return{id:crypto.randomUUID(),name:t.name,description:t.description,mapFileNames:t.mapFileNames,createdAt:Date.now(),settings:iv(i,t.selectedKeys)}}readCurrentSource(){return{state:this.scenariosStore.getValue(),camera:this.readCurrentCamera()}}readCurrentCamera(){let t=this.threeCameraService.camera?.position,i=this.threeMapControlsService.controls?.target;return{position:t?{x:t.x,y:t.y,z:t.z}:vv.position,target:i?{x:i.x,y:i.y,z:i.z}:vv.target}}static{this.\u0275fac=function(i){return new(i||e)(E(gc),E(ar),E(qt),E(vc))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var a7=["dialog"];function s7(e,o){e&1&&(x(0,"span",8),g(1,"A name is required."),v())}var nm=wn.filter(e=>Rt[e].group!=="camera"),rm=(()=>{class e{constructor(t,i){this.scenariosService=t,this.fileStoreReadWindow=i,this.dialogElement=Je.required("dialog"),this.name=Se(""),this.description=Se(""),this.bindToMap=Se(!1),this.nameValid=Y(()=>this.name().trim().length>0),this.availableKeys=wn,this.defaultKeys=nm,this.selectedKeys=Se(new Set(nm)),this.selectionSummary=Y(()=>`${this.selectedKeys().size} of ${this.availableKeys.length} settings`),this.saveLabel=Y(()=>`Save ${fc(this.selectedKeys().size)}`),this.visibleFileNames=D(this.fileStoreReadWindow.files$.pipe(qe(n=>Pn(n).map(r=>r.fileMeta.fileName))),{initialValue:[]}),this.hasFiles=Y(()=>this.visibleFileNames().length>0)}open(){this.name.set(""),this.description.set(""),this.bindToMap.set(!1),this.selectedKeys.set(new Set(nm)),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}async save(){if(!this.nameValid()||this.selectedKeys().size===0)return;let t=this.bindToMap()&&this.hasFiles()?this.visibleFileNames():void 0;await this.scenariosService.saveScenario({name:this.name(),description:this.description()||void 0,mapFileNames:t,selectedKeys:this.selectedKeys()}),this.close()}static{this.\u0275fac=function(i){return new(i||e)(ne(ji),ne(Re))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-save-scenario-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,a7,5),i&2&&at()},decls:38,vars:13,consts:[["dialog",""],["aria-labelledby","save-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","save-scenario-title",1,"text-xl","font-bold","mb-4"],[1,"form-control","mb-4"],["for","scenario-name",1,"label"],[1,"label-text"],["id","scenario-name","placeholder","Enter scenario name",1,"input","input-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label-text-alt","text-error"],["for","scenario-description",1,"label"],["id","scenario-description","rows","3","placeholder","Describe what this scenario captures",1,"textarea","textarea-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label","cursor-pointer","justify-start","gap-3"],["type","checkbox",1,"checkbox","checkbox-sm",3,"ngModelChange","ngModel","disabled"],[1,"mb-4","rounded-md","border","border-base-300","p-2"],["data-testid","save-scenario-extended-settings",1,"cursor-pointer","text-sm"],[1,"text-xs","opacity-60"],[1,"m-0","mt-2","text-xs","opacity-60"],[1,"mt-2"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"modal-action"],[1,"btn",3,"click"],["data-testid","save-scenario-submit",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){if(i&1){let r=we();x(0,"dialog",1,0)(2,"div",2)(3,"h2",3),g(4,"Save Scenario"),v(),x(5,"div",4)(6,"label",5)(7,"span",6),g(8,"Scenario Name"),v()(),x(9,"input",7),z("ngModelChange",function(s){return n.name.set(s)}),v(),In(),K(10,s7,2,0,"span",8),v(),x(11,"div",4)(12,"label",9)(13,"span",6),g(14,"Description (optional)"),v()(),x(15,"textarea",10),z("ngModelChange",function(s){return n.description.set(s)}),v(),In(),v(),x(16,"div",4)(17,"label",11)(18,"input",12),z("ngModelChange",function(s){return n.bindToMap.set(s)}),v(),In(),x(19,"span",6),g(20," Bind to current maps "),v()()(),x(21,"details",13)(22,"summary",14),g(23," Extended settings "),x(24,"span",15),g(25),v()(),x(26,"p",16),g(27,"Uncheck what this scenario should not carry."),v(),x(28,"div",17)(29,"cc-scenario-settings-picker",18),Xa("selectedKeysChange",function(s){return ae(r),Ga(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),v()()(),x(30,"div",19)(31,"button",20),z("click",function(){return n.close()}),g(32,"Cancel"),v(),x(33,"button",21),z("click",function(){return n.save()}),g(34),v()()(),x(35,"form",22)(36,"button",23),z("click",function(){return n.close()}),g(37,"close"),v()()()}i&2&&(h(9),F("ngModel",n.name()),An(),h(),Q(!n.nameValid()&&n.name().length>0?10:-1),h(5),F("ngModel",n.description()),An(),h(2),We("opacity-40",!n.hasFiles()),h(),F("ngModel",n.bindToMap())("disabled",!n.hasFiles()),An(),h(7),ge("(",n.selectionSummary(),")"),h(4),F("availableKeys",n.availableKeys)("defaultKeys",n.defaultKeys),Ua("selectedKeys",n.selectedKeys),h(4),F("disabled",!n.nameValid()||n.selectedKeys().size===0),h(),ge(" ",n.saveLabel()," "))},dependencies:[mr,hr,Os,Nf,zs,cr,$s,dr,pc],encapsulation:2})}}return e})();var l7=["dialog"],wc=(()=>{class e{constructor(){this.scenarioName=Z.required(),this.confirmed=_e(),this.cancelled=_e(),this.dialogElement=Je.required("dialog")}open(){this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}confirm(){this.close(),this.confirmed.emit()}cancel(){this.close(),this.cancelled.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-delete-confirm-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,l7,5),i&2&&at()},inputs:{scenarioName:[1,"scenarioName"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:15,vars:1,consts:[["dialog",""],["aria-labelledby","delete-confirm-title",1,"modal"],[1,"modal-box","max-w-sm"],["id","delete-confirm-title",1,"text-lg","font-bold","mb-2"],[1,"modal-action"],[1,"btn",3,"click"],[1,"btn","btn-error",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){i&1&&(y(0,"dialog",1,0)(2,"div",2)(3,"h3",3),g(4,"Delete Scenario"),M(),y(5,"p"),g(6),M(),y(7,"div",4)(8,"button",5),ie("click",function(){return n.cancel()}),g(9,"Cancel"),M(),y(10,"button",6),ie("click",function(){return n.confirm()}),g(11,"Delete"),M()()(),y(12,"form",7)(13,"button",8),ie("click",function(){return n.cancel()}),g(14,"close"),M()()()),i&2&&(h(6),ge('Are you sure you want to delete "',n.scenarioName(),'"?'))},encapsulation:2})}}return e})();var c7=["dialog"];function d7(e,o){if(e&1&&(y(0,"li"),g(1),M()),e&2){let t=o.$implicit;h(),Te(t)}}function h7(e,o){if(e&1&&(y(0,"div",5)(1,"div"),pe(2,"i",11),y(3,"strong"),g(4,"Already existing:"),M(),y(5,"ul",12),Pe(6,d7,2,1,"li",null,ii),M()()()),e&2){let t=B();h(6),Be(t.feedback().duplicates)}}function m7(e,o){if(e&1&&(y(0,"li"),g(1),M()),e&2){let t=o.$implicit;h(),Te(t)}}function u7(e,o){if(e&1&&(y(0,"div",6)(1,"div"),pe(2,"i",13),y(3,"strong"),g(4,"Invalid scenario files:"),M(),y(5,"ul",12),Pe(6,m7,2,1,"li",null,ii),M()()()),e&2){let t=B();h(6),Be(t.feedback().invalid)}}function p7(e,o){if(e&1&&(y(0,"li"),g(1),M()),e&2){let t=o.$implicit;h(),Te(t)}}function f7(e,o){if(e&1&&(y(0,"div",6)(1,"div"),pe(2,"i",13),y(3,"strong"),g(4,"Could not read (bad format):"),M(),y(5,"ul",12),Pe(6,p7,2,1,"li",null,ii),M()()()),e&2){let t=B();h(6),Be(t.feedback().parseErrors)}}var Sc=(()=>{class e{constructor(){this.closed=_e(),this.dialogElement=Je.required("dialog"),this.feedback=Se({duplicates:[],invalid:[],parseErrors:[]})}open(t){let{duplicates:i,invalid:n,parseErrors:r}=t;(i.length>0||n.length>0||r.length>0)&&(this.feedback.set({duplicates:i,invalid:n,parseErrors:r}),this.dialogElement().nativeElement.showModal())}close(){this.dialogElement().nativeElement.close(),this.feedback.set({duplicates:[],invalid:[],parseErrors:[]}),this.closed.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-import-feedback-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,c7,5),i&2&&at()},outputs:{closed:"closed"},decls:15,vars:3,consts:[["dialog",""],["aria-labelledby","import-feedback-title",1,"modal"],[1,"modal-box","max-w-lg"],["id","import-feedback-title",1,"text-lg","font-bold","mb-2"],[1,"flex","flex-col","gap-2"],[1,"alert","alert-warning","text-sm"],[1,"alert","alert-error","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"],[1,"fa","fa-exclamation-triangle","mr-1"],[1,"list-disc","list-inside","ml-1"],[1,"fa","fa-exclamation-circle","mr-1"]],template:function(i,n){i&1&&(y(0,"dialog",1,0)(2,"div",2)(3,"h3",3),g(4,"Import Results"),M(),y(5,"div",4),K(6,h7,8,0,"div",5),K(7,u7,8,0,"div",6),K(8,f7,8,0,"div",6),M(),y(9,"div",7)(10,"button",8),ie("click",function(){return n.close()}),g(11,"OK"),M()()(),y(12,"form",9)(13,"button",10),ie("click",function(){return n.close()}),g(14,"close"),M()()()),i&2&&(h(6),Q(n.feedback().duplicates.length?6:-1),h(),Q(n.feedback().invalid.length?7:-1),h(),Q(n.feedback().parseErrors.length?8:-1))},encapsulation:2})}}return e})();function g7(e,o){if(e&1){let t=we();y(0,"button",0),ie("click",function(n){return ae(t),B().exportRequested.emit(),se(n.stopPropagation())}),pe(1,"i",1),M(),y(2,"button",2),ie("click",function(n){return ae(t),B().deleteRequested.emit(),se(n.stopPropagation())}),pe(3,"i",3),M()}}var wv=(()=>{class e{constructor(){this.isBuiltIn=Z.required(),this.exportRequested=_e(),this.deleteRequested=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-item-actions"]],inputs:{isBuiltIn:[1,"isBuiltIn"]},outputs:{exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:1,vars:1,consts:[["title","Export scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-download"],["title","Delete scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&K(0,g7,4,0),i&2&&Q(n.isBuiltIn()?-1:0)},encapsulation:2})}}return e})();function b7(e,o){e&1&&(y(0,"span",1),g(1,"Built-in"),M())}function v7(e,o){if(e&1&&(y(0,"span",2),g(1),M()),e&2){let t=B();h(),Te(t.view().formattedDate)}}function x7(e,o){if(e&1&&(y(0,"span",3),pe(1,"i",6),y(2,"span",7),g(3),M()()),e&2){let t=B();ce("title","Bound to "+t.view().scenario.mapFileNames.join(", ")),h(3),Te(t.view().scenario.mapFileNames.join(", "))}}function w7(e,o){if(e&1&&pe(0,"i",8),e&2){let t=o.$implicit,i=B();Dt(Dn("fa ",i.groupIcons[t])),ce("title",i.groupLabels[t])}}var Sv=(()=>{class e{constructor(){this.view=Z.required(),this.groupLabels=ya,this.groupIcons=hc}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-item-badges"]],hostAttrs:[1,"block","overflow-hidden"],inputs:{view:[1,"view"]},decls:7,vars:2,consts:[[1,"flex","items-center","gap-3","mt-1","min-w-0"],[1,"badge","badge-xs","badge-info"],[1,"text-[11px]","text-base-content/40"],[1,"badge","badge-xs","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"flex","gap-1.5","text-[11px]","text-base-content/40"],[3,"class","title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[3,"title"]],template:function(i,n){i&1&&(y(0,"div",0),K(1,b7,2,0,"span",1)(2,v7,2,1,"span",2),K(3,x7,4,2,"span",3),y(4,"span",4),Pe(5,w7,1,4,"i",5,ii),M()()),i&2&&(h(),Q(n.view().scenario.isBuiltIn?1:2),h(2),Q(n.view().mapBound?3:-1),h(2),Be(n.view().groupKeys))},encapsulation:2})}}return e})();function S7(e,o){e&1&&(x(0,"span",3),V(1,"i",7),v())}function y7(e,o){if(e&1&&(x(0,"div",4),g(1),v()),e&2){let t=B();h(),Te(t.view().scenario.description)}}var yv=(()=>{class e{constructor(){this.view=Z.required(),this.applyRequested=_e(),this.exportRequested=_e(),this.deleteRequested=_e()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-item"]],inputs:{view:[1,"view"]},outputs:{applyRequested:"applyRequested",exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:8,vars:8,consts:[["type","button",1,"flex","items-center","w-full","px-4","py-2","border-t","border-base-300","hover:bg-base-200","cursor-pointer","bg-transparent","text-left",3,"click"],[1,"flex-1","min-w-0"],[1,"font-medium","text-sm","truncate",3,"title"],["title","Some metrics in this scenario are not available",1,"text-warning","ml-1"],[1,"text-xs","text-base-content/50","truncate"],[3,"view"],[3,"exportRequested","deleteRequested","isBuiltIn"],[1,"fa","fa-exclamation-triangle","text-xs"]],template:function(i,n){i&1&&(x(0,"button",0),z("click",function(){return n.applyRequested.emit()}),x(1,"div",1)(2,"div",2),g(3),K(4,S7,2,0,"span",3),v(),K(5,y7,2,1,"div",4),V(6,"cc-scenario-item-badges",5),v(),x(7,"cc-scenario-item-actions",6),z("exportRequested",function(){return n.exportRequested.emit()})("deleteRequested",function(){return n.deleteRequested.emit()}),v()()),i&2&&(h(),We("opacity-40",n.view().mapMismatch),h(),F("title",n.view().scenario.name),h(),ge(" ",n.view().scenario.name," "),h(),Q(n.view().warning?4:-1),h(),Q(n.view().scenario.description?5:-1),h(),F("view",n.view()),h(),F("isBuiltIn",!!n.view().scenario.isBuiltIn))},dependencies:[Sv,wv],encapsulation:2})}}return e})();var Fr=class{static downloadData(o,t){let i=new Blob([o],{type:"text/json"}),n=document.createElement("a");n.download=t,n.href=window.URL.createObjectURL(i),n.dataset.downloadurl=["text/json",n.download,n.href].join(":"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,view:window}))}};var Cv=(()=>{class e{constructor(t,i){this.scenariosService=t,this.db=i}exportScenario(t){let i=nv(t),n=t.name.replaceAll(/[^\w-]/g,"_");Fr.downloadData(JSON.stringify(i,null,2),n+mc)}async importScenarioFiles(t){let i=this.scenariosService.scenarios$.getValue(),n={imported:0,duplicates:[],invalid:[],parseErrors:[]};for(let r of t){let a;try{let l=await r.text();a=fv(JSON.parse(l))}catch{n.parseErrors.push(r.name);continue}if(!a){n.invalid.push(r.name);continue}if(this.isDuplicate(a,i)){n.duplicates.push(a.name);continue}let s=rv(a);i.push(s),await this.db.add(s),n.imported++}return n.imported>0&&await this.scenariosService.loadScenarios(),n}isDuplicate(t,i){return i.some(n=>n.name===t.name&&rp(n.settings,t.settings))}static{this.\u0275fac=function(i){return new(i||e)(E(ji),E(vc))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Mv=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(er)}static{this.\u0275fac=function(i){return new(i||e)(E(he))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var _7=[{priority:0,label:"Current Map",icon:"fa-map-pin"},{priority:1,label:"Global",icon:"fa-globe"},{priority:2,label:"Built-in",icon:"fa-cube"},{priority:3,label:"Other Maps",icon:"fa-map-o"}],_v=(()=>{class e{constructor(t){this.scenarioApplier=t}groupScenarios(t,i){let n=new Map;for(let r of t){let a=this.getScenarioPriority(r,i),s=n.get(a);s?s.push(r):n.set(a,[r])}return _7.filter(r=>n.has(r.priority)).map(r=>({label:r.label,icon:r.icon,scenarios:n.get(r.priority)??[]}))}toScenarioView(t,i,n){let r=(t.mapFileNames?.length??0)>0,a=r&&!t.mapFileNames.some(l=>i.has(l)),s=this.scenarioApplier.hasMissingMetrics(this.scenarioApplier.getMissingMetrics(t.settings,n));return{scenario:t,warning:s,mapMismatch:a,mapBound:r,groupKeys:ov(t),formattedDate:new Date(t.createdAt).toLocaleDateString()}}getScenarioPriority(t,i){let n=(t.mapFileNames?.length??0)>0;return n&&t.mapFileNames?.some(r=>i.has(r))?0:!n&&!t.isBuiltIn?1:t.isBuiltIn?2:3}static{this.\u0275fac=function(i){return new(i||e)(E(bc))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var k7=["dialog"],q7=["fileInput"],T7=(e,o)=>o.label,R7=(e,o)=>o.scenario.id;function I7(e,o){e&1&&(x(0,"p",13),g(1,"No scenarios found."),v())}function A7(e,o){if(e&1){let t=we();x(0,"cc-scenario-item",25),z("applyRequested",function(){let n=ae(t).$implicit,r=B(2);return se(r.applyScenario(n.scenario))})("exportRequested",function(){let n=ae(t).$implicit,r=B(2);return se(r.exportScenario(n.scenario))})("deleteRequested",function(){let n=ae(t).$implicit,r=B(2);return se(r.requestDelete(n.scenario))}),v()}if(e&2){let t=o.$implicit;F("view",t)}}function D7(e,o){if(e&1&&(x(0,"div",19),V(1,"input",20),x(2,"div",21),V(3,"i"),g(4),x(5,"span",22),g(6),v()(),x(7,"div",23),Pe(8,A7,1,1,"cc-scenario-item",24,R7),v()()),e&2){let t=o.$implicit,i=o.$index;We("mt-1",i!==0),h(),F("checked",i===0),ot("aria-label",t.label),h(2),Dt(Dn("fa ",t.icon," mr-2")),h(),ge(" ",t.label," "),h(2),Te(t.scenarios.length),h(2),Be(t.scenarios)}}var am=(()=>{class e{constructor(t,i,n,r,a){this.scenariosService=t,this.importExportService=i,this.scenarioDialogStore=n,this.fileStoreReadWindow=r,this.helpers=a,this.dialogElement=Je.required("dialog"),this.deleteConfirmDialogRef=Je.required(wc),this.importFeedbackDialogRef=Je.required(Sc),this.fileInput=Je.required("fileInput"),this.applyRequested=_e(),this.deleteTarget=Se(null),this.acceptExtensions=`${mc},.json`,this.scenarios=D(this.scenariosService.scenarios$,{initialValue:[]}),this.metricData=D(this.scenarioDialogStore.metricData$,{requireSync:!0}),this.searchTerm=Se(""),this.visibleFileNames=D(this.fileStoreReadWindow.files$.pipe(qe(s=>new Set(Pn(s).map(l=>l.fileMeta.fileName)))),{initialValue:new Set}),this.filteredScenarios=Y(()=>{let s=this.searchTerm().toLowerCase(),l=this.scenarios(),d=this.visibleFileNames();return(s?l.filter(m=>m.name.toLowerCase().includes(s)||m.description?.toLowerCase().includes(s)):[...l]).sort((m,u)=>this.helpers.getScenarioPriority(m,d)-this.helpers.getScenarioPriority(u,d))}),this.groupedScenarios=Y(()=>{let s=this.visibleFileNames(),l=this.metricData();return this.helpers.groupScenarios(this.filteredScenarios(),s).map(c=>et(ke({},c),{scenarios:c.scenarios.map(m=>this.helpers.toScenarioView(m,s,l))}))})}async open(){await this.scenariosService.loadScenarios(),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}applyScenario(t){this.close(),this.applyRequested.emit({scenario:t,metricData:this.metricData()})}exportScenario(t){this.importExportService.exportScenario(t)}openImportDialog(){this.fileInput().nativeElement.click()}async handleImportFiles(t){let i=t.target;if(!i.files||i.files.length===0)return;let n=await this.importExportService.importScenarioFiles(i.files);i.value="",this.importFeedbackDialogRef().open(n)}requestDelete(t){this.deleteTarget.set(t),this.deleteConfirmDialogRef().open()}cancelDelete(){this.deleteTarget.set(null)}async confirmDelete(){let t=this.deleteTarget();t&&(this.deleteTarget.set(null),await this.scenariosService.removeScenario(t.id))}static{this.\u0275fac=function(i){return new(i||e)(ne(ji),ne(Cv),ne(Mv),ne(Re),ne(_v))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scenario-list-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialogElement,k7,5)(n.deleteConfirmDialogRef,wc,5)(n.importFeedbackDialogRef,Sc,5)(n.fileInput,q7,5),i&2&&at(4)},outputs:{applyRequested:"applyRequested"},decls:23,vars:4,consts:[["dialog",""],["fileInput",""],["aria-labelledby","scenario-list-title",1,"modal"],[1,"modal-box","max-w-xl"],[1,"flex","items-center","justify-between","mb-4"],["id","scenario-list-title",1,"text-xl","font-bold"],[1,"flex","items-center","gap-1"],["title","Import scenarios",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-upload"],[1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-close"],["type","file","aria-label","Import scenarios","multiple","",1,"hidden",3,"change","accept"],["placeholder","Search scenarios...","aria-label","Search scenarios",1,"input","input-bordered","w-full","mb-4",3,"ngModelChange","ngModel"],[1,"text-center","py-8","text-base-content/50"],[1,"max-h-[60vh]","overflow-y-auto"],[1,"collapse","collapse-arrow","border","border-base-300",3,"mt-1"],["method","dialog",1,"modal-backdrop"],[3,"click"],[3,"confirmed","cancelled","scenarioName"],[1,"collapse","collapse-arrow","border","border-base-300"],["type","radio","name","scenario-accordion",3,"checked"],[1,"collapse-title","font-semibold","text-sm","bg-primary","text-primary-content"],[1,"badge","badge-sm","ml-2"],[1,"collapse-content","px-0"],[3,"view"],[3,"applyRequested","exportRequested","deleteRequested","view"]],template:function(i,n){i&1&&(x(0,"dialog",2,0)(2,"div",3)(3,"div",4)(4,"h2",5),g(5,"Scenarios"),v(),x(6,"div",6)(7,"button",7),z("click",function(){return n.openImportDialog()}),V(8,"i",8),v(),x(9,"button",9),z("click",function(){return n.close()}),V(10,"i",10),v()()(),x(11,"input",11,1),z("change",function(a){return n.handleImportFiles(a)}),v(),x(13,"input",12),z("ngModelChange",function(a){return n.searchTerm.set(a)}),v(),In(),K(14,I7,2,0,"p",13),x(15,"div",14),Pe(16,D7,10,9,"div",15,T7),v()(),x(18,"form",16)(19,"button",17),z("click",function(){return n.close()}),g(20,"close"),v()()(),x(21,"cc-delete-confirm-dialog",18),z("confirmed",function(){return n.confirmDelete()})("cancelled",function(){return n.cancelDelete()}),v(),V(22,"cc-import-feedback-dialog")),i&2&&(h(11),F("accept",n.acceptExtensions),h(2),F("ngModel",n.searchTerm()),An(),h(),Q(n.filteredScenarios().length===0?14:-1),h(2),Be(n.groupedScenarios()),h(5),F("scenarioName",n.deleteTarget()?.name??""))},dependencies:[mr,hr,Os,zs,cr,$s,dr,wc,Sc,yv],encapsulation:2})}}return e})();var F7=["listDialog"],L7=["saveDialog"];function N7(e,o){if(e&1){let t=we();x(0,"cc-apply-scenario-dialog",16),z("closed",function(){ae(t);let n=B();return se(n.handleApplyClosed())}),v()}if(e&2){let t=o;F("scenario",t.scenario)("metricData",t.metricData)}}var Ev=(()=>{class e{constructor(){this.scenariosService=T(ji),this.listDialog=Je.required("listDialog"),this.saveDialog=Je.required("saveDialog"),this.applyTarget=Se(null),this.scenarios=D(this.scenariosService.scenarios$,{initialValue:[]}),this.scenariosCountLabel=Y(()=>{let t=this.scenarios().length;return`${t} ${t===1?"scenario":"scenarios"} available`})}async ngOnInit(){await this.scenariosService.loadScenarios()}openScenarioList(){this.listDialog().open()}openSaveDialog(){this.saveDialog().open()}handleApplyRequested(t){this.applyTarget.set(t)}handleApplyClosed(){this.applyTarget.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-labels-scenarios-segment"]],viewQuery:function(i,n){i&1&&rt(n.listDialog,F7,5)(n.saveDialog,L7,5),i&2&&at(2)},hostAttrs:[1,"group","flex","flex-col","items-stretch","px-3","py-2","transition-colors","relative"],decls:23,vars:2,consts:[["listDialog",""],["saveDialog",""],[1,"flex","flex-col","items-stretch","gap-1.5","px-2","py-1","rounded-md","transition-colors","max-w-[220px]","min-w-[160px]"],["data-testid","metric-segment-labels",1,"flex","flex-col","gap-1"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wide","opacity-70"],["type","button","popovertarget","metric-settings-popover-labels","data-anchor-name","metric-segment-labels","title","Label Settings",1,"btn","btn-ghost","btn-xs","btn-square",2,"anchor-name","--metric-segment-labels"],[1,"fa","fa-cog","text-[10px]"],[1,"border-t","border-base-300","-mx-1"],["data-testid","metric-segment-scenario",1,"flex","flex-col","gap-1"],["type","button","title","Save current state as scenario","data-testid","metric-segment-scenario-save",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-plus","text-[10px]"],["type","button","title","Open saved scenarios",1,"text-sm","font-semibold","leading-tight","text-center","bg-transparent","border-0","p-0","rounded-sm","cursor-pointer","hover:bg-base-200","whitespace-nowrap","overflow-hidden","text-ellipsis",3,"click"],["popoverId","metric-settings-popover-labels","anchorName","metric-segment-labels","widthClass","w-80"],[3,"applyRequested"],[3,"scenario","metricData"],[3,"closed","scenario","metricData"]],template:function(i,n){if(i&1&&(x(0,"div",2)(1,"div",3)(2,"div",4)(3,"span",5),g(4,"Labels"),v(),x(5,"button",6),V(6,"i",7),v()()(),V(7,"div",8),x(8,"div",9)(9,"div",4)(10,"span",5),g(11,"Scenarios"),v(),x(12,"button",10),z("click",function(){return n.openSaveDialog()}),V(13,"i",11),v()(),x(14,"button",12),z("click",function(){return n.openScenarioList()}),g(15),v()()(),x(16,"cc-settings-popover-shell",13),V(17,"cc-label-settings-panel"),v(),x(18,"cc-scenario-list-dialog",14,0),z("applyRequested",function(a){return n.handleApplyRequested(a)}),v(),V(20,"cc-save-scenario-dialog",null,1),K(22,N7,1,2,"cc-apply-scenario-dialog",15)),i&2){let r;h(15),ge(" ",n.scenariosCountLabel()," "),h(7),Q((r=n.applyTarget())?22:-1,r)}},dependencies:[$d,am,rm,im,Ai],encapsulation:2})}}return e})();var kv=(()=>{class e{constructor(){this.preferencesReadWindow=T(sr),this.metricsBarWriteStore=T(Qe),this.isLinked=D(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.iconClass=Y(()=>this.isLinked()?"fa fa-link":"fa fa-unlink"),this.title=Y(()=>this.isLinked()?"Unlink Height and Color Metric":"Link Height and Color Metric"),this.buttonClass=Y(()=>this.isLinked()?"btn btn-circle btn-sm ring-2 ring-primary text-primary bg-primary/10 border-0":"btn btn-circle btn-sm ring-1 ring-base-300 text-base-content/60 border-0 cc-link-button-dashed")}toggle(){this.metricsBarWriteStore.toggleIsHeightAndColorMetricLinked()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-link-color-height-button"]],hostAttrs:[1,"self-center","px-1"],decls:2,vars:8,consts:[["type","button",3,"click","title"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.toggle()}),pe(1,"i"),M()),i&2&&(Dt(n.buttonClass()),ce("title",n.title()),ot("aria-label",n.title())("data-testid","metric-link-button")("aria-pressed",n.isLinked()),h(),Dt(n.iconClass()))},encapsulation:2})}}return e})();function P7(e,o){e&1&&V(0,"cc-link-color-height-button")(1,"cc-color-segment")}function B7(e,o){if(e&1&&V(0,"cc-axis-card",0)(1,"cc-color-settings-popover",1),e&2){let t=B();F("metricName","Settings")("hasCog",!0)("cogPopoverId",t.deltaColorSettingsPopoverId)("cogAnchorName",t.deltaColorSettingsAnchorName)("testId","metric-segment-color-settings")("cogTestId","metric-segment-color-settings-cog"),h(),F("popoverId",t.deltaColorSettingsPopoverId)("anchorName",t.deltaColorSettingsAnchorName)}}function V7(e,o){e&1&&V(0,"cc-edge-segment")}var sm=(()=>{class e{constructor(){this.barBottom=Tf,this.fileStoreReadWindow=T(Re),this.metricsBarReadStore=T(ht),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasEdgeMetric=D(this.metricsBarReadStore.metricData$.pipe(qe(t=>t.edgeMetricData.length>0)),{initialValue:!1}),this.showColorMetricSegment=Y(()=>!this.isDeltaState()),this.deltaColorSettingsPopoverId="metric-settings-popover-color-delta",this.deltaColorSettingsAnchorName="metric-segment-color-settings"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metrics-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&ze("bottom",n.barBottom)},features:[bi([{provide:fr,useValue:mf}]),Zi([Rf,gr])],decls:6,vars:2,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(V(0,"cc-area-segment")(1,"cc-height-segment"),K(2,P7,2,0)(3,B7,2,8),K(4,V7,1,0,"cc-edge-segment"),V(5,"cc-labels-scenarios-segment")),i&2&&(h(2),Q(n.showColorMetricSegment()?2:3),h(2),Q(n.hasEdgeMetric()?4:-1))},dependencies:[f2,_o,X3,cc,Y3,ev,Ev,kv],encapsulation:2})}}return e})();var lm=(()=>{class e extends $0{constructor(){super(...arguments),this.areaMetric=D(T(xe).areaMetric$,{requireSync:!0}),this.pathToNode=T(he).selectSignal(tf)}isEnabledFor(t){let i=this.pathToNode().get(t);return i!==void 0&&ts(i,this.areaMetric())}static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=hu(e)))(n||e)}})()}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var W7=(e,o,t,i)=>{let n=e.length>0?e.filter(d=>xi(d)):o,r=0,a=0,s=0,l=0;for(let d of n)i(d)&&r++,d.isExcluded&&a++,!i(d)&&!d.isExcluded&&(s++,ts(d,t)||l++);return{shown:s,flattened:r,excluded:a,noArea:l}},qv=Ae(af,Bi,yi,Ls,W7);var cm=(()=>{class e{constructor(){this.store=T(he),this.counts$=this.store.select(qv)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Tv=Ae(Xp,e=>e?.map?Ji(e.map).descendants().map(({data:o})=>o).filter(o=>xi(o)):[]);var Ca=Ae(Tv,e=>{let o=new Map;for(let t of O7(e))o.set(t,e.map(i=>i.attributes?.[t]??0).filter(i=>typeof i=="number"&&!Number.isNaN(i)));return o});function O7(e){let o=new Set;for(let t of e)for(let i of Object.keys(t.attributes??{}))i!==zu&&o.add(i);return o}var dm=(()=>{class e{constructor(){this.store=T(he),this.metricValues$=this.store.select(Ca),this.descriptors$=this.store.select(Yn)}addRule(t){Wi(this.store,t.type,ws({rule:et(ke({},t),{id:z7()})}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();function z7(){return`metric-rule-${crypto.randomUUID()}`}var hm=(()=>{class e{constructor(){this.mapStateReadWindow=T(xe),this.sharedViewReadWindow=T(Bt),this.store=T(he),this.idToBuildingService=T(nr),this.areaMetric=D(this.mapStateReadWindow.areaMetric$,{requireSync:!0}),this.buildingIds=D(this.idToBuildingService.buildingIds$,{requireSync:!0}),this.rootUnary=D(this.store.select(of),{requireSync:!0}),this.markedPackages=D(this.sharedViewReadWindow.markedPackages$,{requireSync:!0}),this.isFlattened=D(this.store.select(Ls),{requireSync:!0})}project(t){return j0(t,{areaMetric:this.areaMetric(),buildingIds:this.buildingIds(),rootUnary:this.rootUnary(),isFlattened:this.isFlattened(),hidesExcludedNodes:!0,markedPackages:this.markedPackages()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Nv=sd(Uw());var Rv=e=>/[*?]/.test(e);var $7={gt:">",gte:"\u2265",lt:"<",lte:"\u2264",eq:"="};function Iv(e){if(e.operator==="between"){let o=Math.min(e.value,e.upperValue??e.value),t=Math.max(e.value,e.upperValue??e.value);return`${e.metric} ${o}\u2026${t}`}return`${e.metric} ${$7[e.operator]} ${e.value}`}var j7=(e,o)=>(o.get(e.metric)??[]).filter(t=>$u(e,t)).length,Av=(e,o,t)=>e.filter(i=>i.type===t).map(i=>({id:i.id,label:Iv(i),affectedCount:j7(i,o),kind:"METRIC",metricRule:i})),Dv=Ae(dd,Ca,(e,o)=>Av(e,o,"flatten")),Fv=Ae(dd,Ca,(e,o)=>Av(e,o,"exclude"));var Pv=(e,o,t)=>{if(e.length===0)return[];let i=o.map(a=>ju(a.path)),{rules:n,combinedPositivePrefilter:r}=H7(e);return U7(n,r,i),n.map(({item:a,affectedCount:s})=>({id:`${t}/${a.path}`,label:a.path,item:a,effect:t,affectedCount:s,kind:Rv(a.path)?"RULE":"MANUAL"})).sort((a,s)=>a.label.localeCompare(s.label))};function H7(e){let o=(0,Nv.default)();return{rules:e.map(i=>{let{ignoredNodePaths:n,condition:r}=Hu(i.path);return r&&Uu(o,i.path),{item:i,ignoredNodePaths:n,condition:r,affectedCount:0}}),combinedPositivePrefilter:o}}function U7(e,o,t){let i=e.filter(r=>r.condition),n=e.filter(r=>!r.condition);for(let r of t)i.length>0&&o.ignores(r)&&Lv(i,r,!0),Lv(n,r,!1)}function Lv(e,o,t){for(let i of e)i.ignoredNodePaths.ignores(o)===t&&i.affectedCount++}var Bv=Ae(hs,Bi,Dv,(e,o,t)=>[...t,...Pv(e,o,"flatten")]),Vv=Ae(ds,Bi,Fv,(e,o,t)=>[...t,...Pv(e,o,"exclude")]);var Wv=(e,o)=>{let t=o.trim().split(",");return o.trim().startsWith("!")?(t[0]=t[0].slice(1),t.some(i=>e.some(n=>`!${Sr(i)}`===n.path))):t.some(i=>e.some(n=>Sr(i)===n.path))};var yc=Ae(fo,P0);var Ov=e=>Ae(fo,yc,e,(o,t,i)=>t||Wv(i,o)),zv=Ov(hs),$v=Ov(ds);var mm=(()=>{class e{constructor(){this.store=T(he),this.flattenRules$=this.store.select(Bv),this.excludeRules$=this.store.select(Vv),this.isFlattenPatternDisabled$=this.store.select(zv),this.isExcludePatternDisabled$=this.store.select($v)}removeRule(t){if(t.kind==="METRIC"){Wi(this.store,t.metricRule.type,Ss({id:t.metricRule.id}));return}let i=t.effect==="flatten"?vo({items:[t.item]}):Un({items:[t.item]});Wi(this.store,t.effect,i)}clearRules(t){Wi(this.store,t,ms({ruleEffect:t}))}ruleFromSearchPattern(t){Wi(this.store,t,F1(t))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var jv={patternSelector:fo,setPattern:Pi,isPatternEmptySelector:yc,searchedNodePathsSelector:sf};var um=(()=>{class e{constructor(){this.store=T(he),this.sharedViewReadWindow=T(Bt),this.threeSceneService=T(ft),this.idToBuildingService=T(nr),this.threeRendererService=T(kt),this.codeMapMouseEventService=T(on),this.codeMapTooltipService=T(or),this.selectedBuildingId=D(this.sharedViewReadWindow.selectedBuildingId$,{requireSync:!0}),this.hoveredNodeId=D(this.sharedViewReadWindow.hoveredNodeId$,{requireSync:!0})}isSelected(t){return this.selectedBuildingId()===t.path}isHovered(t){return this.hoveredNodeId()===t.path}select(t){this.store.dispatch(hd({value:t.path}));let i=this.idToBuildingService.get(t.id);this.codeMapMouseEventService.drawLabelSelectedBuilding(i),this.threeSceneService.selectBuilding(i),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}deselect(){this.store.dispatch(hd({value:null})),this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}hover(t,i){this.store.dispatch(Xo({value:t.path})),this.codeMapMouseEventService.hoverNode(t.path),this.codeMapTooltipService.show(t,i.right,i.top)}hoverEnd(){this.store.dispatch(Xo({value:null})),this.codeMapMouseEventService.unhoverNode(),this.codeMapTooltipService.hide()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var Hv={options:Object.values(es),optionSelector:vf,ascendingSelector:xf,setOption:Cf,toggleAscending:()=>Mf()};var Uv=(e,o)=>e!==es.AREA_SIZE?Ae(Et,t=>Sd(yd(t.unifiedMapNode),e,o)):Ae(Et,yi,(t,i)=>Sd(yd(t.unifiedMapNode),e,o,i));var pm=(()=>{class e{constructor(){this.store=T(he)}rootNodeFor(t,i){return this.store.select(Uv(t,i))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac})}}return e})();var G7=2e3,Gv=(()=>{class e{constructor(){this.actions$=T(dt),this.sharedViewReadWindow=T(Bt),this.revealService=T(Qs),this.actions$.pipe(st(ri),Ht(()=>this.sharedViewReadWindow.selectedBuildingId$.pipe(De(Boolean),ut(1),su(ou(G7)))),Lu()).subscribe(t=>this.revealService.revealNode(t,{expand:!1}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=$a({type:e,selectors:[["","ccRevealsSelectedNodeAfterLoad",""]]})}}return e})();var Xv=(()=>{class e{constructor(){this.store=T(he),this.selection=T(Ks),this.revealService=T(Qs),H0("metrics",t=>this.showNode(t))}showNode(t){this.store.select(rf(t)).pipe(ut(1)).subscribe(i=>{i&&(this.selection.select(i),this.revealService.revealNode(t))})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=$a({type:e,selectors:[["","ccShowsHandedOverNode",""]]})}}return e})();var Kv=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-metrics-view"]],features:[bi([hm,{provide:D0,useExisting:hm},um,{provide:Ks,useExisting:um},lm,{provide:F0,useExisting:lm},pm,{provide:A0,useExisting:pm},cm,{provide:I0,useExisting:cm},mm,{provide:T0,useExisting:mm},dm,{provide:q0,useExisting:dm},V0(Hv),B0(jv),{provide:E0,useValue:k0},{provide:O0,useValue:W0},N0("metrics"),Of()]),Zi([Gv,Xv])],decls:10,vars:0,consts:[["view","metrics"],["collapsedContent","",1,"flex-1","min-w-0"]],template:function(i,n){i&1&&(V(0,"cc-loading-file-progress-spinner",0)(1,"cc-code-map"),x(2,"cc-sidebar-explorer"),V(3,"cc-explorer-search-bar",1),v(),V(4,"cc-sidebar-inspector")(5,"cc-node-context-menu")(6,"cc-metrics-bar")(7,"cc-legend-panel")(8,"cc-file-extension-bar")(9,"cc-bottom-bar"))},dependencies:[rh,sm,z0,L0,R0,ih,oh,ah,_0,Vf],encapsulation:2})}}return e})();var Q7=[{path:vd.metrics,component:Kv},{path:vd.domain,loadComponent:()=>import("./chunk-OUNZ5VH4.js").then(e=>e.DomainViewComponent)}],Z7={provide:Cu,useClass:T1},Y7=[Fu(Q7),Z7],fm={providers:[qu(Ru(),Tu()),Pu(R1,{metaReducers:[I1]}),...Y7,{provide:Du,useClass:vl},Bu([...jg,...r1,...Xg,...Gg,...s1,...c1,...q1,...D1,...N1]),{provide:pu,useFactory:e=>()=>e.synchronizeVersion(),deps:[fg],multi:!0}]};var Cc=class{parse(o,t={}){t=Object.assign({binary:!1},t);let i=t.binary,n=[],r=0;o.traverse(function(L){if(L.isMesh){let j=L.geometry,q=j.index,P=j.getAttribute("position");r+=q!==null?q.count/3:P.count/3,n.push({object3d:L,geometry:j})}});let a,s=80;if(i===!0){let L=r*2+r*3*4*4+80+4,j=new ArrayBuffer(L);a=new DataView(j),a.setUint32(s,r,!0),s+=4}else a="",a+=`solid exported
3524
3534
  `;let l=new Ke,d=new Ke,c=new Ke,m=new Ke,u=new Ke,p=new Ke;for(let L=0,j=n.length;L<j;L++){let q=n[L].object3d,P=n[L].geometry,O=P.index,H=P.getAttribute("position");if(O!==null)for(let G=0;G<O.count;G+=3){let J=O.getX(G+0),X=O.getX(G+1),me=O.getX(G+2);f(J,X,me,H,q)}else for(let G=0;G<H.count;G+=3){let J=G+0,X=G+1,me=G+2;f(J,X,me,H,q)}}return i===!1&&(a+=`endsolid exported
3525
3535
  `),a;function f(L,j,q,P,O){l.fromBufferAttribute(P,L),d.fromBufferAttribute(P,j),c.fromBufferAttribute(P,q),O.isSkinnedMesh===!0&&(O.applyBoneTransform(L,l),O.applyBoneTransform(j,d),O.applyBoneTransform(q,c)),l.applyMatrix4(O.matrixWorld),d.applyMatrix4(O.matrixWorld),c.applyMatrix4(O.matrixWorld),S(l,d,c),R(l),R(d),R(c),i===!0?(a.setUint16(s,0,!0),s+=2):(a+=` endloop
3526
3536
  `,a+=` endfacet
3527
3537
  `)}function S(L,j,q){m.subVectors(q,j),u.subVectors(L,j),m.cross(u).normalize(),p.copy(m).normalize(),i===!0?(a.setFloat32(s,p.x,!0),s+=4,a.setFloat32(s,p.y,!0),s+=4,a.setFloat32(s,p.z,!0),s+=4):(a+=" facet normal "+p.x+" "+p.y+" "+p.z+`
3528
3538
  `,a+=` outer loop
3529
3539
  `)}function R(L){i===!0?(a.setFloat32(s,L.x,!0),s+=4,a.setFloat32(s,L.y,!0),s+=4,a.setFloat32(s,L.z,!0),s+=4):a+=" vertex "+L.x+" "+L.y+" "+L.z+`
3530
- `}}};var ya=class{constructor(o){this.isFont=!0,this.type="Font",this.data=o}generateShapes(o,t=100,i="ltr"){let n=[],r=Q7(o,t,this.data,i);for(let a=0,s=r.length;a<s;a++)n.push(...r[a].toShapes());return n}};function Q7(e,o,t,i){let n=Array.from(e),r=o/t.resolution,a=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*r,s=[],l=0,d=0;(i=="rtl"||i=="tb")&&n.reverse();for(let c=0;c<n.length;c++){let m=n[c];if(m===`
3531
- `)l=0,d-=a;else{let u=Z7(m,r,l,d,t);i=="tb"?(l=0,d+=t.ascender*r):l+=u.offsetX,s.push(u.path)}}return s}function Z7(e,o,t,i,n){let r=n.glyphs[e]||n.glyphs["?"];if(!r){console.error('THREE.Font: character "'+e+'" does not exists in font family '+n.familyName+".");return}let a=new qi,s,l,d,c,m,u,p,f;if(r.o){let S=r._cachedOutline||(r._cachedOutline=r.o.split(" "));for(let R=0,L=S.length;R<L;)switch(S[R++]){case"m":s=S[R++]*o+t,l=S[R++]*o+i,a.moveTo(s,l);break;case"l":s=S[R++]*o+t,l=S[R++]*o+i,a.lineTo(s,l);break;case"q":d=S[R++]*o+t,c=S[R++]*o+i,m=S[R++]*o+t,u=S[R++]*o+i,a.quadraticCurveTo(m,u,d,c);break;case"b":d=S[R++]*o+t,c=S[R++]*o+i,m=S[R++]*o+t,u=S[R++]*o+i,p=S[R++]*o+t,f=S[R++]*o+i,a.bezierCurveTo(m,u,p,f,d,c);break}}return{offsetX:r.ha*o,path:a}}var pm={glyphs:{\u03BF:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"\xA6":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},\u03A4:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},\u03A0:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},\u0390:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"\xB2":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"\u2013":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},\u039A:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},\u0192:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},\u03CC:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"\xBB":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"\xA9":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},\u03CE:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"\xAB":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"\u2219":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u00FF:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},\u00B5:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},\u0399:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},\u038E:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2019":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u039D:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},\u03C2:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},\u03A8:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},\u03B9:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},\u0386:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},\u03B5:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},\u0394:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"\u2030":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"\u2014":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},\u03C1:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"\xAF":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},\u0397:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u0391:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"\u2026":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u03BD:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"\xB6":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},\u03B2:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},\u039C:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},\u038C:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u0389:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2022":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"\xA5":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},\u03B3:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},\u03B1:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"\xAD":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03A7:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"\u2020":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"\xB0":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},\u039E:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "},"\xA0":{x_min:0,x_max:0,ha:853},\u03AB:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"\u201D":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},\u038A:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},\u0392:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},\u03C5:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},\u03C7:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},\u03AF:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},\u0396:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"\xA8":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\u2039":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\u201E":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},\u03B4:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},\u03AD:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},\u03C9:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"\xB4":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\xB1":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},\u03CB:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"\xA7":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},\u03A9:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},\u03CD:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"\u2122":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},\u03AE:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},\u0398:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"\xAE":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},\u0395:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"\xB3":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},\u03C3:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},\u03B6:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},\u03B8:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},\u039F:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},\u0393:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},\u0388:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u038F:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},\u03AA:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"\xBD":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},\u03A1:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u00AA:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"\u0385":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},\u03A6:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"\u204B":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},\u03A3:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"\u203A":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\xA3":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"\xAC":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},\u03BB:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},\u03C4:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},\u03BE:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},\u039B:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},\u03B0:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"\xB7":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u03A5:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},\u03BC:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03C6:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"\u201C":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"\u2018":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},\u03CA:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},\u03C0:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},\u03AC:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"\xA4":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},\u03BA:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"\u2021":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},\u03C8:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},\u03B7:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) \u039Cagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"\u039Cagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r
3540
+ `}}};var Ma=class{constructor(o){this.isFont=!0,this.type="Font",this.data=o}generateShapes(o,t=100,i="ltr"){let n=[],r=J7(o,t,this.data,i);for(let a=0,s=r.length;a<s;a++)n.push(...r[a].toShapes());return n}};function J7(e,o,t,i){let n=Array.from(e),r=o/t.resolution,a=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*r,s=[],l=0,d=0;(i=="rtl"||i=="tb")&&n.reverse();for(let c=0;c<n.length;c++){let m=n[c];if(m===`
3541
+ `)l=0,d-=a;else{let u=eC(m,r,l,d,t);i=="tb"?(l=0,d+=t.ascender*r):l+=u.offsetX,s.push(u.path)}}return s}function eC(e,o,t,i,n){let r=n.glyphs[e]||n.glyphs["?"];if(!r){console.error('THREE.Font: character "'+e+'" does not exists in font family '+n.familyName+".");return}let a=new qi,s,l,d,c,m,u,p,f;if(r.o){let S=r._cachedOutline||(r._cachedOutline=r.o.split(" "));for(let R=0,L=S.length;R<L;)switch(S[R++]){case"m":s=S[R++]*o+t,l=S[R++]*o+i,a.moveTo(s,l);break;case"l":s=S[R++]*o+t,l=S[R++]*o+i,a.lineTo(s,l);break;case"q":d=S[R++]*o+t,c=S[R++]*o+i,m=S[R++]*o+t,u=S[R++]*o+i,a.quadraticCurveTo(m,u,d,c);break;case"b":d=S[R++]*o+t,c=S[R++]*o+i,m=S[R++]*o+t,u=S[R++]*o+i,p=S[R++]*o+t,f=S[R++]*o+i,a.bezierCurveTo(m,u,p,f,d,c);break}}return{offsetX:r.ha*o,path:a}}var gm={glyphs:{\u03BF:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"\xA6":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},\u03A4:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},\u03A0:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},\u0390:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"\xB2":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"\u2013":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},\u039A:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},\u0192:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},\u03CC:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"\xBB":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"\xA9":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},\u03CE:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"\xAB":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"\u2219":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u00FF:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},\u00B5:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},\u0399:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},\u038E:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2019":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u039D:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},\u03C2:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},\u03A8:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},\u03B9:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},\u0386:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},\u03B5:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},\u0394:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"\u2030":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"\u2014":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},\u03C1:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"\xAF":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},\u0397:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u0391:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"\u2026":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u03BD:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"\xB6":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},\u03B2:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},\u039C:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},\u038C:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u0389:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2022":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"\xA5":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},\u03B3:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},\u03B1:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"\xAD":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03A7:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"\u2020":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"\xB0":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},\u039E:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "},"\xA0":{x_min:0,x_max:0,ha:853},\u03AB:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"\u201D":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},\u038A:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},\u0392:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},\u03C5:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},\u03C7:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},\u03AF:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},\u0396:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"\xA8":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\u2039":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\u201E":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},\u03B4:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},\u03AD:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},\u03C9:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"\xB4":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\xB1":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},\u03CB:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"\xA7":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},\u03A9:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},\u03CD:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"\u2122":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},\u03AE:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},\u0398:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"\xAE":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},\u0395:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"\xB3":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},\u03C3:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},\u03B6:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},\u03B8:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},\u039F:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},\u0393:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},\u0388:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u038F:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},\u03AA:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"\xBD":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},\u03A1:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u00AA:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"\u0385":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},\u03A6:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"\u204B":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},\u03A3:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"\u203A":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\xA3":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"\xAC":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},\u03BB:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},\u03C4:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},\u03BE:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},\u039B:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},\u03B0:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"\xB7":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u03A5:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},\u03BC:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03C6:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"\u201C":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"\u2018":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},\u03CA:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},\u03C0:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},\u03AC:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"\xA4":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},\u03BA:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"\u2021":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},\u03C8:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},\u03B7:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) \u039Cagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"\u039Cagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r
3532
3542
  \r
3533
3543
  Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r
3534
3544
  \r
@@ -3540,49 +3550,49 @@ This License becomes null and void to the extent applicable to Fonts or Font Sof
3540
3550
  \r
3541
3551
  The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r
3542
3552
  \r
3543
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"\u039Cagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50};var tt=class{execute(o,t){if(o<=1)return!1;let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var xt=class e extends lt{constructor(o,t){super(),this.colorChangeStrategy=t,this.name=o,this.boundingBoxCalculated=!1,this.material=new Dp}updateColor(o){this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof e&&t.updateColor(o)}getWidth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.x-this.geometry.boundingBox.min.x}getHeight(){return this.updateBoundingBox(),this.geometry.boundingBox.max.z-this.geometry.boundingBox.min.z}getDepth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.y-this.geometry.boundingBox.min.y}isGeneralSizeChangeMesh(){return"changeSize"in this}updateBoundingBox(){this.boundingBoxCalculated||(this.geometry.computeBoundingBox(),this.boundingBoxCalculated=!0)}};var It=class extends xt{constructor(o,t,i=1,n=!0){super(o,t),this.minWidth=i,this.manualVisibility=n}setManualVisibility(o){this.manualVisibility=o,this.updateVisibility()}setCurrentWidth(o){this.currentWidth=o,this.updateVisibility()}updateVisibility(){let o=this.currentWidth?this.currentWidth>=this.minWidth:!0;this.visible=this.manualVisibility&&this.visibleBecauseOfColor&&o}updateColor(o){this.visibleBecauseOfColor=this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof xt&&t.updateColor(o);this.updateVisibility()}};var Ca=class extends Kn{constructor(o,t={}){let i=t.font;if(i===void 0)super();else{let n=i.generateShapes(o,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(n,t)}this.type="TextGeometry"}};function Bo(e,o=!1){let t=e[0].index!==null,i=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),r={},a={},s=e[0].morphTargetsRelative,l=new Xt,d=0;for(let c=0;c<e.length;++c){let m=e[c],u=0;if(t!==(m.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let p in m.attributes){if(!i.has(p))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+p+'" attribute exists among all geometries, or in none of them.'),null;r[p]===void 0&&(r[p]=[]),r[p].push(m.attributes[p]),u++}if(u!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==m.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let p in m.morphAttributes){if(!n.has(p))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;a[p]===void 0&&(a[p]=[]),a[p].push(m.morphAttributes[p])}if(o){let p;if(t)p=m.index.count;else if(m.attributes.position!==void 0)p=m.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(d,p,c),d+=p}}if(t){let c=0,m=[];for(let u=0;u<e.length;++u){let p=e[u].index;for(let f=0;f<p.count;++f)m.push(p.getX(f)+c);c+=e[u].attributes.position.count}l.setIndex(m)}for(let c in r){let m=Gv(r[c]);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,m)}for(let c in a){let m=a[c][0].length;if(m===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let u=0;u<m;++u){let p=[];for(let S=0;S<a[c].length;++S)p.push(a[c][S][u]);let f=Gv(p);if(!f)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(f)}}return l}function Gv(e){let o,t,i,n=-1,r=0;for(let d=0;d<e.length;++d){let c=e[d];if(o===void 0&&(o=c.array.constructor),o!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=c.itemSize),t!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(n===-1&&(n=c.gpuType),n!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=c.count*t}let a=new o(r),s=new So(a,t,i),l=0;for(let d=0;d<e.length;++d){let c=e[d];if(c.isInterleavedBufferAttribute){let m=l/t;for(let u=0,p=c.count;u<p;u++)for(let f=0;f<t;f++){let S=c.getComponent(u,f);s.setComponent(u+m,f,S)}}else a.set(c.array,l);l+=c.count*t}return n!==void 0&&(s.gpuType=n),s}var Ar=class{async create(o,t){let{font:i,side:n,text:r,xPosition:a,yPosition:s,align:l}=t;if(!r)return new Xt;let{textSize:d}=t;d||(d=.025);let c=l==="center"&&r.includes(`
3544
- `)?this.createMultilineCenteredTextGeometry(r,i,d,o.printHeight):new Ca(r,{font:i,size:d,depth:o.printHeight});c.center(),n==="back"&&c.rotateY(Math.PI),c.computeBoundingBox();let m=c.boundingBox.max.x-c.boundingBox.min.x,u=l==="center"?0:m/2,p=n==="front"?1:-1;return c.translate(p*(u+a),s,n==="front"?o.printHeight/2:-o.baseplateHeight+o.printHeight/2),c}createMultilineCenteredTextGeometry(o,t,i,n){let r=o.split(`
3545
- `),a=[];for(let[s,l]of r.entries()){let d=new Ca(l,{font:t,size:i,depth:n});d.center(),d.translate(0,-s*i*1.5,0),a.push(d)}return Bo(a)}};var Yt=class extends It{constructor(o,t,i,n,r,a=new Ar){super(o,t,i,n),this.createTextGeometryOptions=r,this.createTextGeometryStrategy=a}async init(o){return this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.updateColor(o.numberOfColors),this}async updateText(o){this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.boundingBoxCalculated=!1}updateTextGeometryOptions(o){this.createTextGeometryOptions.text=o}};var Cc=class extends Yt{constructor(o,t){let i={font:t,text:`IT Stabilization & Modernization
3546
- maibornwolff.de/service/it-sanierung`,side:"back",xPosition:0,yPosition:.23,align:"center"};super(o,new tt,200,!0,i)}};var J7=Ip,Mc=class e extends dd{constructor(o){super(o),this.defaultDPI=90,this.defaultUnit="px"}load(o,t,i,n){let r=this,a=new hd(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(o,function(s){try{t(r.parse(s))}catch(l){n?n(l):console.error(l),r.manager.itemError(o)}},i,n)}parse(o){let t=this;function i(N,_){if(N.nodeType!==1)return;let w=P(N),b=!1,ee=null;switch(N.nodeName){case"svg":_=f(N,_);break;case"style":r(N);break;case"g":_=f(N,_);break;case"path":_=f(N,_),N.hasAttribute("d")&&(ee=n(N));break;case"rect":_=f(N,_),ee=l(N);break;case"polygon":_=f(N,_),ee=d(N);break;case"polyline":_=f(N,_),ee=c(N);break;case"circle":_=f(N,_),ee=m(N);break;case"ellipse":_=f(N,_),ee=u(N);break;case"line":_=f(N,_),ee=p(N);break;case"defs":b=!0;break;case"use":_=f(N,_);let le=(N.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),ue=N.viewportElement.getElementById(le);ue?i(ue,_):console.warn("SVGLoader: 'use node' references non-existent node id: "+le);break;default:}ee&&(_.fill!==void 0&&_.fill!=="none"&&ee.color.setStyle(_.fill,J7),H(ee,ct),$.push(ee),ee.userData={node:N,style:_});let de=N.childNodes;for(let U=0;U<de.length;U++){let le=de[U];b&&le.nodeName!=="style"&&le.nodeName!=="defs"||i(le,_)}w&&(be.pop(),be.length>0?ct.copy(be[be.length-1]):ct.identity())}function n(N){let _=new qi,w=new Ue,b=new Ue,ee=new Ue,de=!0,U=!1,le=N.getAttribute("d");if(le===""||le==="none")return null;let ue=le.match(/[a-df-z][^a-df-z]*/ig);for(let fe=0,te=ue.length;fe<te;fe++){let re=ue[fe],ye=re.charAt(0),Ce=re.slice(1).trim();de===!0&&(U=!0,de=!1);let D;switch(ye){case"M":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=2)w.x=D[C+0],w.y=D[C+1],b.x=w.x,b.y=w.y,C===0?_.moveTo(w.x,w.y):_.lineTo(w.x,w.y),C===0&&ee.copy(w);break;case"H":D=R(Ce);for(let C=0,Me=D.length;C<Me;C++)w.x=D[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"V":D=R(Ce);for(let C=0,Me=D.length;C<Me;C++)w.y=D[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"L":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=2)w.x=D[C+0],w.y=D[C+1],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"C":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=6)_.bezierCurveTo(D[C+0],D[C+1],D[C+2],D[C+3],D[C+4],D[C+5]),b.x=D[C+2],b.y=D[C+3],w.x=D[C+4],w.y=D[C+5],C===0&&U===!0&&ee.copy(w);break;case"S":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=4)_.bezierCurveTo(S(w.x,b.x),S(w.y,b.y),D[C+0],D[C+1],D[C+2],D[C+3]),b.x=D[C+0],b.y=D[C+1],w.x=D[C+2],w.y=D[C+3],C===0&&U===!0&&ee.copy(w);break;case"Q":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=4)_.quadraticCurveTo(D[C+0],D[C+1],D[C+2],D[C+3]),b.x=D[C+0],b.y=D[C+1],w.x=D[C+2],w.y=D[C+3],C===0&&U===!0&&ee.copy(w);break;case"T":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=2){let je=S(w.x,b.x),$t=S(w.y,b.y);_.quadraticCurveTo(je,$t,D[C+0],D[C+1]),b.x=je,b.y=$t,w.x=D[C+0],w.y=D[C+1],C===0&&U===!0&&ee.copy(w)}break;case"A":D=R(Ce,[3,4],7);for(let C=0,Me=D.length;C<Me;C+=7){if(D[C+5]==w.x&&D[C+6]==w.y)continue;let je=w.clone();w.x=D[C+5],w.y=D[C+6],b.x=w.x,b.y=w.y,a(_,D[C],D[C+1],D[C+2],D[C+3],D[C+4],je,w),C===0&&U===!0&&ee.copy(w)}break;case"m":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=2)w.x+=D[C+0],w.y+=D[C+1],b.x=w.x,b.y=w.y,C===0?_.moveTo(w.x,w.y):_.lineTo(w.x,w.y),C===0&&ee.copy(w);break;case"h":D=R(Ce);for(let C=0,Me=D.length;C<Me;C++)w.x+=D[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"v":D=R(Ce);for(let C=0,Me=D.length;C<Me;C++)w.y+=D[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"l":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=2)w.x+=D[C+0],w.y+=D[C+1],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"c":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=6)_.bezierCurveTo(w.x+D[C+0],w.y+D[C+1],w.x+D[C+2],w.y+D[C+3],w.x+D[C+4],w.y+D[C+5]),b.x=w.x+D[C+2],b.y=w.y+D[C+3],w.x+=D[C+4],w.y+=D[C+5],C===0&&U===!0&&ee.copy(w);break;case"s":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=4)_.bezierCurveTo(S(w.x,b.x),S(w.y,b.y),w.x+D[C+0],w.y+D[C+1],w.x+D[C+2],w.y+D[C+3]),b.x=w.x+D[C+0],b.y=w.y+D[C+1],w.x+=D[C+2],w.y+=D[C+3],C===0&&U===!0&&ee.copy(w);break;case"q":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=4)_.quadraticCurveTo(w.x+D[C+0],w.y+D[C+1],w.x+D[C+2],w.y+D[C+3]),b.x=w.x+D[C+0],b.y=w.y+D[C+1],w.x+=D[C+2],w.y+=D[C+3],C===0&&U===!0&&ee.copy(w);break;case"t":D=R(Ce);for(let C=0,Me=D.length;C<Me;C+=2){let je=S(w.x,b.x),$t=S(w.y,b.y);_.quadraticCurveTo(je,$t,w.x+D[C+0],w.y+D[C+1]),b.x=je,b.y=$t,w.x=w.x+D[C+0],w.y=w.y+D[C+1],C===0&&U===!0&&ee.copy(w)}break;case"a":D=R(Ce,[3,4],7);for(let C=0,Me=D.length;C<Me;C+=7){if(D[C+5]==0&&D[C+6]==0)continue;let je=w.clone();w.x+=D[C+5],w.y+=D[C+6],b.x=w.x,b.y=w.y,a(_,D[C],D[C+1],D[C+2],D[C+3],D[C+4],je,w),C===0&&U===!0&&ee.copy(w)}break;case"Z":case"z":_.currentPath.autoClose=!0,_.currentPath.curves.length>0&&(w.copy(ee),_.currentPath.currentPoint.copy(w),de=!0);break;default:console.warn(re)}U=!1}return _}function r(N){if(!(!N.sheet||!N.sheet.cssRules||!N.sheet.cssRules.length))for(let _=0;_<N.sheet.cssRules.length;_++){let w=N.sheet.cssRules[_];if(w.type!==1)continue;let b=w.selectorText.split(/,/gm).filter(Boolean).map(ee=>ee.trim());for(let ee=0;ee<b.length;ee++){let de=Object.fromEntries(Object.entries(w.style).filter(([,U])=>U!==""));Ee[b[ee]]=Object.assign(Ee[b[ee]]||{},de)}}}function a(N,_,w,b,ee,de,U,le){if(_==0||w==0){N.lineTo(le.x,le.y);return}b=b*Math.PI/180,_=Math.abs(_),w=Math.abs(w);let ue=(U.x-le.x)/2,fe=(U.y-le.y)/2,te=Math.cos(b)*ue+Math.sin(b)*fe,re=-Math.sin(b)*ue+Math.cos(b)*fe,ye=_*_,Ce=w*w,D=te*te,C=re*re,Me=D/ye+C/Ce;if(Me>1){let Ba=Math.sqrt(Me);_=Ba*_,w=Ba*w,ye=_*_,Ce=w*w}let je=ye*C+Ce*D,$t=(ye*Ce-je)/je,ui=Math.sqrt(Math.max(0,$t));ee===de&&(ui=-ui);let wt=ui*_*re/w,Xi=-ui*w*te/_,Na=Math.cos(b)*wt-Math.sin(b)*Xi+(U.x+le.x)/2,Qm=Math.sin(b)*wt+Math.cos(b)*Xi+(U.y+le.y)/2,Pa=s(1,0,(te-wt)/_,(re-Xi)/w),nd=s((te-wt)/_,(re-Xi)/w,(-te-wt)/_,(-re-Xi)/w)%(Math.PI*2);N.currentPath.absellipse(Na,Qm,_,w,Pa,Pa+nd,de===0,b)}function s(N,_,w,b){let ee=N*w+_*b,de=Math.sqrt(N*N+_*_)*Math.sqrt(w*w+b*b),U=Math.acos(Math.max(-1,Math.min(1,ee/de)));return N*b-_*w<0&&(U=-U),U}function l(N){let _=q(N.getAttribute("x")||0),w=q(N.getAttribute("y")||0),b=q(N.getAttribute("rx")||N.getAttribute("ry")||0),ee=q(N.getAttribute("ry")||N.getAttribute("rx")||0),de=q(N.getAttribute("width")),U=q(N.getAttribute("height")),le=1-.551915024494,ue=new qi;return ue.moveTo(_+b,w),ue.lineTo(_+de-b,w),(b!==0||ee!==0)&&ue.bezierCurveTo(_+de-b*le,w,_+de,w+ee*le,_+de,w+ee),ue.lineTo(_+de,w+U-ee),(b!==0||ee!==0)&&ue.bezierCurveTo(_+de,w+U-ee*le,_+de-b*le,w+U,_+de-b,w+U),ue.lineTo(_+b,w+U),(b!==0||ee!==0)&&ue.bezierCurveTo(_+b*le,w+U,_,w+U-ee*le,_,w+U-ee),ue.lineTo(_,w+ee),(b!==0||ee!==0)&&ue.bezierCurveTo(_,w+ee*le,_+b*le,w,_+b,w),ue}function d(N){function _(de,U,le){let ue=q(U),fe=q(le);ee===0?b.moveTo(ue,fe):b.lineTo(ue,fe),ee++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,b=new qi,ee=0;return N.getAttribute("points").replace(w,_),b.currentPath.autoClose=!0,b}function c(N){function _(de,U,le){let ue=q(U),fe=q(le);ee===0?b.moveTo(ue,fe):b.lineTo(ue,fe),ee++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,b=new qi,ee=0;return N.getAttribute("points").replace(w,_),b.currentPath.autoClose=!1,b}function m(N){let _=q(N.getAttribute("cx")||0),w=q(N.getAttribute("cy")||0),b=q(N.getAttribute("r")||0),ee=new Cs;ee.absarc(_,w,b,0,Math.PI*2);let de=new qi;return de.subPaths.push(ee),de}function u(N){let _=q(N.getAttribute("cx")||0),w=q(N.getAttribute("cy")||0),b=q(N.getAttribute("rx")||0),ee=q(N.getAttribute("ry")||0),de=new Cs;de.absellipse(_,w,b,ee,0,Math.PI*2);let U=new qi;return U.subPaths.push(de),U}function p(N){let _=q(N.getAttribute("x1")||0),w=q(N.getAttribute("y1")||0),b=q(N.getAttribute("x2")||0),ee=q(N.getAttribute("y2")||0),de=new qi;return de.moveTo(_,w),de.lineTo(b,ee),de.currentPath.autoClose=!1,de}function f(N,_){_=Object.assign({},_);let w={};if(N.hasAttribute("class")){let U=N.getAttribute("class").split(/\s/).filter(Boolean).map(le=>le.trim());for(let le=0;le<U.length;le++)w=Object.assign(w,Ee["."+U[le]])}N.hasAttribute("id")&&(w=Object.assign(w,Ee["#"+N.getAttribute("id")]));function b(U,le,ue){ue===void 0&&(ue=function(te){return te.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),te}),N.hasAttribute(U)&&(_[le]=ue(N.getAttribute(U))),w[le]&&(_[le]=ue(w[le])),N.style&&N.style[U]!==""&&(_[le]=ue(N.style[U]))}function ee(U){return Math.max(0,Math.min(1,q(U)))}function de(U){return Math.max(0,q(U))}return b("fill","fill"),b("fill-opacity","fillOpacity",ee),b("fill-rule","fillRule"),b("opacity","opacity",ee),b("stroke","stroke"),b("stroke-opacity","strokeOpacity",ee),b("stroke-width","strokeWidth",de),b("stroke-linejoin","strokeLineJoin"),b("stroke-linecap","strokeLineCap"),b("stroke-miterlimit","strokeMiterLimit",de),b("visibility","visibility"),_}function S(N,_){return N-(_-N)}function R(N,_,w){if(typeof N!="string")throw new TypeError("Invalid input: "+typeof N);let b={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},ee=0,de=1,U=2,le=3,ue=ee,fe=!0,te="",re="",ye=[];function Ce(je,$t,ui){let wt=new SyntaxError('Unexpected character "'+je+'" at index '+$t+".");throw wt.partial=ui,wt}function D(){te!==""&&(re===""?ye.push(Number(te)):ye.push(Number(te)*Math.pow(10,Number(re)))),te="",re=""}let C,Me=N.length;for(let je=0;je<Me;je++){if(C=N[je],Array.isArray(_)&&_.includes(ye.length%w)&&b.FLAGS.test(C)){ue=de,te=C,D();continue}if(ue===ee){if(b.WHITESPACE.test(C))continue;if(b.DIGIT.test(C)||b.SIGN.test(C)){ue=de,te=C;continue}if(b.POINT.test(C)){ue=U,te=C;continue}b.COMMA.test(C)&&(fe&&Ce(C,je,ye),fe=!0)}if(ue===de){if(b.DIGIT.test(C)){te+=C;continue}if(b.POINT.test(C)){te+=C,ue=U;continue}if(b.EXP.test(C)){ue=le;continue}b.SIGN.test(C)&&te.length===1&&b.SIGN.test(te[0])&&Ce(C,je,ye)}if(ue===U){if(b.DIGIT.test(C)){te+=C;continue}if(b.EXP.test(C)){ue=le;continue}b.POINT.test(C)&&te[te.length-1]==="."&&Ce(C,je,ye)}if(ue===le){if(b.DIGIT.test(C)){re+=C;continue}if(b.SIGN.test(C)){if(re===""){re+=C;continue}re.length===1&&b.SIGN.test(re)&&Ce(C,je,ye)}}b.WHITESPACE.test(C)?(D(),ue=ee,fe=!1):b.COMMA.test(C)?(D(),ue=ee,fe=!0):b.SIGN.test(C)?(D(),ue=de,te=C):b.POINT.test(C)?(D(),ue=U,te=C):Ce(C,je,ye)}return D(),ye}let L=["mm","cm","in","pt","pc","px"],j={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function q(N){let _="px";if(typeof N=="string"||N instanceof String)for(let b=0,ee=L.length;b<ee;b++){let de=L[b];if(N.endsWith(de)){_=de,N=N.substring(0,N.length-de.length);break}}let w;return _==="px"&&t.defaultUnit!=="px"?w=j.in[t.defaultUnit]/t.defaultDPI:(w=j[_][t.defaultUnit],w<0&&(w=j[_].in*t.defaultDPI)),w*parseFloat(N)}function P(N){if(!(N.hasAttribute("transform")||N.nodeName==="use"&&(N.hasAttribute("x")||N.hasAttribute("y"))))return null;let _=O(N);return be.length>0&&_.premultiply(be[be.length-1]),ct.copy(_),be.push(_),_}function O(N){let _=new Ko,w=Fe;if(N.nodeName==="use"&&(N.hasAttribute("x")||N.hasAttribute("y"))){let b=q(N.getAttribute("x")||0),ee=q(N.getAttribute("y")||0);_.translate(b,ee)}if(N.hasAttribute("transform")){let b=N.getAttribute("transform").split(")");for(let ee=b.length-1;ee>=0;ee--){let de=b[ee].trim();if(de==="")continue;let U=de.indexOf("("),le=de.length;if(U>0&&U<le){let ue=de.slice(0,U),fe=R(de.slice(U+1));switch(w.identity(),ue){case"translate":if(fe.length>=1){let te=fe[0],re=0;fe.length>=2&&(re=fe[1]),w.translate(te,re)}break;case"rotate":if(fe.length>=1){let te=0,re=0,ye=0;te=fe[0]*Math.PI/180,fe.length>=3&&(re=fe[1],ye=fe[2]),Oe.makeTranslation(-re,-ye),ve.makeRotation(te),oe.multiplyMatrices(ve,Oe),Oe.makeTranslation(re,ye),w.multiplyMatrices(Oe,oe)}break;case"scale":if(fe.length>=1){let te=fe[0],re=te;fe.length>=2&&(re=fe[1]),w.scale(te,re)}break;case"skewX":fe.length===1&&w.set(1,Math.tan(fe[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":fe.length===1&&w.set(1,0,0,Math.tan(fe[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":fe.length===6&&w.set(fe[0],fe[2],fe[4],fe[1],fe[3],fe[5],0,0,1);break}}_.premultiply(w)}}return _}function H(N,_){function w(U){Ve.set(U.x,U.y,1).applyMatrix3(_),U.set(Ve.x,Ve.y)}function b(U){let le=U.xRadius,ue=U.yRadius,fe=Math.cos(U.aRotation),te=Math.sin(U.aRotation),re=new Ke(le*fe,le*te,0),ye=new Ke(-ue*te,ue*fe,0),Ce=re.applyMatrix3(_),D=ye.applyMatrix3(_),C=Fe.set(Ce.x,D.x,0,Ce.y,D.y,0,0,0,1),Me=Oe.copy(C).invert(),ui=ve.copy(Me).transpose().multiply(Me).elements,wt=Ie(ui[0],ui[1],ui[4]),Xi=Math.sqrt(wt.rt1),Na=Math.sqrt(wt.rt2);if(U.xRadius=1/Xi,U.yRadius=1/Na,U.aRotation=Math.atan2(wt.sn,wt.cs),!((U.aEndAngle-U.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let Pa=Oe.set(Xi,0,0,0,Na,0,0,0,1),nd=ve.set(wt.cs,wt.sn,0,-wt.sn,wt.cs,0,0,0,1),Ba=Pa.multiply(nd).multiply(C),Zm=Ym=>{let{x:Ow,y:zw}=new Ke(Math.cos(Ym),Math.sin(Ym),0).applyMatrix3(Ba);return Math.atan2(zw,Ow)};U.aStartAngle=Zm(U.aStartAngle),U.aEndAngle=Zm(U.aEndAngle),G(_)&&(U.aClockwise=!U.aClockwise)}}function ee(U){let le=X(_),ue=me(_);U.xRadius*=le,U.yRadius*=ue;let fe=le>Number.EPSILON?Math.atan2(_.elements[1],_.elements[0]):Math.atan2(-_.elements[3],_.elements[4]);U.aRotation+=fe,G(_)&&(U.aStartAngle*=-1,U.aEndAngle*=-1,U.aClockwise=!U.aClockwise)}let de=N.subPaths;for(let U=0,le=de.length;U<le;U++){let fe=de[U].curves;for(let te=0;te<fe.length;te++){let re=fe[te];re.isLineCurve?(w(re.v1),w(re.v2)):re.isCubicBezierCurve?(w(re.v0),w(re.v1),w(re.v2),w(re.v3)):re.isQuadraticBezierCurve?(w(re.v0),w(re.v1),w(re.v2)):re.isEllipseCurve&&(He.set(re.aX,re.aY),w(He),re.aX=He.x,re.aY=He.y,J(_)?b(re):ee(re))}}}function G(N){let _=N.elements;return _[0]*_[4]-_[1]*_[3]<0}function J(N){let _=N.elements,w=_[0]*_[3]+_[1]*_[4];if(w===0)return!1;let b=X(N),ee=me(N);return Math.abs(w/(b*ee))>Number.EPSILON}function X(N){let _=N.elements;return Math.sqrt(_[0]*_[0]+_[1]*_[1])}function me(N){let _=N.elements;return Math.sqrt(_[3]*_[3]+_[4]*_[4])}function Ie(N,_,w){let b,ee,de,U,le,ue=N+w,fe=N-w,te=Math.sqrt(fe*fe+4*_*_);return ue>0?(b=.5*(ue+te),le=1/b,ee=N*le*w-_*le*_):ue<0?ee=.5*(ue-te):(b=.5*te,ee=-.5*te),fe>0?de=fe+te:de=fe-te,Math.abs(de)>2*Math.abs(_)?(le=-2*_/de,U=1/Math.sqrt(1+le*le),de=le*U):Math.abs(_)===0?(de=1,U=0):(le=-.5*de/_,de=1/Math.sqrt(1+le*le),U=le*de),fe>0&&(le=de,de=-U,U=le),{rt1:b,rt2:ee,cs:de,sn:U}}let $=[],Ee={},be=[],Fe=new Ko,Oe=new Ko,ve=new Ko,oe=new Ko,He=new Ue,Ve=new Ke,ct=new Ko,Ot=new DOMParser().parseFromString(o,"image/svg+xml");return i(Ot.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:$,xml:Ot.documentElement}}static createShapes(o){let i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:i.ORIGIN,t:0};function r(S,R,L,j){let q=S.x,P=R.x,O=L.x,H=j.x,G=S.y,J=R.y,X=L.y,me=j.y,Ie=(H-O)*(G-X)-(me-X)*(q-O),$=(P-q)*(G-X)-(J-G)*(q-O),Ee=(me-X)*(P-q)-(H-O)*(J-G),be=Ie/Ee,Fe=$/Ee;if(Ee===0&&Ie!==0||be<=0||be>=1||Fe<0||Fe>1)return null;if(Ie===0&&Ee===0){for(let Oe=0;Oe<2;Oe++)if(a(Oe===0?L:j,S,R),n.loc==i.ORIGIN){let ve=Oe===0?L:j;return{x:ve.x,y:ve.y,t:n.t}}else if(n.loc==i.BETWEEN){let ve=+(q+n.t*(P-q)).toPrecision(10),oe=+(G+n.t*(J-G)).toPrecision(10);return{x:ve,y:oe,t:n.t}}return null}else{for(let oe=0;oe<2;oe++)if(a(oe===0?L:j,S,R),n.loc==i.ORIGIN){let He=oe===0?L:j;return{x:He.x,y:He.y,t:n.t}}let Oe=+(q+be*(P-q)).toPrecision(10),ve=+(G+be*(J-G)).toPrecision(10);return{x:Oe,y:ve,t:be}}}function a(S,R,L){let j=L.x-R.x,q=L.y-R.y,P=S.x-R.x,O=S.y-R.y,H=j*O-P*q;if(S.x===R.x&&S.y===R.y){n.loc=i.ORIGIN,n.t=0;return}if(S.x===L.x&&S.y===L.y){n.loc=i.DESTINATION,n.t=1;return}if(H<-Number.EPSILON){n.loc=i.LEFT;return}if(H>Number.EPSILON){n.loc=i.RIGHT;return}if(j*P<0||q*O<0){n.loc=i.BEHIND;return}if(Math.sqrt(j*j+q*q)<Math.sqrt(P*P+O*O)){n.loc=i.BEYOND;return}let G;j!==0?G=P/j:G=O/q,n.loc=i.BETWEEN,n.t=G}function s(S,R){let L=[],j=[];for(let q=1;q<S.length;q++){let P=S[q-1],O=S[q];for(let H=1;H<R.length;H++){let G=R[H-1],J=R[H],X=r(P,O,G,J);X!==null&&L.find(me=>me.t<=X.t+Number.EPSILON&&me.t>=X.t-Number.EPSILON)===void 0&&(L.push(X),j.push(new Ue(X.x,X.y)))}}return j}function l(S,R,L){let j=new Ue;R.getCenter(j);let q=[];return L.forEach(P=>{P.boundingBox.containsPoint(j)&&s(S,P.points).forEach(H=>{q.push({identifier:P.identifier,isCW:P.isCW,point:H})})}),q.sort((P,O)=>P.point.x-O.point.x),q}function d(S,R,L,j,q){(q==null||q==="")&&(q="nonzero");let P=new Ue;S.boundingBox.getCenter(P);let O=[new Ue(L,P.y),new Ue(j,P.y)],H=l(O,S.boundingBox,R);H.sort(($,Ee)=>$.point.x-Ee.point.x);let G=[],J=[];H.forEach($=>{$.identifier===S.identifier?G.push($):J.push($)});let X=G[0].point.x,me=[],Ie=0;for(;Ie<J.length&&J[Ie].point.x<X;)me.length>0&&me[me.length-1]===J[Ie].identifier?me.pop():me.push(J[Ie].identifier),Ie++;if(me.push(S.identifier),q==="evenodd"){let $=me.length%2===0,Ee=me[me.length-2];return{identifier:S.identifier,isHole:$,for:Ee}}else if(q==="nonzero"){let $=!0,Ee=null,be=null;for(let Fe=0;Fe<me.length;Fe++){let Oe=me[Fe];$?(be=R[Oe].isCW,$=!1,Ee=Oe):be!==R[Oe].isCW&&(be=R[Oe].isCW,$=!0)}return{identifier:S.identifier,isHole:$,for:Ee}}else console.warn('fill-rule: "'+q+'" is currently not implemented.')}let c=999999999,m=-999999999,u=o.subPaths.map(S=>{let R=S.getPoints(),L=-999999999,j=999999999,q=-999999999,P=999999999;for(let O=0;O<R.length;O++){let H=R[O];H.y>L&&(L=H.y),H.y<j&&(j=H.y),H.x>q&&(q=H.x),H.x<P&&(P=H.x)}return m<=q&&(m=q+1),c>=P&&(c=P-1),{curves:S.curves,points:R,isCW:Pp.isClockWise(R),identifier:-1,boundingBox:new Vp(new Ue(P,j),new Ue(q,L))}});u=u.filter(S=>S.points.length>1);for(let S=0;S<u.length;S++)u[S].identifier=S;let p=u.map(S=>d(S,u,c,m,o.userData?o.userData.style.fillRule:void 0)),f=[];return u.forEach(S=>{if(!p[S.identifier].isHole){let L=new Ms;L.curves=S.curves,p.filter(q=>q.isHole&&q.for===S.identifier).forEach(q=>{let P=u[q.identifier],O=new Cs;O.curves=P.curves,L.holes.push(O)}),f.push(L)}}),f}static getStrokeStyle(o,t,i,n,r){return o=o!==void 0?o:1,t=t!==void 0?t:"#000",i=i!==void 0?i:"miter",n=n!==void 0?n:"butt",r=r!==void 0?r:4,{strokeColor:t,strokeWidth:o,strokeLineJoin:i,strokeLineCap:n,strokeMiterLimit:r}}static pointsToStroke(o,t,i,n){let r=[],a=[],s=[];if(e.pointsToStrokeWithBuffers(o,t,i,n,r,a,s)===0)return null;let l=new Xt;return l.setAttribute("position",new Qo(r,3)),l.setAttribute("normal",new Qo(a,3)),l.setAttribute("uv",new Qo(s,2)),l}static pointsToStrokeWithBuffers(o,t,i,n,r,a,s,l){let d=new Ue,c=new Ue,m=new Ue,u=new Ue,p=new Ue,f=new Ue,S=new Ue,R=new Ue,L=new Ue,j=new Ue,q=new Ue,P=new Ue,O=new Ue,H=new Ue,G=new Ue,J=new Ue,X=new Ue;i=i!==void 0?i:12,n=n!==void 0?n:.001,l=l!==void 0?l:0,o=fe(o);let me=o.length;if(me<2)return 0;let Ie=o[0].equals(o[me-1]),$,Ee=o[0],be,Fe=t.strokeWidth/2,Oe=1/(me-1),ve=0,oe,He,Ve,ct,Ot=!1,mi=0,N=l*3,_=l*2;w(o[0],o[1],d).multiplyScalar(Fe),R.copy(o[0]).sub(d),L.copy(o[0]).add(d),j.copy(R),q.copy(L);for(let te=1;te<me;te++){$=o[te],te===me-1?Ie?be=o[1]:be=void 0:be=o[te+1];let re=d;if(w(Ee,$,re),m.copy(re).multiplyScalar(Fe),P.copy($).sub(m),O.copy($).add(m),oe=ve+Oe,He=!1,be!==void 0){w($,be,c),m.copy(c).multiplyScalar(Fe),H.copy($).sub(m),G.copy($).add(m),Ve=!0,m.subVectors(be,Ee),re.dot(m)<0&&(Ve=!1),te===1&&(Ot=Ve),m.subVectors(be,$),m.normalize();let ye=Math.abs(re.dot(m));if(ye>Number.EPSILON){let Ce=Fe/ye;m.multiplyScalar(-Ce),u.subVectors($,Ee),p.copy(u).setLength(Ce).add(m),J.copy(p).negate();let D=p.length(),C=u.length();u.divideScalar(C),f.subVectors(be,$);let Me=f.length();switch(f.divideScalar(Me),u.dot(J)<C&&f.dot(J)<Me&&(He=!0),X.copy(p).add($),J.add($),ct=!1,He?Ve?(G.copy(J),O.copy(J)):(H.copy(J),P.copy(J)):de(),t.strokeLineJoin){case"bevel":U(Ve,He,oe);break;case"round":le(Ve,He),Ve?ee($,P,H,oe,0):ee($,G,O,oe,1);break;default:let je=Fe*t.strokeMiterLimit/D;if(je<1)if(t.strokeLineJoin!=="miter-clip"){U(Ve,He,oe);break}else le(Ve,He),Ve?(f.subVectors(X,P).multiplyScalar(je).add(P),S.subVectors(X,H).multiplyScalar(je).add(H),b(P,oe,0),b(f,oe,0),b($,oe,.5),b($,oe,.5),b(f,oe,0),b(S,oe,0),b($,oe,.5),b(S,oe,0),b(H,oe,0)):(f.subVectors(X,O).multiplyScalar(je).add(O),S.subVectors(X,G).multiplyScalar(je).add(G),b(O,oe,1),b(f,oe,1),b($,oe,.5),b($,oe,.5),b(f,oe,1),b(S,oe,1),b($,oe,.5),b(S,oe,1),b(G,oe,1));else He?(Ve?(b(L,ve,1),b(R,ve,0),b(X,oe,0),b(L,ve,1),b(X,oe,0),b(J,oe,1)):(b(L,ve,1),b(R,ve,0),b(X,oe,1),b(R,ve,0),b(J,oe,0),b(X,oe,1)),Ve?H.copy(X):G.copy(X)):Ve?(b(P,oe,0),b(X,oe,0),b($,oe,.5),b($,oe,.5),b(X,oe,0),b(H,oe,0)):(b(O,oe,1),b(X,oe,1),b($,oe,.5),b($,oe,.5),b(X,oe,1),b(G,oe,1)),ct=!0;break}}else de()}else de();!Ie&&te===me-1&&ue(o[0],j,q,Ve,!0,ve),ve=oe,Ee=$,R.copy(H),L.copy(G)}if(!Ie)ue($,P,O,Ve,!1,oe);else if(He&&r){let te=X,re=J;Ot!==Ve&&(te=J,re=X),Ve?(ct||Ot)&&(re.toArray(r,0),re.toArray(r,9),ct&&te.toArray(r,3)):(ct||!Ot)&&(re.toArray(r,3),re.toArray(r,9),ct&&te.toArray(r,0))}return mi;function w(te,re,ye){return ye.subVectors(re,te),ye.set(-ye.y,ye.x).normalize()}function b(te,re,ye){r&&(r[N]=te.x,r[N+1]=te.y,r[N+2]=0,a&&(a[N]=0,a[N+1]=0,a[N+2]=1),N+=3,s&&(s[_]=re,s[_+1]=ye,_+=2)),mi+=3}function ee(te,re,ye,Ce,D){d.copy(re).sub(te).normalize(),c.copy(ye).sub(te).normalize();let C=Math.PI,Me=d.dot(c);Math.abs(Me)<1&&(C=Math.abs(Math.acos(Me))),C/=i,m.copy(re);for(let je=0,$t=i-1;je<$t;je++)u.copy(m).rotateAround(te,C),b(m,Ce,D),b(u,Ce,D),b(te,Ce,.5),m.copy(u);b(u,Ce,D),b(ye,Ce,D),b(te,Ce,.5)}function de(){b(L,ve,1),b(R,ve,0),b(P,oe,0),b(L,ve,1),b(P,oe,0),b(O,oe,1)}function U(te,re,ye){re?te?(b(L,ve,1),b(R,ve,0),b(P,oe,0),b(L,ve,1),b(P,oe,0),b(J,oe,1),b(P,ye,0),b(H,ye,0),b(J,ye,.5)):(b(L,ve,1),b(R,ve,0),b(O,oe,1),b(R,ve,0),b(J,oe,0),b(O,oe,1),b(O,ye,1),b(J,ye,0),b(G,ye,1)):te?(b(P,ye,0),b(H,ye,0),b($,ye,.5)):(b(O,ye,1),b(G,ye,0),b($,ye,.5))}function le(te,re){re&&(te?(b(L,ve,1),b(R,ve,0),b(P,oe,0),b(L,ve,1),b(P,oe,0),b(J,oe,1),b(P,ve,0),b($,oe,.5),b(J,oe,1),b($,oe,.5),b(H,ve,0),b(J,oe,1)):(b(L,ve,1),b(R,ve,0),b(O,oe,1),b(R,ve,0),b(J,oe,0),b(O,oe,1),b(O,ve,1),b(J,oe,0),b($,oe,.5),b($,oe,.5),b(J,oe,0),b(G,ve,1)))}function ue(te,re,ye,Ce,D,C){switch(t.strokeLineCap){case"round":D?ee(te,ye,re,C,.5):ee(te,re,ye,C,.5);break;case"square":if(D)d.subVectors(re,te),c.set(d.y,-d.x),m.addVectors(d,c).add(te),u.subVectors(c,d).add(te),Ce?(m.toArray(r,3),u.toArray(r,0),u.toArray(r,9)):(m.toArray(r,3),s[7]===1?u.toArray(r,9):m.toArray(r,9),u.toArray(r,0));else{d.subVectors(ye,te),c.set(d.y,-d.x),m.addVectors(d,c).add(te),u.subVectors(c,d).add(te);let Me=r.length;Ce?(m.toArray(r,Me-3),u.toArray(r,Me-6),u.toArray(r,Me-12)):(u.toArray(r,Me-6),m.toArray(r,Me-3),u.toArray(r,Me-12))}break;default:break}}function fe(te){let re=!1;for(let Ce=1,D=te.length-1;Ce<D;Ce++)if(te[Ce].distanceTo(te[Ce+1])<n){re=!0;break}if(!re)return te;let ye=[];ye.push(te[0]);for(let Ce=1,D=te.length-1;Ce<D;Ce++)te[Ce].distanceTo(te[Ce+1])>=n&&ye.push(te[Ce]);return ye.push(te[te.length-1]),ye}}};var Jt=class{async create(o,t){let i=t.filePath,n=new Mc;return new Promise((r,a)=>{n.load(i,function(s){let l=s.paths,d=[];for(let f of l){let S=f.toShapes(!0);for(let R of S){let L=new Kn(R,{depth:o.printHeight,bevelEnabled:!1});d.push(L)}}let c=Bo(d);c.computeBoundingBox();let m=c.boundingBox.max.x-c.boundingBox.min.x,u=c.boundingBox.max.y-c.boundingBox.min.y,p=t.size/Math.max(m,u);c.scale(p,p,1),c.center(),t.side==="back"?c.rotateZ(Math.PI):(c.rotateZ(Math.PI),c.rotateY(Math.PI)),r(c)},void 0,function(s){console.error(`Error loading ${i}`),a(s)})})}};var _c=class extends It{constructor(o){super(o,new tt,120,!0),this.name="BackMWLogo"}async init(o){let t=new Jt,i=.31;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo_text.svg",size:i,side:"back"});let n=0,r=.37,a=-o.baseplateHeight+o.printHeight/2;return this.position.set(n,r,a),this.updateColor(o.numberOfColors),this}};var Ec=class extends It{constructor(o,t=new Jt){super(o,new tt,180,!0),this.createSvgStrategy=t}async init(o){this.geometry=await this.createSvgStrategy.create(o,{filePath:"./codeCharta/assets/codecharta_logo.svg",size:.17,side:"back"});let i=0,n=.18-.17/2,r=-o.baseplateHeight+o.printHeight/2;return this.position.set(i,n,r),this.updateColor(o.numberOfColors),this}};var kc=class extends Yt{constructor(o,t){let i={font:t,text:"github.com/MaibornWolff/codecharta",side:"back",xPosition:0,yPosition:0,align:"center"};super(o,new tt,200,!0,i)}};var qc=class{execute(o,t){if(o<4)return!1;let i=[1,0,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var Tc=class{execute(o,t){if(o<4)return!1;let i=[1,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var Rc=class{execute(o,t){if(o<4)return!1;let i=[0,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var Sn=class extends It{constructor(o,t,i){super(o.name,new tt,200,!0),this.metricDescriptionBlockOptions=o,this.font=t,this.yOffset=i,this.createSvgGeometryStrategy=new Jt,this.createTextGeometryStrategy=new Ar}async init(o){let t=await this.createIconGeometry(this.createSvgGeometryStrategy,o),i=await this.createTextGeometry(this.createTextGeometryStrategy,this.getText(),o);return this.geometry=Bo([t,i]),this.position.y=-.15+this.yOffset,this.updateColor(o.numberOfColors),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:0,align:"left"})}async createIconGeometry(o,t){let i=await o.create(t,{filePath:`./codeCharta/assets/${this.metricDescriptionBlockOptions.iconFilename}`,size:this.metricDescriptionBlockOptions.iconScale,side:"back"});return i.translate(0,0,-t.baseplateHeight+t.printHeight/2),i}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3553
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"\u039Cagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50};var tt=class{execute(o,t){if(o<=1)return!1;let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var xt=class e extends lt{constructor(o,t){super(),this.colorChangeStrategy=t,this.name=o,this.boundingBoxCalculated=!1,this.material=new Lp}updateColor(o){this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof e&&t.updateColor(o)}getWidth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.x-this.geometry.boundingBox.min.x}getHeight(){return this.updateBoundingBox(),this.geometry.boundingBox.max.z-this.geometry.boundingBox.min.z}getDepth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.y-this.geometry.boundingBox.min.y}isGeneralSizeChangeMesh(){return"changeSize"in this}updateBoundingBox(){this.boundingBoxCalculated||(this.geometry.computeBoundingBox(),this.boundingBoxCalculated=!0)}};var It=class extends xt{constructor(o,t,i=1,n=!0){super(o,t),this.minWidth=i,this.manualVisibility=n}setManualVisibility(o){this.manualVisibility=o,this.updateVisibility()}setCurrentWidth(o){this.currentWidth=o,this.updateVisibility()}updateVisibility(){let o=this.currentWidth?this.currentWidth>=this.minWidth:!0;this.visible=this.manualVisibility&&this.visibleBecauseOfColor&&o}updateColor(o){this.visibleBecauseOfColor=this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof xt&&t.updateColor(o);this.updateVisibility()}};var _a=class extends Zn{constructor(o,t={}){let i=t.font;if(i===void 0)super();else{let n=i.generateShapes(o,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(n,t)}this.type="TextGeometry"}};function Bo(e,o=!1){let t=e[0].index!==null,i=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),r={},a={},s=e[0].morphTargetsRelative,l=new Xt,d=0;for(let c=0;c<e.length;++c){let m=e[c],u=0;if(t!==(m.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let p in m.attributes){if(!i.has(p))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+p+'" attribute exists among all geometries, or in none of them.'),null;r[p]===void 0&&(r[p]=[]),r[p].push(m.attributes[p]),u++}if(u!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==m.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let p in m.morphAttributes){if(!n.has(p))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;a[p]===void 0&&(a[p]=[]),a[p].push(m.morphAttributes[p])}if(o){let p;if(t)p=m.index.count;else if(m.attributes.position!==void 0)p=m.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(d,p,c),d+=p}}if(t){let c=0,m=[];for(let u=0;u<e.length;++u){let p=e[u].index;for(let f=0;f<p.count;++f)m.push(p.getX(f)+c);c+=e[u].attributes.position.count}l.setIndex(m)}for(let c in r){let m=Qv(r[c]);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,m)}for(let c in a){let m=a[c][0].length;if(m===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let u=0;u<m;++u){let p=[];for(let S=0;S<a[c].length;++S)p.push(a[c][S][u]);let f=Qv(p);if(!f)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(f)}}return l}function Qv(e){let o,t,i,n=-1,r=0;for(let d=0;d<e.length;++d){let c=e[d];if(o===void 0&&(o=c.array.constructor),o!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=c.itemSize),t!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(n===-1&&(n=c.gpuType),n!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=c.count*t}let a=new o(r),s=new So(a,t,i),l=0;for(let d=0;d<e.length;++d){let c=e[d];if(c.isInterleavedBufferAttribute){let m=l/t;for(let u=0,p=c.count;u<p;u++)for(let f=0;f<t;f++){let S=c.getComponent(u,f);s.setComponent(u+m,f,S)}}else a.set(c.array,l);l+=c.count*t}return n!==void 0&&(s.gpuType=n),s}var Lr=class{async create(o,t){let{font:i,side:n,text:r,xPosition:a,yPosition:s,align:l}=t;if(!r)return new Xt;let{textSize:d}=t;d||(d=.025);let c=l==="center"&&r.includes(`
3554
+ `)?this.createMultilineCenteredTextGeometry(r,i,d,o.printHeight):new _a(r,{font:i,size:d,depth:o.printHeight});c.center(),n==="back"&&c.rotateY(Math.PI),c.computeBoundingBox();let m=c.boundingBox.max.x-c.boundingBox.min.x,u=l==="center"?0:m/2,p=n==="front"?1:-1;return c.translate(p*(u+a),s,n==="front"?o.printHeight/2:-o.baseplateHeight+o.printHeight/2),c}createMultilineCenteredTextGeometry(o,t,i,n){let r=o.split(`
3555
+ `),a=[];for(let[s,l]of r.entries()){let d=new _a(l,{font:t,size:i,depth:n});d.center(),d.translate(0,-s*i*1.5,0),a.push(d)}return Bo(a)}};var Yt=class extends It{constructor(o,t,i,n,r,a=new Lr){super(o,t,i,n),this.createTextGeometryOptions=r,this.createTextGeometryStrategy=a}async init(o){return this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.updateColor(o.numberOfColors),this}async updateText(o){this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.boundingBoxCalculated=!1}updateTextGeometryOptions(o){this.createTextGeometryOptions.text=o}};var _c=class extends Yt{constructor(o,t){let i={font:t,text:`IT Stabilization & Modernization
3556
+ maibornwolff.de/service/it-sanierung`,side:"back",xPosition:0,yPosition:.23,align:"center"};super(o,new tt,200,!0,i)}};var iC=Fp,Ec=class e extends md{constructor(o){super(o),this.defaultDPI=90,this.defaultUnit="px"}load(o,t,i,n){let r=this,a=new ud(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(o,function(s){try{t(r.parse(s))}catch(l){n?n(l):console.error(l),r.manager.itemError(o)}},i,n)}parse(o){let t=this;function i(N,_){if(N.nodeType!==1)return;let w=P(N),b=!1,ee=null;switch(N.nodeName){case"svg":_=f(N,_);break;case"style":r(N);break;case"g":_=f(N,_);break;case"path":_=f(N,_),N.hasAttribute("d")&&(ee=n(N));break;case"rect":_=f(N,_),ee=l(N);break;case"polygon":_=f(N,_),ee=d(N);break;case"polyline":_=f(N,_),ee=c(N);break;case"circle":_=f(N,_),ee=m(N);break;case"ellipse":_=f(N,_),ee=u(N);break;case"line":_=f(N,_),ee=p(N);break;case"defs":b=!0;break;case"use":_=f(N,_);let le=(N.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),ue=N.viewportElement.getElementById(le);ue?i(ue,_):console.warn("SVGLoader: 'use node' references non-existent node id: "+le);break;default:}ee&&(_.fill!==void 0&&_.fill!=="none"&&ee.color.setStyle(_.fill,iC),H(ee,ct),$.push(ee),ee.userData={node:N,style:_});let de=N.childNodes;for(let U=0;U<de.length;U++){let le=de[U];b&&le.nodeName!=="style"&&le.nodeName!=="defs"||i(le,_)}w&&(be.pop(),be.length>0?ct.copy(be[be.length-1]):ct.identity())}function n(N){let _=new qi,w=new Ue,b=new Ue,ee=new Ue,de=!0,U=!1,le=N.getAttribute("d");if(le===""||le==="none")return null;let ue=le.match(/[a-df-z][^a-df-z]*/ig);for(let fe=0,te=ue.length;fe<te;fe++){let re=ue[fe],ye=re.charAt(0),Ce=re.slice(1).trim();de===!0&&(U=!0,de=!1);let A;switch(ye){case"M":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=2)w.x=A[C+0],w.y=A[C+1],b.x=w.x,b.y=w.y,C===0?_.moveTo(w.x,w.y):_.lineTo(w.x,w.y),C===0&&ee.copy(w);break;case"H":A=R(Ce);for(let C=0,Me=A.length;C<Me;C++)w.x=A[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"V":A=R(Ce);for(let C=0,Me=A.length;C<Me;C++)w.y=A[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"L":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=2)w.x=A[C+0],w.y=A[C+1],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"C":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=6)_.bezierCurveTo(A[C+0],A[C+1],A[C+2],A[C+3],A[C+4],A[C+5]),b.x=A[C+2],b.y=A[C+3],w.x=A[C+4],w.y=A[C+5],C===0&&U===!0&&ee.copy(w);break;case"S":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=4)_.bezierCurveTo(S(w.x,b.x),S(w.y,b.y),A[C+0],A[C+1],A[C+2],A[C+3]),b.x=A[C+0],b.y=A[C+1],w.x=A[C+2],w.y=A[C+3],C===0&&U===!0&&ee.copy(w);break;case"Q":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=4)_.quadraticCurveTo(A[C+0],A[C+1],A[C+2],A[C+3]),b.x=A[C+0],b.y=A[C+1],w.x=A[C+2],w.y=A[C+3],C===0&&U===!0&&ee.copy(w);break;case"T":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=2){let je=S(w.x,b.x),$t=S(w.y,b.y);_.quadraticCurveTo(je,$t,A[C+0],A[C+1]),b.x=je,b.y=$t,w.x=A[C+0],w.y=A[C+1],C===0&&U===!0&&ee.copy(w)}break;case"A":A=R(Ce,[3,4],7);for(let C=0,Me=A.length;C<Me;C+=7){if(A[C+5]==w.x&&A[C+6]==w.y)continue;let je=w.clone();w.x=A[C+5],w.y=A[C+6],b.x=w.x,b.y=w.y,a(_,A[C],A[C+1],A[C+2],A[C+3],A[C+4],je,w),C===0&&U===!0&&ee.copy(w)}break;case"m":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=2)w.x+=A[C+0],w.y+=A[C+1],b.x=w.x,b.y=w.y,C===0?_.moveTo(w.x,w.y):_.lineTo(w.x,w.y),C===0&&ee.copy(w);break;case"h":A=R(Ce);for(let C=0,Me=A.length;C<Me;C++)w.x+=A[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"v":A=R(Ce);for(let C=0,Me=A.length;C<Me;C++)w.y+=A[C],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"l":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=2)w.x+=A[C+0],w.y+=A[C+1],b.x=w.x,b.y=w.y,_.lineTo(w.x,w.y),C===0&&U===!0&&ee.copy(w);break;case"c":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=6)_.bezierCurveTo(w.x+A[C+0],w.y+A[C+1],w.x+A[C+2],w.y+A[C+3],w.x+A[C+4],w.y+A[C+5]),b.x=w.x+A[C+2],b.y=w.y+A[C+3],w.x+=A[C+4],w.y+=A[C+5],C===0&&U===!0&&ee.copy(w);break;case"s":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=4)_.bezierCurveTo(S(w.x,b.x),S(w.y,b.y),w.x+A[C+0],w.y+A[C+1],w.x+A[C+2],w.y+A[C+3]),b.x=w.x+A[C+0],b.y=w.y+A[C+1],w.x+=A[C+2],w.y+=A[C+3],C===0&&U===!0&&ee.copy(w);break;case"q":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=4)_.quadraticCurveTo(w.x+A[C+0],w.y+A[C+1],w.x+A[C+2],w.y+A[C+3]),b.x=w.x+A[C+0],b.y=w.y+A[C+1],w.x+=A[C+2],w.y+=A[C+3],C===0&&U===!0&&ee.copy(w);break;case"t":A=R(Ce);for(let C=0,Me=A.length;C<Me;C+=2){let je=S(w.x,b.x),$t=S(w.y,b.y);_.quadraticCurveTo(je,$t,w.x+A[C+0],w.y+A[C+1]),b.x=je,b.y=$t,w.x=w.x+A[C+0],w.y=w.y+A[C+1],C===0&&U===!0&&ee.copy(w)}break;case"a":A=R(Ce,[3,4],7);for(let C=0,Me=A.length;C<Me;C+=7){if(A[C+5]==0&&A[C+6]==0)continue;let je=w.clone();w.x+=A[C+5],w.y+=A[C+6],b.x=w.x,b.y=w.y,a(_,A[C],A[C+1],A[C+2],A[C+3],A[C+4],je,w),C===0&&U===!0&&ee.copy(w)}break;case"Z":case"z":_.currentPath.autoClose=!0,_.currentPath.curves.length>0&&(w.copy(ee),_.currentPath.currentPoint.copy(w),de=!0);break;default:console.warn(re)}U=!1}return _}function r(N){if(!(!N.sheet||!N.sheet.cssRules||!N.sheet.cssRules.length))for(let _=0;_<N.sheet.cssRules.length;_++){let w=N.sheet.cssRules[_];if(w.type!==1)continue;let b=w.selectorText.split(/,/gm).filter(Boolean).map(ee=>ee.trim());for(let ee=0;ee<b.length;ee++){let de=Object.fromEntries(Object.entries(w.style).filter(([,U])=>U!==""));Ee[b[ee]]=Object.assign(Ee[b[ee]]||{},de)}}}function a(N,_,w,b,ee,de,U,le){if(_==0||w==0){N.lineTo(le.x,le.y);return}b=b*Math.PI/180,_=Math.abs(_),w=Math.abs(w);let ue=(U.x-le.x)/2,fe=(U.y-le.y)/2,te=Math.cos(b)*ue+Math.sin(b)*fe,re=-Math.sin(b)*ue+Math.cos(b)*fe,ye=_*_,Ce=w*w,A=te*te,C=re*re,Me=A/ye+C/Ce;if(Me>1){let Wa=Math.sqrt(Me);_=Wa*_,w=Wa*w,ye=_*_,Ce=w*w}let je=ye*C+Ce*A,$t=(ye*Ce-je)/je,ui=Math.sqrt(Math.max(0,$t));ee===de&&(ui=-ui);let wt=ui*_*re/w,Xi=-ui*w*te/_,Ba=Math.cos(b)*wt-Math.sin(b)*Xi+(U.x+le.x)/2,Ym=Math.sin(b)*wt+Math.cos(b)*Xi+(U.y+le.y)/2,Va=s(1,0,(te-wt)/_,(re-Xi)/w),ad=s((te-wt)/_,(re-Xi)/w,(-te-wt)/_,(-re-Xi)/w)%(Math.PI*2);N.currentPath.absellipse(Ba,Ym,_,w,Va,Va+ad,de===0,b)}function s(N,_,w,b){let ee=N*w+_*b,de=Math.sqrt(N*N+_*_)*Math.sqrt(w*w+b*b),U=Math.acos(Math.max(-1,Math.min(1,ee/de)));return N*b-_*w<0&&(U=-U),U}function l(N){let _=q(N.getAttribute("x")||0),w=q(N.getAttribute("y")||0),b=q(N.getAttribute("rx")||N.getAttribute("ry")||0),ee=q(N.getAttribute("ry")||N.getAttribute("rx")||0),de=q(N.getAttribute("width")),U=q(N.getAttribute("height")),le=1-.551915024494,ue=new qi;return ue.moveTo(_+b,w),ue.lineTo(_+de-b,w),(b!==0||ee!==0)&&ue.bezierCurveTo(_+de-b*le,w,_+de,w+ee*le,_+de,w+ee),ue.lineTo(_+de,w+U-ee),(b!==0||ee!==0)&&ue.bezierCurveTo(_+de,w+U-ee*le,_+de-b*le,w+U,_+de-b,w+U),ue.lineTo(_+b,w+U),(b!==0||ee!==0)&&ue.bezierCurveTo(_+b*le,w+U,_,w+U-ee*le,_,w+U-ee),ue.lineTo(_,w+ee),(b!==0||ee!==0)&&ue.bezierCurveTo(_,w+ee*le,_+b*le,w,_+b,w),ue}function d(N){function _(de,U,le){let ue=q(U),fe=q(le);ee===0?b.moveTo(ue,fe):b.lineTo(ue,fe),ee++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,b=new qi,ee=0;return N.getAttribute("points").replace(w,_),b.currentPath.autoClose=!0,b}function c(N){function _(de,U,le){let ue=q(U),fe=q(le);ee===0?b.moveTo(ue,fe):b.lineTo(ue,fe),ee++}let w=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,b=new qi,ee=0;return N.getAttribute("points").replace(w,_),b.currentPath.autoClose=!1,b}function m(N){let _=q(N.getAttribute("cx")||0),w=q(N.getAttribute("cy")||0),b=q(N.getAttribute("r")||0),ee=new _s;ee.absarc(_,w,b,0,Math.PI*2);let de=new qi;return de.subPaths.push(ee),de}function u(N){let _=q(N.getAttribute("cx")||0),w=q(N.getAttribute("cy")||0),b=q(N.getAttribute("rx")||0),ee=q(N.getAttribute("ry")||0),de=new _s;de.absellipse(_,w,b,ee,0,Math.PI*2);let U=new qi;return U.subPaths.push(de),U}function p(N){let _=q(N.getAttribute("x1")||0),w=q(N.getAttribute("y1")||0),b=q(N.getAttribute("x2")||0),ee=q(N.getAttribute("y2")||0),de=new qi;return de.moveTo(_,w),de.lineTo(b,ee),de.currentPath.autoClose=!1,de}function f(N,_){_=Object.assign({},_);let w={};if(N.hasAttribute("class")){let U=N.getAttribute("class").split(/\s/).filter(Boolean).map(le=>le.trim());for(let le=0;le<U.length;le++)w=Object.assign(w,Ee["."+U[le]])}N.hasAttribute("id")&&(w=Object.assign(w,Ee["#"+N.getAttribute("id")]));function b(U,le,ue){ue===void 0&&(ue=function(te){return te.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),te}),N.hasAttribute(U)&&(_[le]=ue(N.getAttribute(U))),w[le]&&(_[le]=ue(w[le])),N.style&&N.style[U]!==""&&(_[le]=ue(N.style[U]))}function ee(U){return Math.max(0,Math.min(1,q(U)))}function de(U){return Math.max(0,q(U))}return b("fill","fill"),b("fill-opacity","fillOpacity",ee),b("fill-rule","fillRule"),b("opacity","opacity",ee),b("stroke","stroke"),b("stroke-opacity","strokeOpacity",ee),b("stroke-width","strokeWidth",de),b("stroke-linejoin","strokeLineJoin"),b("stroke-linecap","strokeLineCap"),b("stroke-miterlimit","strokeMiterLimit",de),b("visibility","visibility"),_}function S(N,_){return N-(_-N)}function R(N,_,w){if(typeof N!="string")throw new TypeError("Invalid input: "+typeof N);let b={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},ee=0,de=1,U=2,le=3,ue=ee,fe=!0,te="",re="",ye=[];function Ce(je,$t,ui){let wt=new SyntaxError('Unexpected character "'+je+'" at index '+$t+".");throw wt.partial=ui,wt}function A(){te!==""&&(re===""?ye.push(Number(te)):ye.push(Number(te)*Math.pow(10,Number(re)))),te="",re=""}let C,Me=N.length;for(let je=0;je<Me;je++){if(C=N[je],Array.isArray(_)&&_.includes(ye.length%w)&&b.FLAGS.test(C)){ue=de,te=C,A();continue}if(ue===ee){if(b.WHITESPACE.test(C))continue;if(b.DIGIT.test(C)||b.SIGN.test(C)){ue=de,te=C;continue}if(b.POINT.test(C)){ue=U,te=C;continue}b.COMMA.test(C)&&(fe&&Ce(C,je,ye),fe=!0)}if(ue===de){if(b.DIGIT.test(C)){te+=C;continue}if(b.POINT.test(C)){te+=C,ue=U;continue}if(b.EXP.test(C)){ue=le;continue}b.SIGN.test(C)&&te.length===1&&b.SIGN.test(te[0])&&Ce(C,je,ye)}if(ue===U){if(b.DIGIT.test(C)){te+=C;continue}if(b.EXP.test(C)){ue=le;continue}b.POINT.test(C)&&te[te.length-1]==="."&&Ce(C,je,ye)}if(ue===le){if(b.DIGIT.test(C)){re+=C;continue}if(b.SIGN.test(C)){if(re===""){re+=C;continue}re.length===1&&b.SIGN.test(re)&&Ce(C,je,ye)}}b.WHITESPACE.test(C)?(A(),ue=ee,fe=!1):b.COMMA.test(C)?(A(),ue=ee,fe=!0):b.SIGN.test(C)?(A(),ue=de,te=C):b.POINT.test(C)?(A(),ue=U,te=C):Ce(C,je,ye)}return A(),ye}let L=["mm","cm","in","pt","pc","px"],j={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function q(N){let _="px";if(typeof N=="string"||N instanceof String)for(let b=0,ee=L.length;b<ee;b++){let de=L[b];if(N.endsWith(de)){_=de,N=N.substring(0,N.length-de.length);break}}let w;return _==="px"&&t.defaultUnit!=="px"?w=j.in[t.defaultUnit]/t.defaultDPI:(w=j[_][t.defaultUnit],w<0&&(w=j[_].in*t.defaultDPI)),w*parseFloat(N)}function P(N){if(!(N.hasAttribute("transform")||N.nodeName==="use"&&(N.hasAttribute("x")||N.hasAttribute("y"))))return null;let _=O(N);return be.length>0&&_.premultiply(be[be.length-1]),ct.copy(_),be.push(_),_}function O(N){let _=new Ko,w=Fe;if(N.nodeName==="use"&&(N.hasAttribute("x")||N.hasAttribute("y"))){let b=q(N.getAttribute("x")||0),ee=q(N.getAttribute("y")||0);_.translate(b,ee)}if(N.hasAttribute("transform")){let b=N.getAttribute("transform").split(")");for(let ee=b.length-1;ee>=0;ee--){let de=b[ee].trim();if(de==="")continue;let U=de.indexOf("("),le=de.length;if(U>0&&U<le){let ue=de.slice(0,U),fe=R(de.slice(U+1));switch(w.identity(),ue){case"translate":if(fe.length>=1){let te=fe[0],re=0;fe.length>=2&&(re=fe[1]),w.translate(te,re)}break;case"rotate":if(fe.length>=1){let te=0,re=0,ye=0;te=fe[0]*Math.PI/180,fe.length>=3&&(re=fe[1],ye=fe[2]),Oe.makeTranslation(-re,-ye),ve.makeRotation(te),oe.multiplyMatrices(ve,Oe),Oe.makeTranslation(re,ye),w.multiplyMatrices(Oe,oe)}break;case"scale":if(fe.length>=1){let te=fe[0],re=te;fe.length>=2&&(re=fe[1]),w.scale(te,re)}break;case"skewX":fe.length===1&&w.set(1,Math.tan(fe[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":fe.length===1&&w.set(1,0,0,Math.tan(fe[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":fe.length===6&&w.set(fe[0],fe[2],fe[4],fe[1],fe[3],fe[5],0,0,1);break}}_.premultiply(w)}}return _}function H(N,_){function w(U){Ve.set(U.x,U.y,1).applyMatrix3(_),U.set(Ve.x,Ve.y)}function b(U){let le=U.xRadius,ue=U.yRadius,fe=Math.cos(U.aRotation),te=Math.sin(U.aRotation),re=new Ke(le*fe,le*te,0),ye=new Ke(-ue*te,ue*fe,0),Ce=re.applyMatrix3(_),A=ye.applyMatrix3(_),C=Fe.set(Ce.x,A.x,0,Ce.y,A.y,0,0,0,1),Me=Oe.copy(C).invert(),ui=ve.copy(Me).transpose().multiply(Me).elements,wt=Ie(ui[0],ui[1],ui[4]),Xi=Math.sqrt(wt.rt1),Ba=Math.sqrt(wt.rt2);if(U.xRadius=1/Xi,U.yRadius=1/Ba,U.aRotation=Math.atan2(wt.sn,wt.cs),!((U.aEndAngle-U.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let Va=Oe.set(Xi,0,0,0,Ba,0,0,0,1),ad=ve.set(wt.cs,wt.sn,0,-wt.sn,wt.cs,0,0,0,1),Wa=Va.multiply(ad).multiply(C),Jm=eu=>{let{x:jw,y:Hw}=new Ke(Math.cos(eu),Math.sin(eu),0).applyMatrix3(Wa);return Math.atan2(Hw,jw)};U.aStartAngle=Jm(U.aStartAngle),U.aEndAngle=Jm(U.aEndAngle),G(_)&&(U.aClockwise=!U.aClockwise)}}function ee(U){let le=X(_),ue=me(_);U.xRadius*=le,U.yRadius*=ue;let fe=le>Number.EPSILON?Math.atan2(_.elements[1],_.elements[0]):Math.atan2(-_.elements[3],_.elements[4]);U.aRotation+=fe,G(_)&&(U.aStartAngle*=-1,U.aEndAngle*=-1,U.aClockwise=!U.aClockwise)}let de=N.subPaths;for(let U=0,le=de.length;U<le;U++){let fe=de[U].curves;for(let te=0;te<fe.length;te++){let re=fe[te];re.isLineCurve?(w(re.v1),w(re.v2)):re.isCubicBezierCurve?(w(re.v0),w(re.v1),w(re.v2),w(re.v3)):re.isQuadraticBezierCurve?(w(re.v0),w(re.v1),w(re.v2)):re.isEllipseCurve&&(He.set(re.aX,re.aY),w(He),re.aX=He.x,re.aY=He.y,J(_)?b(re):ee(re))}}}function G(N){let _=N.elements;return _[0]*_[4]-_[1]*_[3]<0}function J(N){let _=N.elements,w=_[0]*_[3]+_[1]*_[4];if(w===0)return!1;let b=X(N),ee=me(N);return Math.abs(w/(b*ee))>Number.EPSILON}function X(N){let _=N.elements;return Math.sqrt(_[0]*_[0]+_[1]*_[1])}function me(N){let _=N.elements;return Math.sqrt(_[3]*_[3]+_[4]*_[4])}function Ie(N,_,w){let b,ee,de,U,le,ue=N+w,fe=N-w,te=Math.sqrt(fe*fe+4*_*_);return ue>0?(b=.5*(ue+te),le=1/b,ee=N*le*w-_*le*_):ue<0?ee=.5*(ue-te):(b=.5*te,ee=-.5*te),fe>0?de=fe+te:de=fe-te,Math.abs(de)>2*Math.abs(_)?(le=-2*_/de,U=1/Math.sqrt(1+le*le),de=le*U):Math.abs(_)===0?(de=1,U=0):(le=-.5*de/_,de=1/Math.sqrt(1+le*le),U=le*de),fe>0&&(le=de,de=-U,U=le),{rt1:b,rt2:ee,cs:de,sn:U}}let $=[],Ee={},be=[],Fe=new Ko,Oe=new Ko,ve=new Ko,oe=new Ko,He=new Ue,Ve=new Ke,ct=new Ko,Ot=new DOMParser().parseFromString(o,"image/svg+xml");return i(Ot.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:$,xml:Ot.documentElement}}static createShapes(o){let i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:i.ORIGIN,t:0};function r(S,R,L,j){let q=S.x,P=R.x,O=L.x,H=j.x,G=S.y,J=R.y,X=L.y,me=j.y,Ie=(H-O)*(G-X)-(me-X)*(q-O),$=(P-q)*(G-X)-(J-G)*(q-O),Ee=(me-X)*(P-q)-(H-O)*(J-G),be=Ie/Ee,Fe=$/Ee;if(Ee===0&&Ie!==0||be<=0||be>=1||Fe<0||Fe>1)return null;if(Ie===0&&Ee===0){for(let Oe=0;Oe<2;Oe++)if(a(Oe===0?L:j,S,R),n.loc==i.ORIGIN){let ve=Oe===0?L:j;return{x:ve.x,y:ve.y,t:n.t}}else if(n.loc==i.BETWEEN){let ve=+(q+n.t*(P-q)).toPrecision(10),oe=+(G+n.t*(J-G)).toPrecision(10);return{x:ve,y:oe,t:n.t}}return null}else{for(let oe=0;oe<2;oe++)if(a(oe===0?L:j,S,R),n.loc==i.ORIGIN){let He=oe===0?L:j;return{x:He.x,y:He.y,t:n.t}}let Oe=+(q+be*(P-q)).toPrecision(10),ve=+(G+be*(J-G)).toPrecision(10);return{x:Oe,y:ve,t:be}}}function a(S,R,L){let j=L.x-R.x,q=L.y-R.y,P=S.x-R.x,O=S.y-R.y,H=j*O-P*q;if(S.x===R.x&&S.y===R.y){n.loc=i.ORIGIN,n.t=0;return}if(S.x===L.x&&S.y===L.y){n.loc=i.DESTINATION,n.t=1;return}if(H<-Number.EPSILON){n.loc=i.LEFT;return}if(H>Number.EPSILON){n.loc=i.RIGHT;return}if(j*P<0||q*O<0){n.loc=i.BEHIND;return}if(Math.sqrt(j*j+q*q)<Math.sqrt(P*P+O*O)){n.loc=i.BEYOND;return}let G;j!==0?G=P/j:G=O/q,n.loc=i.BETWEEN,n.t=G}function s(S,R){let L=[],j=[];for(let q=1;q<S.length;q++){let P=S[q-1],O=S[q];for(let H=1;H<R.length;H++){let G=R[H-1],J=R[H],X=r(P,O,G,J);X!==null&&L.find(me=>me.t<=X.t+Number.EPSILON&&me.t>=X.t-Number.EPSILON)===void 0&&(L.push(X),j.push(new Ue(X.x,X.y)))}}return j}function l(S,R,L){let j=new Ue;R.getCenter(j);let q=[];return L.forEach(P=>{P.boundingBox.containsPoint(j)&&s(S,P.points).forEach(H=>{q.push({identifier:P.identifier,isCW:P.isCW,point:H})})}),q.sort((P,O)=>P.point.x-O.point.x),q}function d(S,R,L,j,q){(q==null||q==="")&&(q="nonzero");let P=new Ue;S.boundingBox.getCenter(P);let O=[new Ue(L,P.y),new Ue(j,P.y)],H=l(O,S.boundingBox,R);H.sort(($,Ee)=>$.point.x-Ee.point.x);let G=[],J=[];H.forEach($=>{$.identifier===S.identifier?G.push($):J.push($)});let X=G[0].point.x,me=[],Ie=0;for(;Ie<J.length&&J[Ie].point.x<X;)me.length>0&&me[me.length-1]===J[Ie].identifier?me.pop():me.push(J[Ie].identifier),Ie++;if(me.push(S.identifier),q==="evenodd"){let $=me.length%2===0,Ee=me[me.length-2];return{identifier:S.identifier,isHole:$,for:Ee}}else if(q==="nonzero"){let $=!0,Ee=null,be=null;for(let Fe=0;Fe<me.length;Fe++){let Oe=me[Fe];$?(be=R[Oe].isCW,$=!1,Ee=Oe):be!==R[Oe].isCW&&(be=R[Oe].isCW,$=!0)}return{identifier:S.identifier,isHole:$,for:Ee}}else console.warn('fill-rule: "'+q+'" is currently not implemented.')}let c=999999999,m=-999999999,u=o.subPaths.map(S=>{let R=S.getPoints(),L=-999999999,j=999999999,q=-999999999,P=999999999;for(let O=0;O<R.length;O++){let H=R[O];H.y>L&&(L=H.y),H.y<j&&(j=H.y),H.x>q&&(q=H.x),H.x<P&&(P=H.x)}return m<=q&&(m=q+1),c>=P&&(c=P-1),{curves:S.curves,points:R,isCW:Wp.isClockWise(R),identifier:-1,boundingBox:new zp(new Ue(P,j),new Ue(q,L))}});u=u.filter(S=>S.points.length>1);for(let S=0;S<u.length;S++)u[S].identifier=S;let p=u.map(S=>d(S,u,c,m,o.userData?o.userData.style.fillRule:void 0)),f=[];return u.forEach(S=>{if(!p[S.identifier].isHole){let L=new Es;L.curves=S.curves,p.filter(q=>q.isHole&&q.for===S.identifier).forEach(q=>{let P=u[q.identifier],O=new _s;O.curves=P.curves,L.holes.push(O)}),f.push(L)}}),f}static getStrokeStyle(o,t,i,n,r){return o=o!==void 0?o:1,t=t!==void 0?t:"#000",i=i!==void 0?i:"miter",n=n!==void 0?n:"butt",r=r!==void 0?r:4,{strokeColor:t,strokeWidth:o,strokeLineJoin:i,strokeLineCap:n,strokeMiterLimit:r}}static pointsToStroke(o,t,i,n){let r=[],a=[],s=[];if(e.pointsToStrokeWithBuffers(o,t,i,n,r,a,s)===0)return null;let l=new Xt;return l.setAttribute("position",new Qo(r,3)),l.setAttribute("normal",new Qo(a,3)),l.setAttribute("uv",new Qo(s,2)),l}static pointsToStrokeWithBuffers(o,t,i,n,r,a,s,l){let d=new Ue,c=new Ue,m=new Ue,u=new Ue,p=new Ue,f=new Ue,S=new Ue,R=new Ue,L=new Ue,j=new Ue,q=new Ue,P=new Ue,O=new Ue,H=new Ue,G=new Ue,J=new Ue,X=new Ue;i=i!==void 0?i:12,n=n!==void 0?n:.001,l=l!==void 0?l:0,o=fe(o);let me=o.length;if(me<2)return 0;let Ie=o[0].equals(o[me-1]),$,Ee=o[0],be,Fe=t.strokeWidth/2,Oe=1/(me-1),ve=0,oe,He,Ve,ct,Ot=!1,mi=0,N=l*3,_=l*2;w(o[0],o[1],d).multiplyScalar(Fe),R.copy(o[0]).sub(d),L.copy(o[0]).add(d),j.copy(R),q.copy(L);for(let te=1;te<me;te++){$=o[te],te===me-1?Ie?be=o[1]:be=void 0:be=o[te+1];let re=d;if(w(Ee,$,re),m.copy(re).multiplyScalar(Fe),P.copy($).sub(m),O.copy($).add(m),oe=ve+Oe,He=!1,be!==void 0){w($,be,c),m.copy(c).multiplyScalar(Fe),H.copy($).sub(m),G.copy($).add(m),Ve=!0,m.subVectors(be,Ee),re.dot(m)<0&&(Ve=!1),te===1&&(Ot=Ve),m.subVectors(be,$),m.normalize();let ye=Math.abs(re.dot(m));if(ye>Number.EPSILON){let Ce=Fe/ye;m.multiplyScalar(-Ce),u.subVectors($,Ee),p.copy(u).setLength(Ce).add(m),J.copy(p).negate();let A=p.length(),C=u.length();u.divideScalar(C),f.subVectors(be,$);let Me=f.length();switch(f.divideScalar(Me),u.dot(J)<C&&f.dot(J)<Me&&(He=!0),X.copy(p).add($),J.add($),ct=!1,He?Ve?(G.copy(J),O.copy(J)):(H.copy(J),P.copy(J)):de(),t.strokeLineJoin){case"bevel":U(Ve,He,oe);break;case"round":le(Ve,He),Ve?ee($,P,H,oe,0):ee($,G,O,oe,1);break;default:let je=Fe*t.strokeMiterLimit/A;if(je<1)if(t.strokeLineJoin!=="miter-clip"){U(Ve,He,oe);break}else le(Ve,He),Ve?(f.subVectors(X,P).multiplyScalar(je).add(P),S.subVectors(X,H).multiplyScalar(je).add(H),b(P,oe,0),b(f,oe,0),b($,oe,.5),b($,oe,.5),b(f,oe,0),b(S,oe,0),b($,oe,.5),b(S,oe,0),b(H,oe,0)):(f.subVectors(X,O).multiplyScalar(je).add(O),S.subVectors(X,G).multiplyScalar(je).add(G),b(O,oe,1),b(f,oe,1),b($,oe,.5),b($,oe,.5),b(f,oe,1),b(S,oe,1),b($,oe,.5),b(S,oe,1),b(G,oe,1));else He?(Ve?(b(L,ve,1),b(R,ve,0),b(X,oe,0),b(L,ve,1),b(X,oe,0),b(J,oe,1)):(b(L,ve,1),b(R,ve,0),b(X,oe,1),b(R,ve,0),b(J,oe,0),b(X,oe,1)),Ve?H.copy(X):G.copy(X)):Ve?(b(P,oe,0),b(X,oe,0),b($,oe,.5),b($,oe,.5),b(X,oe,0),b(H,oe,0)):(b(O,oe,1),b(X,oe,1),b($,oe,.5),b($,oe,.5),b(X,oe,1),b(G,oe,1)),ct=!0;break}}else de()}else de();!Ie&&te===me-1&&ue(o[0],j,q,Ve,!0,ve),ve=oe,Ee=$,R.copy(H),L.copy(G)}if(!Ie)ue($,P,O,Ve,!1,oe);else if(He&&r){let te=X,re=J;Ot!==Ve&&(te=J,re=X),Ve?(ct||Ot)&&(re.toArray(r,0),re.toArray(r,9),ct&&te.toArray(r,3)):(ct||!Ot)&&(re.toArray(r,3),re.toArray(r,9),ct&&te.toArray(r,0))}return mi;function w(te,re,ye){return ye.subVectors(re,te),ye.set(-ye.y,ye.x).normalize()}function b(te,re,ye){r&&(r[N]=te.x,r[N+1]=te.y,r[N+2]=0,a&&(a[N]=0,a[N+1]=0,a[N+2]=1),N+=3,s&&(s[_]=re,s[_+1]=ye,_+=2)),mi+=3}function ee(te,re,ye,Ce,A){d.copy(re).sub(te).normalize(),c.copy(ye).sub(te).normalize();let C=Math.PI,Me=d.dot(c);Math.abs(Me)<1&&(C=Math.abs(Math.acos(Me))),C/=i,m.copy(re);for(let je=0,$t=i-1;je<$t;je++)u.copy(m).rotateAround(te,C),b(m,Ce,A),b(u,Ce,A),b(te,Ce,.5),m.copy(u);b(u,Ce,A),b(ye,Ce,A),b(te,Ce,.5)}function de(){b(L,ve,1),b(R,ve,0),b(P,oe,0),b(L,ve,1),b(P,oe,0),b(O,oe,1)}function U(te,re,ye){re?te?(b(L,ve,1),b(R,ve,0),b(P,oe,0),b(L,ve,1),b(P,oe,0),b(J,oe,1),b(P,ye,0),b(H,ye,0),b(J,ye,.5)):(b(L,ve,1),b(R,ve,0),b(O,oe,1),b(R,ve,0),b(J,oe,0),b(O,oe,1),b(O,ye,1),b(J,ye,0),b(G,ye,1)):te?(b(P,ye,0),b(H,ye,0),b($,ye,.5)):(b(O,ye,1),b(G,ye,0),b($,ye,.5))}function le(te,re){re&&(te?(b(L,ve,1),b(R,ve,0),b(P,oe,0),b(L,ve,1),b(P,oe,0),b(J,oe,1),b(P,ve,0),b($,oe,.5),b(J,oe,1),b($,oe,.5),b(H,ve,0),b(J,oe,1)):(b(L,ve,1),b(R,ve,0),b(O,oe,1),b(R,ve,0),b(J,oe,0),b(O,oe,1),b(O,ve,1),b(J,oe,0),b($,oe,.5),b($,oe,.5),b(J,oe,0),b(G,ve,1)))}function ue(te,re,ye,Ce,A,C){switch(t.strokeLineCap){case"round":A?ee(te,ye,re,C,.5):ee(te,re,ye,C,.5);break;case"square":if(A)d.subVectors(re,te),c.set(d.y,-d.x),m.addVectors(d,c).add(te),u.subVectors(c,d).add(te),Ce?(m.toArray(r,3),u.toArray(r,0),u.toArray(r,9)):(m.toArray(r,3),s[7]===1?u.toArray(r,9):m.toArray(r,9),u.toArray(r,0));else{d.subVectors(ye,te),c.set(d.y,-d.x),m.addVectors(d,c).add(te),u.subVectors(c,d).add(te);let Me=r.length;Ce?(m.toArray(r,Me-3),u.toArray(r,Me-6),u.toArray(r,Me-12)):(u.toArray(r,Me-6),m.toArray(r,Me-3),u.toArray(r,Me-12))}break;default:break}}function fe(te){let re=!1;for(let Ce=1,A=te.length-1;Ce<A;Ce++)if(te[Ce].distanceTo(te[Ce+1])<n){re=!0;break}if(!re)return te;let ye=[];ye.push(te[0]);for(let Ce=1,A=te.length-1;Ce<A;Ce++)te[Ce].distanceTo(te[Ce+1])>=n&&ye.push(te[Ce]);return ye.push(te[te.length-1]),ye}}};var Jt=class{async create(o,t){let i=t.filePath,n=new Ec;return new Promise((r,a)=>{n.load(i,function(s){let l=s.paths,d=[];for(let f of l){let S=f.toShapes(!0);for(let R of S){let L=new Zn(R,{depth:o.printHeight,bevelEnabled:!1});d.push(L)}}let c=Bo(d);c.computeBoundingBox();let m=c.boundingBox.max.x-c.boundingBox.min.x,u=c.boundingBox.max.y-c.boundingBox.min.y,p=t.size/Math.max(m,u);c.scale(p,p,1),c.center(),t.side==="back"?c.rotateZ(Math.PI):(c.rotateZ(Math.PI),c.rotateY(Math.PI)),r(c)},void 0,function(s){console.error(`Error loading ${i}`),a(s)})})}};var kc=class extends It{constructor(o){super(o,new tt,120,!0),this.name="BackMWLogo"}async init(o){let t=new Jt,i=.31;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo_text.svg",size:i,side:"back"});let n=0,r=.37,a=-o.baseplateHeight+o.printHeight/2;return this.position.set(n,r,a),this.updateColor(o.numberOfColors),this}};var qc=class extends It{constructor(o,t=new Jt){super(o,new tt,180,!0),this.createSvgStrategy=t}async init(o){this.geometry=await this.createSvgStrategy.create(o,{filePath:"./codeCharta/assets/codecharta_logo.svg",size:.17,side:"back"});let i=0,n=.18-.17/2,r=-o.baseplateHeight+o.printHeight/2;return this.position.set(i,n,r),this.updateColor(o.numberOfColors),this}};var Tc=class extends Yt{constructor(o,t){let i={font:t,text:"github.com/MaibornWolff/codecharta",side:"back",xPosition:0,yPosition:0,align:"center"};super(o,new tt,200,!0,i)}};var Rc=class{execute(o,t){if(o<4)return!1;let i=[1,0,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var Ic=class{execute(o,t){if(o<4)return!1;let i=[1,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var Ac=class{execute(o,t){if(o<4)return!1;let i=[0,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var Sn=class extends It{constructor(o,t,i){super(o.name,new tt,200,!0),this.metricDescriptionBlockOptions=o,this.font=t,this.yOffset=i,this.createSvgGeometryStrategy=new Jt,this.createTextGeometryStrategy=new Lr}async init(o){let t=await this.createIconGeometry(this.createSvgGeometryStrategy,o),i=await this.createTextGeometry(this.createTextGeometryStrategy,this.getText(),o);return this.geometry=Bo([t,i]),this.position.y=-.15+this.yOffset,this.updateColor(o.numberOfColors),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:0,align:"left"})}async createIconGeometry(o,t){let i=await o.create(t,{filePath:`./codeCharta/assets/${this.metricDescriptionBlockOptions.iconFilename}`,size:this.metricDescriptionBlockOptions.iconScale,side:"back"});return i.translate(0,0,-t.baseplateHeight+t.printHeight/2),i}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3547
3557
  ${this.metricDescriptionBlockOptions.title}
3548
- Value range: ${this.metricDescriptionBlockOptions.nodeMetricData.minValue} - ${this.metricDescriptionBlockOptions.nodeMetricData.maxValue}`}};var Ic=class extends Sn{constructor(o,t,i){super(o,t,i)}async init(o){let t=await this.createColoredBackTextChildren(o);for(let i of t)this.add(i);return super.init(o),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:.015,align:"left"})}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3558
+ Value range: ${this.metricDescriptionBlockOptions.nodeMetricData.minValue} - ${this.metricDescriptionBlockOptions.nodeMetricData.maxValue}`}};var Dc=class extends Sn{constructor(o,t,i){super(o,t,i)}async init(o){let t=await this.createColoredBackTextChildren(o);for(let i of t)this.add(i);return super.init(o),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:.015,align:"left"})}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3549
3559
  ${this.metricDescriptionBlockOptions.title}
3550
- `}async createColoredBackTextChildren(o){let t=this.metricDescriptionBlockOptions,i=[],n=["Value ranges:",`${t.nodeMetricData.minValue} - ${t.colorRange.from-1}`,"/",`${t.colorRange.from} - ${t.colorRange.to-1}`,"/",`${t.colorRange.to} - ${t.nodeMetricData.maxValue}`],r=[new tt,new Rc,new tt,new Tc,new tt,new qc],a=.05;for(let s=0;s<n.length;s+=1){let l=`ColorMetricLastLine${s}`,d={font:this.font,text:n[s],side:"back",xPosition:a,yPosition:-.045,align:"left"},c=await new Yt(l,r[s],200,!0,d).init(o);this.updateColor(o.numberOfColors),i.push(c),s!==n.length-1&&(a+=c.getWidth()+.03)}return i}};var Dc=class extends xt{constructor(o,t){super(o,new tt),this.font=t}async init(o){let{areaIcon:t,areaIconScale:i}=this.createAreaAttributes(),{heightIcon:n,heightIconScale:r}=this.createHeightAttributes(),{colorIcon:a,colorIconScale:s}=this.createColorAttributes(),l=await new Sn({name:"HeigthMetricBlock",title:o.heightMetricTitle,iconFilename:n,iconScale:r,nodeMetricData:o.heightMetricData},this.font,.05).init(o);this.add(l);let d=await new Sn({name:"AreaMetricBlock",title:o.areaMetricTitle,iconFilename:t,iconScale:i,nodeMetricData:o.areaMetricData},this.font,-.1).init(o);this.add(d);let c=await new Ic({name:"ColorMetricBlock",title:o.colorMetricTitle,iconFilename:a,iconScale:s,nodeMetricData:o.colorMetricData,colorRange:o.colorRange},this.font,-.25).init(o);return this.add(c),this.centerMetricsMeshInXDirection(),this}centerMetricsMeshInXDirection(){let o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};this.traverse(t=>{if(t instanceof lt&&t.visible){t.geometry.computeBoundingBox();let{min:i,max:n}=t.geometry.boundingBox;o.min=Math.min(o.min,i.x),o.max=Math.max(o.max,n.x)}}),this.position.x=(o.max-o.min)/2}createColorAttributes(){return{colorIcon:"color_icon_for_3D_print.svg",colorIconScale:.075}}createHeightAttributes(){return{heightIcon:"height_icon_for_3D_print.svg",heightIconScale:.09}}createAreaAttributes(){return{areaIcon:"area_icon_for_3D_print.svg",areaIconScale:.075}}};var Xx=rd(Gx());var jc=class extends It{constructor(o){super(o,new tt,0,!1)}async init(o){this.geometry=await this.create(o);let t=.45,i=.45,n=-o.baseplateHeight+o.printHeight/2;return this.position.set(t,i,n),this.updateColor(o.numberOfColors),this}async changeText(o){this.geometry=await this.create(o)}async create(o){if(!o.qrCodeText||o.qrCodeText.length===0)return new Xt;let t=document.createElement("canvas");await Xx.toCanvas(t,o.qrCodeText,{errorCorrectionLevel:"H"});let n=t.getContext("2d").getImageData(0,0,t.width,t.height),r=[],a=.6/n.width;for(let s=0;s<n.height;s+=4)for(let l=0;l<n.width;l+=4){let d=(s*n.width+l)*4;if(n.data[d]!==0){let c=new yo(a,a,o.printHeight);c.translate(-l/4*a,-s/4*a,0),r.push(c)}}return this.updateMinWidth(a),Bo(r)}updateMinWidth(o){this.minWidth=.6/o}};var Hc=class extends xt{constructor(o){let t=new tt;super("BackPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("BackMWLogo",new _c("BackMWLogo")),this.childrenMeshes.set("BackBelowLogoText",new Cc("BackBelowLogoText",this.font)),this.childrenMeshes.set("QrCode",new jc("QrCode")),this.childrenMeshes.set("CodeChartaLogo",new Ec("CodeChartaLogo")),this.childrenMeshes.set("CodeChartaText",new kc("CodeChartaText",this.font)),this.childrenMeshes.set("MetricDescriptionsContainer",new Dc("MetricDescriptionsContainer",this.font)),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.changeSize(o,1),this}changeSize(o,t){let i=o.width/t;this.scale.set(this.scale.x*i,this.scale.y*i,this.scale.z),this.traverse(n=>{n instanceof It&&n.setCurrentWidth(o.width)})}isQRCodeVisible(){return this.childrenMeshes.get("QrCode").visible}async updateQrCodeText(o,t){t.qrCodeText=o,await this.childrenMeshes.get("QrCode").changeText(t)}updateQrCodeVisibility(o){this.childrenMeshes.get("QrCode").setManualVisibility(o)}getChildrenMeshes(){return this.childrenMeshes}};var Uc=class{execute(o,t){let i=t.material;return i.defaultAttributeValues.color=o===1?[1,1,1]:[.5,.5,.5],!0}};var Gc=class{async create(o){let{width:t,secondRowVisible:i,mapSideOffset:n,baseplateHeight:r,frontTextSize:a,secondRowTextSize:s}=o,l=5,d=Math.sqrt(2*Math.pow(n,2))/(Math.sqrt(2)-1)-1;d<l&&(l=d);let c=new Ms,m=i?s*1.5:0,u=t+a+m;c.absarc(t-l,l,l,Math.PI*1.5,Math.PI*2,!1),c.absarc(t-l,u-l,l,0,Math.PI*.5,!1),c.absarc(l,u-l,l,Math.PI*.5,Math.PI,!1),c.absarc(l,l,l,Math.PI,Math.PI*1.5,!1);let p=new Kn(c,{depth:r,bevelEnabled:!1});return p.translate(-t/2,-t/2-a-m,-r),p}};var Xc=class extends xt{constructor(o=new Gc){super("Baseplate",new Uc),this.createBaseplateGeometryStrategy=o}async init(o){this.createBaseplateGeometryStrategy.create(o).then(i=>{this.geometry=i});let t=new Ap;return t.copy(o.defaultMaterial),t.polygonOffset=!0,t.polygonOffsetUnits=1,t.polygonOffsetFactor=.1,this.material=t,this.updateColor(o.numberOfColors),this}changeSize(o){this.boundingBoxCalculated=!1,this.createBaseplateGeometryStrategy.create(o).then(t=>{this.geometry=t})}};var $o=class{execute(o,t){let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var jo=class extends xt{constructor(o,t){super(o,new $o),this.alignment=t}changeRelativeSize(o){let t=this.getWidth();this.boundingBoxCalculated=!1;let i=o.secondRowVisible,n=i?(o.frontTextSize+o.secondRowTextSize)/o.frontTextSize:1;this.scale.x=n,this.scale.y=n;let r=i?-1:1,a=this.alignment==="left"?-1:1;this.translateY(r*o.secondRowTextSize);let s=i?t/this.getWidth():this.getWidth()/t;this.translateX(2*s*a*r)}};var Kc=class extends jo{constructor(o,t){super(o,"left"),this.filePath=t}async init(o){let t=new Jt,i=o.frontTextSize*o.width/200;this.geometry=await t.create(o,{filePath:this.filePath,size:i,side:"front"});let n=-o.width/2+i/2+o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}setColor(o){this.material.color.set(o)}rotate(){this.geometry.rotateZ(Math.PI/2)}flip(){this.geometry.rotateY(Math.PI)}changeSize(o,t){this.position.x-=(o.width-t)/2}};var Qc=class extends jo{constructor(o){super(o,"right")}async init(o,t=new Jt){let i=o.frontTextSize*o.width/250;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo.svg",size:i,side:"front"});let n=o.width/2-i/2-o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}changeSize(o,t){this.position.x+=(o.width-t)/2}};var Zc=class extends Yt{constructor(o,t,i){let n=i.frontText;n||(n="FrontText");let r={font:t,side:"front",text:n,xPosition:0,yPosition:i.frontTextSize/2,textSize:i.frontTextSize,align:"center"};super(o,new $o,0,!0,r),this.name="Front Text"}};var Yc=class extends Yt{constructor(o,t,i){let n={font:t,text:i.secondRowText,side:"front",xPosition:0,yPosition:-i.secondRowTextSize,textSize:i.secondRowTextSize,align:"center"};super(o,new $o,0,!1,n)}};var Jc=class extends xt{constructor(o){let t=new tt;super("FrontPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("FrontText",new Zc("FrontText",this.font,o)),this.childrenMeshes.set("SecondRowText",new Yc("SecondRowText",this.font,o)),this.childrenMeshes.set("FrontMWLogo",new Qc("FrontMWLogo")),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.position.y=-o.width/2-o.mapSideOffset/2,this}async addCustomLogo(o,t){this.childrenMeshes.has("CustomLogo")&&this.removeCustomLogo();let i=await new Kc("CustomLogo",o).init(t);this.add(i),this.childrenMeshes.set(i.name,i)}rotateCustomLogo(){this.childrenMeshes.get("CustomLogo").rotate()}flipCustomLogo(){this.childrenMeshes.get("CustomLogo").flip()}removeCustomLogo(){this.remove(this.childrenMeshes.get("CustomLogo")),this.childrenMeshes.delete("CustomLogo")}updateCustomLogoColor(o){this.childrenMeshes.get("CustomLogo").setColor(o)}async updateFrontText(o,t){let i=this.childrenMeshes.get("FrontText");i.updateTextGeometryOptions(o),await i.updateText(t)}changeSize(o,t){this.position.y-=(o.width-t)/2;for(let i of this.childrenMeshes.values())i instanceof jo&&i.isGeneralSizeChangeMesh()&&i.changeSize(o,t)}async updateSecondRowText(o,t){let i=this.childrenMeshes.get("SecondRowText");i.updateTextGeometryOptions(o),await i.updateText(t)}updateSecondRowVisibility(o){let t=this.childrenMeshes.get("FrontMWLogo"),i=this.childrenMeshes.get("SecondRowText"),n=this.childrenMeshes.get("CustomLogo");i.setManualVisibility(o.secondRowVisible),t.changeRelativeSize(o),n?.changeRelativeSize(o)}getChildrenMeshes(){return this.childrenMeshes}};function GC(e,o,t){return e===t&&e===o&&o===t}var ed=class extends It{constructor(){super("Map",new tt,1,!1)}async init(o){this.material=o.originalMapMesh.clone().material,this.originalColors=o.originalMapMesh.geometry.attributes.color;let t=o.originalMapMesh.geometry.clone();return this.addBottomFaces(t),t.computeBoundingBox(),t.rotateX(Math.PI/2),this.updateMapGeometry(o,t),t.computeBoundingBox(),t.rotateZ(-Math.PI/2),this.geometry=t,this}updateMapGeometry(o,t){let i=o.width-2*o.mapSideOffset,n=t.boundingBox.max.x,r=i/n;return t.scale(r,r,r),t.translate(-i/2,i/2,0),this.updateMapColors(this.originalColors,t,o.numberOfColors),t}updateMapColors(o,t,i){let n=[];for(let r=0;r<o.count;r++){let a=o.getX(r),s=o.getY(r),l=o.getZ(r);n.push(...this.getPrintColor(a,s,l,i))}t.setAttribute("color",new Qo(n,3))}getPrintColor(o,t,i,n){return GC(o,t,i)?n===1?[1,1,1]:[.5,.5,.5]:o>.75&&t>.75?n<4?[1,1,1]:[1,1,0]:o>.45&&t<.1?n<4?[1,1,1]:[1,0,0]:o<5&&t>.6?n<4?[1,1,1]:[0,1,0]:(console.error("Unknown color"),[1,1,1])}addBottomFaces(o){let t=o.index;if(!t)return;let i=24,n=6,r=8,a=t.count/sf,s=new Uint32Array(t.count+a*n);s.set(new Uint32Array(t.array.buffer,t.array.byteOffset,t.count));let l=t.count;for(let d=0;d<a;d++){let c=d*i+r;s[l++]=c,s[l++]=c+2,s[l++]=c+1,s[l++]=c,s[l++]=c+3,s[l++]=c+2}o.setIndex(new So(s,1))}async changeSize(o,t){let i=(o.width-2*o.mapSideOffset)/(t-2*o.mapSideOffset);this.geometry.scale(i,i,i)}updateColor(o){this.updateMapColors(this.originalColors,this.geometry,o)}};var td=class{constructor(o,t=new Jc(new ya(pm)),i=new Hc(new ya(pm)),n=new Xc,r=new ed){this.geometryOptions=o,this.frontPrintContainerMesh=t,this.backPrintContainerMesh=i,this.baseplateMesh=n,this.mapMesh=r,this.printMesh=new lt,this.printMesh.name="PrintMesh"}async initialize(){this.baseplateMesh=await this.baseplateMesh.init(this.geometryOptions),this.printMesh.add(this.baseplateMesh),this.mapMesh=await this.mapMesh.init(this.geometryOptions),this.printMesh.add(this.mapMesh),this.frontPrintContainerMesh=await this.frontPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.frontPrintContainerMesh),this.backPrintContainerMesh=await this.backPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.backPrintContainerMesh),this.calculateCurrentSize()}getThreeMesh(){return this.printMesh}getMapMesh(){return this.mapMesh}getSize(){return this.currentSize}async updateSize(o){this.geometryOptions.width=o;let t=this.currentSize.x;return await Promise.all([...this.printMesh.children].map(async i=>{i instanceof xt&&i.isGeneralSizeChangeMesh()&&i.changeSize(this.geometryOptions,t)})),this.calculateCurrentSize(),this.backPrintContainerMesh.isQRCodeVisible()}updateNumberOfColors(o){this.geometryOptions.numberOfColors=o;for(let t of this.printMesh.children)t instanceof xt&&t.updateColor(o)}async addCustomLogo(o){this.frontPrintContainerMesh.addCustomLogo(o,this.geometryOptions)}rotateCustomLogo(){this.frontPrintContainerMesh.rotateCustomLogo()}flipCustomLogo(){this.frontPrintContainerMesh.flipCustomLogo()}removeCustomLogo(){this.frontPrintContainerMesh.removeCustomLogo()}updateCustomLogoColor(o){this.frontPrintContainerMesh.updateCustomLogoColor(o)}updateFrontText(o){this.frontPrintContainerMesh.updateFrontText(o,this.geometryOptions)}updateSecondRowVisibility(o){this.geometryOptions.secondRowVisible!==o&&(this.geometryOptions.secondRowVisible=o,this.frontPrintContainerMesh.updateSecondRowVisibility(this.geometryOptions),this.baseplateMesh.changeSize(this.geometryOptions))}async updateSecondRowText(o){await this.frontPrintContainerMesh.updateSecondRowText(o,this.geometryOptions)}calculateCurrentSize(){let o=this.baseplateMesh.getWidth(),t=this.baseplateMesh.getDepth(),i=this.baseplateMesh.getHeight()+this.mapMesh.getHeight();this.currentSize=new Ke(o,t,i)}async updateQrCodeText(o){await this.backPrintContainerMesh.updateQrCodeText(o,this.geometryOptions)}updateQrCodeVisibility(o){this.backPrintContainerMesh.updateQrCodeVisibility(o)}};function Bm(e,o,t,i,n){let r=e.x,a=e.y,s=e.z,l=r,d=a-t;o.geometry.boundingBox||o.geometry.computeBoundingBox();let c=o.geometry.boundingBox.max.z-o.geometry.boundingBox.min.z,m=(s-i)*o.geometry.boundingBox.max.x/c+2*n;return Math.min(l,d,m)}var Dt=Uint8Array,zt=Uint16Array,jm=Int32Array,Hm=new Dt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Um=new Dt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Kx=new Dt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tw=function(e,o){for(var t=new zt(31),i=0;i<31;++i)t[i]=o+=1<<e[i-1];for(var n=new jm(t[30]),i=1;i<30;++i)for(var r=t[i];r<t[i+1];++r)n[r]=r-t[i]<<5|i;return{b:t,r:n}},iw=tw(Hm,2),XC=iw.b,Wm=iw.r;XC[28]=258,Wm[258]=28;var ow=tw(Um,0),kte=ow.b,Qx=ow.r,Om=new zt(32768);for(Xe=0;Xe<32768;++Xe)Ui=(Xe&43690)>>1|(Xe&21845)<<1,Ui=(Ui&52428)>>2|(Ui&13107)<<2,Ui=(Ui&61680)>>4|(Ui&3855)<<4,Om[Xe]=((Ui&65280)>>8|(Ui&255)<<8)>>1;var Ui,Xe,Fa=function(e,o,t){for(var i=e.length,n=0,r=new zt(o);n<i;++n)e[n]&&++r[e[n]-1];var a=new zt(o);for(n=1;n<o;++n)a[n]=a[n-1]+r[n-1]<<1;var s;if(t){s=new zt(1<<o);var l=15-o;for(n=0;n<i;++n)if(e[n])for(var d=n<<4|e[n],c=o-e[n],m=a[e[n]-1]++<<c,u=m|(1<<c)-1;m<=u;++m)s[Om[m]>>l]=d}else for(s=new zt(i),n=0;n<i;++n)e[n]&&(s[n]=Om[a[e[n]-1]++]>>15-e[n]);return s},En=new Dt(288);for(Xe=0;Xe<144;++Xe)En[Xe]=8;var Xe;for(Xe=144;Xe<256;++Xe)En[Xe]=9;var Xe;for(Xe=256;Xe<280;++Xe)En[Xe]=7;var Xe;for(Xe=280;Xe<288;++Xe)En[Xe]=8;var Xe,id=new Dt(32);for(Xe=0;Xe<32;++Xe)id[Xe]=5;var Xe,KC=Fa(En,9,0);var QC=Fa(id,5,0);var nw=function(e){return(e+7)/8|0},rw=function(e,o,t){return(o==null||o<0)&&(o=0),(t==null||t>e.length)&&(t=e.length),new Dt(e.subarray(o,t))};var ZC=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],od=function(e,o,t){var i=new Error(o||ZC[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,od),!t)throw i;return i};var Gi=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8},Da=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8,e[i+2]|=t>>16},Vm=function(e,o){for(var t=[],i=0;i<e.length;++i)e[i]&&t.push({s:i,f:e[i]});var n=t.length,r=t.slice();if(!n)return{t:sw,l:0};if(n==1){var a=new Dt(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(O,H){return O.f-H.f}),t.push({s:-1,f:25001});var s=t[0],l=t[1],d=0,c=1,m=2;for(t[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=n-1;)s=t[t[d].f<t[m].f?d++:m++],l=t[d!=c&&t[d].f<t[m].f?d++:m++],t[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var u=r[0].s,i=1;i<n;++i)r[i].s>u&&(u=r[i].s);var p=new zt(u+1),f=zm(t[c-1],p,0);if(f>o){var i=0,S=0,R=f-o,L=1<<R;for(r.sort(function(H,G){return p[G.s]-p[H.s]||H.f-G.f});i<n;++i){var j=r[i].s;if(p[j]>o)S+=L-(1<<f-p[j]),p[j]=o;else break}for(S>>=R;S>0;){var q=r[i].s;p[q]<o?S-=1<<o-p[q]++-1:++i}for(;i>=0&&S;--i){var P=r[i].s;p[P]==o&&(--p[P],++S)}f=o}return{t:new Dt(p),l:f}},zm=function(e,o,t){return e.s==-1?Math.max(zm(e.l,o,t+1),zm(e.r,o,t+1)):o[e.s]=t},Zx=function(e){for(var o=e.length;o&&!e[--o];);for(var t=new zt(++o),i=0,n=e[0],r=1,a=function(l){t[i++]=l},s=1;s<=o;++s)if(e[s]==n&&s!=o)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=e[s]}return{c:t.subarray(0,i),n:o}},Aa=function(e,o){for(var t=0,i=0;i<o.length;++i)t+=e[i]*o[i];return t},aw=function(e,o,t){var i=t.length,n=nw(o+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var r=0;r<i;++r)e[n+r+4]=t[r];return(n+4+i)*8},Yx=function(e,o,t,i,n,r,a,s,l,d,c){Gi(o,c++,t),++n[256];for(var m=Vm(n,15),u=m.t,p=m.l,f=Vm(r,15),S=f.t,R=f.l,L=Zx(u),j=L.c,q=L.n,P=Zx(S),O=P.c,H=P.n,G=new zt(19),J=0;J<j.length;++J)++G[j[J]&31];for(var J=0;J<O.length;++J)++G[O[J]&31];for(var X=Vm(G,7),me=X.t,Ie=X.l,$=19;$>4&&!me[Kx[$-1]];--$);var Ee=d+5<<3,be=Aa(n,En)+Aa(r,id)+a,Fe=Aa(n,u)+Aa(r,S)+a+14+3*$+Aa(G,me)+2*G[16]+3*G[17]+7*G[18];if(l>=0&&Ee<=be&&Ee<=Fe)return aw(o,c,e.subarray(l,l+d));var Oe,ve,oe,He;if(Gi(o,c,1+(Fe<be)),c+=2,Fe<be){Oe=Fa(u,p,0),ve=u,oe=Fa(S,R,0),He=S;var Ve=Fa(me,Ie,0);Gi(o,c,q-257),Gi(o,c+5,H-1),Gi(o,c+10,$-4),c+=14;for(var J=0;J<$;++J)Gi(o,c+3*J,me[Kx[J]]);c+=3*$;for(var ct=[j,O],Ot=0;Ot<2;++Ot)for(var mi=ct[Ot],J=0;J<mi.length;++J){var N=mi[J]&31;Gi(o,c,Ve[N]),c+=me[N],N>15&&(Gi(o,c,mi[J]>>5&127),c+=mi[J]>>12)}}else Oe=KC,ve=En,oe=QC,He=id;for(var J=0;J<s;++J){var _=i[J];if(_>255){var N=_>>18&31;Da(o,c,Oe[N+257]),c+=ve[N+257],N>7&&(Gi(o,c,_>>23&31),c+=Hm[N]);var w=_&31;Da(o,c,oe[w]),c+=He[w],w>3&&(Da(o,c,_>>5&8191),c+=Um[w])}else Da(o,c,Oe[_]),c+=ve[_]}return Da(o,c,Oe[256]),c+ve[256]},YC=new jm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sw=new Dt(0),JC=function(e,o,t,i,n,r){var a=r.z||e.length,s=new Dt(i+a+5*(1+Math.ceil(a/7e3))+n),l=s.subarray(i,s.length-n),d=r.l,c=(r.r||0)&7;if(o){c&&(l[0]=r.r>>3);for(var m=YC[o-1],u=m>>13,p=m&8191,f=(1<<t)-1,S=r.p||new zt(32768),R=r.h||new zt(f+1),L=Math.ceil(t/3),j=2*L,q=function(te){return(e[te]^e[te+1]<<L^e[te+2]<<j)&f},P=new jm(25e3),O=new zt(288),H=new zt(32),G=0,J=0,X=r.i||0,me=0,Ie=r.w||0,$=0;X+2<a;++X){var Ee=q(X),be=X&32767,Fe=R[Ee];if(S[be]=Fe,R[Ee]=be,Ie<=X){var Oe=a-X;if((G>7e3||me>24576)&&(Oe>423||!d)){c=Yx(e,l,0,P,O,H,J,me,$,X-$,c),me=G=J=0,$=X;for(var ve=0;ve<286;++ve)O[ve]=0;for(var ve=0;ve<30;++ve)H[ve]=0}var oe=2,He=0,Ve=p,ct=be-Fe&32767;if(Oe>2&&Ee==q(X-ct))for(var Ot=Math.min(u,Oe)-1,mi=Math.min(32767,X),N=Math.min(258,Oe);ct<=mi&&--Ve&&be!=Fe;){if(e[X+oe]==e[X+oe-ct]){for(var _=0;_<N&&e[X+_]==e[X+_-ct];++_);if(_>oe){if(oe=_,He=ct,_>Ot)break;for(var w=Math.min(ct,_-2),b=0,ve=0;ve<w;++ve){var ee=X-ct+ve&32767,de=S[ee],U=ee-de&32767;U>b&&(b=U,Fe=ee)}}}be=Fe,Fe=S[be],ct+=be-Fe&32767}if(He){P[me++]=268435456|Wm[oe]<<18|Qx[He];var le=Wm[oe]&31,ue=Qx[He]&31;J+=Hm[le]+Um[ue],++O[257+le],++H[ue],Ie=X+oe,++G}else P[me++]=e[X],++O[e[X]]}}for(X=Math.max(X,Ie);X<a;++X)P[me++]=e[X],++O[e[X]];c=Yx(e,l,d,P,O,H,J,me,$,X-$,c),d||(r.r=c&7|l[c/8|0]<<3,c-=7,r.h=R,r.p=S,r.i=X,r.w=Ie)}else{for(var X=r.w||0;X<a+d;X+=65535){var fe=X+65535;fe>=a&&(l[c/8|0]=d,fe=a),c=aw(l,c+1,e.subarray(X,fe))}r.i=a}return rw(s,0,i+nw(c)+n)},eM=(function(){for(var e=new Int32Array(256),o=0;o<256;++o){for(var t=o,i=9;--i;)t=(t&1&&-306674912)^t>>>1;e[o]=t}return e})(),tM=function(){var e=-1;return{p:function(o){for(var t=e,i=0;i<o.length;++i)t=eM[t&255^o[i]]^t>>>8;e=t},d:function(){return~e}}};var iM=function(e,o,t,i,n){if(!n&&(n={l:1},o.dictionary)){var r=o.dictionary.subarray(-32768),a=new Dt(r.length+e.length);a.set(r),a.set(e,r.length),e=a,n.w=r.length}return JC(e,o.level==null?6:o.level,o.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+o.mem,t,i,n)},lw=function(e,o){var t={};for(var i in e)t[i]=e[i];for(var i in o)t[i]=o[i];return t};var Mt=function(e,o,t){for(;t;++o)e[o]=t,t>>>=8};function oM(e,o){return iM(e,o||{},0,0)}var cw=function(e,o,t,i){for(var n in e){var r=e[n],a=o+n,s=i;Array.isArray(r)&&(s=lw(i,r[1]),r=r[0]),ArrayBuffer.isView(r)?t[a]=[r,s]:(t[a+="/"]=[new Dt(0),s],cw(r,a,t,i))}},Jx=typeof TextEncoder<"u"&&new TextEncoder,nM=typeof TextDecoder<"u"&&new TextDecoder,rM=0;try{nM.decode(sw,{stream:!0}),rM=1}catch{}function kn(e,o){if(o){for(var t=new Dt(e.length),i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}if(Jx)return Jx.encode(e);for(var n=e.length,r=new Dt(e.length+(e.length>>1)),a=0,s=function(c){r[a++]=c},i=0;i<n;++i){if(a+5>r.length){var l=new Dt(a+8+(n-i<<1));l.set(r),r=l}var d=e.charCodeAt(i);d<128||o?s(d):d<2048?(s(192|d>>6),s(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++i)&1023,s(240|d>>18),s(128|d>>12&63),s(128|d>>6&63),s(128|d&63)):(s(224|d>>12),s(128|d>>6&63),s(128|d&63))}return rw(r,0,a)}var $m=function(e){var o=0;if(e)for(var t in e){var i=e[t].length;i>65535&&od(9),o+=i+4}return o},ew=function(e,o,t,i,n,r,a,s){var l=i.length,d=t.extra,c=s&&s.length,m=$m(d);Mt(e,o,a!=null?33639248:67324752),o+=4,a!=null&&(e[o++]=20,e[o++]=t.os),e[o]=20,o+=2,e[o++]=t.flag<<1|(r<0&&8),e[o++]=n&&8,e[o++]=t.compression&255,e[o++]=t.compression>>8;var u=new Date(t.mtime==null?Date.now():t.mtime),p=u.getFullYear()-1980;if((p<0||p>119)&&od(10),Mt(e,o,p<<25|u.getMonth()+1<<21|u.getDate()<<16|u.getHours()<<11|u.getMinutes()<<5|u.getSeconds()>>1),o+=4,r!=-1&&(Mt(e,o,t.crc),Mt(e,o+4,r<0?-r-2:r),Mt(e,o+8,t.size)),Mt(e,o+12,l),Mt(e,o+14,m),o+=16,a!=null&&(Mt(e,o,c),Mt(e,o+6,t.attrs),Mt(e,o+10,a),o+=14),e.set(i,o),o+=l,m)for(var f in d){var S=d[f],R=S.length;Mt(e,o,+f),Mt(e,o+2,R),e.set(S,o+4),o+=4+R}return c&&(e.set(s,o),o+=c),o},aM=function(e,o,t,i,n){Mt(e,o,101010256),Mt(e,o+8,t),Mt(e,o+10,t),Mt(e,o+12,i),Mt(e,o+16,n)};function dw(e,o){o||(o={});var t={},i=[];cw(e,"",t,o);var n=0,r=0;for(var a in t){var s=t[a],l=s[0],d=s[1],c=d.level==0?0:8,m=kn(a),u=m.length,p=d.comment,f=p&&kn(p),S=f&&f.length,R=$m(d.extra);u>65535&&od(11);var L=c?oM(l,d):l,j=L.length,q=tM();q.p(l),i.push(lw(d,{size:l.length,crc:q.d(),c:L,f:m,m:f,u:u!=a.length||f&&p.length!=S,o:n,compression:c})),n+=30+u+R+j,r+=76+2*(u+R)+(S||0)+j}for(var P=new Dt(r+22),O=n,H=r-n,G=0;G<i.length;++G){var m=i[G];ew(P,m.o,m,m.f,m.u,m.c.length);var J=30+m.f.length+$m(m.extra);P.set(m.c,m.o+J),ew(P,n,m,m.f,m.u,m.c.length,m.o,m.m),n+=16+J+(m.m?m.m.length:0)}return aM(P,n,i.length,H,O),P}function hw(e,o){let t=sM(),i=lM(e),n=cM(o),r=dM();return t+i+n+r}function sM(){return`<?xml version="1.0" encoding="UTF-8"?>
3560
+ `}async createColoredBackTextChildren(o){let t=this.metricDescriptionBlockOptions,i=[],n=["Value ranges:",`${t.nodeMetricData.minValue} - ${t.colorRange.from-1}`,"/",`${t.colorRange.from} - ${t.colorRange.to-1}`,"/",`${t.colorRange.to} - ${t.nodeMetricData.maxValue}`],r=[new tt,new Ac,new tt,new Ic,new tt,new Rc],a=.05;for(let s=0;s<n.length;s+=1){let l=`ColorMetricLastLine${s}`,d={font:this.font,text:n[s],side:"back",xPosition:a,yPosition:-.045,align:"left"},c=await new Yt(l,r[s],200,!0,d).init(o);this.updateColor(o.numberOfColors),i.push(c),s!==n.length-1&&(a+=c.getWidth()+.03)}return i}};var Fc=class extends xt{constructor(o,t){super(o,new tt),this.font=t}async init(o){let{areaIcon:t,areaIconScale:i}=this.createAreaAttributes(),{heightIcon:n,heightIconScale:r}=this.createHeightAttributes(),{colorIcon:a,colorIconScale:s}=this.createColorAttributes(),l=await new Sn({name:"HeigthMetricBlock",title:o.heightMetricTitle,iconFilename:n,iconScale:r,nodeMetricData:o.heightMetricData},this.font,.05).init(o);this.add(l);let d=await new Sn({name:"AreaMetricBlock",title:o.areaMetricTitle,iconFilename:t,iconScale:i,nodeMetricData:o.areaMetricData},this.font,-.1).init(o);this.add(d);let c=await new Dc({name:"ColorMetricBlock",title:o.colorMetricTitle,iconFilename:a,iconScale:s,nodeMetricData:o.colorMetricData,colorRange:o.colorRange},this.font,-.25).init(o);return this.add(c),this.centerMetricsMeshInXDirection(),this}centerMetricsMeshInXDirection(){let o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};this.traverse(t=>{if(t instanceof lt&&t.visible){t.geometry.computeBoundingBox();let{min:i,max:n}=t.geometry.boundingBox;o.min=Math.min(o.min,i.x),o.max=Math.max(o.max,n.x)}}),this.position.x=(o.max-o.min)/2}createColorAttributes(){return{colorIcon:"color_icon_for_3D_print.svg",colorIconScale:.075}}createHeightAttributes(){return{heightIcon:"height_icon_for_3D_print.svg",heightIconScale:.09}}createAreaAttributes(){return{areaIcon:"area_icon_for_3D_print.svg",areaIconScale:.075}}};var Zx=sd(Qx());var Uc=class extends It{constructor(o){super(o,new tt,0,!1)}async init(o){this.geometry=await this.create(o);let t=.45,i=.45,n=-o.baseplateHeight+o.printHeight/2;return this.position.set(t,i,n),this.updateColor(o.numberOfColors),this}async changeText(o){this.geometry=await this.create(o)}async create(o){if(!o.qrCodeText||o.qrCodeText.length===0)return new Xt;let t=document.createElement("canvas");await Zx.toCanvas(t,o.qrCodeText,{errorCorrectionLevel:"H"});let n=t.getContext("2d").getImageData(0,0,t.width,t.height),r=[],a=.6/n.width;for(let s=0;s<n.height;s+=4)for(let l=0;l<n.width;l+=4){let d=(s*n.width+l)*4;if(n.data[d]!==0){let c=new yo(a,a,o.printHeight);c.translate(-l/4*a,-s/4*a,0),r.push(c)}}return this.updateMinWidth(a),Bo(r)}updateMinWidth(o){this.minWidth=.6/o}};var Gc=class extends xt{constructor(o){let t=new tt;super("BackPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("BackMWLogo",new kc("BackMWLogo")),this.childrenMeshes.set("BackBelowLogoText",new _c("BackBelowLogoText",this.font)),this.childrenMeshes.set("QrCode",new Uc("QrCode")),this.childrenMeshes.set("CodeChartaLogo",new qc("CodeChartaLogo")),this.childrenMeshes.set("CodeChartaText",new Tc("CodeChartaText",this.font)),this.childrenMeshes.set("MetricDescriptionsContainer",new Fc("MetricDescriptionsContainer",this.font)),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.changeSize(o,1),this}changeSize(o,t){let i=o.width/t;this.scale.set(this.scale.x*i,this.scale.y*i,this.scale.z),this.traverse(n=>{n instanceof It&&n.setCurrentWidth(o.width)})}isQRCodeVisible(){return this.childrenMeshes.get("QrCode").visible}async updateQrCodeText(o,t){t.qrCodeText=o,await this.childrenMeshes.get("QrCode").changeText(t)}updateQrCodeVisibility(o){this.childrenMeshes.get("QrCode").setManualVisibility(o)}getChildrenMeshes(){return this.childrenMeshes}};var Xc=class{execute(o,t){let i=t.material;return i.defaultAttributeValues.color=o===1?[1,1,1]:[.5,.5,.5],!0}};var Kc=class{async create(o){let{width:t,secondRowVisible:i,mapSideOffset:n,baseplateHeight:r,frontTextSize:a,secondRowTextSize:s}=o,l=5,d=Math.sqrt(2*Math.pow(n,2))/(Math.sqrt(2)-1)-1;d<l&&(l=d);let c=new Es,m=i?s*1.5:0,u=t+a+m;c.absarc(t-l,l,l,Math.PI*1.5,Math.PI*2,!1),c.absarc(t-l,u-l,l,0,Math.PI*.5,!1),c.absarc(l,u-l,l,Math.PI*.5,Math.PI,!1),c.absarc(l,l,l,Math.PI,Math.PI*1.5,!1);let p=new Zn(c,{depth:r,bevelEnabled:!1});return p.translate(-t/2,-t/2-a-m,-r),p}};var Qc=class extends xt{constructor(o=new Kc){super("Baseplate",new Xc),this.createBaseplateGeometryStrategy=o}async init(o){this.createBaseplateGeometryStrategy.create(o).then(i=>{this.geometry=i});let t=new Np;return t.copy(o.defaultMaterial),t.polygonOffset=!0,t.polygonOffsetUnits=1,t.polygonOffsetFactor=.1,this.material=t,this.updateColor(o.numberOfColors),this}changeSize(o){this.boundingBoxCalculated=!1,this.createBaseplateGeometryStrategy.create(o).then(t=>{this.geometry=t})}};var $o=class{execute(o,t){let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var jo=class extends xt{constructor(o,t){super(o,new $o),this.alignment=t}changeRelativeSize(o){let t=this.getWidth();this.boundingBoxCalculated=!1;let i=o.secondRowVisible,n=i?(o.frontTextSize+o.secondRowTextSize)/o.frontTextSize:1;this.scale.x=n,this.scale.y=n;let r=i?-1:1,a=this.alignment==="left"?-1:1;this.translateY(r*o.secondRowTextSize);let s=i?t/this.getWidth():this.getWidth()/t;this.translateX(2*s*a*r)}};var Zc=class extends jo{constructor(o,t){super(o,"left"),this.filePath=t}async init(o){let t=new Jt,i=o.frontTextSize*o.width/200;this.geometry=await t.create(o,{filePath:this.filePath,size:i,side:"front"});let n=-o.width/2+i/2+o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}setColor(o){this.material.color.set(o)}rotate(){this.geometry.rotateZ(Math.PI/2)}flip(){this.geometry.rotateY(Math.PI)}changeSize(o,t){this.position.x-=(o.width-t)/2}};var Yc=class extends jo{constructor(o){super(o,"right")}async init(o,t=new Jt){let i=o.frontTextSize*o.width/250;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo.svg",size:i,side:"front"});let n=o.width/2-i/2-o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}changeSize(o,t){this.position.x+=(o.width-t)/2}};var Jc=class extends Yt{constructor(o,t,i){let n=i.frontText;n||(n="FrontText");let r={font:t,side:"front",text:n,xPosition:0,yPosition:i.frontTextSize/2,textSize:i.frontTextSize,align:"center"};super(o,new $o,0,!0,r),this.name="Front Text"}};var ed=class extends Yt{constructor(o,t,i){let n={font:t,text:i.secondRowText,side:"front",xPosition:0,yPosition:-i.secondRowTextSize,textSize:i.secondRowTextSize,align:"center"};super(o,new $o,0,!1,n)}};var td=class extends xt{constructor(o){let t=new tt;super("FrontPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("FrontText",new Jc("FrontText",this.font,o)),this.childrenMeshes.set("SecondRowText",new ed("SecondRowText",this.font,o)),this.childrenMeshes.set("FrontMWLogo",new Yc("FrontMWLogo")),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.position.y=-o.width/2-o.mapSideOffset/2,this}async addCustomLogo(o,t){this.childrenMeshes.has("CustomLogo")&&this.removeCustomLogo();let i=await new Zc("CustomLogo",o).init(t);this.add(i),this.childrenMeshes.set(i.name,i)}rotateCustomLogo(){this.childrenMeshes.get("CustomLogo").rotate()}flipCustomLogo(){this.childrenMeshes.get("CustomLogo").flip()}removeCustomLogo(){this.remove(this.childrenMeshes.get("CustomLogo")),this.childrenMeshes.delete("CustomLogo")}updateCustomLogoColor(o){this.childrenMeshes.get("CustomLogo").setColor(o)}async updateFrontText(o,t){let i=this.childrenMeshes.get("FrontText");i.updateTextGeometryOptions(o),await i.updateText(t)}changeSize(o,t){this.position.y-=(o.width-t)/2;for(let i of this.childrenMeshes.values())i instanceof jo&&i.isGeneralSizeChangeMesh()&&i.changeSize(o,t)}async updateSecondRowText(o,t){let i=this.childrenMeshes.get("SecondRowText");i.updateTextGeometryOptions(o),await i.updateText(t)}updateSecondRowVisibility(o){let t=this.childrenMeshes.get("FrontMWLogo"),i=this.childrenMeshes.get("SecondRowText"),n=this.childrenMeshes.get("CustomLogo");i.setManualVisibility(o.secondRowVisible),t.changeRelativeSize(o),n?.changeRelativeSize(o)}getChildrenMeshes(){return this.childrenMeshes}};function QC(e,o,t){return e===t&&e===o&&o===t}var id=class extends It{constructor(){super("Map",new tt,1,!1)}async init(o){this.material=o.originalMapMesh.clone().material,this.originalColors=o.originalMapMesh.geometry.attributes.color;let t=o.originalMapMesh.geometry.clone();return this.addBottomFaces(t),t.computeBoundingBox(),t.rotateX(Math.PI/2),this.updateMapGeometry(o,t),t.computeBoundingBox(),t.rotateZ(-Math.PI/2),this.geometry=t,this}updateMapGeometry(o,t){let i=o.width-2*o.mapSideOffset,n=t.boundingBox.max.x,r=i/n;return t.scale(r,r,r),t.translate(-i/2,i/2,0),this.updateMapColors(this.originalColors,t,o.numberOfColors),t}updateMapColors(o,t,i){let n=[];for(let r=0;r<o.count;r++){let a=o.getX(r),s=o.getY(r),l=o.getZ(r);n.push(...this.getPrintColor(a,s,l,i))}t.setAttribute("color",new Qo(n,3))}getPrintColor(o,t,i,n){return QC(o,t,i)?n===1?[1,1,1]:[.5,.5,.5]:o>.75&&t>.75?n<4?[1,1,1]:[1,1,0]:o>.45&&t<.1?n<4?[1,1,1]:[1,0,0]:o<5&&t>.6?n<4?[1,1,1]:[0,1,0]:(console.error("Unknown color"),[1,1,1])}addBottomFaces(o){let t=o.index;if(!t)return;let i=24,n=6,r=8,a=t.count/df,s=new Uint32Array(t.count+a*n);s.set(new Uint32Array(t.array.buffer,t.array.byteOffset,t.count));let l=t.count;for(let d=0;d<a;d++){let c=d*i+r;s[l++]=c,s[l++]=c+2,s[l++]=c+1,s[l++]=c,s[l++]=c+3,s[l++]=c+2}o.setIndex(new So(s,1))}async changeSize(o,t){let i=(o.width-2*o.mapSideOffset)/(t-2*o.mapSideOffset);this.geometry.scale(i,i,i)}updateColor(o){this.updateMapColors(this.originalColors,this.geometry,o)}};var od=class{constructor(o,t=new td(new Ma(gm)),i=new Gc(new Ma(gm)),n=new Qc,r=new id){this.geometryOptions=o,this.frontPrintContainerMesh=t,this.backPrintContainerMesh=i,this.baseplateMesh=n,this.mapMesh=r,this.printMesh=new lt,this.printMesh.name="PrintMesh"}async initialize(){this.baseplateMesh=await this.baseplateMesh.init(this.geometryOptions),this.printMesh.add(this.baseplateMesh),this.mapMesh=await this.mapMesh.init(this.geometryOptions),this.printMesh.add(this.mapMesh),this.frontPrintContainerMesh=await this.frontPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.frontPrintContainerMesh),this.backPrintContainerMesh=await this.backPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.backPrintContainerMesh),this.calculateCurrentSize()}getThreeMesh(){return this.printMesh}getMapMesh(){return this.mapMesh}getSize(){return this.currentSize}async updateSize(o){this.geometryOptions.width=o;let t=this.currentSize.x;return await Promise.all([...this.printMesh.children].map(async i=>{i instanceof xt&&i.isGeneralSizeChangeMesh()&&i.changeSize(this.geometryOptions,t)})),this.calculateCurrentSize(),this.backPrintContainerMesh.isQRCodeVisible()}updateNumberOfColors(o){this.geometryOptions.numberOfColors=o;for(let t of this.printMesh.children)t instanceof xt&&t.updateColor(o)}async addCustomLogo(o){this.frontPrintContainerMesh.addCustomLogo(o,this.geometryOptions)}rotateCustomLogo(){this.frontPrintContainerMesh.rotateCustomLogo()}flipCustomLogo(){this.frontPrintContainerMesh.flipCustomLogo()}removeCustomLogo(){this.frontPrintContainerMesh.removeCustomLogo()}updateCustomLogoColor(o){this.frontPrintContainerMesh.updateCustomLogoColor(o)}updateFrontText(o){this.frontPrintContainerMesh.updateFrontText(o,this.geometryOptions)}updateSecondRowVisibility(o){this.geometryOptions.secondRowVisible!==o&&(this.geometryOptions.secondRowVisible=o,this.frontPrintContainerMesh.updateSecondRowVisibility(this.geometryOptions),this.baseplateMesh.changeSize(this.geometryOptions))}async updateSecondRowText(o){await this.frontPrintContainerMesh.updateSecondRowText(o,this.geometryOptions)}calculateCurrentSize(){let o=this.baseplateMesh.getWidth(),t=this.baseplateMesh.getDepth(),i=this.baseplateMesh.getHeight()+this.mapMesh.getHeight();this.currentSize=new Ke(o,t,i)}async updateQrCodeText(o){await this.backPrintContainerMesh.updateQrCodeText(o,this.geometryOptions)}updateQrCodeVisibility(o){this.backPrintContainerMesh.updateQrCodeVisibility(o)}};function Wm(e,o,t,i,n){let r=e.x,a=e.y,s=e.z,l=r,d=a-t;o.geometry.boundingBox||o.geometry.computeBoundingBox();let c=o.geometry.boundingBox.max.z-o.geometry.boundingBox.min.z,m=(s-i)*o.geometry.boundingBox.max.x/c+2*n;return Math.min(l,d,m)}var At=Uint8Array,zt=Uint16Array,Um=Int32Array,Gm=new At([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xm=new At([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Yx=new At([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nw=function(e,o){for(var t=new zt(31),i=0;i<31;++i)t[i]=o+=1<<e[i-1];for(var n=new Um(t[30]),i=1;i<30;++i)for(var r=t[i];r<t[i+1];++r)n[r]=r-t[i]<<5|i;return{b:t,r:n}},rw=nw(Gm,2),ZC=rw.b,zm=rw.r;ZC[28]=258,zm[258]=28;var aw=nw(Xm,0),Rte=aw.b,Jx=aw.r,$m=new zt(32768);for(Xe=0;Xe<32768;++Xe)Ui=(Xe&43690)>>1|(Xe&21845)<<1,Ui=(Ui&52428)>>2|(Ui&13107)<<2,Ui=(Ui&61680)>>4|(Ui&3855)<<4,$m[Xe]=((Ui&65280)>>8|(Ui&255)<<8)>>1;var Ui,Xe,Na=(function(e,o,t){for(var i=e.length,n=0,r=new zt(o);n<i;++n)e[n]&&++r[e[n]-1];var a=new zt(o);for(n=1;n<o;++n)a[n]=a[n-1]+r[n-1]<<1;var s;if(t){s=new zt(1<<o);var l=15-o;for(n=0;n<i;++n)if(e[n])for(var d=n<<4|e[n],c=o-e[n],m=a[e[n]-1]++<<c,u=m|(1<<c)-1;m<=u;++m)s[$m[m]>>l]=d}else for(s=new zt(i),n=0;n<i;++n)e[n]&&(s[n]=$m[a[e[n]-1]++]>>15-e[n]);return s}),En=new At(288);for(Xe=0;Xe<144;++Xe)En[Xe]=8;var Xe;for(Xe=144;Xe<256;++Xe)En[Xe]=9;var Xe;for(Xe=256;Xe<280;++Xe)En[Xe]=7;var Xe;for(Xe=280;Xe<288;++Xe)En[Xe]=8;var Xe,nd=new At(32);for(Xe=0;Xe<32;++Xe)nd[Xe]=5;var Xe,YC=Na(En,9,0);var JC=Na(nd,5,0);var sw=function(e){return(e+7)/8|0},lw=function(e,o,t){return(o==null||o<0)&&(o=0),(t==null||t>e.length)&&(t=e.length),new At(e.subarray(o,t))};var eM=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],rd=function(e,o,t){var i=new Error(o||eM[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,rd),!t)throw i;return i};var Gi=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8},Fa=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8,e[i+2]|=t>>16},Om=function(e,o){for(var t=[],i=0;i<e.length;++i)e[i]&&t.push({s:i,f:e[i]});var n=t.length,r=t.slice();if(!n)return{t:dw,l:0};if(n==1){var a=new At(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(O,H){return O.f-H.f}),t.push({s:-1,f:25001});var s=t[0],l=t[1],d=0,c=1,m=2;for(t[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=n-1;)s=t[t[d].f<t[m].f?d++:m++],l=t[d!=c&&t[d].f<t[m].f?d++:m++],t[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var u=r[0].s,i=1;i<n;++i)r[i].s>u&&(u=r[i].s);var p=new zt(u+1),f=jm(t[c-1],p,0);if(f>o){var i=0,S=0,R=f-o,L=1<<R;for(r.sort(function(H,G){return p[G.s]-p[H.s]||H.f-G.f});i<n;++i){var j=r[i].s;if(p[j]>o)S+=L-(1<<f-p[j]),p[j]=o;else break}for(S>>=R;S>0;){var q=r[i].s;p[q]<o?S-=1<<o-p[q]++-1:++i}for(;i>=0&&S;--i){var P=r[i].s;p[P]==o&&(--p[P],++S)}f=o}return{t:new At(p),l:f}},jm=function(e,o,t){return e.s==-1?Math.max(jm(e.l,o,t+1),jm(e.r,o,t+1)):o[e.s]=t},ew=function(e){for(var o=e.length;o&&!e[--o];);for(var t=new zt(++o),i=0,n=e[0],r=1,a=function(l){t[i++]=l},s=1;s<=o;++s)if(e[s]==n&&s!=o)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=e[s]}return{c:t.subarray(0,i),n:o}},La=function(e,o){for(var t=0,i=0;i<o.length;++i)t+=e[i]*o[i];return t},cw=function(e,o,t){var i=t.length,n=sw(o+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var r=0;r<i;++r)e[n+r+4]=t[r];return(n+4+i)*8},tw=function(e,o,t,i,n,r,a,s,l,d,c){Gi(o,c++,t),++n[256];for(var m=Om(n,15),u=m.t,p=m.l,f=Om(r,15),S=f.t,R=f.l,L=ew(u),j=L.c,q=L.n,P=ew(S),O=P.c,H=P.n,G=new zt(19),J=0;J<j.length;++J)++G[j[J]&31];for(var J=0;J<O.length;++J)++G[O[J]&31];for(var X=Om(G,7),me=X.t,Ie=X.l,$=19;$>4&&!me[Yx[$-1]];--$);var Ee=d+5<<3,be=La(n,En)+La(r,nd)+a,Fe=La(n,u)+La(r,S)+a+14+3*$+La(G,me)+2*G[16]+3*G[17]+7*G[18];if(l>=0&&Ee<=be&&Ee<=Fe)return cw(o,c,e.subarray(l,l+d));var Oe,ve,oe,He;if(Gi(o,c,1+(Fe<be)),c+=2,Fe<be){Oe=Na(u,p,0),ve=u,oe=Na(S,R,0),He=S;var Ve=Na(me,Ie,0);Gi(o,c,q-257),Gi(o,c+5,H-1),Gi(o,c+10,$-4),c+=14;for(var J=0;J<$;++J)Gi(o,c+3*J,me[Yx[J]]);c+=3*$;for(var ct=[j,O],Ot=0;Ot<2;++Ot)for(var mi=ct[Ot],J=0;J<mi.length;++J){var N=mi[J]&31;Gi(o,c,Ve[N]),c+=me[N],N>15&&(Gi(o,c,mi[J]>>5&127),c+=mi[J]>>12)}}else Oe=YC,ve=En,oe=JC,He=nd;for(var J=0;J<s;++J){var _=i[J];if(_>255){var N=_>>18&31;Fa(o,c,Oe[N+257]),c+=ve[N+257],N>7&&(Gi(o,c,_>>23&31),c+=Gm[N]);var w=_&31;Fa(o,c,oe[w]),c+=He[w],w>3&&(Fa(o,c,_>>5&8191),c+=Xm[w])}else Fa(o,c,Oe[_]),c+=ve[_]}return Fa(o,c,Oe[256]),c+ve[256]},tM=new Um([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dw=new At(0),iM=function(e,o,t,i,n,r){var a=r.z||e.length,s=new At(i+a+5*(1+Math.ceil(a/7e3))+n),l=s.subarray(i,s.length-n),d=r.l,c=(r.r||0)&7;if(o){c&&(l[0]=r.r>>3);for(var m=tM[o-1],u=m>>13,p=m&8191,f=(1<<t)-1,S=r.p||new zt(32768),R=r.h||new zt(f+1),L=Math.ceil(t/3),j=2*L,q=function(te){return(e[te]^e[te+1]<<L^e[te+2]<<j)&f},P=new Um(25e3),O=new zt(288),H=new zt(32),G=0,J=0,X=r.i||0,me=0,Ie=r.w||0,$=0;X+2<a;++X){var Ee=q(X),be=X&32767,Fe=R[Ee];if(S[be]=Fe,R[Ee]=be,Ie<=X){var Oe=a-X;if((G>7e3||me>24576)&&(Oe>423||!d)){c=tw(e,l,0,P,O,H,J,me,$,X-$,c),me=G=J=0,$=X;for(var ve=0;ve<286;++ve)O[ve]=0;for(var ve=0;ve<30;++ve)H[ve]=0}var oe=2,He=0,Ve=p,ct=be-Fe&32767;if(Oe>2&&Ee==q(X-ct))for(var Ot=Math.min(u,Oe)-1,mi=Math.min(32767,X),N=Math.min(258,Oe);ct<=mi&&--Ve&&be!=Fe;){if(e[X+oe]==e[X+oe-ct]){for(var _=0;_<N&&e[X+_]==e[X+_-ct];++_);if(_>oe){if(oe=_,He=ct,_>Ot)break;for(var w=Math.min(ct,_-2),b=0,ve=0;ve<w;++ve){var ee=X-ct+ve&32767,de=S[ee],U=ee-de&32767;U>b&&(b=U,Fe=ee)}}}be=Fe,Fe=S[be],ct+=be-Fe&32767}if(He){P[me++]=268435456|zm[oe]<<18|Jx[He];var le=zm[oe]&31,ue=Jx[He]&31;J+=Gm[le]+Xm[ue],++O[257+le],++H[ue],Ie=X+oe,++G}else P[me++]=e[X],++O[e[X]]}}for(X=Math.max(X,Ie);X<a;++X)P[me++]=e[X],++O[e[X]];c=tw(e,l,d,P,O,H,J,me,$,X-$,c),d||(r.r=c&7|l[c/8|0]<<3,c-=7,r.h=R,r.p=S,r.i=X,r.w=Ie)}else{for(var X=r.w||0;X<a+d;X+=65535){var fe=X+65535;fe>=a&&(l[c/8|0]=d,fe=a),c=cw(l,c+1,e.subarray(X,fe))}r.i=a}return lw(s,0,i+sw(c)+n)},oM=(function(){for(var e=new Int32Array(256),o=0;o<256;++o){for(var t=o,i=9;--i;)t=(t&1&&-306674912)^t>>>1;e[o]=t}return e})(),nM=function(){var e=-1;return{p:function(o){for(var t=e,i=0;i<o.length;++i)t=oM[t&255^o[i]]^t>>>8;e=t},d:function(){return~e}}};var rM=function(e,o,t,i,n){if(!n&&(n={l:1},o.dictionary)){var r=o.dictionary.subarray(-32768),a=new At(r.length+e.length);a.set(r),a.set(e,r.length),e=a,n.w=r.length}return iM(e,o.level==null?6:o.level,o.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+o.mem,t,i,n)},hw=function(e,o){var t={};for(var i in e)t[i]=e[i];for(var i in o)t[i]=o[i];return t};var Mt=function(e,o,t){for(;t;++o)e[o]=t,t>>>=8};function aM(e,o){return rM(e,o||{},0,0)}var mw=function(e,o,t,i){for(var n in e){var r=e[n],a=o+n,s=i;Array.isArray(r)&&(s=hw(i,r[1]),r=r[0]),ArrayBuffer.isView(r)?t[a]=[r,s]:(t[a+="/"]=[new At(0),s],mw(r,a,t,i))}},iw=typeof TextEncoder<"u"&&new TextEncoder,sM=typeof TextDecoder<"u"&&new TextDecoder,lM=0;try{sM.decode(dw,{stream:!0}),lM=1}catch{}function kn(e,o){if(o){for(var t=new At(e.length),i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}if(iw)return iw.encode(e);for(var n=e.length,r=new At(e.length+(e.length>>1)),a=0,s=function(c){r[a++]=c},i=0;i<n;++i){if(a+5>r.length){var l=new At(a+8+(n-i<<1));l.set(r),r=l}var d=e.charCodeAt(i);d<128||o?s(d):d<2048?(s(192|d>>6),s(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++i)&1023,s(240|d>>18),s(128|d>>12&63),s(128|d>>6&63),s(128|d&63)):(s(224|d>>12),s(128|d>>6&63),s(128|d&63))}return lw(r,0,a)}var Hm=function(e){var o=0;if(e)for(var t in e){var i=e[t].length;i>65535&&rd(9),o+=i+4}return o},ow=function(e,o,t,i,n,r,a,s){var l=i.length,d=t.extra,c=s&&s.length,m=Hm(d);Mt(e,o,a!=null?33639248:67324752),o+=4,a!=null&&(e[o++]=20,e[o++]=t.os),e[o]=20,o+=2,e[o++]=t.flag<<1|(r<0&&8),e[o++]=n&&8,e[o++]=t.compression&255,e[o++]=t.compression>>8;var u=new Date(t.mtime==null?Date.now():t.mtime),p=u.getFullYear()-1980;if((p<0||p>119)&&rd(10),Mt(e,o,p<<25|u.getMonth()+1<<21|u.getDate()<<16|u.getHours()<<11|u.getMinutes()<<5|u.getSeconds()>>1),o+=4,r!=-1&&(Mt(e,o,t.crc),Mt(e,o+4,r<0?-r-2:r),Mt(e,o+8,t.size)),Mt(e,o+12,l),Mt(e,o+14,m),o+=16,a!=null&&(Mt(e,o,c),Mt(e,o+6,t.attrs),Mt(e,o+10,a),o+=14),e.set(i,o),o+=l,m)for(var f in d){var S=d[f],R=S.length;Mt(e,o,+f),Mt(e,o+2,R),e.set(S,o+4),o+=4+R}return c&&(e.set(s,o),o+=c),o},cM=function(e,o,t,i,n){Mt(e,o,101010256),Mt(e,o+8,t),Mt(e,o+10,t),Mt(e,o+12,i),Mt(e,o+16,n)};function uw(e,o){o||(o={});var t={},i=[];mw(e,"",t,o);var n=0,r=0;for(var a in t){var s=t[a],l=s[0],d=s[1],c=d.level==0?0:8,m=kn(a),u=m.length,p=d.comment,f=p&&kn(p),S=f&&f.length,R=Hm(d.extra);u>65535&&rd(11);var L=c?aM(l,d):l,j=L.length,q=nM();q.p(l),i.push(hw(d,{size:l.length,crc:q.d(),c:L,f:m,m:f,u:u!=a.length||f&&p.length!=S,o:n,compression:c})),n+=30+u+R+j,r+=76+2*(u+R)+(S||0)+j}for(var P=new At(r+22),O=n,H=r-n,G=0;G<i.length;++G){var m=i[G];ow(P,m.o,m,m.f,m.u,m.c.length);var J=30+m.f.length+Hm(m.extra);P.set(m.c,m.o+J),ow(P,n,m,m.f,m.u,m.c.length,m.o,m.m),n+=16+J+(m.m?m.m.length:0)}return cM(P,n,i.length,H,O),P}function pw(e,o){let t=dM(),i=hM(e),n=mM(o),r=uM();return t+i+n+r}function dM(){return`<?xml version="1.0" encoding="UTF-8"?>
3551
3561
  <model unit="millimeter" xml:lang="en-US" xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" xmlns:slic3rpe="http://schemas.slic3r.org/3mf/2017/06">
3552
3562
  <metadata name="Application">PrusaSlicer-2.7.2</metadata>
3553
3563
  <resources>
3554
3564
  <object id="1" type="model">
3555
3565
  <mesh>
3556
- `}function lM(e){let o=` <vertices>
3566
+ `}function hM(e){let o=` <vertices>
3557
3567
  `;for(let t of e)o+=` ${t}
3558
3568
  `;return o+=` </vertices>
3559
- `,o}function cM(e){let o=` <triangles>
3569
+ `,o}function mM(e){let o=` <triangles>
3560
3570
  `;for(let t of e)o+=` ${t}
3561
3571
  `;return o+=` </triangles>
3562
- `,o}function dM(){return` </mesh>
3572
+ `,o}function uM(){return` </mesh>
3563
3573
  </object>
3564
3574
  </resources>
3565
3575
  <build> <item objectid="1"/> </build>
3566
3576
  </model>
3567
- `}function mw(e){let o=hM();for(let t of e)o+=mM(t);return o+=uM(),o}function hM(){return`<?xml version="1.0" encoding="UTF-8"?>
3577
+ `}function fw(e){let o=pM();for(let t of e)o+=fM(t);return o+=gM(),o}function pM(){return`<?xml version="1.0" encoding="UTF-8"?>
3568
3578
  <config>
3569
3579
  <object id="1" instances_count="1">
3570
3580
  <metadata type="object" key="name" value="CodeCharta Map"/>
3571
- `}function mM(e){return` <volume firstid="${e.firstTriangleId}" lastid="${e.lastTriangleId}">
3581
+ `}function fM(e){return` <volume firstid="${e.firstTriangleId}" lastid="${e.lastTriangleId}">
3572
3582
  <metadata type="volume" key="name" value="${e.name}"/>
3573
3583
  <metadata type="volume" key="extruder" value="${e.extruder}"/>
3574
3584
  <metadata type="volume" key="source_object_id" value="1"/>
3575
3585
  <metadata type="volume" key="source_volume_id" value="${e.id}"/>
3576
3586
  </volume>
3577
- `}function uM(){return` </object>
3587
+ `}function gM(){return` </object>
3578
3588
  </config>
3579
- `}function uw(){return`<?xml version="1.0" encoding="UTF-8"?>
3589
+ `}function gw(){return`<?xml version="1.0" encoding="UTF-8"?>
3580
3590
  <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
3581
3591
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
3582
3592
  <Default Extension="model" ContentType="application/vnd.ms-package.3dmanufacturing-3dmodel+xml"/>
3583
- </Types>`}function pw(){return`<?xml version="1.0" encoding="UTF-8"?>
3593
+ </Types>`}function bw(){return`<?xml version="1.0" encoding="UTF-8"?>
3584
3594
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
3585
3595
  <Relationship Target="/3D/3dmodel.model" Id="rel-1" Type="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel"/>
3586
- </Relationships>`}async function gw(e){let{vertices:o,triangles:t,volumes:i}=pM(e),n=hw(o,t),r=mw(i),a=uw(),s=pw(),l=!0,d={"3D":{"3dmodel.model":kn(n,l)},_rels:{".rels":kn(s,l)},Metadata:{"Slic3r_PE_model.config":kn(r,l)},"[Content_Types].xml":kn(a,l)};return dw(d,{comment:"created by CodeCharta"}).buffer}function pM(e){let o=[],t=[],i=[],n=new Map,r=new Map;for(let a of e.children)bw(a,o,t,n,r,i);return{vertices:o,triangles:t,volumes:i}}function bw(e,o,t,i,n,r,a=void 0){if(!e.visible)return;for(let c of e.children){let m=e.matrix;a&&(m=a.clone().multiply(e.matrix)),bw(c,o,t,i,n,r,m)}let s=fM(e),l=new Map,d=1;for(let[c,m]of s.entries()){let u=t.length;gM(o,i,l,m,e,a),bM(e.geometry,t,l,m),vM(e,c,u,t.length-1,r,d,n),d++}}function fM(e){let o=new Map;if(e.geometry.attributes.color)for(let t=0;t<e.geometry.attributes.color.count;t++){let i=fw(e.geometry.attributes.color,t);o.has(i)?o.get(i).push(t):o.set(i,[t])}else if(e.geometry.attributes.position){let t=e.material,i;if(t.color)i=t.color.getHexString();else if(t.isShaderMaterial){let r=t.defaultAttributeValues.color;i=fw(r,0)}let n=Array.from({length:e.geometry.attributes.position.count},(r,a)=>a);o.set(i,n)}return o}function gM(e,o,t,i,n,r){let a=n.geometry.attributes.position;for(let s of i){let l=new Ke(a.getX(s),a.getY(s),a.getZ(s));l.applyMatrix4(n.matrix),r&&l.applyMatrix4(r);let d=`<vertex x="${l.x}" y="${l.y}" z="${l.z}"/>`;o.has(d)?t.set(s,o.get(d)):(e.push(d),o.set(d,e.length-1),t.set(s,e.length-1))}}function bM(e,o,t,i){if(e.index){let n=e.index;for(let r=0;r<n.count;r+=3){let a=n.getX(r),s=n.getY(r),l=n.getZ(r);if(i.includes(a)&&i.includes(s)&&i.includes(l)){let d=`<triangle v1="${t.get(a)}" v2="${t.get(s)}" v3="${t.get(l)}" />`;o.push(d)}}}else for(let n=0;n<t.size;n+=3){let r=`<triangle v1="${t.get(n)}" v2="${t.get(n+1)}" v3="${t.get(n+2)}" />`;o.push(r)}}function vM(e,o,t,i,n,r,a){a.has(o)||a.set(o,a.size+1);let s=a.get(o),l=e.name==="Map"?`${e.name} 0x${o}`:e.name,d={id:r,name:l,color:o,extruder:s,firstTriangleId:t,lastTriangleId:i};n.push(d)}function fw(e,o){return(e instanceof So?[e.getX(o),e.getY(o),e.getZ(o)]:[e[o],e[o+1],e[o+2]]).map(i=>Math.round(i*255).toString(16).padStart(2,"0")).join("")}var vw=(()=>{class e{constructor(){this.isPrintMeshLoaded=Z.required(),this.download3MF=_e(),this.downloadSTL=_e()}handleDownload3MF(){this.download3MF.emit()}handleDownloadSTL(){this.downloadSTL.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-export-actions"]],inputs:{isPrintMeshLoaded:[1,"isPrintMeshLoaded"]},outputs:{download3MF:"download3MF",downloadSTL:"downloadSTL"},decls:7,vars:2,consts:[[1,"flex","gap-2"],["title","Download 3MF Button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-download"],["title","Download STL Button",1,"btn","btn-outline",3,"click","disabled"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.handleDownload3MF()}),pe(2,"i",2),g(3," Download 3MF "),M(),y(4,"button",3),ie("click",function(){return n.handleDownloadSTL()}),pe(5,"i",2),g(6," Download minimal STL "),M()()),i&2&&(h(),ce("disabled",!n.isPrintMeshLoaded()),h(3),ce("disabled",!n.isPrintMeshLoaded()))},encapsulation:2,changeDetection:0})}}return e})();var xw=(()=>{class e{constructor(){this.frontText=Z(""),this.textChanged=_e()}handleInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-front-text-input"]],inputs:{frontText:[1,"frontText"]},outputs:{textChanged:"textChanged"},decls:5,vars:1,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["type","text","placeholder","CodeCharta","data-testid","frontText",1,"input","input-bordered","w-full",3,"input","value"]],template:function(i,n){i&1&&(y(0,"label",0)(1,"div",1)(2,"span",2),g(3,"Bottom center label text"),M()(),y(4,"input",3),ie("input",function(a){return n.handleInput(a)}),M()()),i&2&&(h(4),ce("value",n.frontText()))},encapsulation:2,changeDetection:0})}}return e})();var xM=["fileInput"];function wM(e,o){if(e&1){let t=we();x(0,"div",5)(1,"button",6),z("click",function(){ae(t);let n=B();return se(n.handleRemoveLogo())}),V(2,"i",7),g(3," Remove "),v(),x(4,"button",8),z("click",function(){ae(t);let n=B();return se(n.handleRotateLogo())}),V(5,"i",9),g(6," Rotate "),v(),x(7,"button",10),z("click",function(){ae(t);let n=B();return se(n.handleFlipLogo())}),V(8,"i",11),g(9," Flip "),v()(),x(10,"div",12)(11,"cc-inline-color-picker",13),z("colorChange",function(n){ae(t);let r=B();return se(r.handleColorChange(n))}),v(),x(12,"span",14),g(13,"Color"),v()()}if(e&2){let t=B();h(11),F("hexColor",t.logoColor())}}var ww=(()=>{class e{constructor(){this.fileInput=Je.required("fileInput"),this.isFileSelected=Z.required(),this.logoColor=Z("#ffffff"),this.fileSelected=_e(),this.logoRemoved=_e(),this.logoRotated=_e(),this.logoFlipped=_e(),this.colorChanged=_e()}handleFileSelected(t){let n=t.target.files?.[0];n&&this.fileSelected.emit(n)}handleRemoveLogo(){this.fileInput().nativeElement.value="",this.logoRemoved.emit()}handleRotateLogo(){this.logoRotated.emit()}handleFlipLogo(){this.logoFlipped.emit()}handleColorChange(t){this.colorChanged.emit(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-logo-upload"]],viewQuery:function(i,n){i&1&&rt(n.fileInput,xM,5),i&2&&at()},inputs:{isFileSelected:[1,"isFileSelected"],logoColor:[1,"logoColor"]},outputs:{fileSelected:"fileSelected",logoRemoved:"logoRemoved",logoRotated:"logoRotated",logoFlipped:"logoFlipped",colorChanged:"colorChanged"},decls:7,vars:1,consts:[["fileInput",""],[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","file","aria-label","Bottom left logo (SVG)","accept",".svg",1,"file-input","file-input-bordered","file-input-sm","w-full",3,"change"],[1,"flex","flex-wrap","gap-2","mt-2"],["title","Remove Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-times"],["title","Rotate Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-rotate-right"],["title","Flip Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-arrows-h"],[1,"flex","items-center","gap-2","mt-2"],["ariaLabel","Logo color",3,"colorChange","hexColor"],[1,"text-sm"]],template:function(i,n){i&1&&(x(0,"div",1)(1,"div",2)(2,"h3",3),g(3,"Bottom left logo (SVG)"),v(),x(4,"input",4,0),z("change",function(a){return n.handleFileSelected(a)}),v(),K(6,wM,14,1),v()()),i&2&&(h(6),Q(n.isFileSelected()?6:-1))},dependencies:[Eo],encapsulation:2,changeDetection:0})}}return e})();var SM=(e,o)=>o.name;function yM(e,o){if(e&1&&(y(0,"option",4),g(1),M()),e&2){let t=o.$implicit,i=B();ce("selected",t.name===i.selectedPrinter().name),h(),fu(" ",t.name," (",t.x/10,"\xD7",t.y/10,"\xD7",t.z/10,"cm, ",t.numberOfColors," colors) ")}}var Gm=[{name:"Prusa MK3S (single color)",x:245,y:205,z:205,numberOfColors:1},{name:"BambuLab A1 + AMS Lite",x:251,y:251,z:251,numberOfColors:4},{name:"Prusa XL (5 colors)",x:355,y:335,z:355,numberOfColors:5}],Sw=(()=>{class e{constructor(){this.selectedPrinter=Z.required(),this.printerChanged=_e(),this.printers=Gm}handlePrinterChange(t){let i=t.target,n=this.printers[i.selectedIndex];this.printerChanged.emit(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-printer-preset-selection"]],inputs:{selectedPrinter:[1,"selectedPrinter"]},outputs:{printerChanged:"printerChanged"},decls:7,vars:0,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["data-testid","selectPrinter",1,"select","select-bordered","w-full",3,"change"],["data-testid","selectedPrinter",3,"selected"]],template:function(i,n){i&1&&(y(0,"label",0)(1,"div",1)(2,"span",2),g(3,"Printer preset"),M()(),y(4,"select",3),ie("change",function(a){return n.handlePrinterChange(a)}),Pe(5,yM,2,6,"option",4,SM),M()()),i&2&&(h(5),Be(n.printers))},encapsulation:2,changeDetection:0})}}return e})();function CM(e,o){if(e&1){let t=we();y(0,"input",7),ie("input",function(n){ae(t);let r=B();return se(r.handleTextInput(n))}),M()}if(e&2){let t=B();ce("value",t.currentText())}}var yw=(()=>{class e{constructor(){this.isVisible=Z.required(),this.currentText=Z(""),this.visibilityChanged=_e(),this.textChanged=_e()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-qr-code-settings"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","qrCodeToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"h3",2),g(3,"QR-Code"),M(),y(4,"label",3)(5,"input",4),ie("change",function(a){return n.handleToggleChange(a)}),M(),y(6,"span",5),g(7,"Show QR-Code"),M()(),K(8,CM,1,1,"input",6),M()()),i&2&&(h(5),ce("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2,changeDetection:0})}}return e})();var Cw=(()=>{class e{constructor(){this.currentSize=Z.required(),this.wantedWidth=Z.required(),this.maxWidth=Z.required(),this.selectedPrinter=Z.required(),this.widthChanged=_e()}handleSliderChange(t){let i=t.target;this.widthChanged.emit(Number(i.value))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scale-slider"]],inputs:{currentSize:[1,"currentSize"],wantedWidth:[1,"wantedWidth"],maxWidth:[1,"maxWidth"],selectedPrinter:[1,"selectedPrinter"]},outputs:{widthChanged:"widthChanged"},decls:12,vars:9,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","range","aria-label","Scale","data-testid","onScaleChange",1,"range","range-primary","range-sm",3,"change","min","max","value"],["data-testid","printSizeOverview",1,"text-sm","mt-2"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"h3",2),g(3,"Scale"),M(),y(4,"input",3),ie("change",function(a){return n.handleSliderChange(a)}),M(),y(5,"div",4)(6,"div"),g(7),M(),y(8,"div"),g(9),M(),y(10,"div"),g(11),M()()()()),i&2&&(h(4),ce("min",100)("max",n.maxWidth())("value",n.wantedWidth()),h(3),Yi("Width: ",(n.currentSize().x/10).toFixed(1),"cm (max. ",(n.selectedPrinter().x/10).toFixed(1),")"),h(2),Yi("Depth: ",(n.currentSize().y/10).toFixed(1),"cm (max. ",(n.selectedPrinter().y/10).toFixed(1),")"),h(2),Yi("Height: ",(n.currentSize().z/10).toFixed(1),"cm (max. ",(n.selectedPrinter().z/10).toFixed(1),")"))},encapsulation:2,changeDetection:0})}}return e})();function MM(e,o){if(e&1){let t=we();y(0,"input",7),ie("input",function(n){ae(t);let r=B();return se(r.handleTextInput(n))}),M()}if(e&2){let t=B();ce("value",t.currentText())}}var Mw=(()=>{class e{constructor(){this.isVisible=Z.required(),this.currentText=Z(""),this.visibilityChanged=_e(),this.textChanged=_e()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-second-row-text-input"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","secondRowToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"h3",2),g(3,"Second row center text"),M(),y(4,"label",3)(5,"input",4),ie("change",function(a){return n.handleToggleChange(a)}),M(),y(6,"span",5),g(7,"Show second row text"),M()(),K(8,MM,1,1,"input",6),M()()),i&2&&(h(5),ce("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2,changeDetection:0})}}return e})();var _w=(()=>{class e{constructor(t,i,n,r,a){this.mapStateReadWindow=t,this.metricsLensSourceReadWindow=i,this.sharedViewReadWindow=n,this.fileStoreReadWindow=r,this.ccStateSnapshot=a}getAreaMetric(){return this.mapStateReadWindow.getAreaMetric()}getHeightMetric(){return this.mapStateReadWindow.getHeightMetric()}getColorMetric(){return this.mapStateReadWindow.getColorMetric()}getColorRange(){return this.mapStateReadWindow.getColorRange()}getAttributeDescriptors(){return this.metricsLensSourceReadWindow.getAttributeDescriptors()}getNodeMetricData(){return Co(this.ccStateSnapshot.get())}getExcludedNodes(){return this.sharedViewReadWindow.getExcludedNodes()}getFiles(){return this.fileStoreReadWindow.getFiles()}getAccumulatedFileName(){return Et(this.ccStateSnapshot.get()).unifiedFileMeta?.fileName}static{this.\u0275fac=function(i){return new(i||e)(E(xe),E(Rs),E(Bt),E(Re),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var EM=["dialog"],kM=["rendererContainer"],Xm=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.dialog=Je.required("dialog"),this.rendererContainer=Je.required("rendererContainer"),this.closed=_e(),this.currentSize=Se(new Ke),this.isPrintMeshLoaded=Se(!1),this.frontText=Se(""),this.logoColor=Se("#ffffff"),this.isFileSelected=Se(!1),this.secondRowVisible=Se(!1),this.secondRowText=Se(new Date().toLocaleDateString()),this.qrCodeVisible=Se(!1),this.qrCodeText=Se("maibornwolff.de/service/it-sanierung"),this.selectedPrinter=Se(Gm[2]),this.maxWidth=Se(0),this.wantedWidth=Se(0),this.layerHeight=.2,this.frontTextSize=8,this.secondRowTextSize=6,this.frontPrintDepth=.6,this.mapSideOffset=10,this.baseplateHeight=1,this.logoSize=10,this.primaryShaderMaterialIndex=0,this.exportMesh=this.threeSceneService.getMapMesh().toExportMesh();let n=Bm(new Ke(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.maxWidth.set(n),this.wantedWidth.set(n),this.currentSize.update(a=>(a.x=n,a)),this.currentNumberOfColors=this.selectedPrinter().numberOfColors,this.areaMetric=this.stateAccessStore.getAreaMetric(),this.heightMetric=this.stateAccessStore.getHeightMetric(),this.colorMetric=this.stateAccessStore.getColorMetric();let r=this.stateAccessStore.getNodeMetricData();this.nodeMetricData=r.filter(a=>a.name===this.areaMetric||a.name===this.heightMetric||a.name===this.colorMetric)}async ngAfterViewInit(){let t=this.dialog().nativeElement;t.addEventListener("close",()=>this.closed.emit()),t.showModal(),await this.createScene(),this.isPrintMeshLoaded.set(!0)}close(){this.dialog().nativeElement.close()}handleScaleChange(t){this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize())}handleFrontTextChange(t){this.frontText.set(t),this.previewMesh.updateFrontText(t)}handleFileSelected(t){this.isFileSelected.set(!0);let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{this.previewMesh.addCustomLogo(i.result)}}handleRotateLogo(){this.previewMesh.rotateCustomLogo()}handleFlipLogo(){this.previewMesh.flipCustomLogo()}handleRemoveLogo(){this.isFileSelected.set(!1),this.previewMesh.removeCustomLogo()}handlePrinterChange(t){this.selectedPrinter.set(t);let i=t.numberOfColors;this.currentNumberOfColors!==i&&(this.previewMesh.updateNumberOfColors(i),this.currentNumberOfColors=i),this.makeMapMaxSize(),this.updateCameraPosition(this.printPreviewScene.getObjectByName("camera"))}handleLogoColorChange(t){this.logoColor.set(t),this.previewMesh.updateCustomLogoColor(t)}handleQrCodeTextChange(t){this.qrCodeText.set(t),this.previewMesh.updateQrCodeText(t),this.previewMesh.updateQrCodeVisibility(this.qrCodeVisible())}handleQrCodeVisibilityChange(t){this.qrCodeVisible.set(t),this.previewMesh.updateQrCodeVisibility(t)}handleSecondRowTextChange(t){this.secondRowText.set(t),this.previewMesh.updateSecondRowText(t),this.previewMesh.updateSecondRowVisibility(this.secondRowVisible())}handleSecondRowVisibilityChange(t){this.secondRowVisible.set(t),this.previewMesh.updateSecondRowVisibility(t)}async createScene(){let t=new Ss;t.name="printPreviewScene",this.printPreviewScene=t,t.background=new Gn(15527388);let i=this.threeSceneService.scene.clone().children[3];i.name="lights",t.add(i);let n=new ws(45,1.15,50,2e5);n.name="camera",n.up=new Ke(0,0,1),t.add(n),this.initRenderer(t,n),this.previewMesh=new td(this.initGeometryOptions()),await this.previewMesh.initialize(),this.currentSize.set(this.previewMesh.getSize()),t.add(this.previewMesh.getThreeMesh()),this.updateCameraPosition(n)}initRenderer(t,i){let n=this.getGL(),r=this.rendererContainer().nativeElement,a=r.offsetWidth||600,s=r.offsetHeight||450;n.setSize(a,s,!0),r.appendChild(n.domElement);let l=new Ls(i,n.domElement),d=function(){requestAnimationFrame(d),l.update(),n.render(t,i)};d()}getGL(){return new ks}updateCameraPosition(t){let i=this.currentSize();t.position.set(-i.x*.2,-i.y*1.2,i.z*3)}async handleDownload3MF(){let t=await gw(this.printPreviewScene.getObjectByName("PrintMesh"));this.downloadFile(t,"3mf")}makeMapMaxSize(){let t=Bm(new Ke(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize()),this.maxWidth.set(this.currentSize().x)}handleDownloadSTL(){let t=new Sc().parse(this.previewMesh.getMapMesh(),{binary:!0});this.downloadFile(t,"stl")}initGeometryOptions(){let t=this.stateAccessStore.getAttributeDescriptors(),i=$s,n=t[this.areaMetric]?.title||i.get(this.areaMetric),r=t[this.heightMetric]?.title||i.get(this.heightMetric),a=t[this.colorMetric]?.title||i.get(this.colorMetric);return{originalMapMesh:this.exportMesh,width:this.wantedWidth(),areaMetricTitle:n,areaMetricData:this.nodeMetricData.find(s=>s.name===this.areaMetric),heightMetricTitle:r,heightMetricData:this.nodeMetricData.find(s=>s.name===this.heightMetric),colorMetricTitle:a,colorMetricData:this.nodeMetricData.find(s=>s.name===this.colorMetric),colorRange:this.stateAccessStore.getColorRange(),frontText:this.frontText(),secondRowText:this.secondRowText(),secondRowVisible:this.secondRowVisible(),qrCodeText:this.qrCodeText(),defaultMaterial:this.exportMesh.material[this.primaryShaderMaterialIndex].clone(),numberOfColors:this.currentNumberOfColors,layerHeight:this.layerHeight,frontTextSize:this.frontTextSize,secondRowTextSize:this.secondRowTextSize,printHeight:this.frontPrintDepth,mapSideOffset:this.mapSideOffset,baseplateHeight:this.baseplateHeight,logoSize:this.logoSize}}downloadFile(t,i){let n=this.stateAccessStore.getFiles(),r=this.stateAccessStore.getAccumulatedFileName(),a=`${Ts.getNewFileName(r,wi(n))}.${i}`;Dr.downloadData(t,a)}static{this.\u0275fac=function(i){return new(i||e)(ne(_w),ne(ft))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-export-3D-map-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialog,EM,5)(n.rendererContainer,kM,5),i&2&&at(2)},outputs:{closed:"closed"},decls:27,vars:13,consts:[["dialog",""],["rendererContainer",""],[1,"modal"],[1,"modal-box","max-w-6xl","w-11/12"],[1,"text-2xl","font-bold","mb-6"],[1,"flex","gap-6"],[1,"flex","flex-col","gap-4","w-1/3","min-w-72"],[3,"printerChanged","selectedPrinter"],[3,"widthChanged","currentSize","wantedWidth","maxWidth","selectedPrinter"],[3,"textChanged","frontText"],[3,"visibilityChanged","textChanged","isVisible","currentText"],[3,"fileSelected","logoRemoved","logoRotated","logoFlipped","colorChanged","isFileSelected","logoColor"],[1,"flex-1"],[1,"card","bg-base-200","h-full"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"w-full","min-h-96"],[1,"modal-action"],[3,"download3MF","downloadSTL","isPrintMeshLoaded"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"]],template:function(i,n){i&1&&(x(0,"dialog",2,0)(2,"div",3)(3,"h2",4),g(4,"3D Print CodeCharta Map"),v(),x(5,"div",5)(6,"div",6)(7,"cc-printer-preset-selection",7),z("printerChanged",function(a){return n.handlePrinterChange(a)}),v(),x(8,"cc-scale-slider",8),z("widthChanged",function(a){return n.handleScaleChange(a)}),v(),x(9,"cc-front-text-input",9),z("textChanged",function(a){return n.handleFrontTextChange(a)}),v(),x(10,"cc-second-row-text-input",10),z("visibilityChanged",function(a){return n.handleSecondRowVisibilityChange(a)})("textChanged",function(a){return n.handleSecondRowTextChange(a)}),v(),x(11,"cc-qr-code-settings",10),z("visibilityChanged",function(a){return n.handleQrCodeVisibilityChange(a)})("textChanged",function(a){return n.handleQrCodeTextChange(a)}),v(),x(12,"cc-logo-upload",11),z("fileSelected",function(a){return n.handleFileSelected(a)})("logoRemoved",function(){return n.handleRemoveLogo()})("logoRotated",function(){return n.handleRotateLogo()})("logoFlipped",function(){return n.handleFlipLogo()})("colorChanged",function(a){return n.handleLogoColorChange(a)}),v()(),x(13,"div",12)(14,"div",13)(15,"div",14)(16,"h3",15),g(17,"Preview"),v(),V(18,"div",16,1),v()()()(),x(20,"div",17)(21,"cc-export-actions",18),z("download3MF",function(){return n.handleDownload3MF()})("downloadSTL",function(){return n.handleDownloadSTL()}),v(),x(22,"button",19),z("click",function(){return n.close()}),g(23,"Close"),v()()(),x(24,"form",20)(25,"button"),g(26,"close"),v()()()),i&2&&(h(7),F("selectedPrinter",n.selectedPrinter()),h(),F("currentSize",n.currentSize())("wantedWidth",n.wantedWidth())("maxWidth",n.maxWidth())("selectedPrinter",n.selectedPrinter()),h(),F("frontText",n.frontText()),h(),F("isVisible",n.secondRowVisible())("currentText",n.secondRowText()),h(),F("isVisible",n.qrCodeVisible())("currentText",n.qrCodeText()),h(),F("isFileSelected",n.isFileSelected())("logoColor",n.logoColor()),h(9),F("isPrintMeshLoaded",n.isPrintMeshLoaded()))},dependencies:[Sw,Cw,xw,Mw,yw,ww,vw],encapsulation:2,changeDetection:0})}}return e})();var Ew=(()=>{class e{constructor(t,i){this.store=t,this.mapStateReadWindow=i,this.colorMode$=this.store.select(cp)}getColorMode(){return this.mapStateReadWindow.getColorMode()}setAbsoluteColorMode(){this.store.dispatch(Ei({value:Go.absolute}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(xe))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var La=(()=>{class e{constructor(){this.colorModeStore=T(Ew),this.errorDialogService=T(ts),this.activeViewStore=T(fr),this.viewReadinessStore=T(hr),this.threeRendererService=T(kt),this.router=T(Fn),this.dialogOpen=Se(!1),this.isDialogOpen=this.dialogOpen.asReadonly()}requestExport(){if(this.activeViewStore.currentView()!=="metrics"){this.errorDialogService.open(this.buildSwitchToMetricsViewDialog());return}if(this.colorModeStore.getColorMode()===Go.absolute){this.dialogOpen.set(!0);return}this.errorDialogService.open(this.buildWrongColorModeDialog())}closeDialog(){this.dialogOpen.set(!1)}buildSwitchToMetricsViewDialog(){return{title:"3D export needs the Metric view",message:'<p>The 3D export builds on the rendered map, so it only works in the <strong>Metric view</strong>.<br><i class="fa fa-info-circle"></i> Use "Switch and continue" to open the Metric view and go straight to the export.<p>',resolveErrorData:{buttonText:"Switch and continue",onResolveErrorClick:()=>{this.switchToMetricsViewAndExport()}},dismissButtonText:"Stay here"}}async switchToMetricsViewAndExport(){await this.router.navigateByUrl(Ii.metrics)&&this.viewReadinessStore.isStale$("metrics").pipe(Ae(i=>!i),ut(1)).subscribe(()=>this.requestExport())}buildWrongColorModeDialog(){return{title:"Map could not be exported",message:'<p>3D map can only be exported when <strong>color mode</strong> is set to <strong>absolute</strong>.<br><i class="fa fa-info-circle"></i> You can change this under Color Metric Options or use "Change and continue" to directly change the color mode and continue.<p>',resolveErrorData:{buttonText:"Change and continue",onResolveErrorClick:()=>this.recolorTheMapAndExportIt()}}}recolorTheMapAndExportIt(){this.threeRendererService.afterRender$.pipe(ut(1)).subscribe(()=>this.dialogOpen.set(!0)),this.colorModeStore.setAbsoluteColorMode()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Vr=(()=>{class e{transform(t){return Ts.withoutCCExtension(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=za({name:"removeExtension",type:e,pure:!0})}}return e})();var kw=(e,o)=>o.fileMeta.fileName;function qM(e,o){if(e&1){let t=we();y(0,"li",9)(1,"button",10),ie("click",function(){let n=ae(t).$implicit,r=B(2);return se(r.handleReferenceChange(n))}),y(2,"span",11),g(3),pt(4,"removeExtension"),M()()()}if(e&2){let t=o.$implicit,i=B(2);h(),We("bg-base-200",i.isReferenceSelected(t))("font-bold",i.isReferenceSelected(t)),h(2),Te(vi(4,5,t.fileMeta.fileName))}}function TM(e,o){if(e&1&&(y(0,"div",5)(1,"ul",8),Pe(2,qM,5,7,"li",9,kw),M()()),e&2){let t=B();h(2),Be(t.referenceOptions())}}function RM(e,o){if(e&1){let t=we();y(0,"li",9)(1,"button",10),ie("click",function(){let n=ae(t).$implicit,r=B(2);return se(r.handleComparisonChange(n))}),y(2,"span",11),g(3),pt(4,"removeExtension"),M()()()}if(e&2){let t=o.$implicit,i=B(2);h(),We("bg-base-200",i.isComparisonSelected(t))("font-bold",i.isComparisonSelected(t)),h(2),Te(vi(4,5,t.fileMeta.fileName))}}function IM(e,o){if(e&1&&(y(0,"div",5)(1,"ul",8),Pe(2,RM,5,7,"li",9,kw),M()()),e&2){let t=B();h(2),Be(t.comparisonOptions())}}var qw=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.navBarWriteStore=T(Sr),this.elementRef=T(Nt),this.fileStates=A(this.fileStoreReadWindow.files$,{requireSync:!0}),this.referenceFile=A(this.fileStoreReadWindow.referenceFile$,{requireSync:!0}),this.openDropdown=Se("none"),this.referenceLabel=Y(()=>{let t=this.referenceFile();return t?this.withoutExtension(t.fileMeta.fileName):"select reference file"}),this.comparisonFile=Y(()=>this.fileStates().find(t=>t.selectedAs===oi.Comparison)?.file),this.comparisonLabel=Y(()=>{let t=this.comparisonFile();return t?this.withoutExtension(t.fileMeta.fileName):"select comparison file"}),this.referenceOptions=Y(()=>this.fileStates().map(t=>t.file)),this.comparisonOptions=Y(()=>this.fileStates().filter(t=>t.selectedAs!==oi.Reference).map(t=>t.file)),this.swapDisabled=Y(()=>this.comparisonFile()===void 0)}handleDocumentClick(t){this.openDropdown()!=="none"&&t.target instanceof Node&&!this.elementRef.nativeElement.contains(t.target)&&this.openDropdown.set("none")}toggleDropdown(t){this.openDropdown.update(i=>i===t?"none":t)}handleReferenceChange(t){this.navBarWriteStore.setDeltaReference(t),this.openDropdown.set("none")}handleComparisonChange(t){this.navBarWriteStore.setDeltaComparison(t),this.openDropdown.set("none")}handleSwap(){this.swapDisabled()||this.navBarWriteStore.switchReferenceAndComparison()}isReferenceSelected(t){return this.referenceFile()?.fileMeta.fileName===t.fileMeta.fileName}isComparisonSelected(t){return this.comparisonFile()?.fileMeta.fileName===t.fileMeta.fileName}withoutExtension(t){return new Vr().transform(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-delta-selector"]],hostBindings:function(i,n){i&1&&z("click",function(a){return n.handleDocumentClick(a)},Uo)},decls:15,vars:9,consts:[[1,"flex","items-center","gap-1"],[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[12rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[12rem]","w-max","max-w-[24rem]","z-[70]","p-1"],["type","button","title","Switch reference and comparison file",1,"btn","btn-ghost","btn-sm","btn-square",3,"click","disabled"],[1,"fa","fa-arrows-h"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],["type","button",1,"flex","items-center","gap-2","w-full","text-left","rounded-md","px-2","py-1","hover:bg-base-200",3,"click"],[1,"flex-1","whitespace-nowrap"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"button",2),ie("click",function(){return n.toggleDropdown("reference")}),y(3,"span",3),g(4),M(),pe(5,"i",4),M(),K(6,TM,4,0,"div",5),M(),y(7,"button",6),ie("click",function(){return n.handleSwap()}),pe(8,"i",7),M(),y(9,"div",1)(10,"button",2),ie("click",function(){return n.toggleDropdown("comparison")}),y(11,"span",3),g(12),M(),pe(13,"i",4),M(),K(14,IM,4,0,"div",5),M()()),i&2&&(h(),We("dropdown-open",n.openDropdown()==="reference"),h(3),Te(n.referenceLabel()),h(2),Q(n.openDropdown()==="reference"?6:-1),h(),ce("disabled",n.swapDisabled()),h(2),We("dropdown-open",n.openDropdown()==="comparison"),h(3),Te(n.comparisonLabel()),h(2),Q(n.openDropdown()==="comparison"?14:-1))},dependencies:[Vr],encapsulation:2,changeDetection:0})}}return e})();var DM=(e,o)=>o.file.fileMeta.fileName;function AM(e,o){e&1&&pe(0,"i",16)}function FM(e,o){e&1&&pe(0,"i",17)}function LM(e,o){if(e&1){let t=we();y(0,"li",8)(1,"label",12)(2,"input",13),ie("change",function(n){let r=ae(t).$implicit,a=B(2);return se(a.handleCheckboxChange(r.file,n.target.checked))}),M(),y(3,"span",14),g(4),pt(5,"removeExtension"),M(),y(6,"button",15),ie("click",function(n){let r=ae(t).$implicit,a=B(2);return se(a.handleRemoveFileToggle(r.file,n))}),K(7,AM,1,0,"i",16)(8,FM,1,0,"i",17),M()()()}if(e&2){let t=o.$implicit,i=B(2);h(2),ce("checked",i.isFileSelected(t.file))("disabled",t.isRemoved),h(),We("line-through",t.isRemoved),h(),ge(" ",vi(5,7,t.file.fileMeta.fileName)," "),h(2),ce("title",t.isRemoved?"Undo remove map":"Remove map"),h(),Q(t.isRemoved?7:8)}}function NM(e,o){if(e&1){let t=we();y(0,"div",4)(1,"div",5)(2,"button",6),ie("click",function(){ae(t);let n=B();return se(n.handleSelectAll())}),g(3,"All"),M(),y(4,"button",6),ie("click",function(){ae(t);let n=B();return se(n.handleSelectNone())}),g(5,"None"),M(),y(6,"button",6),ie("click",function(){ae(t);let n=B();return se(n.handleSelectInvert())}),g(7,"Invert"),M()(),y(8,"ul",7),Pe(9,LM,9,9,"li",8,DM),M(),y(11,"div",9)(12,"span",10)(13,"button",11),ie("click",function(){ae(t);let n=B();return se(n.handleApply())}),g(14," Apply "),M()()()()}if(e&2){let t=B();h(9),Be(t.filesInUI()),h(3),We("tooltip-disabled",!t.applyButtonState().disabled),ot("data-tip",t.applyButtonState().tooltip||null),h(),ce("disabled",t.applyButtonState().disabled)}}var Tw=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.navBarWriteStore=T(Sr),this.elementRef=T(Nt),this.filesInStore=A(this.fileStoreReadWindow.files$,{requireSync:!0}),this.isOpen=Se(!1),this.filesInUI=Se([]),this.selectedFilesInUI=Se([]),this.triggerLabel=Y(()=>{let t=this.selectedFilesInStore();return t.length===0?"Select map":t.length===1?this.withoutExtension(t[0].fileMeta.fileName):`${this.withoutExtension(t[0].fileMeta.fileName)} +${t.length-1}`}),this.applyButtonState=Y(()=>this.selectedFilesInUI().length===0?{disabled:!0,tooltip:"Select at least one map"}:this.uiSelectionDiffersFromStore()?{disabled:!1,tooltip:""}:{disabled:!0,tooltip:"No changes to apply"}),this.syncFromStore(this.filesInStore())}handleDocumentClick(t){if(!this.isOpen())return;let i=t.target;this.elementRef.nativeElement.contains(i)||this.closeWithoutApplying()}toggleOpen(){this.isOpen()?this.closeWithoutApplying():(this.syncFromStore(this.filesInStore()),this.isOpen.set(!0))}handleCheckboxChange(t,i){let n=this.selectedFilesInUI();i?(n.includes(t)||this.selectedFilesInUI.set([...n,t]),this.filesInUI.update(r=>r.map(a=>a.file===t?{file:a.file,isRemoved:!1}:a))):this.selectedFilesInUI.set(n.filter(r=>r!==t))}handleRemoveFileToggle(t,i){i.stopPropagation(),i.preventDefault(),this.filesInUI.update(n=>n.map(r=>r.file.fileMeta.fileName===t.fileMeta.fileName?{file:r.file,isRemoved:!r.isRemoved}:r)),this.selectedFilesInUI.update(n=>n.filter(r=>r.fileMeta.fileName!==t.fileMeta.fileName))}handleSelectAll(){this.selectedFilesInUI.set(this.filesInUI().filter(t=>!t.isRemoved).map(t=>t.file))}handleSelectNone(){this.selectedFilesInUI.set([])}handleSelectInvert(){let t=this.filesInUI().filter(n=>!n.isRemoved);if(t.length===0)return;let i=this.selectedFilesInUI();i.length===0?this.selectedFilesInUI.set(t.map(n=>n.file)):i.length===t.length?this.selectedFilesInUI.set([]):this.selectedFilesInUI.set(t.filter(n=>!i.includes(n.file)).map(n=>n.file))}handleApply(){let t=this.filesInUI().filter(i=>i.isRemoved).map(i=>i.file.fileMeta.fileName);this.navBarWriteStore.setStandard(this.selectedFilesInUI()),this.navBarWriteStore.removeFiles(t),this.isOpen.set(!1)}closeWithoutApplying(){this.syncFromStore(this.filesInStore()),this.isOpen.set(!1)}syncFromStore(t){this.filesInUI.set(t.map(i=>({file:i.file,isRemoved:!1}))),this.selectedFilesInUI.set(t.filter(i=>i.selectedAs===oi.Partial).map(i=>i.file))}selectedFilesInStore(){return this.filesInStore().filter(t=>t.selectedAs===oi.Partial).map(t=>t.file)}uiSelectionDiffersFromStore(){if(this.filesInUI().some(n=>n.isRemoved))return!0;let t=this.selectedFilesInStore(),i=this.selectedFilesInUI();return i.length!==t.length?!0:!i.every(n=>t.includes(n))}withoutExtension(t){return new Vr().transform(t)}isFileSelected(t){return this.selectedFilesInUI().includes(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-map-selector"]],hostBindings:function(i,n){i&1&&z("click",function(a){return n.handleDocumentClick(a)},Uo)},decls:6,vars:4,consts:[[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[14rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[14rem]","w-max","max-w-[32rem]","z-[70]","p-2"],[1,"flex","items-center","gap-1","px-1","pb-2","border-b","border-base-200"],["type","button",1,"btn","btn-ghost","btn-xs","flex-1",3,"click"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],[1,"flex","justify-end","mt-2"],[1,"tooltip"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"flex","items-center","gap-2","w-full","cursor-pointer","rounded-md","px-2","py-1","hover:bg-base-200"],["type","checkbox",1,"checkbox","checkbox-xs","shrink-0",3,"change","checked","disabled"],[1,"flex-1","whitespace-nowrap"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square","shrink-0",3,"click","title"],[1,"fa","fa-undo"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.toggleOpen()}),y(2,"span",2),g(3),M(),pe(4,"i",3),M(),K(5,NM,15,4,"div",4),M()),i&2&&(We("dropdown-open",n.isOpen()),h(3),Te(n.triggerLabel()),h(2),Q(n.isOpen()?5:-1))},dependencies:[Vr],encapsulation:2,changeDetection:0})}}return e})();var Rw=()=>{let e=document.createElement("INPUT");return e.setAttribute("type","file"),e.setAttribute("accept",".json,.gz"),e.setAttribute("multiple",""),e.style.display="none",document.body.appendChild(e),e};var Iw=(()=>{class e{constructor(t){this.loadFilesUseCase=t}uploadFiles(){let t=Rw();t.addEventListener("change",()=>{this.uploadFilesOnEvent(t),t.remove()}),t.addEventListener("cancel",()=>t.remove()),t.click()}async uploadFilesOnEvent(t){if(!t.files||t.files.length===0)return;let i=t.files;await this.loadFilesUseCase.loadFromUpload(()=>this.readNameDataPairs(i))}async readNameDataPairs(t){let i=Array.from(t),n=[];for(let r=0;r<i.length;r++){let a=i[r];qf(Tf(a.name,r+1,i.length)),n.push({fileName:a.name,fileSize:a.size,content:await Hu(new Uint8Array(await a.arrayBuffer()))})}return n}static{this.\u0275fac=function(i){return new(i||e)(E(Us))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Dw=(()=>{class e{constructor(){this.uploadFilesService=T(Iw)}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-nav-bar-folder-button"]],decls:2,vars:0,consts:[["type","button","title","Load cc.json files",1,"btn","btn-ghost","btn-square",3,"click"],[1,"fa","fa-folder-open","text-lg"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.uploadFiles()}),pe(1,"i",1),M())},encapsulation:2,changeDetection:0})}}return e})();var Aw=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-nav-bar-logo"]],decls:2,vars:0,consts:[["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer","title","CodeCharta website",1,"flex","items-center","px-2"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta",1,"h-8","w-auto"]],template:function(i,n){i&1&&(y(0,"a",0),pe(1,"img",1),M())},encapsulation:2,changeDetection:0})}}return e})();var BM=["configDialog"],Fw=(()=>{class e{constructor(){this.dialog=Je.required("configDialog")}showSettings(){this.dialog().open()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-settings-button"]],viewQuery:function(i,n){i&1&&rt(n.dialog,BM,5),i&2&&at()},decls:4,vars:0,consts:[["configDialog",""],["type","button","title","Global Configuration",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(x(0,"button",1),z("click",function(){return n.showSettings()}),g(1,` Settings
3587
- `),v(),V(2,"cc-global-configuration-dialog",null,0))},dependencies:[u0],encapsulation:2,changeDetection:0})}}return e})();var Lw=(()=>{class e{constructor(){this.store=T(he),this.isDomainViewAvailable=A(this.store.select(x0),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function VM(e,o){e&1&&pe(0,"span",2)}function WM(e,o){e&1&&pe(0,"span",2)}var Nw=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.fileSelectionModeService=T(pl),this.router=T(Fn),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0})}selectExplore(){this.showMetricsView(),this.isDeltaState()&&this.fileSelectionModeService.toggle()}selectCompare(){this.showMetricsView(),this.isDeltaState()||this.fileSelectionModeService.toggle()}showMetricsView(){this.router.navigateByUrl(Ii.metrics)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-mode-toggle"]],decls:7,vars:8,consts:[["role","tablist",1,"flex","items-center","gap-1"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"click"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.selectExplore()}),g(2," Explore "),K(3,VM,1,0,"span",2),M(),y(4,"button",1),ie("click",function(){return n.selectCompare()}),g(5," Compare "),K(6,WM,1,0,"span",2),M()()),i&2&&(h(),We("font-bold",!n.isDeltaState()),ot("aria-selected",!n.isDeltaState()),h(2),Q(n.isDeltaState()?-1:3),h(),We("font-bold",n.isDeltaState()),ot("aria-selected",n.isDeltaState()),h(2),Q(n.isDeltaState()?6:-1))},encapsulation:2,changeDetection:0})}}return e})();var Pw=(()=>{class e{constructor(){this.export3DMapDialogStore=T(La)}export3DMap(){this.export3DMapDialogStore.requestExport()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-print-3d-button"]],decls:2,vars:0,consts:[["type","button","title","Download 3MF code file",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.export3DMap()}),g(1,` 3D Print
3588
- `),M())},encapsulation:2,changeDetection:0})}}return e})();function OM(e,o){e&1&&V(0,"cc-mode-toggle")(1,"cc-print-3d-button")}function zM(e,o){e&1&&V(0,"span",3)}function $M(e,o){if(e&1&&(x(0,"a",2,0),g(2," Explore "),K(3,zM,1,0,"span",3),v()),e&2){let t=Or(1),i=B();F("routerLink",i.routeLinks.domain),h(3),Q(t.isActive?3:-1)}}var jM={metrics:"Metric modes",domain:"Domain modes"},Bw=(()=>{class e{constructor(){this.view=Z.required(),this.routeLinks=Ii,this.groupLabel=Y(()=>jM[this.view()])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-mode-bar"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"]},decls:3,vars:2,consts:[["domainExplore","routerLinkActive"],[1,"flex","items-center","justify-center","gap-1","py-0.5","border-0","m-0","px-0","min-w-0"],["routerLinkActive","font-bold","data-testid","view-mode-domain-explore",1,"btn","btn-ghost","btn-sm","relative",3,"routerLink"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(x(0,"fieldset",1),K(1,OM,2,0)(2,$M,4,2,"a",2),v()),i&2&&(ot("aria-label",n.groupLabel()),h(),Q(n.view()==="metrics"?1:2))},dependencies:[Nw,Pw,Ka,Qa],encapsulation:2,changeDetection:0})}}return e})();var HM=()=>({exact:!0});function UM(e,o){e&1&&V(0,"span",5)}function GM(e,o){e&1&&V(0,"span",5)}function XM(e,o){if(e&1){let t=we();x(0,"a",9,1),z("mouseenter",function(){ae(t);let n=B();return se(n.openModeBar("domain"))})("focusin",function(){ae(t);let n=B();return se(n.openModeBar("domain"))}),g(2," Domain "),K(3,GM,1,0,"span",5),v()}if(e&2){let t=Or(1),i=B();We("font-bold",t.isActive),F("routerLink",i.routeLinks.domain),h(3),Q(t.isActive?3:-1)}}function KM(e,o){if(e&1){let t=we();x(0,"div",10),z("mouseenter",function(){ae(t);let n=B();return se(n.cancelPendingClose())})("mouseleave",function(){ae(t);let n=B();return se(n.scheduleClosingModeBar())}),V(1,"cc-view-mode-bar",11),v()}e&2&&(h(),F("view",o))}function QM(e,o){if(e&1){let t=we();x(0,"span",12),z("mouseenter",function(){ae(t);let n=B();return se(n.openModeBar(n.activeView()))}),Ho(),x(1,"svg",13),V(2,"path",14),v()()}}var ZM=200,Vw=(()=>{class e{constructor(){this.readStore=T(Lw),this.hostElement=T(Nt),this.isDomainViewAvailable=this.readStore.isDomainViewAvailable,this.activeView=A(T(fr).activeView$,{requireSync:!0}),this.routeLinks=Ii,this.previewedView=Se(null),this.pendingClose=null,T(Tn).onDestroy(()=>this.cancelPendingClose())}openModeBar(t){this.cancelPendingClose(),this.previewedView.set(t)}cancelPendingClose(){this.pendingClose!==null&&(clearTimeout(this.pendingClose),this.pendingClose=null)}scheduleClosingModeBar(){this.cancelPendingClose(),this.pendingClose=setTimeout(()=>this.closeModeBar(),ZM)}closeModeBarWhenFocusLeaves(t){let i=t.relatedTarget;(!(i instanceof Node)||!this.hostElement.nativeElement.contains(i))&&this.closeModeBar()}closeModeBar(){this.cancelPendingClose(),this.previewedView.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-switcher"]],hostAttrs:[1,"contents"],decls:9,vars:8,consts:[["metricsTab","routerLinkActive"],["domainTab","routerLinkActive"],[1,"flex","items-center",3,"click","mouseleave","focusout"],["aria-label","View","data-testid","view-switcher",1,"flex","items-center","gap-1"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the 3D metrics map","data-testid","view-switcher-metrics",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink","routerLinkActiveOptions"],[1,"cc-current-underline"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md",3,"mouseenter","mouseleave"],[3,"view"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70",3,"mouseenter"],["viewBox","0 0 10 6","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"block","h-1.5","w-2.5"],["d","M1 1 5 5 9 1"]],template:function(i,n){if(i&1&&(x(0,"div",2),z("click",function(){return n.closeModeBar()})("mouseleave",function(){return n.scheduleClosingModeBar()})("focusout",function(a){return n.closeModeBarWhenFocusLeaves(a)}),x(1,"nav",3)(2,"a",4,0),z("mouseenter",function(){return n.openModeBar("metrics")})("focusin",function(){return n.openModeBar("metrics")}),g(4," Metric "),K(5,UM,1,0,"span",5),v(),K(6,XM,4,4,"a",6),v(),K(7,KM,2,1,"div",7)(8,QM,3,0,"span",8),v()),i&2){let r,a=Or(3);h(2),We("font-bold",a.isActive),F("routerLink",n.routeLinks.metrics)("routerLinkActiveOptions",bu(7,HM)),h(3),Q(a.isActive?5:-1),h(),Q(n.isDomainViewAvailable()?6:-1),h(),Q((r=n.previewedView())?7:8,r)}},dependencies:[Ka,Qa,Bw],encapsulation:2,changeDetection:0})}}return e})();function YM(e,o){e&1&&V(0,"cc-delta-selector")}function JM(e,o){e&1&&V(0,"cc-map-selector")}function e9(e,o){if(e&1){let t=we();x(0,"cc-export-3D-map-dialog",5),z("closed",function(){ae(t);let n=B();return se(n.closeExportDialog())}),v()}}var Km=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.export3DMapDialogStore=T(La),this.isDeltaState=A(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isExportDialogOpen=this.export3DMapDialogStore.isDialogOpen}closeExportDialog(){this.export3DMapDialogStore.closeDialog()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-nav-bar"]],features:[bi([{provide:ur,useValue:"--cc-bars-height"}]),Zi([pr])],decls:12,vars:2,consts:[[1,"navbar","relative","bg-base-100","border-b","border-base-300","min-h-12","px-2"],[1,"navbar-start","gap-1"],[1,"divider","divider-horizontal","mx-0"],[1,"navbar-center","self-stretch"],[1,"navbar-end"],[3,"closed"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"div",1),V(2,"cc-nav-bar-logo")(3,"div",2)(4,"cc-nav-bar-folder-button"),K(5,YM,1,0,"cc-delta-selector")(6,JM,1,0,"cc-map-selector"),v(),x(7,"div",3),V(8,"cc-view-switcher"),v(),x(9,"div",4),V(10,"cc-settings-button"),v()(),K(11,e9,1,0,"cc-export-3D-map-dialog")),i&2&&(h(5),Q(n.isDeltaState()?5:6),h(6),Q(n.isExportDialogOpen()?11:-1))},dependencies:[Xm,Aw,Dw,Tw,qw,Fw,Vw],encapsulation:2,changeDetection:0})}}return e})();function t9(e,o){e&1&&(x(0,"div"),V(1,"cc-nav-bar")(2,"router-outlet")(3,"cc-changelog-dialog"),v())}function i9(e,o){e&1&&V(0,"cc-boot-loading-indicator")}var Ww=(()=>{class e{constructor(t){this.loadFilesUseCase=t,this.isInitialized=Se(!1)}ngOnInit(){this.loadFilesUseCase.loadOnBoot().catch(()=>{}).finally(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(i){return new(i||e)(ne(Us))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-code-charta"]],decls:4,vars:1,template:function(i,n){i&1&&(V(0,"cc-error-dialog")(1,"cc-toast"),K(2,t9,4,0,"div")(3,i9,1,0,"cc-boot-loading-indicator")),i&2&&(h(2),Q(n.isInitialized()?2:3))},dependencies:[Km,Ld,If,c0,Tu,Rf],encapsulation:2,changeDetection:0})}}return e})();_u(Ww,et(ke({},um),{providers:[vu(),...um.providers]}));
3596
+ </Relationships>`}async function xw(e){let{vertices:o,triangles:t,volumes:i}=bM(e),n=pw(o,t),r=fw(i),a=gw(),s=bw(),l=!0,d={"3D":{"3dmodel.model":kn(n,l)},_rels:{".rels":kn(s,l)},Metadata:{"Slic3r_PE_model.config":kn(r,l)},"[Content_Types].xml":kn(a,l)};return uw(d,{comment:"created by CodeCharta"}).buffer}function bM(e){let o=[],t=[],i=[],n=new Map,r=new Map;for(let a of e.children)ww(a,o,t,n,r,i);return{vertices:o,triangles:t,volumes:i}}function ww(e,o,t,i,n,r,a=void 0){if(!e.visible)return;for(let c of e.children){let m=e.matrix;a&&(m=a.clone().multiply(e.matrix)),ww(c,o,t,i,n,r,m)}let s=vM(e),l=new Map,d=1;for(let[c,m]of s.entries()){let u=t.length;xM(o,i,l,m,e,a),wM(e.geometry,t,l,m),SM(e,c,u,t.length-1,r,d,n),d++}}function vM(e){let o=new Map;if(e.geometry.attributes.color)for(let t=0;t<e.geometry.attributes.color.count;t++){let i=vw(e.geometry.attributes.color,t);o.has(i)?o.get(i).push(t):o.set(i,[t])}else if(e.geometry.attributes.position){let t=e.material,i;if(t.color)i=t.color.getHexString();else if(t.isShaderMaterial){let r=t.defaultAttributeValues.color;i=vw(r,0)}let n=Array.from({length:e.geometry.attributes.position.count},(r,a)=>a);o.set(i,n)}return o}function xM(e,o,t,i,n,r){let a=n.geometry.attributes.position;for(let s of i){let l=new Ke(a.getX(s),a.getY(s),a.getZ(s));l.applyMatrix4(n.matrix),r&&l.applyMatrix4(r);let d=`<vertex x="${l.x}" y="${l.y}" z="${l.z}"/>`;o.has(d)?t.set(s,o.get(d)):(e.push(d),o.set(d,e.length-1),t.set(s,e.length-1))}}function wM(e,o,t,i){if(e.index){let n=e.index;for(let r=0;r<n.count;r+=3){let a=n.getX(r),s=n.getY(r),l=n.getZ(r);if(i.includes(a)&&i.includes(s)&&i.includes(l)){let d=`<triangle v1="${t.get(a)}" v2="${t.get(s)}" v3="${t.get(l)}" />`;o.push(d)}}}else for(let n=0;n<t.size;n+=3){let r=`<triangle v1="${t.get(n)}" v2="${t.get(n+1)}" v3="${t.get(n+2)}" />`;o.push(r)}}function SM(e,o,t,i,n,r,a){a.has(o)||a.set(o,a.size+1);let s=a.get(o),l=e.name==="Map"?`${e.name} 0x${o}`:e.name,d={id:r,name:l,color:o,extruder:s,firstTriangleId:t,lastTriangleId:i};n.push(d)}function vw(e,o){return(e instanceof So?[e.getX(o),e.getY(o),e.getZ(o)]:[e[o],e[o+1],e[o+2]]).map(i=>Math.round(i*255).toString(16).padStart(2,"0")).join("")}var Sw=(()=>{class e{constructor(){this.isPrintMeshLoaded=Z.required(),this.download3MF=_e(),this.downloadSTL=_e()}handleDownload3MF(){this.download3MF.emit()}handleDownloadSTL(){this.downloadSTL.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-export-actions"]],inputs:{isPrintMeshLoaded:[1,"isPrintMeshLoaded"]},outputs:{download3MF:"download3MF",downloadSTL:"downloadSTL"},decls:7,vars:2,consts:[[1,"flex","gap-2"],["title","Download 3MF Button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-download"],["title","Download STL Button",1,"btn","btn-outline",3,"click","disabled"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.handleDownload3MF()}),pe(2,"i",2),g(3," Download 3MF "),M(),y(4,"button",3),ie("click",function(){return n.handleDownloadSTL()}),pe(5,"i",2),g(6," Download minimal STL "),M()()),i&2&&(h(),ce("disabled",!n.isPrintMeshLoaded()),h(3),ce("disabled",!n.isPrintMeshLoaded()))},encapsulation:2})}}return e})();var yw=(()=>{class e{constructor(){this.frontText=Z(""),this.textChanged=_e()}handleInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-front-text-input"]],inputs:{frontText:[1,"frontText"]},outputs:{textChanged:"textChanged"},decls:5,vars:1,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["type","text","placeholder","CodeCharta","data-testid","frontText",1,"input","input-bordered","w-full",3,"input","value"]],template:function(i,n){i&1&&(y(0,"label",0)(1,"div",1)(2,"span",2),g(3,"Bottom center label text"),M()(),y(4,"input",3),ie("input",function(a){return n.handleInput(a)}),M()()),i&2&&(h(4),ce("value",n.frontText()))},encapsulation:2})}}return e})();var yM=["fileInput"];function CM(e,o){if(e&1){let t=we();x(0,"div",5)(1,"button",6),z("click",function(){ae(t);let n=B();return se(n.handleRemoveLogo())}),V(2,"i",7),g(3," Remove "),v(),x(4,"button",8),z("click",function(){ae(t);let n=B();return se(n.handleRotateLogo())}),V(5,"i",9),g(6," Rotate "),v(),x(7,"button",10),z("click",function(){ae(t);let n=B();return se(n.handleFlipLogo())}),V(8,"i",11),g(9," Flip "),v()(),x(10,"div",12)(11,"cc-inline-color-picker",13),z("colorChange",function(n){ae(t);let r=B();return se(r.handleColorChange(n))}),v(),x(12,"span",14),g(13,"Color"),v()()}if(e&2){let t=B();h(11),F("hexColor",t.logoColor())}}var Cw=(()=>{class e{constructor(){this.fileInput=Je.required("fileInput"),this.isFileSelected=Z.required(),this.logoColor=Z("#ffffff"),this.fileSelected=_e(),this.logoRemoved=_e(),this.logoRotated=_e(),this.logoFlipped=_e(),this.colorChanged=_e()}handleFileSelected(t){let n=t.target.files?.[0];n&&this.fileSelected.emit(n)}handleRemoveLogo(){this.fileInput().nativeElement.value="",this.logoRemoved.emit()}handleRotateLogo(){this.logoRotated.emit()}handleFlipLogo(){this.logoFlipped.emit()}handleColorChange(t){this.colorChanged.emit(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-logo-upload"]],viewQuery:function(i,n){i&1&&rt(n.fileInput,yM,5),i&2&&at()},inputs:{isFileSelected:[1,"isFileSelected"],logoColor:[1,"logoColor"]},outputs:{fileSelected:"fileSelected",logoRemoved:"logoRemoved",logoRotated:"logoRotated",logoFlipped:"logoFlipped",colorChanged:"colorChanged"},decls:7,vars:1,consts:[["fileInput",""],[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","file","aria-label","Bottom left logo (SVG)","accept",".svg",1,"file-input","file-input-bordered","file-input-sm","w-full",3,"change"],[1,"flex","flex-wrap","gap-2","mt-2"],["title","Remove Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-times"],["title","Rotate Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-rotate-right"],["title","Flip Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-arrows-h"],[1,"flex","items-center","gap-2","mt-2"],["ariaLabel","Logo color",3,"colorChange","hexColor"],[1,"text-sm"]],template:function(i,n){i&1&&(x(0,"div",1)(1,"div",2)(2,"h3",3),g(3,"Bottom left logo (SVG)"),v(),x(4,"input",4,0),z("change",function(a){return n.handleFileSelected(a)}),v(),K(6,CM,14,1),v()()),i&2&&(h(6),Q(n.isFileSelected()?6:-1))},dependencies:[Eo],encapsulation:2})}}return e})();var MM=(e,o)=>o.name;function _M(e,o){if(e&1&&(y(0,"option",4),g(1),M()),e&2){let t=o.$implicit,i=B();ce("selected",t.name===i.selectedPrinter().name),h(),bu(" ",t.name," (",t.x/10,"\xD7",t.y/10,"\xD7",t.z/10,"cm, ",t.numberOfColors," colors) ")}}var Km=[{name:"Prusa MK3S (single color)",x:245,y:205,z:205,numberOfColors:1},{name:"BambuLab A1 + AMS Lite",x:251,y:251,z:251,numberOfColors:4},{name:"Prusa XL (5 colors)",x:355,y:335,z:355,numberOfColors:5}],Mw=(()=>{class e{constructor(){this.selectedPrinter=Z.required(),this.printerChanged=_e(),this.printers=Km}handlePrinterChange(t){let i=t.target,n=this.printers[i.selectedIndex];this.printerChanged.emit(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-printer-preset-selection"]],inputs:{selectedPrinter:[1,"selectedPrinter"]},outputs:{printerChanged:"printerChanged"},decls:7,vars:0,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["data-testid","selectPrinter",1,"select","select-bordered","w-full",3,"change"],["data-testid","selectedPrinter",3,"selected"]],template:function(i,n){i&1&&(y(0,"label",0)(1,"div",1)(2,"span",2),g(3,"Printer preset"),M()(),y(4,"select",3),ie("change",function(a){return n.handlePrinterChange(a)}),Pe(5,_M,2,6,"option",4,MM),M()()),i&2&&(h(5),Be(n.printers))},encapsulation:2})}}return e})();function EM(e,o){if(e&1){let t=we();y(0,"input",7),ie("input",function(n){ae(t);let r=B();return se(r.handleTextInput(n))}),M()}if(e&2){let t=B();ce("value",t.currentText())}}var _w=(()=>{class e{constructor(){this.isVisible=Z.required(),this.currentText=Z(""),this.visibilityChanged=_e(),this.textChanged=_e()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-qr-code-settings"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","qrCodeToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","URL for QR code","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"h3",2),g(3,"QR-Code"),M(),y(4,"label",3)(5,"input",4),ie("change",function(a){return n.handleToggleChange(a)}),M(),y(6,"span",5),g(7,"Show QR-Code"),M()(),K(8,EM,1,1,"input",6),M()()),i&2&&(h(5),ce("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2})}}return e})();var Ew=(()=>{class e{constructor(){this.currentSize=Z.required(),this.wantedWidth=Z.required(),this.maxWidth=Z.required(),this.selectedPrinter=Z.required(),this.widthChanged=_e()}handleSliderChange(t){let i=t.target;this.widthChanged.emit(Number(i.value))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-scale-slider"]],inputs:{currentSize:[1,"currentSize"],wantedWidth:[1,"wantedWidth"],maxWidth:[1,"maxWidth"],selectedPrinter:[1,"selectedPrinter"]},outputs:{widthChanged:"widthChanged"},decls:12,vars:9,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","range","aria-label","Scale","data-testid","onScaleChange",1,"range","range-primary","range-sm",3,"change","min","max","value"],["data-testid","printSizeOverview",1,"text-sm","mt-2"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"h3",2),g(3,"Scale"),M(),y(4,"input",3),ie("change",function(a){return n.handleSliderChange(a)}),M(),y(5,"div",4)(6,"div"),g(7),M(),y(8,"div"),g(9),M(),y(10,"div"),g(11),M()()()()),i&2&&(h(4),ce("min",100)("max",n.maxWidth())("value",n.wantedWidth()),h(3),Yi("Width: ",(n.currentSize().x/10).toFixed(1),"cm (max. ",(n.selectedPrinter().x/10).toFixed(1),")"),h(2),Yi("Depth: ",(n.currentSize().y/10).toFixed(1),"cm (max. ",(n.selectedPrinter().y/10).toFixed(1),")"),h(2),Yi("Height: ",(n.currentSize().z/10).toFixed(1),"cm (max. ",(n.selectedPrinter().z/10).toFixed(1),")"))},encapsulation:2})}}return e})();function kM(e,o){if(e&1){let t=we();y(0,"input",7),ie("input",function(n){ae(t);let r=B();return se(r.handleTextInput(n))}),M()}if(e&2){let t=B();ce("value",t.currentText())}}var kw=(()=>{class e{constructor(){this.isVisible=Z.required(),this.currentText=Z(""),this.visibilityChanged=_e(),this.textChanged=_e()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-second-row-text-input"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","secondRowToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","aria-label","Second row center text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"h3",2),g(3,"Second row center text"),M(),y(4,"label",3)(5,"input",4),ie("change",function(a){return n.handleToggleChange(a)}),M(),y(6,"span",5),g(7,"Show second row text"),M()(),K(8,kM,1,1,"input",6),M()()),i&2&&(h(5),ce("checked",n.isVisible()),h(3),Q(n.isVisible()?8:-1))},encapsulation:2})}}return e})();var qw=(()=>{class e{constructor(t,i,n,r,a){this.mapStateReadWindow=t,this.metricsLensSourceReadWindow=i,this.sharedViewReadWindow=n,this.fileStoreReadWindow=r,this.ccStateSnapshot=a}getAreaMetric(){return this.mapStateReadWindow.getAreaMetric()}getHeightMetric(){return this.mapStateReadWindow.getHeightMetric()}getColorMetric(){return this.mapStateReadWindow.getColorMetric()}getColorRange(){return this.mapStateReadWindow.getColorRange()}getAttributeDescriptors(){return this.metricsLensSourceReadWindow.getAttributeDescriptors()}getNodeMetricData(){return Co(this.ccStateSnapshot.get())}getExcludedNodes(){return this.sharedViewReadWindow.getExcludedNodes()}getFiles(){return this.fileStoreReadWindow.getFiles()}getAccumulatedFileName(){return Et(this.ccStateSnapshot.get()).unifiedFileMeta?.fileName}static{this.\u0275fac=function(i){return new(i||e)(E(xe),E(As),E(Bt),E(Re),E(Vt))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var TM=["dialog"],RM=["rendererContainer"],Qm=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.dialog=Je.required("dialog"),this.rendererContainer=Je.required("rendererContainer"),this.closed=_e(),this.currentSize=Se(new Ke),this.isPrintMeshLoaded=Se(!1),this.frontText=Se(""),this.logoColor=Se("#ffffff"),this.isFileSelected=Se(!1),this.secondRowVisible=Se(!1),this.secondRowText=Se(new Date().toLocaleDateString()),this.qrCodeVisible=Se(!1),this.qrCodeText=Se("maibornwolff.de/service/it-sanierung"),this.selectedPrinter=Se(Km[2]),this.maxWidth=Se(0),this.wantedWidth=Se(0),this.layerHeight=.2,this.frontTextSize=8,this.secondRowTextSize=6,this.frontPrintDepth=.6,this.mapSideOffset=10,this.baseplateHeight=1,this.logoSize=10,this.primaryShaderMaterialIndex=0,this.exportMesh=this.threeSceneService.getMapMesh().toExportMesh();let n=Wm(new Ke(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.maxWidth.set(n),this.wantedWidth.set(n),this.currentSize.update(a=>(a.x=n,a)),this.currentNumberOfColors=this.selectedPrinter().numberOfColors,this.areaMetric=this.stateAccessStore.getAreaMetric(),this.heightMetric=this.stateAccessStore.getHeightMetric(),this.colorMetric=this.stateAccessStore.getColorMetric();let r=this.stateAccessStore.getNodeMetricData();this.nodeMetricData=r.filter(a=>a.name===this.areaMetric||a.name===this.heightMetric||a.name===this.colorMetric)}async ngAfterViewInit(){let t=this.dialog().nativeElement;t.addEventListener("close",()=>this.closed.emit()),t.showModal(),await this.createScene(),this.isPrintMeshLoaded.set(!0)}close(){this.dialog().nativeElement.close()}handleScaleChange(t){this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize())}handleFrontTextChange(t){this.frontText.set(t),this.previewMesh.updateFrontText(t)}handleFileSelected(t){this.isFileSelected.set(!0);let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{this.previewMesh.addCustomLogo(i.result)}}handleRotateLogo(){this.previewMesh.rotateCustomLogo()}handleFlipLogo(){this.previewMesh.flipCustomLogo()}handleRemoveLogo(){this.isFileSelected.set(!1),this.previewMesh.removeCustomLogo()}handlePrinterChange(t){this.selectedPrinter.set(t);let i=t.numberOfColors;this.currentNumberOfColors!==i&&(this.previewMesh.updateNumberOfColors(i),this.currentNumberOfColors=i),this.makeMapMaxSize(),this.updateCameraPosition(this.printPreviewScene.getObjectByName("camera"))}handleLogoColorChange(t){this.logoColor.set(t),this.previewMesh.updateCustomLogoColor(t)}handleQrCodeTextChange(t){this.qrCodeText.set(t),this.previewMesh.updateQrCodeText(t),this.previewMesh.updateQrCodeVisibility(this.qrCodeVisible())}handleQrCodeVisibilityChange(t){this.qrCodeVisible.set(t),this.previewMesh.updateQrCodeVisibility(t)}handleSecondRowTextChange(t){this.secondRowText.set(t),this.previewMesh.updateSecondRowText(t),this.previewMesh.updateSecondRowVisibility(this.secondRowVisible())}handleSecondRowVisibilityChange(t){this.secondRowVisible.set(t),this.previewMesh.updateSecondRowVisibility(t)}async createScene(){let t=new Cs;t.name="printPreviewScene",this.printPreviewScene=t,t.background=new Kn(15527388);let i=this.threeSceneService.scene.clone().children[3];i.name="lights",t.add(i);let n=new ys(45,1.15,50,2e5);n.name="camera",n.up=new Ke(0,0,1),t.add(n),this.initRenderer(t,n),this.previewMesh=new od(this.initGeometryOptions()),await this.previewMesh.initialize(),this.currentSize.set(this.previewMesh.getSize()),t.add(this.previewMesh.getThreeMesh()),this.updateCameraPosition(n)}initRenderer(t,i){let n=this.getGL(),r=this.rendererContainer().nativeElement,a=r.offsetWidth||600,s=r.offsetHeight||450;n.setSize(a,s,!0),r.appendChild(n.domElement);let l=new Ps(i,n.domElement),d=function(){requestAnimationFrame(d),l.update(),n.render(t,i)};d()}getGL(){return new Ts}updateCameraPosition(t){let i=this.currentSize();t.position.set(-i.x*.2,-i.y*1.2,i.z*3)}async handleDownload3MF(){let t=await xw(this.printPreviewScene.getObjectByName("PrintMesh"));this.downloadFile(t,"3mf")}makeMapMaxSize(){let t=Wm(new Ke(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize()),this.maxWidth.set(this.currentSize().x)}handleDownloadSTL(){let t=new Cc().parse(this.previewMesh.getMapMesh(),{binary:!0});this.downloadFile(t,"stl")}initGeometryOptions(){let t=this.stateAccessStore.getAttributeDescriptors(),i=Hs,n=t[this.areaMetric]?.title||i.get(this.areaMetric),r=t[this.heightMetric]?.title||i.get(this.heightMetric),a=t[this.colorMetric]?.title||i.get(this.colorMetric);return{originalMapMesh:this.exportMesh,width:this.wantedWidth(),areaMetricTitle:n,areaMetricData:this.nodeMetricData.find(s=>s.name===this.areaMetric),heightMetricTitle:r,heightMetricData:this.nodeMetricData.find(s=>s.name===this.heightMetric),colorMetricTitle:a,colorMetricData:this.nodeMetricData.find(s=>s.name===this.colorMetric),colorRange:this.stateAccessStore.getColorRange(),frontText:this.frontText(),secondRowText:this.secondRowText(),secondRowVisible:this.secondRowVisible(),qrCodeText:this.qrCodeText(),defaultMaterial:this.exportMesh.material[this.primaryShaderMaterialIndex].clone(),numberOfColors:this.currentNumberOfColors,layerHeight:this.layerHeight,frontTextSize:this.frontTextSize,secondRowTextSize:this.secondRowTextSize,printHeight:this.frontPrintDepth,mapSideOffset:this.mapSideOffset,baseplateHeight:this.baseplateHeight,logoSize:this.logoSize}}downloadFile(t,i){let n=this.stateAccessStore.getFiles(),r=this.stateAccessStore.getAccumulatedFileName(),a=`${Is.getNewFileName(r,wi(n))}.${i}`;Fr.downloadData(t,a)}static{this.\u0275fac=function(i){return new(i||e)(ne(qw),ne(ft))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-export-3D-map-dialog"]],viewQuery:function(i,n){i&1&&rt(n.dialog,TM,5)(n.rendererContainer,RM,5),i&2&&at(2)},outputs:{closed:"closed"},decls:27,vars:13,consts:[["dialog",""],["rendererContainer",""],[1,"modal"],[1,"modal-box","max-w-6xl","w-11/12"],[1,"text-2xl","font-bold","mb-6"],[1,"flex","gap-6"],[1,"flex","flex-col","gap-4","w-1/3","min-w-72"],[3,"printerChanged","selectedPrinter"],[3,"widthChanged","currentSize","wantedWidth","maxWidth","selectedPrinter"],[3,"textChanged","frontText"],[3,"visibilityChanged","textChanged","isVisible","currentText"],[3,"fileSelected","logoRemoved","logoRotated","logoFlipped","colorChanged","isFileSelected","logoColor"],[1,"flex-1"],[1,"card","bg-base-200","h-full"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"w-full","min-h-96"],[1,"modal-action"],[3,"download3MF","downloadSTL","isPrintMeshLoaded"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"]],template:function(i,n){i&1&&(x(0,"dialog",2,0)(2,"div",3)(3,"h2",4),g(4,"3D Print CodeCharta Map"),v(),x(5,"div",5)(6,"div",6)(7,"cc-printer-preset-selection",7),z("printerChanged",function(a){return n.handlePrinterChange(a)}),v(),x(8,"cc-scale-slider",8),z("widthChanged",function(a){return n.handleScaleChange(a)}),v(),x(9,"cc-front-text-input",9),z("textChanged",function(a){return n.handleFrontTextChange(a)}),v(),x(10,"cc-second-row-text-input",10),z("visibilityChanged",function(a){return n.handleSecondRowVisibilityChange(a)})("textChanged",function(a){return n.handleSecondRowTextChange(a)}),v(),x(11,"cc-qr-code-settings",10),z("visibilityChanged",function(a){return n.handleQrCodeVisibilityChange(a)})("textChanged",function(a){return n.handleQrCodeTextChange(a)}),v(),x(12,"cc-logo-upload",11),z("fileSelected",function(a){return n.handleFileSelected(a)})("logoRemoved",function(){return n.handleRemoveLogo()})("logoRotated",function(){return n.handleRotateLogo()})("logoFlipped",function(){return n.handleFlipLogo()})("colorChanged",function(a){return n.handleLogoColorChange(a)}),v()(),x(13,"div",12)(14,"div",13)(15,"div",14)(16,"h3",15),g(17,"Preview"),v(),V(18,"div",16,1),v()()()(),x(20,"div",17)(21,"cc-export-actions",18),z("download3MF",function(){return n.handleDownload3MF()})("downloadSTL",function(){return n.handleDownloadSTL()}),v(),x(22,"button",19),z("click",function(){return n.close()}),g(23,"Close"),v()()(),x(24,"form",20)(25,"button"),g(26,"close"),v()()()),i&2&&(h(7),F("selectedPrinter",n.selectedPrinter()),h(),F("currentSize",n.currentSize())("wantedWidth",n.wantedWidth())("maxWidth",n.maxWidth())("selectedPrinter",n.selectedPrinter()),h(),F("frontText",n.frontText()),h(),F("isVisible",n.secondRowVisible())("currentText",n.secondRowText()),h(),F("isVisible",n.qrCodeVisible())("currentText",n.qrCodeText()),h(),F("isFileSelected",n.isFileSelected())("logoColor",n.logoColor()),h(9),F("isPrintMeshLoaded",n.isPrintMeshLoaded()))},dependencies:[Mw,Ew,yw,kw,_w,Cw,Sw],encapsulation:2})}}return e})();var Tw=(()=>{class e{constructor(t,i){this.store=t,this.mapStateReadWindow=i,this.colorMode$=this.store.select(mp)}getColorMode(){return this.mapStateReadWindow.getColorMode()}setAbsoluteColorMode(){this.store.dispatch(Ei({value:Go.absolute}))}static{this.\u0275fac=function(i){return new(i||e)(E(he),E(xe))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Pa=(()=>{class e{constructor(){this.colorModeStore=T(Tw),this.errorDialogService=T(os),this.activeViewStore=T(br),this.viewReadinessStore=T(ur),this.threeRendererService=T(kt),this.router=T(Nn),this.dialogOpen=Se(!1),this.isDialogOpen=this.dialogOpen.asReadonly()}requestExport(){if(this.activeViewStore.currentView()!=="metrics"){this.errorDialogService.open(this.buildSwitchToMetricsViewDialog());return}if(this.colorModeStore.getColorMode()===Go.absolute){this.dialogOpen.set(!0);return}this.errorDialogService.open(this.buildWrongColorModeDialog())}closeDialog(){this.dialogOpen.set(!1)}buildSwitchToMetricsViewDialog(){return{title:"3D export needs the Metric view",message:'<p>The 3D export builds on the rendered map, so it only works in the <strong>Metric view</strong>.<br><i class="fa fa-info-circle"></i> Use "Switch and continue" to open the Metric view and go straight to the export.<p>',resolveErrorData:{buttonText:"Switch and continue",onResolveErrorClick:()=>{this.switchToMetricsViewAndExport()}},dismissButtonText:"Stay here"}}async switchToMetricsViewAndExport(){await this.router.navigateByUrl(Ii.metrics)&&this.viewReadinessStore.isStale$("metrics").pipe(De(i=>!i),ut(1)).subscribe(()=>this.requestExport())}buildWrongColorModeDialog(){return{title:"Map could not be exported",message:'<p>3D map can only be exported when <strong>color mode</strong> is set to <strong>absolute</strong>.<br><i class="fa fa-info-circle"></i> You can change this under Color Metric Options or use "Change and continue" to directly change the color mode and continue.<p>',resolveErrorData:{buttonText:"Change and continue",onResolveErrorClick:()=>this.recolorTheMapAndExportIt()}}}recolorTheMapAndExportIt(){this.threeRendererService.afterRender$.pipe(ut(1)).subscribe(()=>this.dialogOpen.set(!0)),this.colorModeStore.setAbsoluteColorMode()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Or=(()=>{class e{transform(t){return Is.withoutCCExtension(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=ja({name:"removeExtension",type:e,pure:!0})}}return e})();var Rw=(e,o)=>o.fileMeta.fileName;function IM(e,o){if(e&1){let t=we();y(0,"li",9)(1,"button",10),ie("click",function(){let n=ae(t).$implicit,r=B(2);return se(r.handleReferenceChange(n))}),y(2,"span",11),g(3),pt(4,"removeExtension"),M()()()}if(e&2){let t=o.$implicit,i=B(2);h(),We("bg-base-200",i.isReferenceSelected(t))("font-bold",i.isReferenceSelected(t)),h(2),Te(vi(4,5,t.fileMeta.fileName))}}function AM(e,o){if(e&1&&(y(0,"div",5)(1,"ul",8),Pe(2,IM,5,7,"li",9,Rw),M()()),e&2){let t=B();h(2),Be(t.referenceOptions())}}function DM(e,o){if(e&1){let t=we();y(0,"li",9)(1,"button",10),ie("click",function(){let n=ae(t).$implicit,r=B(2);return se(r.handleComparisonChange(n))}),y(2,"span",11),g(3),pt(4,"removeExtension"),M()()()}if(e&2){let t=o.$implicit,i=B(2);h(),We("bg-base-200",i.isComparisonSelected(t))("font-bold",i.isComparisonSelected(t)),h(2),Te(vi(4,5,t.fileMeta.fileName))}}function FM(e,o){if(e&1&&(y(0,"div",5)(1,"ul",8),Pe(2,DM,5,7,"li",9,Rw),M()()),e&2){let t=B();h(2),Be(t.comparisonOptions())}}var Iw=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.navBarWriteStore=T(Cr),this.elementRef=T(Nt),this.fileStates=D(this.fileStoreReadWindow.files$,{requireSync:!0}),this.referenceFile=D(this.fileStoreReadWindow.referenceFile$,{requireSync:!0}),this.openDropdown=Se("none"),this.referenceLabel=Y(()=>{let t=this.referenceFile();return t?this.withoutExtension(t.fileMeta.fileName):"select reference file"}),this.comparisonFile=Y(()=>this.fileStates().find(t=>t.selectedAs===oi.Comparison)?.file),this.comparisonLabel=Y(()=>{let t=this.comparisonFile();return t?this.withoutExtension(t.fileMeta.fileName):"select comparison file"}),this.referenceOptions=Y(()=>this.fileStates().map(t=>t.file)),this.comparisonOptions=Y(()=>this.fileStates().filter(t=>t.selectedAs!==oi.Reference).map(t=>t.file)),this.swapDisabled=Y(()=>this.comparisonFile()===void 0)}handleDocumentClick(t){this.openDropdown()!=="none"&&t.target instanceof Node&&!this.elementRef.nativeElement.contains(t.target)&&this.openDropdown.set("none")}toggleDropdown(t){this.openDropdown.update(i=>i===t?"none":t)}handleReferenceChange(t){this.navBarWriteStore.setDeltaReference(t),this.openDropdown.set("none")}handleComparisonChange(t){this.navBarWriteStore.setDeltaComparison(t),this.openDropdown.set("none")}handleSwap(){this.swapDisabled()||this.navBarWriteStore.switchReferenceAndComparison()}isReferenceSelected(t){return this.referenceFile()?.fileMeta.fileName===t.fileMeta.fileName}isComparisonSelected(t){return this.comparisonFile()?.fileMeta.fileName===t.fileMeta.fileName}withoutExtension(t){return new Or().transform(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-delta-selector"]],hostBindings:function(i,n){i&1&&z("click",function(a){return n.handleDocumentClick(a)},Uo)},decls:15,vars:9,consts:[[1,"flex","items-center","gap-1"],[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[12rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[12rem]","w-max","max-w-[24rem]","z-[70]","p-1"],["type","button","title","Switch reference and comparison file",1,"btn","btn-ghost","btn-sm","btn-square",3,"click","disabled"],[1,"fa","fa-arrows-h"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],["type","button",1,"flex","items-center","gap-2","w-full","text-left","rounded-md","px-2","py-1","hover:bg-base-200",3,"click"],[1,"flex-1","whitespace-nowrap"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"div",1)(2,"button",2),ie("click",function(){return n.toggleDropdown("reference")}),y(3,"span",3),g(4),M(),pe(5,"i",4),M(),K(6,AM,4,0,"div",5),M(),y(7,"button",6),ie("click",function(){return n.handleSwap()}),pe(8,"i",7),M(),y(9,"div",1)(10,"button",2),ie("click",function(){return n.toggleDropdown("comparison")}),y(11,"span",3),g(12),M(),pe(13,"i",4),M(),K(14,FM,4,0,"div",5),M()()),i&2&&(h(),We("dropdown-open",n.openDropdown()==="reference"),h(3),Te(n.referenceLabel()),h(2),Q(n.openDropdown()==="reference"?6:-1),h(),ce("disabled",n.swapDisabled()),h(2),We("dropdown-open",n.openDropdown()==="comparison"),h(3),Te(n.comparisonLabel()),h(2),Q(n.openDropdown()==="comparison"?14:-1))},dependencies:[Or],encapsulation:2})}}return e})();var LM=(e,o)=>o.file.fileMeta.fileName;function NM(e,o){e&1&&pe(0,"i",16)}function PM(e,o){e&1&&pe(0,"i",17)}function BM(e,o){if(e&1){let t=we();y(0,"li",8)(1,"label",12)(2,"input",13),ie("change",function(n){let r=ae(t).$implicit,a=B(2);return se(a.handleCheckboxChange(r.file,n.target.checked))}),M(),y(3,"span",14),g(4),pt(5,"removeExtension"),M(),y(6,"button",15),ie("click",function(n){let r=ae(t).$implicit,a=B(2);return se(a.handleRemoveFileToggle(r.file,n))}),K(7,NM,1,0,"i",16)(8,PM,1,0,"i",17),M()()()}if(e&2){let t=o.$implicit,i=B(2);h(2),ce("checked",i.isFileSelected(t.file))("disabled",t.isRemoved),h(),We("line-through",t.isRemoved),h(),ge(" ",vi(5,7,t.file.fileMeta.fileName)," "),h(2),ce("title",t.isRemoved?"Undo remove map":"Remove map"),h(),Q(t.isRemoved?7:8)}}function VM(e,o){if(e&1){let t=we();y(0,"div",4)(1,"div",5)(2,"button",6),ie("click",function(){ae(t);let n=B();return se(n.handleSelectAll())}),g(3,"All"),M(),y(4,"button",6),ie("click",function(){ae(t);let n=B();return se(n.handleSelectNone())}),g(5,"None"),M(),y(6,"button",6),ie("click",function(){ae(t);let n=B();return se(n.handleSelectInvert())}),g(7,"Invert"),M()(),y(8,"ul",7),Pe(9,BM,9,9,"li",8,LM),M(),y(11,"div",9)(12,"span",10)(13,"button",11),ie("click",function(){ae(t);let n=B();return se(n.handleApply())}),g(14," Apply "),M()()()()}if(e&2){let t=B();h(9),Be(t.filesInUI()),h(3),We("tooltip-disabled",!t.applyButtonState().disabled),ot("data-tip",t.applyButtonState().tooltip||null),h(),ce("disabled",t.applyButtonState().disabled)}}var Aw=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.navBarWriteStore=T(Cr),this.elementRef=T(Nt),this.filesInStore=D(this.fileStoreReadWindow.files$,{requireSync:!0}),this.isOpen=Se(!1),this.filesInUI=Se([]),this.selectedFilesInUI=Se([]),this.triggerLabel=Y(()=>{let t=this.selectedFilesInStore();return t.length===0?"Select map":t.length===1?this.withoutExtension(t[0].fileMeta.fileName):`${this.withoutExtension(t[0].fileMeta.fileName)} +${t.length-1}`}),this.applyButtonState=Y(()=>this.selectedFilesInUI().length===0?{disabled:!0,tooltip:"Select at least one map"}:this.uiSelectionDiffersFromStore()?{disabled:!1,tooltip:""}:{disabled:!0,tooltip:"No changes to apply"}),this.syncFromStore(this.filesInStore())}handleDocumentClick(t){if(!this.isOpen())return;let i=t.target;this.elementRef.nativeElement.contains(i)||this.closeWithoutApplying()}toggleOpen(){this.isOpen()?this.closeWithoutApplying():(this.syncFromStore(this.filesInStore()),this.isOpen.set(!0))}handleCheckboxChange(t,i){let n=this.selectedFilesInUI();i?(n.includes(t)||this.selectedFilesInUI.set([...n,t]),this.filesInUI.update(r=>r.map(a=>a.file===t?{file:a.file,isRemoved:!1}:a))):this.selectedFilesInUI.set(n.filter(r=>r!==t))}handleRemoveFileToggle(t,i){i.stopPropagation(),i.preventDefault(),this.filesInUI.update(n=>n.map(r=>r.file.fileMeta.fileName===t.fileMeta.fileName?{file:r.file,isRemoved:!r.isRemoved}:r)),this.selectedFilesInUI.update(n=>n.filter(r=>r.fileMeta.fileName!==t.fileMeta.fileName))}handleSelectAll(){this.selectedFilesInUI.set(this.filesInUI().filter(t=>!t.isRemoved).map(t=>t.file))}handleSelectNone(){this.selectedFilesInUI.set([])}handleSelectInvert(){let t=this.filesInUI().filter(n=>!n.isRemoved);if(t.length===0)return;let i=this.selectedFilesInUI();i.length===0?this.selectedFilesInUI.set(t.map(n=>n.file)):i.length===t.length?this.selectedFilesInUI.set([]):this.selectedFilesInUI.set(t.filter(n=>!i.includes(n.file)).map(n=>n.file))}handleApply(){let t=this.filesInUI().filter(i=>i.isRemoved).map(i=>i.file.fileMeta.fileName);this.navBarWriteStore.setStandard(this.selectedFilesInUI()),this.navBarWriteStore.removeFiles(t),this.isOpen.set(!1)}closeWithoutApplying(){this.syncFromStore(this.filesInStore()),this.isOpen.set(!1)}syncFromStore(t){this.filesInUI.set(t.map(i=>({file:i.file,isRemoved:!1}))),this.selectedFilesInUI.set(t.filter(i=>i.selectedAs===oi.Partial).map(i=>i.file))}selectedFilesInStore(){return this.filesInStore().filter(t=>t.selectedAs===oi.Partial).map(t=>t.file)}uiSelectionDiffersFromStore(){if(this.filesInUI().some(n=>n.isRemoved))return!0;let t=this.selectedFilesInStore(),i=this.selectedFilesInUI();return i.length!==t.length?!0:!i.every(n=>t.includes(n))}withoutExtension(t){return new Or().transform(t)}isFileSelected(t){return this.selectedFilesInUI().includes(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-map-selector"]],hostBindings:function(i,n){i&1&&z("click",function(a){return n.handleDocumentClick(a)},Uo)},decls:6,vars:4,consts:[[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[14rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[14rem]","w-max","max-w-[32rem]","z-[70]","p-2"],[1,"flex","items-center","gap-1","px-1","pb-2","border-b","border-base-200"],["type","button",1,"btn","btn-ghost","btn-xs","flex-1",3,"click"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],[1,"flex","justify-end","mt-2"],[1,"tooltip"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"flex","items-center","gap-2","w-full","cursor-pointer","rounded-md","px-2","py-1","hover:bg-base-200"],["type","checkbox",1,"checkbox","checkbox-xs","shrink-0",3,"change","checked","disabled"],[1,"flex-1","whitespace-nowrap"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square","shrink-0",3,"click","title"],[1,"fa","fa-undo"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.toggleOpen()}),y(2,"span",2),g(3),M(),pe(4,"i",3),M(),K(5,VM,15,4,"div",4),M()),i&2&&(We("dropdown-open",n.isOpen()),h(3),Te(n.triggerLabel()),h(2),Q(n.isOpen()?5:-1))},dependencies:[Or],encapsulation:2})}}return e})();var Dw=()=>{let e=document.createElement("INPUT");return e.setAttribute("type","file"),e.setAttribute("accept",".json,.gz"),e.setAttribute("multiple",""),e.style.display="none",document.body.appendChild(e),e};var Fw=(()=>{class e{constructor(t){this.loadFilesUseCase=t}uploadFiles(){let t=Dw();t.addEventListener("change",()=>{this.uploadFilesOnEvent(t),t.remove()}),t.addEventListener("cancel",()=>t.remove()),t.click()}async uploadFilesOnEvent(t){if(!t.files||t.files.length===0)return;let i=t.files;await this.loadFilesUseCase.loadFromUpload(()=>this.readNameDataPairs(i))}async readNameDataPairs(t){let i=Array.from(t),n=[];for(let r=0;r<i.length;r++){let a=i[r];If(Af(a.name,r+1,i.length)),n.push({fileName:a.name,fileSize:a.size,content:await Xu(new Uint8Array(await a.arrayBuffer()))})}return n}static{this.\u0275fac=function(i){return new(i||e)(E(Xs))}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Lw=(()=>{class e{constructor(){this.uploadFilesService=T(Fw)}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-nav-bar-folder-button"]],decls:2,vars:0,consts:[["type","button","title","Load cc.json files",1,"btn","btn-ghost","btn-square",3,"click"],[1,"fa","fa-folder-open","text-lg"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.uploadFiles()}),pe(1,"i",1),M())},encapsulation:2})}}return e})();var Nw=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-nav-bar-logo"]],decls:2,vars:0,consts:[["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer","title","CodeCharta website",1,"flex","items-center","px-2"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta",1,"h-8","w-auto"]],template:function(i,n){i&1&&(y(0,"a",0),pe(1,"img",1),M())},encapsulation:2})}}return e})();var OM=["configDialog"],Pw=(()=>{class e{constructor(){this.dialog=Je.required("configDialog")}showSettings(){this.dialog().open()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-settings-button"]],viewQuery:function(i,n){i&1&&rt(n.dialog,OM,5),i&2&&at()},decls:4,vars:0,consts:[["configDialog",""],["type","button","title","Global Configuration",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(x(0,"button",1),z("click",function(){return n.showSettings()}),g(1,` Settings
3597
+ `),v(),V(2,"cc-global-configuration-dialog",null,0))},dependencies:[g0],encapsulation:2})}}return e})();var Bw=(()=>{class e{constructor(){this.store=T(he),this.isDomainViewAvailable=D(this.store.select(y0),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function zM(e,o){e&1&&pe(0,"span",2)}function $M(e,o){e&1&&pe(0,"span",2)}var Vw=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.fileSelectionModeService=T(gl),this.router=T(Nn),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0})}selectExplore(){this.showMetricsView(),this.isDeltaState()&&this.fileSelectionModeService.toggle()}selectCompare(){this.showMetricsView(),this.isDeltaState()||this.fileSelectionModeService.toggle()}showMetricsView(){this.router.navigateByUrl(Ii.metrics)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-mode-toggle"]],decls:7,vars:8,consts:[["role","tablist",1,"flex","items-center","gap-1"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"click"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(y(0,"div",0)(1,"button",1),ie("click",function(){return n.selectExplore()}),g(2," Explore "),K(3,zM,1,0,"span",2),M(),y(4,"button",1),ie("click",function(){return n.selectCompare()}),g(5," Compare "),K(6,$M,1,0,"span",2),M()()),i&2&&(h(),We("font-bold",!n.isDeltaState()),ot("aria-selected",!n.isDeltaState()),h(2),Q(n.isDeltaState()?-1:3),h(),We("font-bold",n.isDeltaState()),ot("aria-selected",n.isDeltaState()),h(2),Q(n.isDeltaState()?6:-1))},encapsulation:2})}}return e})();var Ww=(()=>{class e{constructor(){this.export3DMapDialogStore=T(Pa)}export3DMap(){this.export3DMapDialogStore.requestExport()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-print-3d-button"]],decls:2,vars:0,consts:[["type","button","title","Download 3MF code file",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(y(0,"button",0),ie("click",function(){return n.export3DMap()}),g(1,` 3D Print
3598
+ `),M())},encapsulation:2})}}return e})();function jM(e,o){e&1&&V(0,"cc-mode-toggle")(1,"cc-print-3d-button")}function HM(e,o){e&1&&V(0,"span",3)}function UM(e,o){if(e&1&&(x(0,"a",2,0),g(2," Explore "),K(3,HM,1,0,"span",3),v()),e&2){let t=$r(1),i=B();F("routerLink",i.routeLinks.domain),h(3),Q(t.isActive?3:-1)}}var GM={metrics:"Metric modes",domain:"Domain modes"},Ow=(()=>{class e{constructor(){this.view=Z.required(),this.routeLinks=Ii,this.groupLabel=Y(()=>GM[this.view()])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-mode-bar"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"]},decls:3,vars:2,consts:[["domainExplore","routerLinkActive"],[1,"flex","items-center","justify-center","gap-1","py-0.5","border-0","m-0","px-0","min-w-0"],["routerLinkActive","font-bold","data-testid","view-mode-domain-explore",1,"btn","btn-ghost","btn-sm","relative",3,"routerLink"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(x(0,"fieldset",1),K(1,jM,2,0)(2,UM,4,2,"a",2),v()),i&2&&(ot("aria-label",n.groupLabel()),h(),Q(n.view()==="metrics"?1:2))},dependencies:[Vw,Ww,Za,Ya],encapsulation:2})}}return e})();var XM=()=>({exact:!0});function KM(e,o){e&1&&V(0,"span",5)}function QM(e,o){e&1&&V(0,"span",5)}function ZM(e,o){if(e&1){let t=we();x(0,"a",9,1),z("mouseenter",function(){ae(t);let n=B();return se(n.openModeBar("domain"))})("focusin",function(){ae(t);let n=B();return se(n.openModeBar("domain"))}),g(2," Domain "),K(3,QM,1,0,"span",5),v()}if(e&2){let t=$r(1),i=B();We("font-bold",t.isActive),F("routerLink",i.routeLinks.domain),h(3),Q(t.isActive?3:-1)}}function YM(e,o){if(e&1){let t=we();x(0,"div",10),z("mouseenter",function(){ae(t);let n=B();return se(n.cancelPendingClose())})("mouseleave",function(){ae(t);let n=B();return se(n.scheduleClosingModeBar())}),V(1,"cc-view-mode-bar",11),v()}e&2&&(h(),F("view",o))}function JM(e,o){if(e&1){let t=we();x(0,"span",12),z("mouseenter",function(){ae(t);let n=B();return se(n.openModeBar(n.activeView()))}),Ho(),x(1,"svg",13),V(2,"path",14),v()()}}var e9=200,zw=(()=>{class e{constructor(){this.readStore=T(Bw),this.hostElement=T(Nt),this.isDomainViewAvailable=this.readStore.isDomainViewAvailable,this.activeView=D(T(br).activeView$,{requireSync:!0}),this.routeLinks=Ii,this.previewedView=Se(null),this.pendingClose=null,T(Tn).onDestroy(()=>this.cancelPendingClose())}openModeBar(t){this.cancelPendingClose(),this.previewedView.set(t)}cancelPendingClose(){this.pendingClose!==null&&(clearTimeout(this.pendingClose),this.pendingClose=null)}scheduleClosingModeBar(){this.cancelPendingClose(),this.pendingClose=setTimeout(()=>this.closeModeBar(),e9)}closeModeBarWhenFocusLeaves(t){let i=t.relatedTarget;(!(i instanceof Node)||!this.hostElement.nativeElement.contains(i))&&this.closeModeBar()}closeModeBar(){this.cancelPendingClose(),this.previewedView.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-view-switcher"]],hostAttrs:[1,"contents"],decls:9,vars:8,consts:[["metricsTab","routerLinkActive"],["domainTab","routerLinkActive"],[1,"flex","items-center",3,"click","mouseleave","focusout"],["aria-label","View","data-testid","view-switcher",1,"flex","items-center","gap-1"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the 3D metrics map","data-testid","view-switcher-metrics",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink","routerLinkActiveOptions"],[1,"cc-current-underline"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md",3,"mouseenter","mouseleave"],[3,"view"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70",3,"mouseenter"],["viewBox","0 0 10 6","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"block","h-1.5","w-2.5"],["d","M1 1 5 5 9 1"]],template:function(i,n){if(i&1&&(x(0,"div",2),z("click",function(){return n.closeModeBar()})("mouseleave",function(){return n.scheduleClosingModeBar()})("focusout",function(a){return n.closeModeBarWhenFocusLeaves(a)}),x(1,"nav",3)(2,"a",4,0),z("mouseenter",function(){return n.openModeBar("metrics")})("focusin",function(){return n.openModeBar("metrics")}),g(4," Metric "),K(5,KM,1,0,"span",5),v(),K(6,ZM,4,4,"a",6),v(),K(7,YM,2,1,"div",7)(8,JM,3,0,"span",8),v()),i&2){let r,a=$r(3);h(2),We("font-bold",a.isActive),F("routerLink",n.routeLinks.metrics)("routerLinkActiveOptions",xu(7,XM)),h(3),Q(a.isActive?5:-1),h(),Q(n.isDomainViewAvailable()?6:-1),h(),Q((r=n.previewedView())?7:8,r)}},dependencies:[Za,Ya,Ow],encapsulation:2})}}return e})();function t9(e,o){e&1&&V(0,"cc-delta-selector")}function i9(e,o){e&1&&V(0,"cc-map-selector")}function o9(e,o){if(e&1){let t=we();x(0,"cc-export-3D-map-dialog",5),z("closed",function(){ae(t);let n=B();return se(n.closeExportDialog())}),v()}}var Zm=(()=>{class e{constructor(){this.fileStoreReadWindow=T(Re),this.export3DMapDialogStore=T(Pa),this.isDeltaState=D(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isExportDialogOpen=this.export3DMapDialogStore.isDialogOpen}closeExportDialog(){this.export3DMapDialogStore.closeDialog()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=k({type:e,selectors:[["cc-nav-bar"]],features:[bi([{provide:fr,useValue:"--cc-bars-height"}]),Zi([gr])],decls:12,vars:2,consts:[[1,"navbar","relative","bg-base-100","border-b","border-base-300","min-h-12","px-2"],[1,"navbar-start","gap-1"],[1,"divider","divider-horizontal","mx-0"],[1,"navbar-center","self-stretch"],[1,"navbar-end"],[3,"closed"]],template:function(i,n){i&1&&(x(0,"div",0)(1,"div",1),V(2,"cc-nav-bar-logo")(3,"div",2)(4,"cc-nav-bar-folder-button"),K(5,t9,1,0,"cc-delta-selector")(6,i9,1,0,"cc-map-selector"),v(),x(7,"div",3),V(8,"cc-view-switcher"),v(),x(9,"div",4),V(10,"cc-settings-button"),v()(),K(11,o9,1,0,"cc-export-3D-map-dialog")),i&2&&(h(5),Q(n.isDeltaState()?5:6),h(6),Q(n.isExportDialogOpen()?11:-1))},dependencies:[Qm,Nw,Lw,Aw,Iw,Pw,zw],encapsulation:2})}}return e})();function n9(e,o){e&1&&(x(0,"div"),V(1,"cc-nav-bar")(2,"router-outlet")(3,"cc-changelog-dialog"),v())}function r9(e,o){e&1&&V(0,"cc-boot-loading-indicator")}var $w=(()=>{class e{constructor(t){this.loadFilesUseCase=t,this.isInitialized=Se(!1)}ngOnInit(){this.loadFilesUseCase.loadOnBoot().catch(()=>{}).finally(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(i){return new(i||e)(ne(Xs))}}static{this.\u0275cmp=k({type:e,selectors:[["cc-code-charta"]],decls:4,vars:1,template:function(i,n){i&1&&(V(0,"cc-error-dialog")(1,"cc-toast"),K(2,n9,4,0,"div")(3,r9,1,0,"cc-boot-loading-indicator")),i&2&&(h(2),Q(n.isInitialized()?2:3))},dependencies:[Zm,Pd,Ff,m0,Au,Df],encapsulation:2})}}return e})();ku($w,et(ke({},fm),{providers:[wu(),...fm.providers]}));