@master/css 2.0.0-beta.138 → 2.0.0-beta.139

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 +1 @@
1
- var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(a,t)=>{for(var o in t)n(a,o,{get:t[o],enumerable:!0})},i=(a,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!f.call(a,r)&&r!==o&&n(a,r,{get:()=>t[r],enumerable:!(e=s(t,r))||e.enumerable});return a};var l=a=>i(n({},"__esModule",{value:!0}),a);var g={};c(g,{keyframes:()=>p});module.exports=l(g);var p={fade:{"0%":{opacity:0},to:{opacity:0}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},to:{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,to":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(.8,0,1,1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0,0,.2,1)"}},ping:{"75%,to":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},to:{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},to:{transform:"none"}}};0&&(module.exports={keyframes});
1
+ var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(a,t)=>{for(var o in t)n(a,o,{get:t[o],enumerable:!0})},i=(a,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!f.call(a,r)&&r!==o&&n(a,r,{get:()=>t[r],enumerable:!(e=s(t,r))||e.enumerable});return a};var l=a=>i(n({},"__esModule",{value:!0}),a);var g={};c(g,{keyframes:()=>p});module.exports=l(g);var p={fade:{"0%":{opacity:0},to:{opacity:1}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},to:{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,to":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(.8,0,1,1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0,0,.2,1)"}},ping:{"75%,to":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},to:{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},to:{transform:"none"}}};0&&(module.exports={keyframes});
@@ -1 +1 @@
1
- var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var i in t)g(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of k(t))!C.call(e,n)&&n!==i&&g(e,n,{get:()=>t[n],enumerable:!(c=$(t,n))||c.enumerable});return e};var R=e=>S(g({},"__esModule",{value:!0}),e);var I={};w(I,{rules:()=>T});module.exports=R(I);var v=require("../constants/start-symbol"),x=require("../utils/css-escape"),B={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},i=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let u=t[o],h=r.slice(0,a);h in u||(u[h]=r.slice(a+1))}},c=o=>{let r=(a,u)=>{let h=u.slice((0,x.cssEscape)(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let y of h)i(a,y)};if(this.theme){let a=o.natives.find(u=>u.theme===this.theme)??o.natives.find(u=>!u.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},n=[],l="",d=()=>{l&&(n.push(l.replace(/ /g,"")),l="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){d();continue}if(a==="}")break}if(l+=a,r===a){if(r==="'"||r==='"'){let u=0;for(let h=l.length-2;l[h]==="\\";h--)u++;if(u%2)continue}break}else a in v.START_SYMBOL&&r!=="'"&&r!=='"'&&(m++,o(v.START_SYMBOL[a]))}})(void 0),d();for(let o of n){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)c(a);else r?c(r):i(this.theme??"",o)}let s={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in s?s[r][o]=a:s[r]={[o]:a};return s}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){switch(e){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"margin-left":e+t,"margin-right":e+t}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"margin-top":e+t,"margin-bottom":e+t}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"padding-left":e+t,"padding-right":e+t}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"padding-top":e+t,"padding-bottom":e+t}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,i]=e.split(" x ");return{width:t,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"min-width":t,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"max-width":t,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0},overflowY:{native:!0},overflow:{native:!0,order:-1},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return b.call(this,e)},delete(e){return p.call(this,e)},insert(){return f.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return b.call(this,e)},delete(e){return p.call(this,e)},insert(){return f.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-left-color":e+t,"border-right-color":e+t}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-top-color":e+t,"border-bottom-color":e+t}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-top-right-radius":e+t}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(e,t){return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-left-style":e+t,"border-right-style":e+t}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-top-style":e+t,"border-bottom-style":e+t}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-left-width":e+t,"border-right-width":e+t}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-top-width":e+t,"border-bottom-width":e+t}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-left":e,"border-right":e}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-top":e,"border-bottom":e}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gapX:{unit:"rem",native:!0},gapY:{unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-left":e+t,"scroll-margin-right":e+t}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-left":e+t,"scroll-padding-right":e+t}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},T=B;function b(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function p(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let i=this.css.keyframes[t];if(!--i.count){let c=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(c),e.natives.splice(c,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function f(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:c}=this.css,n=i?.sheet;for(let l of this.keyframeNames)if(l in t)t[l].count++;else{let d={text:`@keyframes ${l}{`+Object.entries(e.keyframes[l]).map(([s,o])=>`${s}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=c[0]).natives.push(d):c.splice(0,0,m={natives:[d],get text(){return this.natives.map(s=>s.text).join("")}}),n){let s;for(let o=0;o<n.cssRules.length;o++){let r=n.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===l){s=r;break}}if(s)d.cssRule=s;else{let o=m.natives.length-1;n.insertRule(d.text,o),d.cssRule=n.cssRules[o]}}t[l]={native:d,count:1}}}}0&&(module.exports={rules});
1
+ var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var i in t)g(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of k(t))!C.call(e,n)&&n!==i&&g(e,n,{get:()=>t[n],enumerable:!(c=$(t,n))||c.enumerable});return e};var R=e=>S(g({},"__esModule",{value:!0}),e);var I={};w(I,{rules:()=>T});module.exports=R(I);var v=require("../constants/start-symbol"),x=require("../utils/css-escape"),B={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},i=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let u=t[o],h=r.slice(0,a);h in u||(u[h]=r.slice(a+1))}},c=o=>{let r=(a,u)=>{let h=u.slice((0,x.cssEscape)(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let y of h)i(a,y)};if(this.theme){let a=o.natives.find(u=>u.theme===this.theme)??o.natives.find(u=>!u.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},n=[],l="",d=()=>{l&&(n.push(l.replace(/ /g,"")),l="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){d();continue}if(a==="}")break}if(l+=a,r===a){if(r==="'"||r==='"'){let u=0;for(let h=l.length-2;l[h]==="\\";h--)u++;if(u%2)continue}break}else a in v.START_SYMBOL&&r!=="'"&&r!=='"'&&(m++,o(v.START_SYMBOL[a]))}})(void 0),d();for(let o of n){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)c(a);else r?c(r):i(this.theme??"",o)}let s={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in s?s[r][o]=a:s[r]={[o]:a};return s}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){switch(e){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"margin-left":e+t,"margin-right":e+t}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"margin-top":e+t,"margin-bottom":e+t}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"padding-left":e+t,"padding-right":e+t}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"padding-top":e+t,"padding-bottom":e+t}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,i]=e.split(" x ");return{width:t,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"min-width":t,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"max-width":t,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0},overflowY:{native:!0},overflow:{native:!0,order:-1},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return b.call(this,e)},delete(e){return p.call(this,e)},insert(){return f.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return b.call(this,e)},delete(e){return p.call(this,e)},insert(){return f.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-left-color":e+t,"border-right-color":e+t}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-top-color":e+t,"border-bottom-color":e+t}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-top-right-radius":e+t}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(e,t){return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-left-style":e+t,"border-right-style":e+t}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-top-style":e+t,"border-bottom-style":e+t}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-left-width":e+t,"border-right-width":e+t}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-top-width":e+t,"border-bottom-width":e+t}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-left":e,"border-right":e}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-top":e,"border-bottom":e}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-left":e+t,"scroll-margin-right":e+t}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-left":e+t,"scroll-padding-right":e+t}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},T=B;function b(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function p(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let i=this.css.keyframes[t];if(!--i.count){let c=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(c),e.natives.splice(c,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function f(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:c}=this.css,n=i?.sheet;for(let l of this.keyframeNames)if(l in t)t[l].count++;else{let d={text:`@keyframes ${l}{`+Object.entries(e.keyframes[l]).map(([s,o])=>`${s}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=c[0]).natives.push(d):c.splice(0,0,m={natives:[d],get text(){return this.natives.map(s=>s.text).join("")}}),n){let s;for(let o=0;o<n.cssRules.length;o++){let r=n.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===l){s=r;break}}if(s)d.cssRule=s;else{let o=m.natives.length-1;n.insertRule(d.text,o),d.cssRule=n.cssRules[o]}}t[l]={native:d,count:1}}}}0&&(module.exports={rules});
package/dist/cjs/css.js CHANGED
@@ -1 +1 @@
1
- var S=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var P=(y,e,n)=>e in y?S(y,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):y[e]=n;var U=(y,e)=>{for(var n in e)S(y,n,{get:e[n],enumerable:!0})},Y=(y,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let h of Z(e))!q.call(y,h)&&h!==n&&S(y,h,{get:()=>e[h],enumerable:!(r=_(e,h))||r.enumerable});return y};var G=y=>Y(S({},"__esModule",{value:!0}),y);var O=(y,e,n)=>(P(y,typeof e!="symbol"?e+"":e,n),n);var J={};U(J,{MasterCSS:()=>W});module.exports=G(J);function F(y){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&y instanceof e||y instanceof Date||y instanceof RegExp)}function I(y){if(typeof Buffer<"u"&&Buffer&&y instanceof Buffer){let e=Buffer.alloc(y.length);return y.copy(e),e}else{if(y instanceof Date)return new Date(y.getTime());if(y instanceof RegExp)return new RegExp(y);throw new Error("Unexpected situation")}}function $(y){let e=[];return y.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?e[r]=$(n):F(n)?e[r]=I(n):e[r]=j({},n):e[r]=n}),e}function L(y,e){return e==="__proto__"?void 0:y[e]}function j(...y){let e={},n,r;return y.forEach(function(h){typeof h!="object"||h===null||Array.isArray(h)||Object.keys(h).forEach(function(M){if(r=L(e,M),n=L(h,M),n!==e)if(typeof n!="object"||n===null){e[M]=n;return}else if(Array.isArray(n)){e[M]=$(n);return}else if(F(n)){e[M]=I(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){e[M]=j({},n);return}else{e[M]=j(r,n);return}})}),e}var D=require("./rule"),T=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var N=typeof window<"u",V=()=>{let y=document.createElement("style");return y.id="master",y},A=class{constructor(e=T.config){this.config=e;e?.override||(this.config=j(T.config,e),"keyframes"in e&&Object.assign(this.config.keyframes,e.keyframes)),this.cache(),N&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:n,selectors:r,themes:h,colors:M,values:B,breakpoints:R,mediaQueries:p,rules:k}=this.config;function C(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(t,s,i="",c={}){let a=x=>x?(i?i+"-":"")+x:i,g=Object.entries(t),v=[],w=[];for(let x of g){let E=x[1];(typeof E=="object"&&!Array.isArray(E)?v:w).push(x)}for(let[x,E]of v)o(E,s,a(x),c);if(s&&i)w.length&&(c[i]=w.reduce((x,[E,z])=>(x[E]=z,x),{}));else for(let[x,E]of w)c[a(x)]=E;return c}if(e)for(let[t,s]of Object.entries(o(e,!0)))this.semantics.push([new RegExp("^"+C(t)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[t,s]]);if(r)for(let[t,s]of Object.entries(o(r,!1))){let i=new RegExp(C(t)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let a=c.match(/^::-[a-z]+-/m)?.[0]??"",g=this.selectors[a];g||(g=this.selectors[a]=[]);let v=g.find(([w])=>w===i);v||(v=[i,[]],g.push(v)),v[1].push(c)}}B&&(this.globalValues=o(B,!1)),R&&(this.breakpoints=o(R,!1)),p&&(this.mediaQueries=o(p,!1));let f=n?o(n,!1):{},b=h&&!Array.isArray(h)?Object.entries(h).filter(([,{classes:t}])=>t).reduce((t,[s,{classes:i}])=>(t[s]=o(i,!1),t),{}):{},u=[...Object.keys(f),...Object.entries(b).flatMap(([t,s])=>Object.keys(s))],m=t=>{if(t in this.classes)return;let s=this.classes[t]=[],i=(c,a)=>{if(!a)return;let g=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let v of g){let w=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(t):this.themeAffectedClassesBy[x][c]=[t]:this.themeAffectedClassesBy[x]={[c]:[t]},s.includes(x)||s.push(x)};if(u.includes(v)){m(v);for(let x of this.classes[v])w(x)}else w(v)}};i("",f?.[t]);for(let[c,a]of Object.entries(b))i(c,a?.[t])};for(let t of u)m(t);for(let t in this.themeAffectedClassesBy){let s=this.classesBy[t]=[];for(let i of Object.values(this.themeAffectedClassesBy[t]))for(let c of i)s.includes(c)||s.push(c)}let l=(t,s)=>{if(!s)return;let i=o(s,!0);for(let[c,a]of Object.entries(i)){let g=typeof a=="string"?{"":a}:a;for(let[v,w]of Object.entries(g)){let x=c+(v?"-"+v:"");x in this.colorThemesMap?this.colorThemesMap[x][t]=w:this.colorThemesMap[x]={[t]:w}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(l("",M),h)if(Array.isArray(h))this.themeNames.push(...h);else for(let t in h){let s=h[t];l(t,s.colors),this.themeNames.push(t)}let d=t=>{for(let[s,i]of Object.entries(this.colorThemesMap))for(let[c,a]of Object.entries(i))a.startsWith("#")||t(s,i,c,a)};if(d((t,s,i,c)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(a){let g="#"+(0,H.rgbToHex)(+a[1],+a[2],+a[3]);a[4]&&(g+=Math.round(255*+a[4]).toString(16)),s[i]=g}}),d((t,s,i,c)=>{let[a,g]=c.split("/"),v=this.colorThemesMap[a];if(v){let w=(i?v[i]:void 0)??v[""];s[i]=g?w.slice(0,7)+Math.round(255*+g).toString(16):w}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[i],Object.keys(s).length||delete this.colorThemesMap[t]}),k)for(let t in k){let s=k[t],{native:i,values:c,colored:a}=s,g=s.match;if(s.id=t,s.native=i===!0?t.replace(/(?!^)[A-Z]/g,v=>"-"+v).toLowerCase():void 0,c&&(this.values[t]=o(c,!1)),g){let v=Object.keys(this.values[t]??{});g.includes("$values")&&(g=v.length?g.replace(/\$values/,v.join("|")):g.replace(/(?:\|)?\$values/,"")),a&&g.includes("$colors")&&(g=this.colorNames.length?g.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):g.replace(/(?:\|)?\$colors/,"")),this.matches[t]=new RegExp(g)}}}observe(e,n={subtree:!0,childList:!0}){if(this.root!==e){if(N&&e){this.root=e;let r=e===document;r&&(A.root=this),this.host=r?document.documentElement:root.host;let h=r?document.head:e,M=r?document.styleSheets:e.styleSheets;for(let R of M){let{ownerNode:p}=R;if(p.id==="master"){this.style=p;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let p=this.style.sheet.cssRules[R];if(p.constructor.name==="CSSKeyframesRule")continue;let k=o=>{if(o.selectorText){let b=o.selectorText.split(", ")[0].split(" ");for(let u=0;u<b.length;u++){let m=b[u];if(m[0]==="."){let l=m.slice(1),d="";for(let t=0;t<l.length;t++){let s=l[t],i=l[t+1];if(s==="\\"){if(t++,i!=="\\"){d+=i;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;d+=s}if(!(d in this.ruleBy)&&!(d in this.classes)){let t=this.create(d)[0];if(t)return t}}}}else if(o.cssRules)for(let f=0;f<o.cssRules.length;f++){let b=k(o.cssRules[f]);if(b)return b}},C=k(p);if(C){this.rules.push(C),this.ruleBy[C.className]=C;for(let o=0;o<C.natives.length;o++)C.natives[o].cssRule=this.style.sheet.cssRules[R+o];R+=C.natives.length-1,C.config.insert?.call(C)}}else this.style=V(),h.append(this.style);let B=R=>{R.forEach(p=>{p in this.countBy?this.countBy[p]++:(this.countBy[p]=1,this.insert(p))})};B(this.host.classList),n.subtree&&this.host.querySelectorAll("[class]").forEach(R=>B(R.classList)),this.observer=new MutationObserver(R=>{let p={},k=[],C=[],o=[],f=(l,d)=>{d?l.classList.forEach(u):l.classList.forEach(b);let t=l.children;for(let s=0;s<t.length;s++){let i=t[s];i.classList&&(C.push(i),f(i,d))}},b=l=>{l in p?p[l]++:p[l]=1},u=l=>{l in p?p[l]--:l in this.countBy&&(p[l]=-1)},m=(l,d)=>{for(let t=0;t<l.length;t++){let s=l[t];s.classList&&!C.includes(s)&&!o.includes(s)&&(s.isConnected!==d?(C.push(s),f(s,d)):o.push(s))}};for(let l=0;l<R.length;l++){let d=R[l],{addedNodes:t,removedNodes:s,type:i,target:c}=d;if(i==="attributes"){if(k.find(a=>a.target===c))continue;k.push(d)}else m(t,!1),(!c.isConnected||!C.includes(c))&&m(s,!0)}if(!(!k.length&&!Object.keys(p).length)){for(let{oldValue:l,target:d}of k){let t=C.includes(d),s=d.classList,i=l?l.split(" "):[];if(t){if(d.isConnected)continue;for(let c of i)s.contains(c)||u(c)}else if(d.isConnected){s.forEach(c=>{i.includes(c)||b(c)});for(let c of i)s.contains(c)||u(c)}}for(let l in p){let d=p[l],t=(this.countBy[l]||0)+d;t===0?(delete this.countBy[l],this.delete(l)):(l in this.countBy||this.insert(l),this.countBy[l]=t)}}}),this.observer.observe(e,{...n,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let n=e.cssRules.length-1;n>=0;n--)e.deleteRule(n);this.style?.remove(),this.style=null,this.root=null}match(e){for(let n in this.config.rules){let r=this.config.rules[n],h=this.matches[n],{symbol:M,native:B}=r;if(h&&h.test(e))return{origin:"match",config:r};if(M&&e.startsWith(M))return{origin:"symbol",config:r};if(B&&e.startsWith(B+":"))return{origin:"match",config:r}}for(let n of this.semantics)if(e.match(n[0]))return{origin:"semantics",value:n[1]}}create(e){let n=r=>{if(r in this.ruleBy)return this.ruleBy[r];let h=this.match(r);if(h)return new D.Rule(r,h,this)};return(e in this.classes?this.classes[e].map(r=>n(r)):[n(e)]).filter(r=>r&&r.text)}refresh(e){if(e?.override?this.config=e:this.config=j(T.config,e),this.cache(),!this.style)return;let n=V();this.style.replaceWith(n),this.style=n,this.rules.length=0,this.ruleBy={};for(let r in this.countBy)this.insert(r)}destroy(){let e=A.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let n=this.style?.sheet,r=h=>{let M=this.ruleBy[h];if(!(!M||h in this.classesBy&&this.classesBy[h].some(B=>B in this.countBy))){if(n&&M.natives.length){let B=M.natives[0];for(let R=0;R<n.cssRules.length;R++)if(n.cssRules[R]===B.cssRule){for(let k=0;k<M.natives.length;k++)n.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(M),1),delete this.ruleBy[h],M.config.delete&&M.config.delete.call(M,h)}};if(e in this.classes){for(let h of this.classes[e])h in this.countBy||r(h);delete this.ruleBy[e]}else r(e)}insert(e){let n=this.create(e);return n.length?(this.insertRules(n),!0):!1}insertRules(e){for(let n of e){if(this.ruleBy[n.className])continue;let r,h=this.rules.length-1,{media:M,order:B,priority:R,hasWhere:p,className:k}=n,C=(o,f,b,u)=>{let m=0,l;f&&(m=o.findIndex(f)),b&&(l=o.findIndex(b)),m===-1&&(m=o.length),(l===void 0||l===-1)&&(l=o.length);let d=o.slice(m,l);for(let t=0;t<d.length;t++){let s=d[t];if(!(s.priority===-1||u&&u(s))&&(s.priority<R||s.priority===R&&(p&&!s.hasWhere||s.order>=B)))return m+t}return m+d.length};if(M){let o=this.rules.findIndex(f=>f.media);if(o!==-1){let f=M.features["max-width"],b=M.features["min-width"];if(f&&b){let u=f.value-b.value;for(let m=h;m>=o;m--){r=m;let l=this.rules[m],d=l.media,t=d.features["max-width"],s=d.features["min-width"];if(!t||!s){r++;break}let i=t.value-s.value;if(i===u){if(p!==l.hasWhere)continue;if(R!==-1){let c=[this.rules[m]];for(let a=m-1;a>=o;a--){let g=this.rules[a];if(g.hasWhere!==p)break;let v=g.media,w=v.features["max-width"],x=v.features["min-width"];if(!w||!x||w.value-x.value!==i)break;c.unshift(this.rules[a])}r=C(this.rules,a=>a.media&&a.priority!==-1&&a.media.features["min-width"]&&a.media.features["max-width"])}break}else if(i>u)break}}else if(b)for(let u=o;u<=h;u++){r=u;let m=this.rules[u],l=m.media,d=l.features["max-width"],t=l.features["min-width"];if(d){if(t)break;continue}let s=t?.value;if(s===b.value){if(!p&&m.hasWhere){r++;continue}if(R!==-1)r=C(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else for(let i=u;i<=h;i++){let c=this.rules[i],a=c.media,g=a.features["min-width"];if(!a.features["max-width"]){if(c.hasWhere!==p||g.value!==s||c.order>=B)break;r=i+1}}break}else{if(s>b.value)break;r++}}else if(f)for(let u=h;u>=o;u--){r=u;let m=this.rules[u],l=m.media,d=l.features["max-width"];if(l.features["min-width"])continue;let s=d?.value;if(!s||s>f.value){r++;break}else if(s===f.value){if(p&&!m.hasWhere)continue;if(R!==-1)r=C(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else{let i=[this.rules[u]];for(let c=u-1;c>=o;c--){let a=this.rules[c],g=a.media,v=g.features["min-width"],w=g.features["max-width"];if(!v&&(!w||w.value!==s||a.hasWhere!==p))break;i.unshift(a)}for(let c=0;c<i.length;c++){let a=i[c];if(!a.media.features["min-width"]){if(a.order>=B)break;r=u-i.length+2+c}}}break}}}if(r===void 0)if(o===-1)r=h+1;else if(R!==-1)r=o+C(this.rules.slice(o),void 0,f=>f.media.features["max-width"]||f.media.features["min-width"]);else if(p){let f=o;for(;f<this.rules.length;f++){let b=this.rules[f];if(b.priority!==-1||!b.hasWhere||b.order>=B){r=f;break}}r===void 0&&(r=f)}else for(let f=o;f<=h;f++){r=f;let b=this.rules[f],u=b.media;if(b.priority!==-1||u.features["max-width"]||u.features["min-width"])break;if(b.hasWhere)r++;else if(b.order>=B)break}}else if(R===-1){if(p)r=this.rules.findIndex(o=>!o.hasWhere||o.media||o.priority!==-1||o.order>=B),r===-1&&(r=h+1);else{let o=0;for(;o<this.rules.length;o++){let f=this.rules[o];if(f.media||!f.hasWhere&&(f.order>=B||f.priority!==-1)){r=o;break}}r===void 0&&(r=o)}!r&&Object.keys(this.keyframes).length&&r++}else r=C(this.rules,void 0,o=>o.media);if(this.rules.splice(r,0,n),this.ruleBy[k]=n,this.style){let o=this.style.sheet,f=0,b=u=>{let m=this.rules[u];if(m){if(!m.natives.length)return b(u-1);let l=m.natives[m.natives.length-1].cssRule;for(let d=0;d<o.cssRules.length;d++)if(o.cssRules[d]===l){f=d+1;break}}};b(r-1);for(let u=0;u<n.natives.length;)try{let m=n.natives[u];o.insertRule(m.text,f),m.cssRule=o.cssRules[f++],u++}catch(m){console.error(m),n.natives.splice(u,1)}}n.config.insert?.call(n)}}get text(){return this.rules.map(e=>e.text).join("")}},W=A;O(W,"root"),O(W,"config",T.config),O(W,"instances",[]),O(W,"refresh",e=>{for(let n of A.instances)n.refresh(e)});N&&(window.MasterCSS=W);0&&(module.exports={MasterCSS});
1
+ var S=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var P=(g,e,i)=>e in g?S(g,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[e]=i;var U=(g,e)=>{for(var i in e)S(g,i,{get:e[i],enumerable:!0})},Y=(g,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let d of Z(e))!q.call(g,d)&&d!==i&&S(g,d,{get:()=>e[d],enumerable:!(n=_(e,d))||n.enumerable});return g};var G=g=>Y(S({},"__esModule",{value:!0}),g);var O=(g,e,i)=>(P(g,typeof e!="symbol"?e+"":e,i),i);var J={};U(J,{MasterCSS:()=>W});module.exports=G(J);function F(g){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&g instanceof e||g instanceof Date||g instanceof RegExp)}function I(g){if(typeof Buffer<"u"&&Buffer&&g instanceof Buffer){let e=Buffer.alloc(g.length);return g.copy(e),e}else{if(g instanceof Date)return new Date(g.getTime());if(g instanceof RegExp)return new RegExp(g);throw new Error("Unexpected situation")}}function $(g){let e=[];return g.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?e[n]=$(i):F(i)?e[n]=I(i):e[n]=j({},i):e[n]=i}),e}function L(g,e){return e==="__proto__"?void 0:g[e]}function j(...g){let e={},i,n;return g.forEach(function(d){typeof d!="object"||d===null||Array.isArray(d)||Object.keys(d).forEach(function(v){if(n=L(e,v),i=L(d,v),i!==e)if(typeof i!="object"||i===null){e[v]=i;return}else if(Array.isArray(i)){e[v]=$(i);return}else if(F(i)){e[v]=I(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){e[v]=j({},i);return}else{e[v]=j(n,i);return}})}),e}var D=require("./rule"),T=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var N=typeof window<"u",V=()=>{let g=document.createElement("style");return g.id="master",g},A=class{constructor(e=T.config){this.config=e;e?.override||(this.config=j(T.config,e),"keyframes"in e&&Object.assign(this.config.keyframes,e.keyframes)),this.cache(),N&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:i,selectors:n,themes:d,colors:v,values:k,breakpoints:x,mediaQueries:y,rules:C}=this.config;function B(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function M(t,r,c="",s={}){let a=b=>b?(c?c+"-":"")+b:c,h=Object.entries(t),p=[],w=[];for(let b of h){let E=b[1];(typeof E=="object"&&!Array.isArray(E)?p:w).push(b)}for(let[b,E]of p)M(E,r,a(b),s);if(r&&c)w.length&&(s[c]=w.reduce((b,[E,z])=>(b[E]=z,b),{}));else for(let[b,E]of w)s[a(b)]=E;return s}if(e)for(let[t,r]of Object.entries(M(e,!0)))this.semantics.push([new RegExp("^"+B(t)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[t,r]]);if(n)for(let[t,r]of Object.entries(M(n,!1))){let c=new RegExp(B(t)+"(?![a-z-])");for(let s of Array.isArray(r)?r:[r]){let a=s.match(/^::-[a-z]+-/m)?.[0]??"",h=this.selectors[a];h||(h=this.selectors[a]=[]);let p=h.find(([w])=>w===c);p||(p=[c,[]],h.push(p)),p[1].push(s)}}k&&(this.globalValues=M(k,!1)),x&&(this.breakpoints=M(x,!1)),y&&(this.mediaQueries=M(y,!1));let f=i?M(i,!1):{},l=d&&!Array.isArray(d)?Object.entries(d).filter(([,{classes:t}])=>t).reduce((t,[r,{classes:c}])=>(t[r]=M(c,!1),t),{}):{},R=[...Object.keys(f),...Object.entries(l).flatMap(([t,r])=>Object.keys(r))],m=t=>{if(t in this.classes)return;let r=this.classes[t]=[],c=(s,a)=>{if(!a)return;let h=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let p of h){let w=b=>{b in this.themeAffectedClassesBy?s in this.themeAffectedClassesBy[b]?this.themeAffectedClassesBy[b][s].push(t):this.themeAffectedClassesBy[b][s]=[t]:this.themeAffectedClassesBy[b]={[s]:[t]},r.includes(b)||r.push(b)};if(R.includes(p)){m(p);for(let b of this.classes[p])w(b)}else w(p)}};c("",f?.[t]);for(let[s,a]of Object.entries(l))c(s,a?.[t])};for(let t of R)m(t);for(let t in this.themeAffectedClassesBy){let r=this.classesBy[t]=[];for(let c of Object.values(this.themeAffectedClassesBy[t]))for(let s of c)r.includes(s)||r.push(s)}let o=(t,r)=>{if(!r)return;let c=M(r,!0);for(let[s,a]of Object.entries(c)){let h=typeof a=="string"?{"":a}:a;for(let[p,w]of Object.entries(h)){let b=s+(p?"-"+p:"");b in this.colorThemesMap?this.colorThemesMap[b][t]=w:this.colorThemesMap[b]={[t]:w}}}for(let s in r)this.colorNames.includes(s)||this.colorNames.push(s)};if(o("",v),d)if(Array.isArray(d))this.themeNames.push(...d);else for(let t in d){let r=d[t];o(t,r.colors),this.themeNames.push(t)}let u=t=>{for(let[r,c]of Object.entries(this.colorThemesMap))for(let[s,a]of Object.entries(c))a.startsWith("#")||t(r,c,s,a)};if(u((t,r,c,s)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(s);if(a){let h="#"+(0,H.rgbToHex)(+a[1],+a[2],+a[3]);a[4]&&(h+=Math.round(255*+a[4]).toString(16)),r[c]=h}}),u((t,r,c,s)=>{let[a,h]=s.split("/"),p=this.colorThemesMap[a];if(p){let w=(c?p[c]:void 0)??p[""];r[c]=h?w.slice(0,7)+Math.round(255*+h).toString(16):w}else console.warn(`\`${s}\` doesn't exist in the extended config \`.colors\``),delete r[c],Object.keys(r).length||delete this.colorThemesMap[t]}),C)for(let t in C){let r=C[t],{native:c,values:s,colored:a}=r,h=r.match;if(r.id=t,r.native=c===!0?t.replace(/(?!^)[A-Z]/g,p=>"-"+p).toLowerCase():void 0,s&&(this.values[t]=M(s,!1)),h){let p=Object.keys(this.values[t]??{});h.includes("$values")&&(h=p.length?h.replace(/\$values/,p.join("|")):h.replace(/(?:\|)?\$values/,"")),a&&h.includes("$colors")&&(h=this.colorNames.length?h.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):h.replace(/(?:\|)?\$colors/,"")),this.matches[t]=new RegExp(h)}}}observe(e,i={subtree:!0,childList:!0}){if(this.root!==e){if(N&&e){this.root=e;let n=e===document;n&&(A.root=this),this.host=n?document.documentElement:root.host;let d=n?document.head:e,v=n?document.styleSheets:e.styleSheets;for(let x of v){let{ownerNode:y}=x;if(y.id==="master"){this.style=y;break}}if(this.style)for(let x=0;x<this.style.sheet.cssRules.length;x++){let y=this.style.sheet.cssRules[x];if(y.constructor.name==="CSSKeyframesRule")continue;let C=M=>{if(M.selectorText){let l=M.selectorText.split(", ")[0].split(" ");for(let R=0;R<l.length;R++){let m=l[R];if(m[0]==="."){let o=m.slice(1),u="";for(let t=0;t<o.length;t++){let r=o[t],c=o[t+1];if(r==="\\"){if(t++,c!=="\\"){u+=c;continue}}else if(Q.SELECTOR_SYMBOLS.includes(r))break;u+=r}if(!(u in this.ruleBy)&&!(u in this.classes)){let t=this.create(u)[0];if(t)return t}}}}else if(M.cssRules)for(let f=0;f<M.cssRules.length;f++){let l=C(M.cssRules[f]);if(l)return l}},B=C(y);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let M=0;M<B.natives.length;M++)B.natives[M].cssRule=this.style.sheet.cssRules[x+M];x+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=V(),d.append(this.style);let k=x=>{x.forEach(y=>{y in this.countBy?this.countBy[y]++:(this.countBy[y]=1,this.insert(y))})};k(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(x=>k(x.classList)),this.observer=new MutationObserver(x=>{let y={},C=[],B=[],M=[],f=(o,u)=>{u?o.classList.forEach(R):o.classList.forEach(l);let t=o.children;for(let r=0;r<t.length;r++){let c=t[r];c.classList&&(B.push(c),f(c,u))}},l=o=>{o in y?y[o]++:y[o]=1},R=o=>{o in y?y[o]--:o in this.countBy&&(y[o]=-1)},m=(o,u)=>{for(let t=0;t<o.length;t++){let r=o[t];r.classList&&!B.includes(r)&&!M.includes(r)&&(r.isConnected!==u?(B.push(r),f(r,u)):M.push(r))}};for(let o=0;o<x.length;o++){let u=x[o],{addedNodes:t,removedNodes:r,type:c,target:s}=u;if(c==="attributes"){if(C.find(a=>a.target===s))continue;C.push(u)}else m(t,!1),(!s.isConnected||!B.includes(s))&&m(r,!0)}if(!(!C.length&&!Object.keys(y).length)){for(let{oldValue:o,target:u}of C){let t=B.includes(u),r=u.classList,c=o?o.split(" "):[];if(t){if(u.isConnected)continue;for(let s of c)r.contains(s)||R(s)}else if(u.isConnected){r.forEach(s=>{c.includes(s)||l(s)});for(let s of c)r.contains(s)||R(s)}}for(let o in y){let u=y[o],t=(this.countBy[o]||0)+u;t===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=t)}}}),this.observer.observe(e,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let i=e.cssRules.length-1;i>=0;i--)e.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(e){for(let i in this.config.rules){let n=this.config.rules[i],d=this.matches[i],{symbol:v,native:k}=n;if(d&&d.test(e))return{origin:"match",config:n};if(v&&e.startsWith(v))return{origin:"symbol",config:n};if(k&&e.startsWith(k+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(e.match(i[0]))return{origin:"semantics",value:i[1]}}create(e){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let d=this.match(n);if(d)return new D.Rule(n,d,this)};return(e in this.classes?this.classes[e].map(n=>i(n)):[i(e)]).filter(n=>n&&n.text)}refresh(e){if(e?.override?this.config=e:this.config=j(T.config,e),this.cache(),!this.style)return;let i=V();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let e=A.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let i=this.style?.sheet,n=d=>{let v=this.ruleBy[d];if(!(!v||d in this.classesBy&&this.classesBy[d].some(k=>k in this.countBy))){if(i&&v.natives.length){let k=v.natives[0];for(let x=0;x<i.cssRules.length;x++)if(i.cssRules[x]===k.cssRule){for(let C=0;C<v.natives.length;C++)i.deleteRule(x);break}}this.rules.splice(this.rules.indexOf(v),1),delete this.ruleBy[d],v.config.delete&&v.config.delete.call(v,d)}};if(e in this.classes){for(let d of this.classes[e])d in this.countBy||n(d);delete this.ruleBy[e]}else n(e)}insert(e){let i=this.create(e);return i.length?(this.insertRules(i),!0):!1}insertRules(e){for(let i of e){if(this.ruleBy[i.className])continue;let n,d=Object.keys(this.keyframes).length,v=this.rules.length-1,{media:k,order:x,priority:y,hasWhere:C,className:B}=i,M=(f,l,R,m)=>{let o=d?1:0,u;l&&(o=f.findIndex(l)),R&&(u=f.findIndex(R)),o===-1&&(o=f.length),(u===void 0||u===-1)&&(u=f.length);let t=f.slice(o,u);for(let r=0;r<t.length;r++){let c=t[r];if(!(c.priority===-1||m&&m(c))&&(c.priority<y||c.priority===y&&(C&&!c.hasWhere||c.order>=x)))return o+r}return o+t.length};if(k){let f=this.rules.findIndex(l=>l.media);if(f!==-1){let l=k.features["max-width"],R=k.features["min-width"];if(l&&R){let m=l.value-R.value;for(let o=v;o>=f;o--){n=o;let u=this.rules[o],t=u.media,r=t.features["max-width"],c=t.features["min-width"];if(!r||!c){n++;break}let s=r.value-c.value;if(s===m){if(C!==u.hasWhere)continue;if(y!==-1){let a=[this.rules[o]];for(let h=o-1;h>=f;h--){let p=this.rules[h];if(p.hasWhere!==C)break;let w=p.media,b=w.features["max-width"],E=w.features["min-width"];if(!b||!E||b.value-E.value!==s)break;a.unshift(this.rules[h])}n=M(this.rules,h=>h.media&&h.priority!==-1&&h.media.features["min-width"]&&h.media.features["max-width"])}break}else if(s>m)break}}else if(R)for(let m=f;m<=v;m++){n=m;let o=this.rules[m],u=o.media,t=u.features["max-width"],r=u.features["min-width"];if(t){if(r)break;continue}let c=r?.value;if(c===R.value){if(!C&&o.hasWhere){n++;continue}if(y!==-1)n=M(this.rules,s=>s.media,s=>s.media&&s.priority!==-1&&s.media.features["min-width"]&&s.media.features["max-width"],s=>!s.media.features["min-width"]&&!s.media.features["max-width"]);else for(let s=m;s<=v;s++){let a=this.rules[s],h=a.media,p=h.features["min-width"];if(!h.features["max-width"]){if(a.hasWhere!==C||p.value!==c||a.order>=x)break;n=s+1}}break}else{if(c>R.value)break;n++}}else if(l)for(let m=v;m>=f;m--){n=m;let o=this.rules[m],u=o.media,t=u.features["max-width"];if(u.features["min-width"])continue;let c=t?.value;if(!c||c>l.value){n++;break}else if(c===l.value){if(C&&!o.hasWhere)continue;if(y!==-1)n=M(this.rules,s=>s.media,s=>s.media&&s.priority!==-1&&s.media.features["min-width"]&&s.media.features["max-width"],s=>!s.media.features["min-width"]&&!s.media.features["max-width"]);else{let s=[this.rules[m]];for(let a=m-1;a>=f;a--){let h=this.rules[a],p=h.media,w=p.features["min-width"],b=p.features["max-width"];if(!w&&(!b||b.value!==c||h.hasWhere!==C))break;s.unshift(h)}for(let a=0;a<s.length;a++){let h=s[a];if(!h.media.features["min-width"]){if(h.order>=x)break;n=m-s.length+2+a}}}break}}}if(n===void 0)if(f===-1)n=v+1;else if(y!==-1)n=f+M(this.rules.slice(f),void 0,l=>l.media.features["max-width"]||l.media.features["min-width"]);else if(C){let l=f;for(;l<this.rules.length;l++){let R=this.rules[l];if(R.priority!==-1||!R.hasWhere||R.order>=x){n=l;break}}n===void 0&&(n=l)}else for(let l=f;l<=v;l++){n=l;let R=this.rules[l],m=R.media;if(R.priority!==-1||m.features["max-width"]||m.features["min-width"])break;if(R.hasWhere)n++;else if(R.order>=x)break}}else if(y===-1){let f=d?1:0;if(C)for(;f<this.rules.length;f++){let l=this.rules[f];if(!l.hasWhere||l.media||l.priority!==-1||l.order>=x){n=f;break}}else for(;f<this.rules.length;f++){let l=this.rules[f];if(l.media||!l.hasWhere&&(l.order>=x||l.priority!==-1)){n=f;break}}n===void 0&&(n=f)}else n=M(this.rules,void 0,f=>f.media);if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let f=this.style.sheet,l=0,R=m=>{let o=this.rules[m];if(o){if(!o.natives.length)return R(m-1);let u=o.natives[o.natives.length-1].cssRule;for(let t=0;t<f.cssRules.length;t++)if(f.cssRules[t]===u){l=t+1;break}}};R(n-1);for(let m=0;m<i.natives.length;)try{let o=i.natives[m];f.insertRule(o.text,l),o.cssRule=f.cssRules[l++],m++}catch(o){console.error(o),i.natives.splice(m,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(e=>e.text).join("")}},W=A;O(W,"root"),O(W,"config",T.config),O(W,"instances",[]),O(W,"refresh",e=>{for(let i of A.instances)i.refresh(e)});N&&(window.MasterCSS=W);0&&(module.exports={MasterCSS});
@@ -0,0 +1 @@
1
+ var p=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(e,t)=>{for(var s in t)p(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of c(t))!l.call(e,a)&&a!==s&&p(e,a,{get:()=>t[a],enumerable:!(o=r(t,a))||o.enumerable});return e};var i=e=>g(p({},"__esModule",{value:!0}),e);var f={};n(f,{extractClassesFromHTML:()=>d});module.exports=i(f);var m=/&(amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,u={amp:"&","#38":"&",lt:"<","#60":"<",gt:">","#62":">",apos:"'","#39":"'",quot:'"',"#34":'"'};function d(e){if(e)return e.split(/\sclass="([^"]*)"/gm).filter((t,s)=>s%2===1).map(t=>t.split(" ")).flat().map(t=>t.replace(m,(s,o)=>u[o]))}0&&(module.exports={extractClassesFromHTML});
@@ -1 +1 @@
1
- var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,e,p,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of c(e))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>e[m],enumerable:!(x=b(e,m))||x.enumerable});return f},r=(f,e,p)=>(t(f,e,"default"),p&&t(p,e,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);r(o,require("./render"),module.exports);r(o,require("./render-from-html"),module.exports);r(o,require("./render-into-html"),module.exports);r(o,require("./fill-color-scale"),module.exports);r(o,require("./define-content"),module.exports);0&&(module.exports={...require("./render"),...require("./render-from-html"),...require("./render-into-html"),...require("./fill-color-scale"),...require("./define-content")});
1
+ var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,e,p,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of c(e))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>e[m],enumerable:!(x=b(e,m))||x.enumerable});return f},r=(f,e,p)=>(t(f,e,"default"),p&&t(p,e,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);r(o,require("./render"),module.exports);r(o,require("./render-from-html"),module.exports);r(o,require("./render-into-html"),module.exports);r(o,require("./render-rules"),module.exports);r(o,require("./render-rules-from-html"),module.exports);r(o,require("./extract-classes-from-html"),module.exports);r(o,require("./fill-color-scale"),module.exports);r(o,require("./define-content"),module.exports);0&&(module.exports={...require("./render"),...require("./render-from-html"),...require("./render-into-html"),...require("./render-rules"),...require("./render-rules-from-html"),...require("./extract-classes-from-html"),...require("./fill-color-scale"),...require("./define-content")});
@@ -1 +1 @@
1
- var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},u=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of l(e))!f.call(t,s)&&s!==o&&c(t,s,{get:()=>e[s],enumerable:!(n=g(e,s))||n.enumerable});return t};var d=t=>u(c({},"__esModule",{value:!0}),t);var S={};m(S,{renderFromHTML:()=>C});module.exports=d(S);var i=require("../css"),x=/&(amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,y={amp:"&","#38":"&",lt:"<","#60":"<",gt:">","#62":">",apos:"'","#39":"'",quot:'"',"#34":'"'};function C(t,e){if(!t)return;let o=new i.MasterCSS({...e,observe:!1}),n=/\sclass="([^"]*)"/gm,s;for(;s=n.exec(t);){let a=s[1].replace(/\n/g,"").split(" ").filter(r=>r).map(r=>r.replace(x,(b,p)=>y[p]));for(let r of a)r in o.countBy||(o.insert(r),o.countBy[r]=1)}return o.text}0&&(module.exports={renderFromHTML});
1
+ var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var g=(t,r)=>{for(var e in r)s(t,e,{get:r[e],enumerable:!0})},u=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of a(r))!m.call(t,o)&&o!==e&&s(t,o,{get:()=>r[o],enumerable:!(n=c(r,o))||n.enumerable});return t};var p=t=>u(s({},"__esModule",{value:!0}),t);var l={};g(l,{renderFromHTML:()=>C});module.exports=p(l);var i=require("../css"),f=require("./extract-classes-from-html");function C(t,r){if(!t)return;let e=(0,f.extractClassesFromHTML)(t);if(!e.length)return;let n=new i.MasterCSS({...r,observe:!1});for(let o of e)o in n.countBy||n.insert(o)&&(n.countBy[o]=1);return n.text}0&&(module.exports={renderFromHTML});
@@ -0,0 +1 @@
1
+ var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(e,r)=>{for(var o in r)n(e,o,{get:r[o],enumerable:!0})},c=(e,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of u(r))!l.call(e,t)&&t!==o&&n(e,t,{get:()=>r[t],enumerable:!(i=m(r,t))||i.enumerable});return e};var g=e=>c(n({},"__esModule",{value:!0}),e);var a={};p(a,{renderRulesFromHTML:()=>R});module.exports=g(a);var f=require("./extract-classes-from-html"),s=require("./render-rules");function R(e,r){if(!e)return;let o=(0,f.extractClassesFromHTML)(e);if(o.length)return(0,s.renderRules)(o,r)}0&&(module.exports={renderRulesFromHTML});
@@ -0,0 +1 @@
1
+ var f=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(r,e)=>{for(var o in e)f(r,o,{get:e[o],enumerable:!0})},m=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!c.call(r,t)&&t!==o&&f(r,t,{get:()=>e[t],enumerable:!(n=s(e,t))||n.enumerable});return r};var p=r=>m(f({},"__esModule",{value:!0}),r);var a={};l(a,{renderRules:()=>g});module.exports=p(a);var i=require("../css");function g(r,e){if(!r?.length)return;let o=new i.MasterCSS({...e,observe:!1});for(let n of r)n in o.countBy||o.insert(n)&&(o.countBy[n]=1);return o.rules}0&&(module.exports={renderRules});
@@ -204,8 +204,8 @@ export declare const rules: {
204
204
  gridTemplateRows: RuleConfig;
205
205
  gridTemplate: RuleConfig;
206
206
  gridArea: RuleConfig;
207
- gapX: RuleConfig;
208
- gapY: RuleConfig;
207
+ columnGap: RuleConfig;
208
+ rowGap: RuleConfig;
209
209
  gap: RuleConfig;
210
210
  order: RuleConfig;
211
211
  breakInside: RuleConfig;
@@ -1 +1 @@
1
- var t={fade:{"0%":{opacity:0},to:{opacity:0}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},to:{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,to":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(.8,0,1,1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0,0,.2,1)"}},ping:{"75%,to":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},to:{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},to:{transform:"none"}}};export{t as keyframes};
1
+ var t={fade:{"0%":{opacity:0},to:{opacity:1}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},to:{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,to":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(.8,0,1,1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0,0,.2,1)"}},ping:{"75%,to":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},to:{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},to:{transform:"none"}}};export{t as keyframes};
@@ -1 +1 @@
1
- import{START_SYMBOL as g}from"../constants/start-symbol.mjs";import{cssEscape as x}from"../utils/css-escape.mjs";var y={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},i=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let s=t[o],h=r.slice(0,a);h in s||(s[h]=r.slice(a+1))}},u=o=>{let r=(a,s)=>{let h=s.slice(x(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let f of h)i(a,f)};if(this.theme){let a=o.natives.find(s=>s.theme===this.theme)??o.natives.find(s=>!s.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},d=[],n="",c=()=>{n&&(d.push(n.replace(/ /g,"")),n="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){c();continue}if(a==="}")break}if(n+=a,r===a){if(r==="'"||r==='"'){let s=0;for(let h=n.length-2;n[h]==="\\";h--)s++;if(s%2)continue}break}else a in g&&r!=="'"&&r!=='"'&&(m++,o(g[a]))}})(void 0),c();for(let o of d){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)u(a);else r?u(r):i(this.theme??"",o)}let l={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in l?l[r][o]=a:l[r]={[o]:a};return l}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){switch(e){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"margin-left":e+t,"margin-right":e+t}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"margin-top":e+t,"margin-bottom":e+t}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"padding-left":e+t,"padding-right":e+t}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"padding-top":e+t,"padding-bottom":e+t}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,i]=e.split(" x ");return{width:t,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"min-width":t,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"max-width":t,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0},overflowY:{native:!0},overflow:{native:!0,order:-1},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-left-color":e+t,"border-right-color":e+t}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-top-color":e+t,"border-bottom-color":e+t}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-top-right-radius":e+t}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(e,t){return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-left-style":e+t,"border-right-style":e+t}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-top-style":e+t,"border-bottom-style":e+t}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-left-width":e+t,"border-right-width":e+t}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-top-width":e+t,"border-bottom-width":e+t}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-left":e,"border-right":e}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-top":e,"border-bottom":e}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gapX:{unit:"rem",native:!0},gapY:{unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-left":e+t,"scroll-margin-right":e+t}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-left":e+t,"scroll-padding-right":e+t}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},C=y;function v(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function b(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let i=this.css.keyframes[t];if(!--i.count){let u=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(u),e.natives.splice(u,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function p(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:u}=this.css,d=i?.sheet;for(let n of this.keyframeNames)if(n in t)t[n].count++;else{let c={text:`@keyframes ${n}{`+Object.entries(e.keyframes[n]).map(([l,o])=>`${l}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=u[0]).natives.push(c):u.splice(0,0,m={natives:[c],get text(){return this.natives.map(l=>l.text).join("")}}),d){let l;for(let o=0;o<d.cssRules.length;o++){let r=d.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===n){l=r;break}}if(l)c.cssRule=l;else{let o=m.natives.length-1;d.insertRule(c.text,o),c.cssRule=d.cssRules[o]}}t[n]={native:c,count:1}}}}export{C as rules};
1
+ import{START_SYMBOL as g}from"../constants/start-symbol.mjs";import{cssEscape as x}from"../utils/css-escape.mjs";var y={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},i=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let s=t[o],h=r.slice(0,a);h in s||(s[h]=r.slice(a+1))}},u=o=>{let r=(a,s)=>{let h=s.slice(x(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let f of h)i(a,f)};if(this.theme){let a=o.natives.find(s=>s.theme===this.theme)??o.natives.find(s=>!s.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},d=[],n="",c=()=>{n&&(d.push(n.replace(/ /g,"")),n="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){c();continue}if(a==="}")break}if(n+=a,r===a){if(r==="'"||r==='"'){let s=0;for(let h=n.length-2;n[h]==="\\";h--)s++;if(s%2)continue}break}else a in g&&r!=="'"&&r!=='"'&&(m++,o(g[a]))}})(void 0),c();for(let o of d){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)u(a);else r?u(r):i(this.theme??"",o)}let l={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in l?l[r][o]=a:l[r]={[o]:a};return l}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){switch(e){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"margin-left":e+t,"margin-right":e+t}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"margin-top":e+t,"margin-bottom":e+t}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"padding-left":e+t,"padding-right":e+t}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"padding-top":e+t,"padding-bottom":e+t}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,i]=e.split(" x ");return{width:t,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"min-width":t,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"max-width":t,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0},overflowY:{native:!0},overflow:{native:!0,order:-1},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-left-color":e+t,"border-right-color":e+t}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-top-color":e+t,"border-bottom-color":e+t}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-top-right-radius":e+t}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(e,t){return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-left-style":e+t,"border-right-style":e+t}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-top-style":e+t,"border-bottom-style":e+t}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-left-width":e+t,"border-right-width":e+t}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-top-width":e+t,"border-bottom-width":e+t}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-left":e,"border-right":e}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-top":e,"border-bottom":e}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-left":e+t,"scroll-margin-right":e+t}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-left":e+t,"scroll-padding-right":e+t}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},C=y;function v(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function b(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let i=this.css.keyframes[t];if(!--i.count){let u=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(u),e.natives.splice(u,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function p(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:u}=this.css,d=i?.sheet;for(let n of this.keyframeNames)if(n in t)t[n].count++;else{let c={text:`@keyframes ${n}{`+Object.entries(e.keyframes[n]).map(([l,o])=>`${l}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=u[0]).natives.push(c):u.splice(0,0,m={natives:[c],get text(){return this.natives.map(l=>l.text).join("")}}),d){let l;for(let o=0;o<d.cssRules.length;o++){let r=d.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===n){l=r;break}}if(l)c.cssRule=l;else{let o=m.natives.length-1;d.insertRule(c.text,o),c.cssRule=d.cssRules[o]}}t[n]={native:c,count:1}}}}export{C as rules};
package/dist/esm/css.mjs CHANGED
@@ -1 +1 @@
1
- var D=Object.defineProperty;var H=(M,t,r)=>t in M?D(M,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):M[t]=r;var O=(M,t,r)=>(H(M,typeof t!="symbol"?t+"":t,r),r);function L(M){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&M instanceof t||M instanceof Date||M instanceof RegExp)}function F(M){if(typeof Buffer<"u"&&Buffer&&M instanceof Buffer){let t=Buffer.alloc(M.length);return M.copy(t),t}else{if(M instanceof Date)return new Date(M.getTime());if(M instanceof RegExp)return new RegExp(M);throw new Error("Unexpected situation")}}function I(M){let t=[];return M.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?t[n]=I(r):L(r)?t[n]=F(r):t[n]=W({},r):t[n]=r}),t}function N(M,t){return t==="__proto__"?void 0:M[t]}function W(...M){let t={},r,n;return M.forEach(function(d){typeof d!="object"||d===null||Array.isArray(d)||Object.keys(d).forEach(function(x){if(n=N(t,x),r=N(d,x),r!==t)if(typeof r!="object"||r===null){t[x]=r;return}else if(Array.isArray(r)){t[x]=I(r);return}else if(L(r)){t[x]=F(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[x]=W({},r);return}else{t[x]=W(n,r);return}})}),t}import{Rule as Q}from"./rule.mjs";import{config as T}from"./config/index.mjs";import{rgbToHex as z}from"./utils/rgb-to-hex.mjs";import{SELECTOR_SYMBOLS as _}from"./constants/selector-symbols.mjs";var S=typeof window<"u",$=()=>{let M=document.createElement("style");return M.id="master",M},A=class{constructor(t=T){this.config=t;t?.override||(this.config=W(T,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),S&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:t,classes:r,selectors:n,themes:d,colors:x,values:B,breakpoints:b,mediaQueries:y,rules:k}=this.config;function C(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(e,s,i="",c={}){let a=v=>v?(i?i+"-":"")+v:i,g=Object.entries(e),R=[],w=[];for(let v of g){let E=v[1];(typeof E=="object"&&!Array.isArray(E)?R:w).push(v)}for(let[v,E]of R)o(E,s,a(v),c);if(s&&i)w.length&&(c[i]=w.reduce((v,[E,V])=>(v[E]=V,v),{}));else for(let[v,E]of w)c[a(v)]=E;return c}if(t)for(let[e,s]of Object.entries(o(t,!0)))this.semantics.push([new RegExp("^"+C(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(o(n,!1))){let i=new RegExp(C(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let a=c.match(/^::-[a-z]+-/m)?.[0]??"",g=this.selectors[a];g||(g=this.selectors[a]=[]);let R=g.find(([w])=>w===i);R||(R=[i,[]],g.push(R)),R[1].push(c)}}B&&(this.globalValues=o(B,!1)),b&&(this.breakpoints=o(b,!1)),y&&(this.mediaQueries=o(y,!1));let h=r?o(r,!1):{},p=d&&!Array.isArray(d)?Object.entries(d).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:i}])=>(e[s]=o(i,!1),e),{}):{},f=[...Object.keys(h),...Object.entries(p).flatMap(([e,s])=>Object.keys(s))],m=e=>{if(e in this.classes)return;let s=this.classes[e]=[],i=(c,a)=>{if(!a)return;let g=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let R of g){let w=v=>{v in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[v]?this.themeAffectedClassesBy[v][c].push(e):this.themeAffectedClassesBy[v][c]=[e]:this.themeAffectedClassesBy[v]={[c]:[e]},s.includes(v)||s.push(v)};if(f.includes(R)){m(R);for(let v of this.classes[R])w(v)}else w(R)}};i("",h?.[e]);for(let[c,a]of Object.entries(p))i(c,a?.[e])};for(let e of f)m(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let i of Object.values(this.themeAffectedClassesBy[e]))for(let c of i)s.includes(c)||s.push(c)}let l=(e,s)=>{if(!s)return;let i=o(s,!0);for(let[c,a]of Object.entries(i)){let g=typeof a=="string"?{"":a}:a;for(let[R,w]of Object.entries(g)){let v=c+(R?"-"+R:"");v in this.colorThemesMap?this.colorThemesMap[v][e]=w:this.colorThemesMap[v]={[e]:w}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(l("",x),d)if(Array.isArray(d))this.themeNames.push(...d);else for(let e in d){let s=d[e];l(e,s.colors),this.themeNames.push(e)}let u=e=>{for(let[s,i]of Object.entries(this.colorThemesMap))for(let[c,a]of Object.entries(i))a.startsWith("#")||e(s,i,c,a)};if(u((e,s,i,c)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(a){let g="#"+z(+a[1],+a[2],+a[3]);a[4]&&(g+=Math.round(255*+a[4]).toString(16)),s[i]=g}}),u((e,s,i,c)=>{let[a,g]=c.split("/"),R=this.colorThemesMap[a];if(R){let w=(i?R[i]:void 0)??R[""];s[i]=g?w.slice(0,7)+Math.round(255*+g).toString(16):w}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[i],Object.keys(s).length||delete this.colorThemesMap[e]}),k)for(let e in k){let s=k[e],{native:i,values:c,colored:a}=s,g=s.match;if(s.id=e,s.native=i===!0?e.replace(/(?!^)[A-Z]/g,R=>"-"+R).toLowerCase():void 0,c&&(this.values[e]=o(c,!1)),g){let R=Object.keys(this.values[e]??{});g.includes("$values")&&(g=R.length?g.replace(/\$values/,R.join("|")):g.replace(/(?:\|)?\$values/,"")),a&&g.includes("$colors")&&(g=this.colorNames.length?g.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):g.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(g)}}}observe(t,r={subtree:!0,childList:!0}){if(this.root!==t){if(S&&t){this.root=t;let n=t===document;n&&(A.root=this),this.host=n?document.documentElement:root.host;let d=n?document.head:t,x=n?document.styleSheets:t.styleSheets;for(let b of x){let{ownerNode:y}=b;if(y.id==="master"){this.style=y;break}}if(this.style)for(let b=0;b<this.style.sheet.cssRules.length;b++){let y=this.style.sheet.cssRules[b];if(y.constructor.name==="CSSKeyframesRule")continue;let k=o=>{if(o.selectorText){let p=o.selectorText.split(", ")[0].split(" ");for(let f=0;f<p.length;f++){let m=p[f];if(m[0]==="."){let l=m.slice(1),u="";for(let e=0;e<l.length;e++){let s=l[e],i=l[e+1];if(s==="\\"){if(e++,i!=="\\"){u+=i;continue}}else if(_.includes(s))break;u+=s}if(!(u in this.ruleBy)&&!(u in this.classes)){let e=this.create(u)[0];if(e)return e}}}}else if(o.cssRules)for(let h=0;h<o.cssRules.length;h++){let p=k(o.cssRules[h]);if(p)return p}},C=k(y);if(C){this.rules.push(C),this.ruleBy[C.className]=C;for(let o=0;o<C.natives.length;o++)C.natives[o].cssRule=this.style.sheet.cssRules[b+o];b+=C.natives.length-1,C.config.insert?.call(C)}}else this.style=$(),d.append(this.style);let B=b=>{b.forEach(y=>{y in this.countBy?this.countBy[y]++:(this.countBy[y]=1,this.insert(y))})};B(this.host.classList),r.subtree&&this.host.querySelectorAll("[class]").forEach(b=>B(b.classList)),this.observer=new MutationObserver(b=>{let y={},k=[],C=[],o=[],h=(l,u)=>{u?l.classList.forEach(f):l.classList.forEach(p);let e=l.children;for(let s=0;s<e.length;s++){let i=e[s];i.classList&&(C.push(i),h(i,u))}},p=l=>{l in y?y[l]++:y[l]=1},f=l=>{l in y?y[l]--:l in this.countBy&&(y[l]=-1)},m=(l,u)=>{for(let e=0;e<l.length;e++){let s=l[e];s.classList&&!C.includes(s)&&!o.includes(s)&&(s.isConnected!==u?(C.push(s),h(s,u)):o.push(s))}};for(let l=0;l<b.length;l++){let u=b[l],{addedNodes:e,removedNodes:s,type:i,target:c}=u;if(i==="attributes"){if(k.find(a=>a.target===c))continue;k.push(u)}else m(e,!1),(!c.isConnected||!C.includes(c))&&m(s,!0)}if(!(!k.length&&!Object.keys(y).length)){for(let{oldValue:l,target:u}of k){let e=C.includes(u),s=u.classList,i=l?l.split(" "):[];if(e){if(u.isConnected)continue;for(let c of i)s.contains(c)||f(c)}else if(u.isConnected){s.forEach(c=>{i.includes(c)||p(c)});for(let c of i)s.contains(c)||f(c)}}for(let l in y){let u=y[l],e=(this.countBy[l]||0)+u;e===0?(delete this.countBy[l],this.delete(l)):(l in this.countBy||this.insert(l),this.countBy[l]=e)}}}),this.observer.observe(t,{...r,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let t=this.style?.sheet;if(t?.cssRules)for(let r=t.cssRules.length-1;r>=0;r--)t.deleteRule(r);this.style?.remove(),this.style=null,this.root=null}match(t){for(let r in this.config.rules){let n=this.config.rules[r],d=this.matches[r],{symbol:x,native:B}=n;if(d&&d.test(t))return{origin:"match",config:n};if(x&&t.startsWith(x))return{origin:"symbol",config:n};if(B&&t.startsWith(B+":"))return{origin:"match",config:n}}for(let r of this.semantics)if(t.match(r[0]))return{origin:"semantics",value:r[1]}}create(t){let r=n=>{if(n in this.ruleBy)return this.ruleBy[n];let d=this.match(n);if(d)return new Q(n,d,this)};return(t in this.classes?this.classes[t].map(n=>r(n)):[r(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=W(T,t),this.cache(),!this.style)return;let r=$();this.style.replaceWith(r),this.style=r,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=A.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let r=this.style?.sheet,n=d=>{let x=this.ruleBy[d];if(!(!x||d in this.classesBy&&this.classesBy[d].some(B=>B in this.countBy))){if(r&&x.natives.length){let B=x.natives[0];for(let b=0;b<r.cssRules.length;b++)if(r.cssRules[b]===B.cssRule){for(let k=0;k<x.natives.length;k++)r.deleteRule(b);break}}this.rules.splice(this.rules.indexOf(x),1),delete this.ruleBy[d],x.config.delete&&x.config.delete.call(x,d)}};if(t in this.classes){for(let d of this.classes[t])d in this.countBy||n(d);delete this.ruleBy[t]}else n(t)}insert(t){let r=this.create(t);return r.length?(this.insertRules(r),!0):!1}insertRules(t){for(let r of t){if(this.ruleBy[r.className])continue;let n,d=this.rules.length-1,{media:x,order:B,priority:b,hasWhere:y,className:k}=r,C=(o,h,p,f)=>{let m=0,l;h&&(m=o.findIndex(h)),p&&(l=o.findIndex(p)),m===-1&&(m=o.length),(l===void 0||l===-1)&&(l=o.length);let u=o.slice(m,l);for(let e=0;e<u.length;e++){let s=u[e];if(!(s.priority===-1||f&&f(s))&&(s.priority<b||s.priority===b&&(y&&!s.hasWhere||s.order>=B)))return m+e}return m+u.length};if(x){let o=this.rules.findIndex(h=>h.media);if(o!==-1){let h=x.features["max-width"],p=x.features["min-width"];if(h&&p){let f=h.value-p.value;for(let m=d;m>=o;m--){n=m;let l=this.rules[m],u=l.media,e=u.features["max-width"],s=u.features["min-width"];if(!e||!s){n++;break}let i=e.value-s.value;if(i===f){if(y!==l.hasWhere)continue;if(b!==-1){let c=[this.rules[m]];for(let a=m-1;a>=o;a--){let g=this.rules[a];if(g.hasWhere!==y)break;let R=g.media,w=R.features["max-width"],v=R.features["min-width"];if(!w||!v||w.value-v.value!==i)break;c.unshift(this.rules[a])}n=C(this.rules,a=>a.media&&a.priority!==-1&&a.media.features["min-width"]&&a.media.features["max-width"])}break}else if(i>f)break}}else if(p)for(let f=o;f<=d;f++){n=f;let m=this.rules[f],l=m.media,u=l.features["max-width"],e=l.features["min-width"];if(u){if(e)break;continue}let s=e?.value;if(s===p.value){if(!y&&m.hasWhere){n++;continue}if(b!==-1)n=C(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else for(let i=f;i<=d;i++){let c=this.rules[i],a=c.media,g=a.features["min-width"];if(!a.features["max-width"]){if(c.hasWhere!==y||g.value!==s||c.order>=B)break;n=i+1}}break}else{if(s>p.value)break;n++}}else if(h)for(let f=d;f>=o;f--){n=f;let m=this.rules[f],l=m.media,u=l.features["max-width"];if(l.features["min-width"])continue;let s=u?.value;if(!s||s>h.value){n++;break}else if(s===h.value){if(y&&!m.hasWhere)continue;if(b!==-1)n=C(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else{let i=[this.rules[f]];for(let c=f-1;c>=o;c--){let a=this.rules[c],g=a.media,R=g.features["min-width"],w=g.features["max-width"];if(!R&&(!w||w.value!==s||a.hasWhere!==y))break;i.unshift(a)}for(let c=0;c<i.length;c++){let a=i[c];if(!a.media.features["min-width"]){if(a.order>=B)break;n=f-i.length+2+c}}}break}}}if(n===void 0)if(o===-1)n=d+1;else if(b!==-1)n=o+C(this.rules.slice(o),void 0,h=>h.media.features["max-width"]||h.media.features["min-width"]);else if(y){let h=o;for(;h<this.rules.length;h++){let p=this.rules[h];if(p.priority!==-1||!p.hasWhere||p.order>=B){n=h;break}}n===void 0&&(n=h)}else for(let h=o;h<=d;h++){n=h;let p=this.rules[h],f=p.media;if(p.priority!==-1||f.features["max-width"]||f.features["min-width"])break;if(p.hasWhere)n++;else if(p.order>=B)break}}else if(b===-1){if(y)n=this.rules.findIndex(o=>!o.hasWhere||o.media||o.priority!==-1||o.order>=B),n===-1&&(n=d+1);else{let o=0;for(;o<this.rules.length;o++){let h=this.rules[o];if(h.media||!h.hasWhere&&(h.order>=B||h.priority!==-1)){n=o;break}}n===void 0&&(n=o)}!n&&Object.keys(this.keyframes).length&&n++}else n=C(this.rules,void 0,o=>o.media);if(this.rules.splice(n,0,r),this.ruleBy[k]=r,this.style){let o=this.style.sheet,h=0,p=f=>{let m=this.rules[f];if(m){if(!m.natives.length)return p(f-1);let l=m.natives[m.natives.length-1].cssRule;for(let u=0;u<o.cssRules.length;u++)if(o.cssRules[u]===l){h=u+1;break}}};p(n-1);for(let f=0;f<r.natives.length;)try{let m=r.natives[f];o.insertRule(m.text,h),m.cssRule=o.cssRules[h++],f++}catch(m){console.error(m),r.natives.splice(f,1)}}r.config.insert?.call(r)}}get text(){return this.rules.map(t=>t.text).join("")}},j=A;O(j,"root"),O(j,"config",T),O(j,"instances",[]),O(j,"refresh",t=>{for(let r of A.instances)r.refresh(t)});S&&(window.MasterCSS=j);export{j as MasterCSS};
1
+ var D=Object.defineProperty;var H=(M,t,n)=>t in M?D(M,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):M[t]=n;var O=(M,t,n)=>(H(M,typeof t!="symbol"?t+"":t,n),n);function L(M){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&M instanceof t||M instanceof Date||M instanceof RegExp)}function F(M){if(typeof Buffer<"u"&&Buffer&&M instanceof Buffer){let t=Buffer.alloc(M.length);return M.copy(t),t}else{if(M instanceof Date)return new Date(M.getTime());if(M instanceof RegExp)return new RegExp(M);throw new Error("Unexpected situation")}}function I(M){let t=[];return M.forEach(function(n,o){typeof n=="object"&&n!==null?Array.isArray(n)?t[o]=I(n):L(n)?t[o]=F(n):t[o]=W({},n):t[o]=n}),t}function N(M,t){return t==="__proto__"?void 0:M[t]}function W(...M){let t={},n,o;return M.forEach(function(m){typeof m!="object"||m===null||Array.isArray(m)||Object.keys(m).forEach(function(R){if(o=N(t,R),n=N(m,R),n!==t)if(typeof n!="object"||n===null){t[R]=n;return}else if(Array.isArray(n)){t[R]=I(n);return}else if(L(n)){t[R]=F(n);return}else if(typeof o!="object"||o===null||Array.isArray(o)){t[R]=W({},n);return}else{t[R]=W(o,n);return}})}),t}import{Rule as Q}from"./rule.mjs";import{config as T}from"./config/index.mjs";import{rgbToHex as z}from"./utils/rgb-to-hex.mjs";import{SELECTOR_SYMBOLS as _}from"./constants/selector-symbols.mjs";var S=typeof window<"u",$=()=>{let M=document.createElement("style");return M.id="master",M},A=class{constructor(t=T){this.config=t;t?.override||(this.config=W(T,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),S&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:t,classes:n,selectors:o,themes:m,colors:R,values:k,breakpoints:v,mediaQueries:g,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function x(e,i,c="",s={}){let a=p=>p?(c?c+"-":"")+p:c,h=Object.entries(e),y=[],w=[];for(let p of h){let E=p[1];(typeof E=="object"&&!Array.isArray(E)?y:w).push(p)}for(let[p,E]of y)x(E,i,a(p),s);if(i&&c)w.length&&(s[c]=w.reduce((p,[E,V])=>(p[E]=V,p),{}));else for(let[p,E]of w)s[a(p)]=E;return s}if(t)for(let[e,i]of Object.entries(x(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,i]]);if(o)for(let[e,i]of Object.entries(x(o,!1))){let c=new RegExp(B(e)+"(?![a-z-])");for(let s of Array.isArray(i)?i:[i]){let a=s.match(/^::-[a-z]+-/m)?.[0]??"",h=this.selectors[a];h||(h=this.selectors[a]=[]);let y=h.find(([w])=>w===c);y||(y=[c,[]],h.push(y)),y[1].push(s)}}k&&(this.globalValues=x(k,!1)),v&&(this.breakpoints=x(v,!1)),g&&(this.mediaQueries=x(g,!1));let f=n?x(n,!1):{},l=m&&!Array.isArray(m)?Object.entries(m).filter(([,{classes:e}])=>e).reduce((e,[i,{classes:c}])=>(e[i]=x(c,!1),e),{}):{},b=[...Object.keys(f),...Object.entries(l).flatMap(([e,i])=>Object.keys(i))],d=e=>{if(e in this.classes)return;let i=this.classes[e]=[],c=(s,a)=>{if(!a)return;let h=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let y of h){let w=p=>{p in this.themeAffectedClassesBy?s in this.themeAffectedClassesBy[p]?this.themeAffectedClassesBy[p][s].push(e):this.themeAffectedClassesBy[p][s]=[e]:this.themeAffectedClassesBy[p]={[s]:[e]},i.includes(p)||i.push(p)};if(b.includes(y)){d(y);for(let p of this.classes[y])w(p)}else w(y)}};c("",f?.[e]);for(let[s,a]of Object.entries(l))c(s,a?.[e])};for(let e of b)d(e);for(let e in this.themeAffectedClassesBy){let i=this.classesBy[e]=[];for(let c of Object.values(this.themeAffectedClassesBy[e]))for(let s of c)i.includes(s)||i.push(s)}let r=(e,i)=>{if(!i)return;let c=x(i,!0);for(let[s,a]of Object.entries(c)){let h=typeof a=="string"?{"":a}:a;for(let[y,w]of Object.entries(h)){let p=s+(y?"-"+y:"");p in this.colorThemesMap?this.colorThemesMap[p][e]=w:this.colorThemesMap[p]={[e]:w}}}for(let s in i)this.colorNames.includes(s)||this.colorNames.push(s)};if(r("",R),m)if(Array.isArray(m))this.themeNames.push(...m);else for(let e in m){let i=m[e];r(e,i.colors),this.themeNames.push(e)}let u=e=>{for(let[i,c]of Object.entries(this.colorThemesMap))for(let[s,a]of Object.entries(c))a.startsWith("#")||e(i,c,s,a)};if(u((e,i,c,s)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(s);if(a){let h="#"+z(+a[1],+a[2],+a[3]);a[4]&&(h+=Math.round(255*+a[4]).toString(16)),i[c]=h}}),u((e,i,c,s)=>{let[a,h]=s.split("/"),y=this.colorThemesMap[a];if(y){let w=(c?y[c]:void 0)??y[""];i[c]=h?w.slice(0,7)+Math.round(255*+h).toString(16):w}else console.warn(`\`${s}\` doesn't exist in the extended config \`.colors\``),delete i[c],Object.keys(i).length||delete this.colorThemesMap[e]}),C)for(let e in C){let i=C[e],{native:c,values:s,colored:a}=i,h=i.match;if(i.id=e,i.native=c===!0?e.replace(/(?!^)[A-Z]/g,y=>"-"+y).toLowerCase():void 0,s&&(this.values[e]=x(s,!1)),h){let y=Object.keys(this.values[e]??{});h.includes("$values")&&(h=y.length?h.replace(/\$values/,y.join("|")):h.replace(/(?:\|)?\$values/,"")),a&&h.includes("$colors")&&(h=this.colorNames.length?h.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):h.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(h)}}}observe(t,n={subtree:!0,childList:!0}){if(this.root!==t){if(S&&t){this.root=t;let o=t===document;o&&(A.root=this),this.host=o?document.documentElement:root.host;let m=o?document.head:t,R=o?document.styleSheets:t.styleSheets;for(let v of R){let{ownerNode:g}=v;if(g.id==="master"){this.style=g;break}}if(this.style)for(let v=0;v<this.style.sheet.cssRules.length;v++){let g=this.style.sheet.cssRules[v];if(g.constructor.name==="CSSKeyframesRule")continue;let C=x=>{if(x.selectorText){let l=x.selectorText.split(", ")[0].split(" ");for(let b=0;b<l.length;b++){let d=l[b];if(d[0]==="."){let r=d.slice(1),u="";for(let e=0;e<r.length;e++){let i=r[e],c=r[e+1];if(i==="\\"){if(e++,c!=="\\"){u+=c;continue}}else if(_.includes(i))break;u+=i}if(!(u in this.ruleBy)&&!(u in this.classes)){let e=this.create(u)[0];if(e)return e}}}}else if(x.cssRules)for(let f=0;f<x.cssRules.length;f++){let l=C(x.cssRules[f]);if(l)return l}},B=C(g);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let x=0;x<B.natives.length;x++)B.natives[x].cssRule=this.style.sheet.cssRules[v+x];v+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=$(),m.append(this.style);let k=v=>{v.forEach(g=>{g in this.countBy?this.countBy[g]++:(this.countBy[g]=1,this.insert(g))})};k(this.host.classList),n.subtree&&this.host.querySelectorAll("[class]").forEach(v=>k(v.classList)),this.observer=new MutationObserver(v=>{let g={},C=[],B=[],x=[],f=(r,u)=>{u?r.classList.forEach(b):r.classList.forEach(l);let e=r.children;for(let i=0;i<e.length;i++){let c=e[i];c.classList&&(B.push(c),f(c,u))}},l=r=>{r in g?g[r]++:g[r]=1},b=r=>{r in g?g[r]--:r in this.countBy&&(g[r]=-1)},d=(r,u)=>{for(let e=0;e<r.length;e++){let i=r[e];i.classList&&!B.includes(i)&&!x.includes(i)&&(i.isConnected!==u?(B.push(i),f(i,u)):x.push(i))}};for(let r=0;r<v.length;r++){let u=v[r],{addedNodes:e,removedNodes:i,type:c,target:s}=u;if(c==="attributes"){if(C.find(a=>a.target===s))continue;C.push(u)}else d(e,!1),(!s.isConnected||!B.includes(s))&&d(i,!0)}if(!(!C.length&&!Object.keys(g).length)){for(let{oldValue:r,target:u}of C){let e=B.includes(u),i=u.classList,c=r?r.split(" "):[];if(e){if(u.isConnected)continue;for(let s of c)i.contains(s)||b(s)}else if(u.isConnected){i.forEach(s=>{c.includes(s)||l(s)});for(let s of c)i.contains(s)||b(s)}}for(let r in g){let u=g[r],e=(this.countBy[r]||0)+u;e===0?(delete this.countBy[r],this.delete(r)):(r in this.countBy||this.insert(r),this.countBy[r]=e)}}}),this.observer.observe(t,{...n,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let t=this.style?.sheet;if(t?.cssRules)for(let n=t.cssRules.length-1;n>=0;n--)t.deleteRule(n);this.style?.remove(),this.style=null,this.root=null}match(t){for(let n in this.config.rules){let o=this.config.rules[n],m=this.matches[n],{symbol:R,native:k}=o;if(m&&m.test(t))return{origin:"match",config:o};if(R&&t.startsWith(R))return{origin:"symbol",config:o};if(k&&t.startsWith(k+":"))return{origin:"match",config:o}}for(let n of this.semantics)if(t.match(n[0]))return{origin:"semantics",value:n[1]}}create(t){let n=o=>{if(o in this.ruleBy)return this.ruleBy[o];let m=this.match(o);if(m)return new Q(o,m,this)};return(t in this.classes?this.classes[t].map(o=>n(o)):[n(t)]).filter(o=>o&&o.text)}refresh(t){if(t?.override?this.config=t:this.config=W(T,t),this.cache(),!this.style)return;let n=$();this.style.replaceWith(n),this.style=n,this.rules.length=0,this.ruleBy={};for(let o in this.countBy)this.insert(o)}destroy(){let t=A.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let n=this.style?.sheet,o=m=>{let R=this.ruleBy[m];if(!(!R||m in this.classesBy&&this.classesBy[m].some(k=>k in this.countBy))){if(n&&R.natives.length){let k=R.natives[0];for(let v=0;v<n.cssRules.length;v++)if(n.cssRules[v]===k.cssRule){for(let C=0;C<R.natives.length;C++)n.deleteRule(v);break}}this.rules.splice(this.rules.indexOf(R),1),delete this.ruleBy[m],R.config.delete&&R.config.delete.call(R,m)}};if(t in this.classes){for(let m of this.classes[t])m in this.countBy||o(m);delete this.ruleBy[t]}else o(t)}insert(t){let n=this.create(t);return n.length?(this.insertRules(n),!0):!1}insertRules(t){for(let n of t){if(this.ruleBy[n.className])continue;let o,m=Object.keys(this.keyframes).length,R=this.rules.length-1,{media:k,order:v,priority:g,hasWhere:C,className:B}=n,x=(f,l,b,d)=>{let r=m?1:0,u;l&&(r=f.findIndex(l)),b&&(u=f.findIndex(b)),r===-1&&(r=f.length),(u===void 0||u===-1)&&(u=f.length);let e=f.slice(r,u);for(let i=0;i<e.length;i++){let c=e[i];if(!(c.priority===-1||d&&d(c))&&(c.priority<g||c.priority===g&&(C&&!c.hasWhere||c.order>=v)))return r+i}return r+e.length};if(k){let f=this.rules.findIndex(l=>l.media);if(f!==-1){let l=k.features["max-width"],b=k.features["min-width"];if(l&&b){let d=l.value-b.value;for(let r=R;r>=f;r--){o=r;let u=this.rules[r],e=u.media,i=e.features["max-width"],c=e.features["min-width"];if(!i||!c){o++;break}let s=i.value-c.value;if(s===d){if(C!==u.hasWhere)continue;if(g!==-1){let a=[this.rules[r]];for(let h=r-1;h>=f;h--){let y=this.rules[h];if(y.hasWhere!==C)break;let w=y.media,p=w.features["max-width"],E=w.features["min-width"];if(!p||!E||p.value-E.value!==s)break;a.unshift(this.rules[h])}o=x(this.rules,h=>h.media&&h.priority!==-1&&h.media.features["min-width"]&&h.media.features["max-width"])}break}else if(s>d)break}}else if(b)for(let d=f;d<=R;d++){o=d;let r=this.rules[d],u=r.media,e=u.features["max-width"],i=u.features["min-width"];if(e){if(i)break;continue}let c=i?.value;if(c===b.value){if(!C&&r.hasWhere){o++;continue}if(g!==-1)o=x(this.rules,s=>s.media,s=>s.media&&s.priority!==-1&&s.media.features["min-width"]&&s.media.features["max-width"],s=>!s.media.features["min-width"]&&!s.media.features["max-width"]);else for(let s=d;s<=R;s++){let a=this.rules[s],h=a.media,y=h.features["min-width"];if(!h.features["max-width"]){if(a.hasWhere!==C||y.value!==c||a.order>=v)break;o=s+1}}break}else{if(c>b.value)break;o++}}else if(l)for(let d=R;d>=f;d--){o=d;let r=this.rules[d],u=r.media,e=u.features["max-width"];if(u.features["min-width"])continue;let c=e?.value;if(!c||c>l.value){o++;break}else if(c===l.value){if(C&&!r.hasWhere)continue;if(g!==-1)o=x(this.rules,s=>s.media,s=>s.media&&s.priority!==-1&&s.media.features["min-width"]&&s.media.features["max-width"],s=>!s.media.features["min-width"]&&!s.media.features["max-width"]);else{let s=[this.rules[d]];for(let a=d-1;a>=f;a--){let h=this.rules[a],y=h.media,w=y.features["min-width"],p=y.features["max-width"];if(!w&&(!p||p.value!==c||h.hasWhere!==C))break;s.unshift(h)}for(let a=0;a<s.length;a++){let h=s[a];if(!h.media.features["min-width"]){if(h.order>=v)break;o=d-s.length+2+a}}}break}}}if(o===void 0)if(f===-1)o=R+1;else if(g!==-1)o=f+x(this.rules.slice(f),void 0,l=>l.media.features["max-width"]||l.media.features["min-width"]);else if(C){let l=f;for(;l<this.rules.length;l++){let b=this.rules[l];if(b.priority!==-1||!b.hasWhere||b.order>=v){o=l;break}}o===void 0&&(o=l)}else for(let l=f;l<=R;l++){o=l;let b=this.rules[l],d=b.media;if(b.priority!==-1||d.features["max-width"]||d.features["min-width"])break;if(b.hasWhere)o++;else if(b.order>=v)break}}else if(g===-1){let f=m?1:0;if(C)for(;f<this.rules.length;f++){let l=this.rules[f];if(!l.hasWhere||l.media||l.priority!==-1||l.order>=v){o=f;break}}else for(;f<this.rules.length;f++){let l=this.rules[f];if(l.media||!l.hasWhere&&(l.order>=v||l.priority!==-1)){o=f;break}}o===void 0&&(o=f)}else o=x(this.rules,void 0,f=>f.media);if(this.rules.splice(o,0,n),this.ruleBy[B]=n,this.style){let f=this.style.sheet,l=0,b=d=>{let r=this.rules[d];if(r){if(!r.natives.length)return b(d-1);let u=r.natives[r.natives.length-1].cssRule;for(let e=0;e<f.cssRules.length;e++)if(f.cssRules[e]===u){l=e+1;break}}};b(o-1);for(let d=0;d<n.natives.length;)try{let r=n.natives[d];f.insertRule(r.text,l),r.cssRule=f.cssRules[l++],d++}catch(r){console.error(r),n.natives.splice(d,1)}}n.config.insert?.call(n)}}get text(){return this.rules.map(t=>t.text).join("")}},j=A;O(j,"root"),O(j,"config",T),O(j,"instances",[]),O(j,"refresh",t=>{for(let n of A.instances)n.refresh(t)});S&&(window.MasterCSS=j);export{j as MasterCSS};
@@ -0,0 +1 @@
1
+ var o=/&(amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,p={amp:"&","#38":"&",lt:"<","#60":"<",gt:">","#62":">",apos:"'","#39":"'",quot:'"',"#34":'"'};function r(e){if(e)return e.split(/\sclass="([^"]*)"/gm).filter((t,s)=>s%2===1).map(t=>t.split(" ")).flat().map(t=>t.replace(o,(s,a)=>p[a]))}export{r as extractClassesFromHTML};
@@ -1 +1 @@
1
- export*from"./render.mjs";export*from"./render-from-html.mjs";export*from"./render-into-html.mjs";export*from"./fill-color-scale.mjs";export*from"./define-content.mjs";
1
+ export*from"./render.mjs";export*from"./render-from-html.mjs";export*from"./render-into-html.mjs";export*from"./render-rules.mjs";export*from"./render-rules-from-html.mjs";export*from"./extract-classes-from-html.mjs";export*from"./fill-color-scale.mjs";export*from"./define-content.mjs";
@@ -1 +1 @@
1
- import{MasterCSS as a}from"../css.mjs";var p=/&(amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,g={amp:"&","#38":"&",lt:"<","#60":"<",gt:">","#62":">",apos:"'","#39":"'",quot:'"',"#34":'"'};function m(s,n){if(!s)return;let t=new a({...n,observe:!1}),r=/\sclass="([^"]*)"/gm,o;for(;o=r.exec(s);){let c=o[1].replace(/\n/g,"").split(" ").filter(e=>e).map(e=>e.replace(p,(l,i)=>g[i]));for(let e of c)e in t.countBy||(t.insert(e),t.countBy[e]=1)}return t.text}export{m as renderFromHTML};
1
+ import{MasterCSS as s}from"../css.mjs";import{extractClassesFromHTML as i}from"./extract-classes-from-html.mjs";function m(e,o){if(!e)return;let n=i(e);if(!n.length)return;let r=new s({...o,observe:!1});for(let t of n)t in r.countBy||r.insert(t)&&(r.countBy[t]=1);return r.text}export{m as renderFromHTML};
@@ -0,0 +1 @@
1
+ import{extractClassesFromHTML as t}from"./extract-classes-from-html.mjs";import{renderRules as n}from"./render-rules.mjs";function m(r,o){if(!r)return;let e=t(r);if(e.length)return n(e,o)}export{m as renderRulesFromHTML};
@@ -0,0 +1 @@
1
+ import{MasterCSS as t}from"../css.mjs";function f(n,o){if(!n?.length)return;let e=new t({...o,observe:!1});for(let r of n)r in e.countBy||e.insert(r)&&(e.countBy[r]=1);return e.rules}export{f as renderRules};