"use strict";const l=require("@synnaxlabs/x");function d(s){var r,e,t="";if(typeof s=="string"||typeof s=="number")t+=s;else if(typeof s=="object")if(Array.isArray(s)){var n=s.length;for(r=0;r<n;r++)s[r]&&(e=d(s[r]))&&(t&&(t+=" "),t+=e)}else for(e in s)s[e]&&(t&&(t+=" "),t+=e);return t}function c(){for(var s,r,e=0,t="",n=arguments.length;e<n;e++)(s=arguments[e])&&(r=d(s))&&(t&&(t+=" "),t+=r);return t}const p=c,o="-",a="__",i="--",u=s=>{const r=(...e)=>p(...e);return r.B=(...e)=>s+o+e.join(o),r.E=e=>s+a+e,r.M=(...e)=>s+i+e.join("-"),r.BM=(e,...t)=>r.B(e)+i+t.join("-"),r.BE=(e,...t)=>r.B(e)+a+t.join(o),r.BEM=(e,t,...n)=>r.BE(e,t)+i+n.join(o),r.var=(...e)=>i+s+o+e.join(o),r};class h{rows=[];columns=[];prefix;constructor(r=""){this.prefix=r}row(r,e,t){const{prefix:n}=this;return this.rows.push({startLabel:n+r,endLabel:n+e,size:t}),this}col(r,e,t){const{prefix:n}=this;return this.columns.push({startLabel:n+r,endLabel:n+e,size:t}),this}build(){return{display:"grid",gridTemplateRows:this.rows.map((r,e)=>{let t=e===0?"[":"";return t+=`${r.startLabel}] ${r.size}${typeof r.size=="number"?"px":""} [${r.endLabel}`,t+=e===this.rows.length-1?"]":"",t}).join(" "),gridTemplateColumns:this.columns.map((r,e)=>{let t=e===0?"[":"";return t+=`${r.startLabel}] ${r.size}${typeof r.size=="number"?"px":""} [${r.endLabel}`,t+=e===this.columns.length-1?"]":"",t}).join(" ")}}}const M=(s,r)=>Object.entries(r).forEach(([e,t])=>t!=null&&s.style.setProperty(e,`${t}`)),b=(s,r)=>Array.from(s.style).forEach(e=>{e.startsWith(r)&&s.style.removeProperty(e)}),f=s=>{const r=u(s);return r.visible=e=>r.M(e?"visible":"hidden"),r.expanded=e=>r.M(e?"expanded":"collapsed"),r.loc=e=>r.M("location",l.location.construct(e)),r.disabled=e=>e===!0&&r.M("disabled"),r.align=e=>r.M(e),r.dir=e=>e!=null&&r.M("direction",l.direction.construct(e)),r.sharp=e=>e!==!1&&r.M("sharp"),r.rounded=e=>e!==!1&&r.M("rounded"),r.bordered=e=>typeof e=="boolean"?e&&r.M("bordered"):e!=null?r.M(`bordered-${e.toString()}`):r.M("bordered"),r.selected=e=>e&&r.M("selected"),r.altColor=e=>e&&r.M("alt-color"),r.editable=e=>e&&r.M("editable"),r.noSelect=r.M("no-select"),r.applyVars=M,r.removeVars=b,r.newGridBuilder=e=>new h(e),r.dropRegion=e=>e&&r.B("haul-drop-region"),r.px=e=>`${e}px`,r.inheritDims=(e=!0)=>e&&r.M("inherit-dims"),r.shade=(e=>e!=null&&r.M(`shade-${e}`)),r.colorVar=e=>{if(!(e==null||e===!1))return typeof e=="number"?`var(--${s}-gray-l${e})`:l.color.cssString(e)},r.levelSizeVar=e=>`var(--${s}-${e}-size)`,r.level=e=>r.M(`level-${e}`),r},m=f("pluto");exports.CSS=m;exports.clsx=c;exports.newBEM=u;
