import{n as e}from"./chunk.DuxOD-Sk.js";import{a as t,d as n,i as r,l as i,n as a,o,s,t as c,u as l}from"./space-separated-tokens.DeggmezP.js";function u(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){d.lastIndex=i;let e=d.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}var d,f=e((()=>{d=/[#.]/g})),p=e((()=>{f()}));function m(e,t,n){let r=n?b(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=u(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,h(i))a.unshift(i);else for(let[t,n]of Object.entries(i))g(e,o.properties,t,n)}for(let e of a)_(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function h(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function g(e,t,r,i){let o=s(e,r),c;if(i!=null){if(typeof i==`number`){if(Number.isNaN(i))return;c=i}else c=typeof i==`boolean`?i:typeof i==`string`?o.spaceSeparated?a(i):o.commaSeparated?n(i):o.commaOrSpaceSeparated?a(n(i).join(` `)):v(o,o.property,i):Array.isArray(i)?[...i]:o.property===`style`?y(i):String(i);if(Array.isArray(c)){let e=[];for(let t of c)e.push(v(o,o.property,t));c=e}o.property===`className`&&Array.isArray(t.className)&&(c=t.className.concat(c)),t[o.property]=c}}function _(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)_(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?_(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function v(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||i(n)===i(t)))return!0}return n}function y(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function b(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var x=e((()=>{l(),p(),t(),c()})),S,C=e((()=>{S=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`)})),w,T,E=e((()=>{t(),x(),C(),w=m(r,`div`),T=m(o,`g`,S)})),D=e((()=>{E()}));export{w as n,T as r,D as t};