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-DHF3V75i.js";var l=class extends o{static{n(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends a{static{n(this,`TreemapValueConverter`)}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=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}n(f,`registerValidationChecks`);var p=class{static{n(this,`TreemapValidator`)}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`}))}},m={parser:{TokenBuilder:n(()=>new l,`TokenBuilder`),ValueConverter:n(()=>new d,`ValueConverter`)},validation:{TreemapValidator:n(()=>new p,`TreemapValidator`)}};function h(n=t){let a=c(s(n),r),o=c(e({shared:a}),i,m);return a.ServiceRegistry.register(o),f(o),{shared:a,Treemap:o}}n(h,`createTreemapServices`);export{h as n,m as t};