import{_ as e,a as t,g as n,l as r,m as i,n as a,t as o,v as s,y as c}from"./chunk-NNHCCRGN.BGI6DATj.js";var l,u,d,f=(l=class extends o{constructor(){super([`treemap`])}},n(l,`TreemapTokenBuilder`),l),p=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,m=(u=class extends a{runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=p.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},n(u,`TreemapValueConverter`),u);function h(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}n(h,`registerValidationChecks`);var g=(d=class{checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},n(d,`TreemapValidator`),d),_={parser:{TokenBuilder:n(()=>new f,`TokenBuilder`),ValueConverter:n(()=>new m,`ValueConverter`)},validation:{TreemapValidator:n(()=>new g,`TreemapValidator`)}};function v(n=t){let a=c(s(n),r),o=c(e({shared:a}),i,_);return a.ServiceRegistry.register(o),h(o),{shared:a,Treemap:o}}n(v,`createTreemapServices`);export{v as n,_ as t};
//# sourceMappingURL=chunk-BR22UD5L.BngAao5a.js.map