@master/css 2.0.0-beta.123 → 2.0.0-beta.125

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 Ie=Object.defineProperty;var ze=(e,t,r)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var K=(e,t,r)=>(ze(e,typeof t!="symbol"?t+"":t,r),r);function Re(e){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&e instanceof t||e instanceof Date||e instanceof RegExp)}function Ce(e){if(typeof Buffer<"u"&&Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function Te(e){let t=[];return e.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?t[s]=Te(r):Re(r)?t[s]=Ce(r):t[s]=q({},r):t[s]=r}),t}function Se(e,t){return t==="__proto__"?void 0:e[t]}function q(...e){let t={},r,s;return e.forEach(function(l){typeof l!="object"||l===null||Array.isArray(l)||Object.keys(l).forEach(function(a){if(s=Se(t,a),r=Se(l,a),r!==t)if(typeof r!="object"||r===null){t[a]=r;return}else if(Array.isArray(r)){t[a]=Te(r);return}else if(Re(r)){t[a]=Ce(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[a]=q({},r);return}else{t[a]=q(s,r);return}})}),t}function oe(e,t){return(e?e+":":"")+(t.unit?t.value+t.unit:t.value)+(t.important?"!important":"")}var Y={"(":")","'":"'",'"':'"',"{":"}"};function Z(e,t,r,s=[]){let l=[",",...s],a=[],c="",o=0;return function g(h,n,i,f="",p=[],x=[]){let b,S=!1;n&&(n===")"&&c.slice(-1)==="$"?b=c.length-1:(n==="'"||n==='"')&&(S=!0),c+=h[o++]);let R=()=>{let u=c;if(c="",t&&u in t&&!p.includes(u)){let m=o;o=0,g(t[u].toString(),void 0,void 0,void 0,[...p,u],x),o=m}else if(r&&u in r&&!x.includes(u)){let m=o;o=0,g(r[u].toString(),void 0,void 0,void 0,p,[...x,u]),o=m}else a.push({value:u})};for(;o<h.length;o++){let u=h[o];if(u===n){if(c+=u,S){let m=0;for(let d=c.length-2;c[d]==="\\";d--)m++;if(m%2)continue}b!==void 0&&(c=c.slice(0,b)+c.slice(b).replace(/\$\((.*)\)/,"var(--$1)")),i||(S?a.push(c):R(),f="",c="");break}else if(!S&&u in Y)g(h,Y[u],i===void 0?0:i+1,f,p,x);else if((u==="|"||u===" ")&&n!=="}"&&(!S||f==="path"))n?c+=" ":R();else{if(!n){if(u==="."){if(isNaN(+h[o+1]))break;h[o-1]==="-"&&(c+="0")}else if(l.includes(u)){c&&R(),a.push(u);continue}else if(u==="#"&&(c||a.length&&h[o-1]!=="|"&&a[o-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(u))break;f+=u}c+=u}}i===void 0&&c&&R()}(e),[a,e.slice(o)]}function ae(e,t,r){if(r){let s="",l=e.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(l)if(e.includes("/")){let[a,c]=e.split("/");return{value:+a/+c*100+"%",unit:s}}else{let a=+l[1];return s=l[3]||"",s||((r==="rem"||r==="em")&&(a=a/t),s=r||""),{value:a,unit:s}}}}function Me(e,t,r){let s=n=>n==="+"||n==="-"||n==="*"||n==="/",l="",a,c="",o=!1,g=!1;function h(n,i="",f=""){if(a===2&&!g){let p=ae(c,t,r);p&&(c=p.value+p.unit)}l+=c+i+n+f,a=null,g=!1,c=""}for(let n=0;n<e.length;n++){let i=e[n];if(i==="("||i===")")o=i===")",h(i);else if(i===",")h(i,""," ");else{switch(a){case 1:break;case 2:if(s(i)){h(i," "," ");continue}else/[0-9]/.test(i)||(g=!0);break;default:o&&(l+=" "),isNaN(+i)?s(i)||(a=1):a=2;break}a?c+=i:l+=i}}return c&&(l+=c),l}function le(e,t,r,s,l,a){let c="",o="",g;if(typeof e=="number")c=e,o=t||"";else{if(s){let n=!1,i=!1;e=e.replace(new RegExp(`(^|,| |\\()((?:${r.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(f,p,x,b)=>{i=!0;let S=s[x];if(S){let R;for(let u of a)if(R=S[u])break;if(R){n=!0;let u=R;if(b){let m=b.endsWith("%")?parseFloat(b)/100:+b;m=isNaN(m)?1:Math.min(Math.max(m,0),1),u+=Math.round(m*255).toString(16).toUpperCase().padStart(2,"0")}return p+u}}return f}),i&&(g=n)}let h=ae(e,l,t);if(h)return h;c=(e.indexOf("calc(")===-1?e:Me(e,l,t)).replace(/\$\(((\w|-)+)\)/g,"var(--$1)")}return{value:c,unit:o,colorMatched:g}}var ye=[":disabled",":active",":focus",":hover"];function ce(e){if(typeof CSS<"u")return CSS.escape(e);if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let t=String(e),r=t.length,s=-1,l="",a,c=t.charCodeAt(0);if(r==1&&c==45)return"\\"+t;for(;++s<r;){if(a=t.charCodeAt(s),a==0){l+="\uFFFD";continue}if(a>=1&&a<=31||a==127||s==0&&a>=48&&a<=57||s==1&&a>=48&&a<=57&&c==45){l+="\\"+a.toString(16)+" ";continue}if(a>=128||a==45||a==95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){l+=t.charAt(s);continue}l+="\\"+t.charAt(s)}return l}var ue=class{constructor(t,r,s){this.className=t;this.meta=r;this.css=s;let{id:l,unit:a="rem",order:c=0,colorful:o,prop:g,analyzeToken:h,getThemeProps:n,parseValue:i,get:f}=r.config||{},{rootSize:p,scope:x,important:b}=s.config,{themeNames:S,colorNames:R,colorThemesMap:u,selectors:m,globalValues:d,breakpoints:k,mediaQueries:y}=s,M=s.values[l],C=s.relationThemesMap[t],$=t;this.order=c;let O,B,P,G;if(r.origin==="semantics"){let[W,A]=r.value;P=$.slice(W.length),O=A}else if(h)[B,G,P]=h.call(this,$,M,d);else{let W;if(r.origin==="matches"){let A=$.indexOf(":");this.prefix=$.slice(0,A+1),this.prefix.includes("(")?(this.prefix=void 0,W=$):W=$.slice(A+1)}else r.origin==="symbol"&&(this.symbol=$[0],W=$.slice(1));[G,P]=Z(W,M,d)}P[0]==="!"&&(this.important=!0,P=P.slice(1));let ke=W=>{let A=W.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((w,T)=>T%3?w:w.replace(/_/g," ")).join(""),E=[],N="",F=0;for(let w=0;w<A.length;w++){let T=A[w];if(T==="\\"){N+=T+A[++w];continue}!F&&T===","?(E.push(N),N=""):(N+=T,F&&T===")"?F--:T==="("&&F++)}return N&&E.push(N),E};this.prefixSelectors=B?ke(B):[""];let pe=P.split("@"),be=pe[0];if(be){this.vendorSuffixSelectors={};let W=(w,T,v,j)=>{for(let[L,D]of T)if(L.test(w)){for(let V of D)W(w.replace(L,V),T,v,!0);return}j&&v.push(w)},A=[];""in m?W(be,m[""],A,!0):A.push(be);let E={};for(let[w,T]of Object.entries(m)){if(!w)continue;let v=[];for(let j of A)W(j,T,v,!1);v.length&&(E[w]=v)}let N=(w,T)=>{let v=T.reduce((j,L)=>(j.push(...ke(L)),j),[]);w in this.vendorSuffixSelectors?this.vendorSuffixSelectors[w].push(...v):this.vendorSuffixSelectors[w]=v},F=Object.keys(E);if(F.length)for(let w of F)N(w,E[w]);else N("",A);for(let w of Object.values(this.vendorSuffixSelectors))for(let T of w){this.hasWhere!==!1&&(this.hasWhere=T.includes(":where("));for(let v=0;v<ye.length;v++)if(T.includes(ye[v])){(this.priority===-1||this.priority>v)&&(this.priority=v);break}}}else this.vendorSuffixSelectors={"":[""]};for(let W=1;W<pe.length;W++){let A=pe[W];if(A)if(S.includes(A))this.theme=A;else if(A==="rtl"||A==="ltr")this.direction=A;else{let E,N,F=A.indexOf("_");if(F!==-1)E=A.slice(0,F),N=A.slice(F);else{let w=A.indexOf("(");w!==-1&&(E=A.slice(0,w),N=A.slice(w))}if(!E){E="media";let w=[];this.media={token:A,features:{}};let T=A.split("&");for(let v of T)if(v==="all"||v==="print"||v==="screen"||v==="speech")this.media.type=v;else if(v==="\u{1F5A8}")this.media.type="print";else if(v==="landscape"||v==="portrait")w.push("(orientation:"+v+")");else if(v==="motion"||v==="reduced-motion")w.push("(prefers-reduced-motion:"+(v==="motion"?"no-preference":"reduce")+")");else if(y&&v in y)w.push(y[v]);else{let j={token:v},L="",D="",V=0;v.startsWith("<=")?(D="<=",L="max-width"):v.startsWith(">=")||k[v]?(D=">=",L="min-width"):v.startsWith(">")?(D=">",L="min-width",V=.02):v.startsWith("<")&&(D="<",L="max-width",V=-.02);let H=D?v.replace(D,""):v,z=k[H];switch(L){case"max-width":case"min-width":z?Object.assign(j,le(z,"px")):Object.assign(j,le(H,"px")),j.unit==="px"&&(j.value+=V),this.media.features[L]=j,w.push("("+L+":"+(j.value+j.unit)+")");break}}N="",this.media.type&&(N=this.media.type),w.length&&(N+=(N?" and ":"")+w.join(" and "))}N&&(this.at[E]=(E in this.at?this.at[E]+" and ":"")+N.replace(/_/g," "))}}let ie=(W,A)=>{let E,N,F=(T,v,j)=>{let L="";this.direction&&(L+="[dir="+this.direction+"] ");let D=this.prefixSelectors.map(z=>z+L),V=(z,ne)=>D.map(U=>(z?"."+z+" ":"")+(x?x+" ":"")+U).reduce((U,xe)=>(U.push(j.reduce((we,Le)=>(we.push(xe+"."+ce(ne)+Le),we),[]).join(",")),U),[]).join(","),H=V(v,t)+(C?Object.entries(C).filter(([z])=>this.theme||!o||!v||!z||z===v).map(([z,ne])=>ne.reduce((U,xe)=>U+","+V(this.theme??((o||n)&&v||z),xe),"")).join(""):"")+"{"+T+"}";for(let z of Object.keys(this.at).sort((ne,U)=>U==="supports"?-1:1))H="@"+z+" "+this.at[z]+"{"+H+"}";return H},w=[];if(G){let T,v;for(let j of G)typeof j=="string"?w.push(j):(T=le(j.value,a,o&&R,o&&u,p,this.theme?[this.theme,""]:[W]),T.colorMatched!==void 0&&v!==!0&&(v=T.colorMatched),w.push(T.value+T.unit));if(A&&(v===void 0?W:!v))return;if(w.length===1?T?(E=T.value,N=T.unit):E=w[0]:E=w.reduce((j,L,D)=>j+L+(L===","||G[D+1]===","||D===G.length-1?"":" "),""),typeof E!="object"){i&&(E=i.call(this,E,this.css.config)),o&&E==="current"&&(E="currentColor");let j={unit:N,value:E,important:this.important};if(n){let L=n.call(this,j,s);for(let D in L)for(let V of Object.values(this.vendorSuffixSelectors))this.natives.push({unit:N,value:E,text:F(Object.entries(L[D]).map(([H,z])=>oe(H,{important:(this.important||b)&&!z.endsWith("!important"),unit:"",value:z})).join(";"),D,V),theme:D});return}else f&&(E=f.call(this,j))}}else E=O;for(let T of Object.values(this.vendorSuffixSelectors))this.natives.push({unit:N,value:E,text:F(typeof E=="object"?Object.entries(E).map(([v,j])=>oe(v,{...typeof j=="object"?j:{unit:"",value:j},important:this.important||b})).join(";"):oe(g,{unit:N,value:E,important:this.important||b}),W,T),theme:W})};if(n)ie(void 0,!1);else if(this.theme)ie(this.theme,!1);else if(o)for(let W of S)ie(W,!0);else ie("",!1)}at={};priority=-1;natives=[];get text(){return this.natives.map(t=>t.text).join("")}};var ee={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560};function te(e){e.startsWith("#")&&(e=e.slice(1));let t=e.match(/.{1,2}/g);return[parseInt(t[0],16),parseInt(t[1],16),parseInt(t[2],16)]}function fe(e,t,r){return((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function I(e){typeof e=="string"&&(e={"":e});let t=""in e,r=!1;for(let s in e)if(s&&+s>=100){r=!0;break}if(!r&&(!t||Object.keys(e).length>1)){let s=0,l="0"in e?te(e[0]):[0,0,0],a,c,o=[],g=()=>{let h=a-s,n=c.map((i,f)=>(i-l[f])/h);for(let i of o){let f=i-s,p=l.map((x,b)=>Math.round(x+n[b]*f));e[i]="#"+fe.call(this,...p)}};for(let h=1;h<100;h++)h in e?(o.length?(a=h,c=te(e[h]),g(),o.length=0,l=c):l=te(e[h]),s=h):o.push(h);o.length&&(a=100,c="100"in e?te(e[100]):[255,255,255],g())}return t||(e[""]=e[r?"500":"50"]),e}var Oe={black:"#000000",white:"#ffffff",slate:I({5:"#141e2b",10:"#19212d",20:"#262f3e",30:"#323e52",40:"#41516b",50:"#616a84",55:"#6c7693",60:"#959db3",70:"#a3abbf",80:"#d7dae3",95:"#f6f7f8"}),gray:I({5:"#1e1d1f",10:"#212022",20:"#2f2e30",30:"#3e3d40",40:"#504f52",50:"#6b6a6d",55:"#777679",60:"#9e9da0",70:"#abaaae",80:"#dad9db",95:"#f5f4f7"}),brown:I({5:"#271b15",10:"#2b1e18",20:"#3c2b22",30:"#50382c",40:"#694839",50:"#8d604b",55:"#9d6b53",60:"#b79788",70:"#c1a598",80:"#efd5c9",95:"#faf2ef"}),orange:I({5:"#2e1907",10:"#331b07",20:"#47260b",30:"#5d320e",40:"#7a4111",50:"#a15717",55:"#b4611a",60:"#e38739",70:"#e79855",80:"#f7d4b5",95:"#fcf1e7"}),gold:I({5:"#281b00",10:"#2d1e01",20:"#3f2a00",30:"#543800",40:"#6d4900",50:"#906000",55:"#9c6d00",60:"#d09100",70:"#dca000",80:"#fbd67f",95:"#fff3d8"}),yellow:I({5:"#251d00",10:"#282000",20:"#3a2e01",30:"#4b3b00",40:"#624e00",50:"#806700",55:"#8e7200",60:"#be9900",70:"#d0a700",80:"#edda8f",95:"#fff5ca"}),grass:I({5:"#162106",10:"#182406",20:"#223308",30:"#2c4408",40:"#3a570b",50:"#4e750e",60:"#74ae15",70:"#7dbc17",80:"#bfe87c",95:"#ebfad4"}),green:I({5:"#042311",10:"#032611",20:"#023717",30:"#03481f",40:"#025d26",50:"#067b34",55:"#07883a",60:"#09b64d",70:"#0ac553",80:"#80f1a4",95:"#e0fae8"}),beryl:I({5:"#002319",10:"#00271c",20:"#003626",30:"#004732",40:"#005c41",50:"#007954",55:"#00875e",60:"#00b37c",70:"#00c387",80:"#72f0c5",95:"#d6fcef"}),teal:I({5:"#012220",10:"#012624",20:"#003532",30:"#004541",40:"#005a54",50:"#00776f",55:"#00857c",60:"#00b1a5",70:"#00bfb2",80:"#6aeee5",95:"#d4fcf8"}),cyan:I({5:"#00222b",10:"#00252e",20:"#013340",30:"#004457",40:"#00576f",50:"#007391",55:"#0080a1",60:"#00abd7",70:"#00b9e9",80:"#97e6fa",95:"#dff8ff"}),sky:I({5:"#031f34",10:"#032339",20:"#04314e",30:"#044169",40:"#065386",50:"#086eb3",55:"#097ac5",60:"#29a4f5",70:"#4db3f7",80:"#b3e0ff",95:"#eaf6fe"}),blue:I({5:"#07194a",10:"#081c53",20:"#0a2773",30:"#0e3496",40:"#1146b6",50:"#175fe9",55:"#2671ea",60:"#6b9ef1",70:"#81acf3",80:"#c6dbfe",95:"#edf4fe"}),indigo:I({5:"#1f1645",10:"#20174f",20:"#2b1f74",30:"#37289d",40:"#463fb1",50:"#5a5bd5",55:"#6464f1",60:"#9393f5",70:"#a1a5ee",80:"#d5d7fe",95:"#f1f2ff"}),violet:I({5:"#2b0a4e",10:"#2e0b57",20:"#3d1179",30:"#4e169f",40:"#5f2eba",50:"#7949e5",55:"#8755f5",60:"#ac8af8",70:"#b89bf9",80:"#e1d4fe",95:"#f5f1ff"}),purple:I({5:"#2e0c47",10:"#330c4e",20:"#460f6c",30:"#5b1390",40:"#7421b1",50:"#9832e4",55:"#a348e7",60:"#c184ef",70:"#ca96f1",80:"#ead1fe",95:"#f9f0ff"}),fuchsia:I({5:"#39092a",10:"#400932",20:"#560d4a",30:"#6f1165",40:"#8c158a",50:"#b61cbb",55:"#ca1fce",60:"#e66ee9",70:"#ea86ed",80:"#facbfb",95:"#feefff"}),pink:I({5:"#3d0722",10:"#430725",20:"#5d0933",30:"#790d44",40:"#9a1058",50:"#ca1473",55:"#e11681",60:"#f170b4",70:"#f388c0",80:"#fdcde6",95:"#fff0f8"}),crimson:I({5:"#430213",10:"#470314",20:"#62041c",30:"#800524",40:"#9f1036",50:"#ce1a4b",55:"#e8144c",60:"#f37596",70:"#f58ba7",80:"#fdceda",95:"#fff1f4"}),red:I({5:"#450001",10:"#490102",20:"#640304",30:"#800506",40:"#a11012",50:"#d11a1e",55:"#ed0a0e",60:"#f97476",70:"#fa8b8d",80:"#fdcfcf",95:"#fff1f1"})};var Ee="";var $e={"::scrollbar":"::-webkit-scrollbar","::scrollbar-button":"::-webkit-scrollbar-button","::scrollbar-thumb":"::-webkit-scrollbar-thumb","::scrollbar-track":"::-webkit-scrollbar-track","::scrollbar-track-piece":"::-webkit-scrollbar-track-piece","::scrollbar-corner":"::-webkit-scrollbar-corner","::slider-thumb":["::-webkit-slider-thumb","::-moz-range-thumb"],"::slider-runnable-track":["::-webkit-slider-runnable-track","::-moz-range-track"],"::meter":"::-webkit-meter","::resizer":"::-webkit-resizer","::progress":"::-webkit-progress",":first":":first-child",":last":":last-child",":even":":nth-child(2n)",":odd":":nth-child(odd)",":nth(":":nth-child("};var Ae={square:{"aspect-ratio":"1/1"},video:{"aspect-ratio":"16/9"},rounded:{"border-radius":"1e9em"},round:{"border-radius":"50%"},hidden:{display:"none"},hide:{display:"none"},block:{display:"block"},table:{display:"table"},flex:{display:"flex"},grid:{display:"grid"},contents:{display:"contents"},inline:{display:"inline"},"inline-block":{display:"inline-block"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-table":{display:"inline-table"},"table-cell":{display:"table-cell"},"table-caption":{display:"table-caption"},"flow-root":{display:"flow-root"},"list-item":{display:"list-item"},"table-row":{display:"table-row"},"table-column":{display:"table-column"},"table-row-group":{display:"table-row-group"},"table-column-group":{display:"table-column-group"},"table-header-group":{display:"table-header-group"},"table-footer-group":{display:"table-footer-group"},italic:{"font-style":"italic"},oblique:{"font-style":"oblique"},isolate:{isolation:"isolate"},overflow:{overflow:"visible"},untouchable:{"pointer-events":"none"},static:{position:"static"},fixed:{position:"fixed"},abs:{position:"absolute"},rel:{position:"relative"},sticky:{position:"sticky"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},vw:{width:"100vw"},vh:{height:"100vh"},"max-vw":{"max-width":"100vw"},"max-vh":{"max-height":"100vh"},"min-vw":{"min-width":"100vw"},"min-vh":{"min-height":"100vh"},"center-content":{"justify-content":"center","align-items":"center"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap","border-width":"0"},full:{width:"100%",height:"100%"},center:{left:0,right:0,"margin-left":"auto","margin-right":"auto"},middle:{top:0,bottom:0,"margin-top":"auto","margin-bottom":"auto"},"break-spaces":{"white-space":"break-spaces"},"break-word":{"overflow-wrap":"break-word",overflow:"hidden"}};var je=["dark","light"];var he={store:"theme"};function re(e,t,r=""){let s="border-";r&&(r="-"+r);let l=/^b(order)?-?(.)?/.exec(e)[2],a=s+"left"+r,c=s+"right"+r,o=s+"top"+r,g=s+"bottom"+r;switch(l){case"x":return{[a]:t,[c]:t};case"y":return{[o]:t,[g]:t};case"l":return{[a]:t};case"r":return{[c]:t};case"t":return{[o]:t};case"b":return{[g]:t};default:return{["border"+r]:t}}}function ve(e,t,{rootSize:r}){let s="",l=0;return function a(c,o){let g="",h=o?t(o):"",n=()=>{g&&(s+=!h||Number.isNaN(+g)?g:+g/(h==="rem"?r:1)+h,g="")};for(;l<e.length;l++){let i=e[l];if(i===c&&(c!=="'"||e[l+1]===")")){n(),s+=i;break}else i===","||i===" "?(n(),s+=i):!g&&i==="'"?(s+=i,l++,a(i),g=""):g&&i==="("?(s+=g+i,l++,a(")",g),g=""):g+=i}n()}(),s}var X={content:"content-box",border:"border-box",padding:"padding-box"};var se={min:"min-content",max:"max-content"};var _={full:"100%",fit:"fit-content",max:"max-content",min:"min-content"};for(let e in ee)_[e]=ee[e]/16+"rem";(()=>{let e=typeof global<"u"?global:window;if(!e.CSS&&!e.CSS?.escape){let t=function(r){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let s=String(r),l=s.length,a=-1,c="",o,g=s.charCodeAt(0);if(l==1&&g==45)return"\\"+s;for(;++a<l;){if(o=s.charCodeAt(a),o==0){c+="\uFFFD";continue}if(o>=1&&o<=31||o==127||a==0&&o>=48&&o<=57||a==1&&o>=48&&o<=57&&g==45){c+="\\"+o.toString(16)+" ";continue}if(o>=128||o==45||o==95||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122){c+=s.charAt(a);continue}c+="\\"+s.charAt(a)}return c};e.CSS||(e.CSS={}),e.CSS.escape=t,globalThis.CSS.escape=t}})();var Ne={group:{matches:"^(?:.+?[*_>~+])?\\{.+?\\}",unit:"",prop:!1,analyzeToken(e,t,r){let s=0;for(;s<e.length&&!(e[s]==="{"&&e[s-1]!=="\\");s++);return[e.slice(0,s),...Z(e.slice(s),t,r)]},getThemeProps(e,t){let r={},s=(h,n)=>{let i=n.indexOf(":");if(i!==-1){h in r||(r[h]={});let f=r[h],p=n.slice(0,i);p in f||(f[p]=n.slice(i+1))}},l=h=>{let n=(i,f)=>{let p=f.slice(ce(h.className).length).match(/\{(.*)\}/)[1].split(";");for(let x of p)s(i,x)};if(this.theme){let i=h.natives.find(f=>f.theme===this.theme)??h.natives.find(f=>!f.theme);i&&n(this.theme,i.text)}else for(let i of h.natives)n(i.theme,i.text)},a=[],c="",o=()=>{c&&(a.push(c.replace(/ /g,"")),c="")},g=1;(function h(n){for(;g<e.value.length;g++){let i=e.value[g];if(!n){if(i===";"){o();continue}if(i==="}")break}if(c+=i,n===i){if(n==="'"||n==='"'){let f=0;for(let p=c.length-2;c[p]==="\\";p--)f++;if(f%2)continue}break}else i in Y&&n!=="'"&&n!=='"'&&(g++,h(Y[i]))}})(void 0),o();for(let h of a){let n=t.create(h);if(Array.isArray(n))for(let i of n)l(i);else n?l(n):s(this.theme??"",h)}return r}},variable:{matches:"^\\$[^ (){}A-Z]+:[^ ]",unit:"",prop:!1,get(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{matches:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},fontWeight:{matches:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",unit:"",values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{matches:"^f(?:ont)?:(?:$values)(?!\\|)",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:{matches:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",unit:"",prop:!1,get(e){let t={};switch(e.value){case"subpixel-antialiased":t["-webkit-font-smoothing"]=t["-moz-osx-font-smoothing"]={...e,value:"auto"};break;case"antialiased":t["-webkit-font-smoothing"]={...e,value:"antialiased"},t["-moz-osx-font-smoothing"]={...e,value:"grayscale"};break}return t}},fontStyle:{matches:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",unit:"deg"},fontVariantNumeric:{matches:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)"},fontFeatureSettings:{matches:"^font-feature:."},font:{matches:"^f:.",unit:"",order:-1},color:{matches:"^(?:color|fg|foreground):.",colorful:!0,unit:""},spacing:{matches:"^[pm][xytblr]?:.",prop:!1,get(e){let r=this.prefix[0]==="m"?"margin":"padding",s=r+"-left",l=r+"-right",a=r+"-top",c=r+"-bottom";switch(this.prefix[1]){case"x":return{[s]:e,[l]:e};case"y":return{[a]:e,[c]:e};case"l":return{[s]:e};case"r":return{[l]:e};case"t":return{[a]:e};case"b":return{[c]:e};default:return{[r]:e}}},get order(){return this.prefix==="p:"||this.prefix==="m:"?-1:0}},margin:{matches:"^margin(?:-(?:left|right|top|bottom))?:.",prop:!1,get(e){return{[this.prefix.slice(0,-1)]:e}},get order(){return this.prefix==="margin:"?-1:0}},padding:{matches:"^padding(?:-(?:left|right|top|bottom))?:.",prop:!1,get(e){return{[this.prefix.slice(0,-1)]:e}},get order(){return this.prefix==="padding:"?-1:0}},flexBasis:{values:_},flexWrap:{matches:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)"},flexGrow:{unit:""},flexShrink:{unit:""},flexDirection:{matches:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",values:{col:"column","col-reverse":"column-reverse"}},flex:{unit:"",order:-1},display:{matches:"^d:."},width:{matches:"^w:.",values:_},height:{matches:"^h:.",values:_},minWidth:{matches:"^min-w:.",values:_},minHeight:{matches:"^min-h:.",values:_},wH:{matches:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",prop:!1,analyzeToken(e,t,r){return["",...Z(e,t,r,["x"])]},get(e){let[t,r]=e.value.split(" x ");return{width:{...e,value:t},height:{...e,value:r}}}},minWH:{matches:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",prop:!1,analyzeToken(e,t,r){return["",...Z(e.slice(4),t,r,["x"])]},get(e){let[t,r]=e.value.split(" x ");return{"min-width":{...e,value:t},"min-height":{...e,value:r}}}},maxWH:{matches:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",prop:!1,analyzeToken(e,t,r){return["",...Z(e.slice(4),t,r,["x"])]},get(e){let[t,r]=e.value.split(" x ");return{"max-width":{...e,value:t},"max-height":{...e,value:r}}}},contain:{},content:{},counterIncrement:{unit:""},counterReset:{unit:""},letterSpacing:{matches:"^ls:.",unit:"em"},lineHeight:{matches:"^lh:.",unit:""},objectFit:{matches:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)"},objectPosition:{matches:"^(?:object|obj):(?:top|bottom|right|left|center|$values)"},textAlign:{matches:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)"},textDecorationColor:{colorStarts:"text-decoration:",colorful:!0},textDecorationStyle:{matches:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)"},textDecorationThickness:{matches:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",unit:"em"},textDecorationLine:{matches:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)"},textDecoration:{matches:"^t(?:ext)?:(?:underline|line-through|overline|$values)",colorful:!0,order:-1},textUnderlineOffset:{},textOverflow:{matches:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))"},textOrientation:{matches:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)"},textTransform:{matches:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)"},textRendering:{matches:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)"},textIndent:{},verticalAlign:{matches:"^(?:v|vertical):."},columns:{matches:"^(?:columns|cols):.",unit:"",order:-1},whiteSpace:{unit:""},inset:{matches:"^(?:top|bottom|left|right):.",get(e){return{[this.prefix.slice(0,-1)]:e}}},lines:{matches:"^lines:.",unit:"",prop:!1,get(e){return{overflow:{...e,value:"hidden"},display:{...e,value:"-webkit-box"},"overflow-wrap":{...e,value:"break-word"},"text-overflow":{...e,value:"ellipsis"},"-webkit-box-orient":{...e,value:"vertical"},"-webkit-line-clamp":e}}},maxHeight:{matches:"^max-h:.",values:_},maxWidth:{matches:"^max-w:.",values:_},boxSizing:{matches:"^box:(?:$values)(?!\\|)",values:{content:"content-box",border:"border-box"}},opacity:{unit:""},visibility:{},clear:{},float:{},isolation:{},overflow:{matches:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",prop:!1,get(e){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":e};case"y":return{"overflow-y":e}}return{overflow:e}},get order(){return-1}},overscrollBehavior:{matches:"^overscroll-behavior(?:-[xy])?:",prop:!1,get(e){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":e};case"y":return{"overscroll-behavior-y":e};default:return{"overscroll-behavior":e}}}},zIndex:{matches:"^z:.",unit:""},position:{values:{abs:"absolute",rel:"relative"}},cursor:{},pointerEvents:{},resize:{},touchAction:{},wordBreak:{unit:""},wordSpacing:{unit:"em"},userDrag:{get(e){return{"user-drag":e,"-webkit-user-drag":e}}},userSelect:{get(e){return{"user-select":e,"-webkit-user-select":e}}},textShadow:{colorful:!0},textSize:{matches:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",prop:!1,get(e){let{unit:t,value:r}=e,s=.75;return{"font-size":e,"line-height":{...e,value:t==="em"?r+s+t:`calc(${r}${t} + ${s}em)`,unit:""}}}},textFillColor:{matches:"^text-fill-color:.",colorStarts:"(?:text-fill|text|t):",colorful:!0,prop:!1,get(e){return{"-webkit-text-fill-color":e}}},textStrokeWidth:{matches:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",prop:!1,get(e){return{"-webkit-text-stroke-width":e}}},textStrokeColor:{matches:"^text-stroke-color:.",colorStarts:"text-stroke:",colorful:!0,prop:!1,get(e){return{"-webkit-text-stroke-color":e}}},textStroke:{matches:"^text-stroke:.",prop:!1,get(e){return{"-webkit-text-stroke":e}}},boxShadow:{matches:"^s(?:hadow)?:.",colorful:!0},tableLayout:{},transformBox:{matches:"^transform:(?:$values)(?!\\|)",values:{...X,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{matches:"^transform:(?:flat|preserve-3d|$values)(?!\\|)"},transformOrigin:{matches:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",unit:"px"},transform:{matches:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",unit:"",parseValue(e,{rootSize:t}){return e.replace(/(translate|scale|skew|rotate|perspective|matrix)(3d|[XYZ])?\((.*?)\)/g,(r,s,l,a)=>{let c,o;switch(s){case"translate":c="rem";break;case"skew":c="deg";break;case"rotate":l==="3d"&&(o=!0),c="deg";break;default:return r}let g=a.split(",");return r.replace(a,g.map((h,n)=>!o||g.length-1===n?Number.isNaN(+h)?h:h/(c==="rem"?t:1)+c:h).join(","))})}},transitionProperty:{matches:"^~property:."},transitionTimingFunction:{matches:"^~easing:."},transitionDuration:{matches:"^~duration:.",unit:"ms"},transitionDelay:{matches:"^~delay:.",unit:"ms"},transition:{symbol:"~",order:-1},animationDelay:{matches:"^@delay:.",unit:"ms"},animationDirection:{matches:"^@direction:."},animationDuration:{matches:"^@duration:.",unit:"ms"},animationFillMode:{matches:"^@fill-mode:."},animationIterationCount:{matches:"^@iteration-count:.",unit:""},animationName:{matches:"^@name:."},animationPlayState:{matches:"^@play-state:."},animationTimingFunction:{matches:"^@easing:."},animation:{symbol:"@",unit:"",order:-1},borderColor:{matches:"^border(?:-(?:left|right|top|bottom))?-color:.",colorStarts:"b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?:",colorful:!0,prop:!1,get(e){return re(this.prefix,e,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{matches:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",prop:!1,get(e){if(this.prefix){let r="",s=this.prefix.split("-");if(s.length>1)for(let l=1;l<s.length-1;l++)r+=s[l][0];else r=this.prefix.slice(1,-1);switch(r){case"t":return{"border-top-left-radius":e,"border-top-right-radius":e};case"tl":case"lt":return{"border-top-left-radius":e};case"rt":case"tr":return{"border-top-right-radius":e};case"b":return{"border-bottom-left-radius":e,"border-bottom-right-radius":e};case"bl":case"lb":return{"border-bottom-left-radius":e};case"br":case"rb":return{"border-bottom-right-radius":e};case"l":return{"border-top-left-radius":e,"border-bottom-left-radius":e};case"r":return{"border-top-right-radius":e,"border-bottom-right-radius":e};default:return{"border-radius":e}}}let t=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(t)?t:"border-radius"]:e}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{matches:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",prop:!1,get(e){return re(this.prefix,e,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{matches:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",prop:!1,get(e){return re(this.prefix,e,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{matches:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)"},borderSpacing:{},borderImageOutset:{},borderImageRepeat:{matches:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)"},borderImageSlice:{unit:""},borderImageSource:{matches:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)"},borderImageWidth:{matches:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},borderImage:{unit:""},border:{matches:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",colorful:!0,prop:!1,get(e){return re(this.prefix,e)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{matches:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)"},backgroundBlendMode:{},backgroundColor:{colorStarts:"(?:bg|background):",unit:"",colorful:!0},backgroundClip:{matches:"^(?:bg|background):(?:text|$values)(?!\\|)",get(e){return{"-webkit-background-clip":e,"background-clip":e}},values:X},backgroundOrigin:{matches:"^(?:bg|background):(?:$values)(?!\\|)",values:X},backgroundPosition:{matches:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",unit:"px"},backgroundRepeat:{matches:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])"},backgroundSize:{matches:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)"},backgroundImage:{matches:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",colorful:!0},background:{matches:"^bg:.",colorful:!0,order:-1},mixBlendMode:{matches:"^blend:."},backdropFilter:{matches:"^bd:.",colorful:!0,get(e){return{"backdrop-filter":e,"-webkit-backdrop-filter":e}},parseValue(e,t){return ve(e,r=>{switch(r){case"blur":case"drop-shadow":return"rem";case"hue-rotate":return"deg"}return""},t)}},filter:{matches:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",colorful:!0,parseValue(e,t){return ve(e,r=>{switch(r){case"blur":case"drop-shadow":return"rem";case"hue-rotate":return"deg"}return""},t)}},fill:{colorStarts:"fill:",colorful:!0},strokeDasharray:{},strokeDashoffset:{},strokeWidth:{matches:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},stroke:{colorful:!0},x:{unit:""},y:{unit:""},cx:{unit:""},cy:{unit:""},rx:{unit:""},ry:{unit:""},gridColumnStart:{matches:"^grid-col-start:.",unit:""},gridColumnEnd:{matches:"^grid-col-end:.",unit:""},gridColumn:{matches:"^grid-col(?:umn)?(?:-span)?:.",unit:"",order:-1,parseValue(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{matches:"^grid-cols:.",unit:"",get(e){return{display:{...e,value:"grid"},"grid-template-columns":{...this,value:"repeat("+e.value+",minmax(0,1fr))"}}}},gridRowStart:{unit:""},gridRowEnd:{unit:""},gridRow:{matches:"^grid-row-span:.",unit:"",order:-1,parseValue(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{unit:"",get(e){return{display:{...e,value:"grid"},"grid-auto-flow":{...e,value:"column"},"grid-template-rows":{...e,value:"repeat("+e.value+",minmax(0,1fr))"}}}},gridAutoColumns:{matches:"^grid-auto-cols:.",values:se},gridAutoFlow:{matches:"^grid-flow:."},gridAutoRows:{values:se},gridTemplateAreas:{},gridTemplateColumns:{matches:"^grid-template-cols:.",values:se},gridTemplateRows:{values:se},gridTemplate:{order:-1},gridArea:{unit:"",order:-1},grid:{order:-1},gap:{matches:"^gap(?:-x|-y)?:.",order:-1,prop:!1,get(e){switch(this.prefix[4]){case"x":return{"column-gap":e};case"y":return{"row-gap":e};default:return{gap:e}}}},order:{matches:"^o:.",unit:"",values:{first:-999999,last:999999}},breakInside:{},breakBefore:{},breakAfter:{},boxDecorationBreak:{matches:"^box:(?:slice|clone|$values)(?!\\|)",get(e){return{"box-decoration-break":e,"-webkit-box-decoration-break":e}}},aspectRatio:{matches:"^aspect:.",unit:""},columnSpan:{matches:"^col-span:."},alignContent:{matches:"^ac:."},alignItems:{matches:"^ai:."},alignSelf:{matches:"^as:"},justifyContent:{matches:"^jc:."},justifyItems:{matches:"^ji:."},justifySelf:{matches:"^js:."},placeContent:{order:-1},placeItems:{order:-1},placeSelf:{order:-1},listStylePosition:{matches:"^list-style:(?:inside|outside|$values)(?!\\|)"},listStyleType:{matches:"^list-style:(?:disc|decimal|$values)(?!\\|)"},listStyleImage:{matches:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)"},listStyle:{order:-1},outlineColor:{colorStarts:"outline:",colorful:!0},outlineOffset:{},outlineStyle:{matches:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)"},outlineWidth:{matches:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},outline:{order:-1,colorful:!0},accentColor:{colorStarts:"accent:",colorful:!0},appearance:{},caretColor:{colorStarts:"caret:",colorful:!0},scrollBehavior:{},scrollMargin:{matches:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",prop:!1,get(e){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":e,"scroll-margin-right":e};case"y":return{"scroll-margin-top":e,"scroll-margin-bottom":e};case"l":return{"scroll-margin-left":e};case"r":return{"scroll-margin-right":e};case"t":return{"scroll-margin-top":e};case"b":return{"scroll-margin-bottom":e}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:e}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{matches:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",prop:!1,get(e){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":e,"scroll-padding-right":e};case"y":return{"scroll-padding-top":e,"scroll-padding-bottom":e};case"l":return{"scroll-padding-left":e};case"r":return{"scroll-padding-right":e};case"t":return{"scroll-padding-top":e};case"b":return{"scroll-padding-bottom":e}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:e}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{matches:"^scroll-snap:(?:start|end|center|$values)"},scrollSnapStop:{matches:"^scroll-snap:(?:normal|always|$values)(?!\\|)"},scrollSnapType:{matches:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)"},willChange:{},writingMode:{matches:"^writing:."},direction:{},shapeOutside:{matches:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",values:{...X,margin:"margin-box"}},shapeMargin:{matches:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},shapeImageThreshold:{unit:""},clipPath:{matches:"^clip:.",values:{...X,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{},maskImage:{get(e){return{"mask-image":e,"-webkit-mask-image":e}}}};var de={breakpoints:ee,colors:Oe,rootSize:16,scope:Ee,selectors:$e,semantics:Ae,themes:je,theme:he,rules:Ne,override:!1,observe:!0,important:!1};var me=class{constructor(t=typeof document<"u"?document.documentElement:null,r){this.host=t;this.options=r;this.options=q(he,r),this.options.store&&this.storage?this.syncWithStorage():this.options.default&&this.set(this.options.default,{emit:!1,store:!1})}darkMQL=typeof window<"u"?window.matchMedia?.("(prefers-color-scheme:dark)"):void 0;get storage(){let{store:t}=this.options;if(t)return localStorage.getItem(t)}current;value;set(t,r={store:!0,emit:!0}){if(t!==this.value){let s;t==="system"?(this.darkMQL?.addEventListener?.("change",this.onThemeChange),s=this.darkMQL?.matches?"dark":"light"):(this.removeDarkMQLListener(),s=t),s&&(this.host.classList.remove(this.current),this.host.classList.add(s),this.host.style&&(this.host.style.colorScheme=s)),this.current=s,this.value=t,r.store,this.storage,this.options.store&&localStorage.setItem(this.options.store,t),r.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this}))}}syncWithStorage(){if(typeof window<"u"&&this.options.store){let t=this.storage;(t==="system"&&(t=this.darkMQL?.matches?"dark":"light")||t)&&(this.host.classList.add(t),this.host.style.colorScheme=t,this.set(t,{emit:!1,store:!1}))}}removeDarkMQLListener(){this.darkMQL?.removeEventListener("change",this.onThemeChange)}onThemeChange=t=>{this.set(t.matches?"dark":"light")};destroy(){this.darkMQL?.removeEventListener("change",this.onThemeChange)}};var We=[",",".","#","[","!","*",">","+","~",":","@"];var ge=typeof window<"u",J=class{constructor(t){this.config=t;this.config?.override||(this.config=q(de,t)),this.cache(),ge&&this.config.observe&&this.observe(document),J.instances.push(this),this.ready=!0}rules=[];ruleOfClass={};countOfClass={};ready=!1;e=ge?new MutationObserver(t=>{let r={},s=[],l=[],a=[],c=(n,i)=>{i?n.classList.forEach(g):n.classList.forEach(o);let f=n.children;for(let p=0;p<f.length;p++){let x=f[p];x.classList&&(l.push(x),c(x,i))}},o=n=>{n in r?r[n]++:r[n]=1},g=n=>{n in r?r[n]--:n in this.countOfClass&&(r[n]=-1)},h=(n,i)=>{for(let f=0;f<n.length;f++){let p=n[f];p.classList&&!l.includes(p)&&!a.includes(p)&&(p.isConnected!==i?(l.push(p),c(p,i)):a.push(p))}};for(let n=0;n<t.length;n++){let i=t[n],{addedNodes:f,removedNodes:p,type:x,target:b}=i;if(x==="attributes"){if(s.find(S=>S.target===b))continue;s.push(i)}else h(f,!1),(!b.isConnected||!l.includes(b))&&h(p,!0)}if(!(!s.length&&!Object.keys(r).length)){for(let{oldValue:n,target:i}of s){let f=l.includes(i),p=i.classList,x=n?n.split(" "):[];if(f){if(i.isConnected)continue;for(let b of x)p.contains(b)||g(b)}else if(i.isConnected){p.forEach(b=>{x.includes(b)||o(b)});for(let b of x)p.contains(b)||g(b)}}for(let n in r){let i=r[n],f=(this.countOfClass[n]||0)+i;f===0?(delete this.countOfClass[n],this.delete(n)):(n in this.countOfClass||this.insert(n),this.countOfClass[n]=f)}}}):null;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.relationThemesMap={},this.relations={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={};let{semantics:t,classes:r,selectors:s,themes:l,colors:a,values:c,breakpoints:o,mediaQueries:g,rules:h}=this.config;function n(u){return u.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function i(u,m,d="",k={}){let y=O=>O?(d?d+"-":"")+O:d,M=Object.entries(u),C=[],$=[];for(let O of M){let B=O[1];(typeof B=="object"&&!Array.isArray(B)?C:$).push(O)}for(let[O,B]of C)i(B,m,y(O),k);if(m&&d)$.length&&(k[d]=$.reduce((O,[B,P])=>(O[B]=P,O),{}));else for(let[O,B]of $)k[y(O)]=B;return k}if(t)for(let[u,m]of Object.entries(i(t,!0)))this.semantics.push([new RegExp("^"+n(u)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[u,m]]);if(s)for(let[u,m]of Object.entries(i(s,!1))){let d=new RegExp(n(u)+"(?![a-z-])");for(let k of Array.isArray(m)?m:[m]){let y=k.match(/^::-[a-z]+-/m)?.[0]??"",M=this.selectors[y];M||(M=this.selectors[y]=[]);let C=M.find(([$])=>$===d);C||(C=[d,[]],M.push(C)),C[1].push(k)}}c&&(this.globalValues=i(c,!1)),o&&(this.breakpoints=i(o,!1)),g&&(this.mediaQueries=i(g,!1));let f=r?i(r,!1):{},p=l&&!Array.isArray(l)?Object.entries(l).filter(([,{classes:u}])=>u).reduce((u,[m,{classes:d}])=>(u[m]=i(d,!1),u),{}):{},x=[...Object.keys(f),...Object.entries(p).flatMap(([u,m])=>Object.keys(m))],b=u=>{if(u in this.classes)return;let m=this.classes[u]=[],d=(k,y)=>{if(!y)return;let M=Array.isArray(y)?y:y.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let C of M){let $=O=>{O in this.relationThemesMap?k in this.relationThemesMap[O]?this.relationThemesMap[O][k].push(u):this.relationThemesMap[O][k]=[u]:this.relationThemesMap[O]={[k]:[u]},m.includes(O)||m.push(O)};if(x.includes(C)){b(C);for(let O of this.classes[C])$(O)}else $(C)}};d("",f?.[u]);for(let[k,y]of Object.entries(p))d(k,y?.[u])};for(let u of x)b(u);for(let u in this.relationThemesMap){let m=this.relations[u]=[];for(let d of Object.values(this.relationThemesMap[u]))for(let k of d)m.includes(k)||m.push(k)}let S=(u,m)=>{if(!m)return;let d=i(m,!0);for(let[k,y]of Object.entries(d)){let M=typeof y=="string"?{"":y}:y;for(let[C,$]of Object.entries(M)){let O=k+(C?"-"+C:"");O in this.colorThemesMap?this.colorThemesMap[O][u]=$:this.colorThemesMap[O]={[u]:$}}}for(let k in m)this.colorNames.includes(k)||this.colorNames.push(k)};if(S("",a),l)if(Array.isArray(l))this.themeNames.push(...l);else for(let u in l){let m=l[u];S(u,m.colors),this.themeNames.push(u)}let R=u=>{for(let[m,d]of Object.entries(this.colorThemesMap))for(let[k,y]of Object.entries(d))y.startsWith("#")||u(m,d,k,y)};if(R((u,m,d,k)=>{let y=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(k);if(y){let M="#"+fe(+y[1],+y[2],+y[3]);y[4]&&(M+=Math.round(255*+y[4]).toString(16)),m[d]=M}}),R((u,m,d,k)=>{let[y,M]=k.split("/"),C=this.colorThemesMap[y];if(C){let $=(d?C[d]:void 0)??C[""];m[d]=M?$.slice(0,7)+Math.round(255*+M).toString(16):$}else console.warn(`\`${k}\` doesn't exist in the extended config \`.colors\``),delete m[d],Object.keys(m).length||delete this.colorThemesMap[u]}),h)for(let u in h){let m=h[u],{matches:d,prop:k,values:y}=m;if(m.id=u,m.prop=k===!1?"":u.replace(/(?!^)[A-Z]/g,M=>"-"+M).toLowerCase(),y&&(this.values[u]=i(y,!1)),d){let M=Object.keys(this.values[u]??{}),C=d.indexOf("$values");this.matches[u]=new RegExp(C===-1?d:M.length?d.slice(0,C)+M.join("|")+d.slice(C+7):d.slice(0,C-(d[C-1]==="|"?1:0))+d.slice(C+7+(d[C+7]==="|"?1:0)))}}}observe(t,r={subtree:!0,childList:!0}){if(ge&&t){this.root=t;let s=t===document;s&&(J.root=this),this.host=s?document.documentElement:root.host,this.theme=new me(this.host,this.config.theme);let l=s?document.head:t,a=s?document.styleSheets:t.styleSheets;for(let o of a){let{title:g,href:h,ownerNode:n}=o;(g==="master"||h&&h.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(h))&&(this.style=n)}if(this.style)for(let o=0;o<this.style.sheet.cssRules.length;o++){let g=n=>{if(n.selectorText){let f=n.selectorText.split(", ")[0].split(" ");for(let p=0;p<f.length;p++){let x=f[p];if(x[0]==="."){let b=x.slice(1),S="";for(let R=0;R<b.length;R++){let u=b[R],m=b[R+1];if(u==="\\"){if(R++,m!=="\\"){S+=m;continue}}else if(We.includes(u))break;S+=u}if(!(S in this.ruleOfClass)&&!(S in this.classes)){let R=this.create(S)[0];if(R)return R}}}}else if(n.cssRules)for(let i=0;i<n.cssRules.length;i++){let f=g(n.cssRules[i]);if(f)return f}},h=g(this.style.sheet.cssRules[o]);if(h){this.rules.push(h),this.ruleOfClass[h.className]=h;for(let n=0;n<h.natives.length;n++)h.natives[n].cssRule=this.style.sheet.cssRules[o+n];o+=h.natives.length-1}}else{this.style=document.createElement("style"),this.style.title="master";let o=l.querySelector('link[rel="styleSheet"], style');o?o.before(this.style):l.append(this.style)}let c=o=>{o.forEach(g=>{g in this.countOfClass?this.countOfClass[g]++:(this.countOfClass[g]=1,this.insert(g))})};c(this.host.classList),r.subtree&&this.host.querySelectorAll("[class]").forEach(o=>c(o.classList)),this.e.observe(t,{...r,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]})}return this}disconnect(){this.e.disconnect(),this.ruleOfClass={},this.countOfClass={},this.rules.length=0;let t=this.style.sheet;if(t)for(let r=t.cssRules.length-1;r>=0;r--)t.deleteRule(r);this.style.remove(),this.style=null,this.theme?.destroy(),this.theme=null}match(t){for(let r in this.config.rules){let s=this.config.rules[r],l=this.matches[r],{colorStarts:a,symbol:c,prop:o}=s,{colorNames:g,colorThemesMap:h}=this;if(l&&l.test(t))return{origin:"matches",config:s};if(a){if(t.match("^"+a+"(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|current|inherit))"))return{origin:"matches",config:s};if(g.length&&t.indexOf("|")===-1){let n=t.match("^"+a+"((?:"+g.join("|")+")[0-9a-zA-Z-]*)");if(n&&n[1]in h)return{origin:"matches",config:s}}}if(c&&t.startsWith(c))return{origin:"symbol",config:s};if(o&&t.startsWith(o+":"))return{origin:"matches",config:s}}for(let r of this.semantics)if(t.match(r[0]))return{origin:"semantics",value:r[1]}}create(t){let r=s=>{if(s in this.ruleOfClass)return this.ruleOfClass[s];let l=this.match(s);if(l)return new ue(s,l,this)};return(t in this.classes?this.classes[t].map(s=>r(s)):[r(t)]).filter(s=>s&&s.text)}refresh(t){if(t?.override?this.config=t:this.config=q(de,t),this.cache(),!this.style)return;let r=document.createElement("style");r.title="master",this.style.replaceWith(r),this.style=r,this.rules.length=0,this.ruleOfClass={};for(let s in this.countOfClass)this.insert(s)}destroy(){let t=J.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let r=this.style.sheet,s=l=>{let a=this.ruleOfClass[l];if(!(!a||l in this.relations&&this.relations[l].some(c=>c in this.countOfClass))){if(a.natives.length){let c=a.natives[0];for(let o=0;o<r.cssRules.length;o++)if(r.cssRules[o]===c.cssRule){for(let h=0;h<a.natives.length;h++)r.deleteRule(o);this.rules.splice(this.rules.indexOf(a),1);break}}delete this.ruleOfClass[l]}};if(t in this.classes){for(let l of this.classes[t])l in this.countOfClass||s(l);delete this.ruleOfClass[t]}else s(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.ruleOfClass[r.className])continue;let s,l=this.rules.length-1,{media:a,order:c,priority:o,hasWhere:g,className:h}=r,n=(i,f,p,x)=>{let b=0,S;f&&(b=i.findIndex(f)),p&&(S=i.findIndex(p)),b===-1&&(b=i.length),(S===void 0||S===-1)&&(S=i.length);let R=i.slice(b,S);for(let u=0;u<R.length;u++){let m=R[u];if(!(m.priority===-1||x&&x(m))&&(m.priority<o||m.priority===o&&(g&&!m.hasWhere||m.order>=c)))return b+u}return b+R.length};if(a){let i=this.rules.findIndex(f=>f.media);if(i!==-1){let f=a.features["max-width"],p=a.features["min-width"];if(f&&p){let x=f.value-p.value;for(let b=l;b>=i;b--){s=b;let S=this.rules[b],R=S.media,u=R.features["max-width"],m=R.features["min-width"];if(!u||!m){s++;break}let d=u.value-m.value;if(d===x){if(g!==S.hasWhere)continue;if(o!==-1){let k=[this.rules[b]];for(let y=b-1;y>=i;y--){let M=this.rules[y];if(M.hasWhere!==g)break;let C=M.media,$=C.features["max-width"],O=C.features["min-width"];if(!$||!O||$.value-O.value!==d)break;k.unshift(this.rules[y])}s=n(this.rules,y=>y.media&&y.priority!==-1&&y.media.features["min-width"]&&y.media.features["max-width"])}break}else if(d>x)break}}else if(p)for(let x=i;x<=l;x++){s=x;let b=this.rules[x],S=b.media,R=S.features["max-width"],u=S.features["min-width"];if(R){if(u)break;continue}let m=u?.value;if(m===p.value){if(!g&&b.hasWhere){s++;continue}if(o!==-1)s=n(this.rules,d=>d.media,d=>d.media&&d.priority!==-1&&d.media.features["min-width"]&&d.media.features["max-width"],d=>!d.media.features["min-width"]&&!d.media.features["max-width"]);else for(let d=x;d<=l;d++){let k=this.rules[d],y=k.media,M=y.features["min-width"];if(!y.features["max-width"]){if(k.hasWhere!==g||M.value!==m||k.order>=c)break;s=d+1}}break}else{if(m>p.value)break;s++}}else if(f)for(let x=l;x>=i;x--){s=x;let b=this.rules[x],S=b.media,R=S.features["max-width"];if(S.features["min-width"])continue;let m=R?.value;if(!m||m>f.value){s++;break}else if(m===f.value){if(g&&!b.hasWhere)continue;if(o!==-1)s=n(this.rules,d=>d.media,d=>d.media&&d.priority!==-1&&d.media.features["min-width"]&&d.media.features["max-width"],d=>!d.media.features["min-width"]&&!d.media.features["max-width"]);else{let d=[this.rules[x]];for(let k=x-1;k>=i;k--){let y=this.rules[k],M=y.media,C=M.features["min-width"],$=M.features["max-width"];if(!C&&(!$||$.value!==m||y.hasWhere!==g))break;d.unshift(y)}for(let k=0;k<d.length;k++){let y=d[k];if(!y.media.features["min-width"]){if(y.order>=c)break;s=x-d.length+2+k}}}break}}}if(s===void 0)if(i===-1)s=l+1;else if(o!==-1)s=i+n(this.rules.slice(i),void 0,f=>f.media.features["max-width"]||f.media.features["min-width"]);else if(g){let f=i;for(;f<this.rules.length;f++){let p=this.rules[f];if(p.priority!==-1||!p.hasWhere||p.order>=c){s=f;break}}s===void 0&&(s=f)}else for(let f=i;f<=l;f++){s=f;let p=this.rules[f],x=p.media;if(p.priority!==-1||x.features["max-width"]||x.features["min-width"])break;if(p.hasWhere)s++;else if(p.order>=c)break}}else if(o===-1)if(g)s=this.rules.findIndex(i=>!i.hasWhere||i.media||i.priority!==-1||i.order>=c),s===-1&&(s=l+1);else{let i=0;for(;i<this.rules.length;i++){let f=this.rules[i];if(f.media||!f.hasWhere&&(f.order>=c||f.priority!==-1)){s=i;break}}s===void 0&&(s=i)}else s=n(this.rules,void 0,i=>i.media);if(this.rules.splice(s,0,r),this.ruleOfClass[h]=r,this.style){let i=this.style.sheet,f=0,p=x=>{let b=this.rules[x];if(b){if(!b.natives.length)return p(x-1);let S=b.natives[b.natives.length-1].cssRule;for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===S){f=R+1;break}}};p(s-1);for(let x=0;x<r.natives.length;)try{let b=r.natives[x];i.insertRule(b.text,f),b.cssRule=i.cssRules[f++],x++}catch(b){console.error(b),r.natives.splice(x,1)}}}}get text(){return this.rules.map(t=>t.text).join("")}},Q=J;K(Q,"root"),K(Q,"config",de),K(Q,"instances",[]),K(Q,"refresh",t=>{for(let r of J.instances)r.refresh(t)});ge&&(window.MasterCSS=Q);new Q(window.masterCSSConfig);})();
1
+ (()=>{var Le=Object.defineProperty;var De=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var K=(e,t,r)=>(De(e,typeof t!="symbol"?t+"":t,r),r);function Se(e){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&e instanceof t||e instanceof Date||e instanceof RegExp)}function Re(e){if(typeof Buffer<"u"&&Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function Ce(e){let t=[];return e.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?t[s]=Ce(r):Se(r)?t[s]=Re(r):t[s]=q({},r):t[s]=r}),t}function we(e,t){return t==="__proto__"?void 0:e[t]}function q(...e){let t={},r,s;return e.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(l){if(s=we(t,l),r=we(o,l),r!==t)if(typeof r!="object"||r===null){t[l]=r;return}else if(Array.isArray(r)){t[l]=Ce(r);return}else if(Se(r)){t[l]=Re(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[l]=q({},r);return}else{t[l]=q(s,r);return}})}),t}function oe(e,t){return(e?e+":":"")+(t.unit?t.value+t.unit:t.value)+(t.important?"!important":"")}var Y={"(":")","'":"'",'"':'"',"{":"}"};function Z(e,t,r,s=[]){let o=[",",...s],l=[],c="",f=0;return function g(h,n,i,u="",p=[],x=[]){let b,S=!1;n&&(n===")"&&c.slice(-1)==="$"?b=c.length-1:(n==="'"||n==='"')&&(S=!0),c+=h[f++]);let R=()=>{let a=c;if(c="",t&&a in t&&!p.includes(a)){let m=f;f=0,g(t[a].toString(),void 0,void 0,void 0,[...p,a],x),f=m}else if(r&&a in r&&!x.includes(a)){let m=f;f=0,g(r[a].toString(),void 0,void 0,void 0,p,[...x,a]),f=m}else l.push({value:a})};for(;f<h.length;f++){let a=h[f];if(a===n){if(c+=a,S){let m=0;for(let d=c.length-2;c[d]==="\\";d--)m++;if(m%2)continue}b!==void 0&&(c=c.slice(0,b)+c.slice(b).replace(/\$\((.*)\)/,"var(--$1)")),i||(S?l.push(c):R(),u="",c="");break}else if(!S&&a in Y)g(h,Y[a],i===void 0?0:i+1,u,p,x);else if((a==="|"||a===" ")&&n!=="}"&&(!S||u==="path"))n?c+=" ":R();else{if(!n){if(a==="."){if(isNaN(+h[f+1]))break;h[f-1]==="-"&&(c+="0")}else if(o.includes(a)){c&&R(),l.push(a);continue}else if(a==="#"&&(c||l.length&&h[f-1]!=="|"&&l[f-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(a))break;u+=a}c+=a}}i===void 0&&c&&R()}(e),[l,e.slice(f)]}function ae(e,t,r){if(r){let s="",o=e.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(o)if(e.includes("/")){let[l,c]=e.split("/");return{value:+l/+c*100+"%",unit:s}}else{let l=+o[1];return s=o[3]||"",s||((r==="rem"||r==="em")&&(l=l/t),s=r||""),{value:l,unit:s}}}}function Te(e,t,r){let s=n=>n==="+"||n==="-"||n==="*"||n==="/",o="",l,c="",f=!1,g=!1;function h(n,i="",u=""){if(l===2&&!g){let p=ae(c,t,r);p&&(c=p.value+p.unit)}o+=c+i+n+u,l=null,g=!1,c=""}for(let n=0;n<e.length;n++){let i=e[n];if(i==="("||i===")")f=i===")",h(i);else if(i===",")h(i,""," ");else{switch(l){case 1:break;case 2:if(s(i)){h(i," "," ");continue}else/[0-9]/.test(i)||(g=!0);break;default:f&&(o+=" "),isNaN(+i)?s(i)||(l=1):l=2;break}l?c+=i:o+=i}}return c&&(o+=c),o}function le(e,t,r,s,o,l){let c="",f="",g;if(typeof e=="number")c=e,f=t||"";else{if(s){let n=!1,i=!1;e=e.replace(new RegExp(`(^|,| |\\()((?:${r.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(u,p,x,b)=>{i=!0;let S=s[x];if(S){let R;for(let a of l)if(R=S[a])break;if(R){n=!0;let a=R;if(b){let m=b.endsWith("%")?parseFloat(b)/100:+b;m=isNaN(m)?1:Math.min(Math.max(m,0),1),a+=Math.round(m*255).toString(16).toUpperCase().padStart(2,"0")}return p+a}}return u}),i&&(g=n)}let h=ae(e,o,t);if(h)return h;c=(e.indexOf("calc(")===-1?e:Te(e,o,t)).replace(/\$\(((\w|-)+)\)/g,"var(--$1)")}return{value:c,unit:f,colorMatched:g}}var xe=[":disabled",":active",":focus",":hover"];function ce(e){if(typeof CSS<"u")return CSS.escape(e);if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let t=String(e),r=t.length,s=-1,o="",l,c=t.charCodeAt(0);if(r==1&&c==45)return"\\"+t;for(;++s<r;){if(l=t.charCodeAt(s),l==0){o+="\uFFFD";continue}if(l>=1&&l<=31||l==127||s==0&&l>=48&&l<=57||s==1&&l>=48&&l<=57&&c==45){o+="\\"+l.toString(16)+" ";continue}if(l>=128||l==45||l==95||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122){o+=t.charAt(s);continue}o+="\\"+t.charAt(s)}return o}var ue=class{constructor(t,r,s){this.className=t;this.meta=r;this.css=s;let{id:o,unit:l="rem",order:c=0,colorful:f,prop:g,analyzeToken:h,getThemeProps:n,parseValue:i,get:u}=r.config||{},{rootSize:p,scope:x,important:b}=s.config,{themeNames:S,colorNames:R,colorThemesMap:a,selectors:m,globalValues:d,breakpoints:k,mediaQueries:y}=s,M=s.values[o],C=s.relationThemesMap[t],$=t;this.order=c;let O,B,P,G;if(r.origin==="semantics"){let[W,j]=r.value;P=$.slice(W.length),O=j}else if(h)[B,G,P]=h.call(this,$,M,d);else{let W;if(r.origin==="matches"){let j=$.indexOf(":");this.prefix=$.slice(0,j+1),this.prefix.includes("(")?(this.prefix=void 0,W=$):W=$.slice(j+1)}else r.origin==="symbol"&&(this.symbol=$[0],W=$.slice(1));[G,P]=Z(W,M,d)}P[0]==="!"&&(this.important=!0,P=P.slice(1));let ve=W=>{let j=W.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((w,T)=>T%3?w:w.replace(/_/g," ")).join(""),E=[],N="",F=0;for(let w=0;w<j.length;w++){let T=j[w];if(T==="\\"){N+=T+j[++w];continue}!F&&T===","?(E.push(N),N=""):(N+=T,F&&T===")"?F--:T==="("&&F++)}return N&&E.push(N),E};this.prefixSelectors=B?ve(B):[""];let ge=P.split("@"),pe=ge[0];if(pe){this.vendorSuffixSelectors={};let W=(w,T,v,A)=>{for(let[I,D]of T)if(I.test(w)){for(let V of D)W(w.replace(I,V),T,v,!0);return}A&&v.push(w)},j=[];""in m?W(pe,m[""],j,!0):j.push(pe);let E={};for(let[w,T]of Object.entries(m)){if(!w)continue;let v=[];for(let A of j)W(A,T,v,!1);v.length&&(E[w]=v)}let N=(w,T)=>{let v=T.reduce((A,I)=>(A.push(...ve(I)),A),[]);w in this.vendorSuffixSelectors?this.vendorSuffixSelectors[w].push(...v):this.vendorSuffixSelectors[w]=v},F=Object.keys(E);if(F.length)for(let w of F)N(w,E[w]);else N("",j);for(let w of Object.values(this.vendorSuffixSelectors))for(let T of w){this.hasWhere!==!1&&(this.hasWhere=T.includes(":where("));for(let v=0;v<xe.length;v++)if(T.includes(xe[v])){(this.priority===-1||this.priority>v)&&(this.priority=v);break}}}else this.vendorSuffixSelectors={"":[""]};for(let W=1;W<ge.length;W++){let j=ge[W];if(j)if(S.includes(j))this.theme=j;else if(j==="rtl"||j==="ltr")this.direction=j;else{let E,N,F=j.indexOf("_");if(F!==-1)E=j.slice(0,F),N=j.slice(F);else{let w=j.indexOf("(");w!==-1&&(E=j.slice(0,w),N=j.slice(w))}if(!E){E="media";let w=[];this.media={token:j,features:{}};let T=j.split("&");for(let v of T)if(v==="all"||v==="print"||v==="screen"||v==="speech")this.media.type=v;else if(v==="\u{1F5A8}")this.media.type="print";else if(v==="landscape"||v==="portrait")w.push("(orientation:"+v+")");else if(v==="motion"||v==="reduced-motion")w.push("(prefers-reduced-motion:"+(v==="motion"?"no-preference":"reduce")+")");else if(y&&v in y)w.push(y[v]);else{let A={token:v},I="",D="",V=0;v.startsWith("<=")?(D="<=",I="max-width"):v.startsWith(">=")||k[v]?(D=">=",I="min-width"):v.startsWith(">")?(D=">",I="min-width",V=.02):v.startsWith("<")&&(D="<",I="max-width",V=-.02);let U=D?v.replace(D,""):v,L=k[U];switch(I){case"max-width":case"min-width":L?Object.assign(A,le(L,"px")):Object.assign(A,le(U,"px")),A.unit==="px"&&(A.value+=V),this.media.features[I]=A,w.push("("+I+":"+(A.value+A.unit)+")");break}}N="",this.media.type&&(N=this.media.type),w.length&&(N+=(N?" and ":"")+w.join(" and "))}N&&(this.at[E]=(E in this.at?this.at[E]+" and ":"")+N.replace(/_/g," "))}}let ie=(W,j)=>{let E,N,F=(T,v,A)=>{let I="";this.direction&&(I+="[dir="+this.direction+"] ");let D=this.prefixSelectors.map(L=>L+I),V=(L,ne)=>D.map(Q=>(L?"."+L+" ":"")+(x?x+" ":"")+Q).reduce((Q,be)=>(Q.push(A.reduce((ke,ze)=>(ke.push(be+"."+ce(ne)+ze),ke),[]).join(",")),Q),[]).join(","),U=V(v,t)+(C?Object.entries(C).filter(([L])=>this.theme||!f||!v||!L||L===v).map(([L,ne])=>ne.reduce((Q,be)=>Q+","+V(this.theme??((f||n)&&v||L),be),"")).join(""):"")+"{"+T+"}";for(let L of Object.keys(this.at).sort((ne,Q)=>Q==="supports"?-1:1))U="@"+L+" "+this.at[L]+"{"+U+"}";return U},w=[];if(G){let T,v;for(let A of G)typeof A=="string"?w.push(A):(T=le(A.value,l,f&&R,f&&a,p,this.theme?[this.theme,""]:[W]),T.colorMatched!==void 0&&v!==!0&&(v=T.colorMatched),w.push(T.value+T.unit));if(j&&(v===void 0?W:!v))return;if(w.length===1?T?(E=T.value,N=T.unit):E=w[0]:E=w.reduce((A,I,D)=>A+I+(I===","||G[D+1]===","||D===G.length-1?"":" "),""),typeof E!="object"){i&&(E=i.call(this,E,this.css.config)),f&&E==="current"&&(E="currentColor");let A={unit:N,value:E,important:this.important};if(n){let I=n.call(this,A,s);for(let D in I)for(let V of Object.values(this.vendorSuffixSelectors))this.natives.push({unit:N,value:E,text:F(Object.entries(I[D]).map(([U,L])=>oe(U,{important:(this.important||b)&&!L.endsWith("!important"),unit:"",value:L})).join(";"),D,V),theme:D});return}else u&&(E=u.call(this,A))}}else E=O;for(let T of Object.values(this.vendorSuffixSelectors))this.natives.push({unit:N,value:E,text:F(typeof E=="object"?Object.entries(E).map(([v,A])=>oe(v,{...typeof A=="object"?A:{unit:"",value:A},important:this.important||b})).join(";"):oe(g,{unit:N,value:E,important:this.important||b}),W,T),theme:W})};if(n)ie(void 0,!1);else if(this.theme)ie(this.theme,!1);else if(f)for(let W of S)ie(W,!0);else ie("",!1)}at={};priority=-1;natives=[];get text(){return this.natives.map(t=>t.text).join("")}};var ee={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560};function te(e){e.startsWith("#")&&(e=e.slice(1));let t=e.match(/.{1,2}/g);return[parseInt(t[0],16),parseInt(t[1],16),parseInt(t[2],16)]}function fe(e,t,r){return((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function z(e){typeof e=="string"&&(e={"":e});let t=""in e,r=!1;for(let s in e)if(s&&+s>=100){r=!0;break}if(!r&&(!t||Object.keys(e).length>1)){let s=0,o="0"in e?te(e[0]):[0,0,0],l,c,f=[],g=()=>{let h=l-s,n=c.map((i,u)=>(i-o[u])/h);for(let i of f){let u=i-s,p=o.map((x,b)=>Math.round(x+n[b]*u));e[i]="#"+fe.call(this,...p)}};for(let h=1;h<100;h++)h in e?(f.length?(l=h,c=te(e[h]),g(),f.length=0,o=c):o=te(e[h]),s=h):f.push(h);f.length&&(l=100,c="100"in e?te(e[100]):[255,255,255],g())}return t||(e[""]=e[r?"500":"50"]),e}var Me={black:"#000000",white:"#ffffff",slate:z({5:"#141e2b",10:"#19212d",20:"#262f3e",30:"#323e52",40:"#41516b",50:"#616a84",55:"#6c7693",60:"#959db3",70:"#a3abbf",80:"#d7dae3",95:"#f6f7f8"}),gray:z({5:"#1e1d1f",10:"#212022",20:"#2f2e30",30:"#3e3d40",40:"#504f52",50:"#6b6a6d",55:"#777679",60:"#9e9da0",70:"#abaaae",80:"#dad9db",95:"#f5f4f7"}),brown:z({5:"#271b15",10:"#2b1e18",20:"#3c2b22",30:"#50382c",40:"#694839",50:"#8d604b",55:"#9d6b53",60:"#b79788",70:"#c1a598",80:"#efd5c9",95:"#faf2ef"}),orange:z({5:"#2e1907",10:"#331b07",20:"#47260b",30:"#5d320e",40:"#7a4111",50:"#a15717",55:"#b4611a",60:"#e38739",70:"#e79855",80:"#f7d4b5",95:"#fcf1e7"}),gold:z({5:"#281b00",10:"#2d1e01",20:"#3f2a00",30:"#543800",40:"#6d4900",50:"#906000",55:"#9c6d00",60:"#d09100",70:"#dca000",80:"#fbd67f",95:"#fff3d8"}),yellow:z({5:"#251d00",10:"#282000",20:"#3a2e01",30:"#4b3b00",40:"#624e00",50:"#806700",55:"#8e7200",60:"#be9900",70:"#d0a700",80:"#edda8f",95:"#fff5ca"}),grass:z({5:"#162106",10:"#182406",20:"#223308",30:"#2c4408",40:"#3a570b",50:"#4e750e",60:"#74ae15",70:"#7dbc17",80:"#bfe87c",95:"#ebfad4"}),green:z({5:"#042311",10:"#032611",20:"#023717",30:"#03481f",40:"#025d26",50:"#067b34",55:"#07883a",60:"#09b64d",70:"#0ac553",80:"#80f1a4",95:"#e0fae8"}),beryl:z({5:"#002319",10:"#00271c",20:"#003626",30:"#004732",40:"#005c41",50:"#007954",55:"#00875e",60:"#00b37c",70:"#00c387",80:"#72f0c5",95:"#d6fcef"}),teal:z({5:"#012220",10:"#012624",20:"#003532",30:"#004541",40:"#005a54",50:"#00776f",55:"#00857c",60:"#00b1a5",70:"#00bfb2",80:"#6aeee5",95:"#d4fcf8"}),cyan:z({5:"#00222b",10:"#00252e",20:"#013340",30:"#004457",40:"#00576f",50:"#007391",55:"#0080a1",60:"#00abd7",70:"#00b9e9",80:"#97e6fa",95:"#dff8ff"}),sky:z({5:"#031f34",10:"#032339",20:"#04314e",30:"#044169",40:"#065386",50:"#086eb3",55:"#097ac5",60:"#29a4f5",70:"#4db3f7",80:"#b3e0ff",95:"#eaf6fe"}),blue:z({5:"#07194a",10:"#081c53",20:"#0a2773",30:"#0e3496",40:"#1146b6",50:"#175fe9",55:"#2671ea",60:"#6b9ef1",70:"#81acf3",80:"#c6dbfe",95:"#edf4fe"}),indigo:z({5:"#1f1645",10:"#20174f",20:"#2b1f74",30:"#37289d",40:"#463fb1",50:"#5a5bd5",55:"#6464f1",60:"#9393f5",70:"#a1a5ee",80:"#d5d7fe",95:"#f1f2ff"}),violet:z({5:"#2b0a4e",10:"#2e0b57",20:"#3d1179",30:"#4e169f",40:"#5f2eba",50:"#7949e5",55:"#8755f5",60:"#ac8af8",70:"#b89bf9",80:"#e1d4fe",95:"#f5f1ff"}),purple:z({5:"#2e0c47",10:"#330c4e",20:"#460f6c",30:"#5b1390",40:"#7421b1",50:"#9832e4",55:"#a348e7",60:"#c184ef",70:"#ca96f1",80:"#ead1fe",95:"#f9f0ff"}),fuchsia:z({5:"#39092a",10:"#400932",20:"#560d4a",30:"#6f1165",40:"#8c158a",50:"#b61cbb",55:"#ca1fce",60:"#e66ee9",70:"#ea86ed",80:"#facbfb",95:"#feefff"}),pink:z({5:"#3d0722",10:"#430725",20:"#5d0933",30:"#790d44",40:"#9a1058",50:"#ca1473",55:"#e11681",60:"#f170b4",70:"#f388c0",80:"#fdcde6",95:"#fff0f8"}),crimson:z({5:"#430213",10:"#470314",20:"#62041c",30:"#800524",40:"#9f1036",50:"#ce1a4b",55:"#e8144c",60:"#f37596",70:"#f58ba7",80:"#fdceda",95:"#fff1f4"}),red:z({5:"#450001",10:"#490102",20:"#640304",30:"#800506",40:"#a11012",50:"#d11a1e",55:"#ed0a0e",60:"#f97476",70:"#fa8b8d",80:"#fdcfcf",95:"#fff1f1"})};var Oe="";var Ee={"::scrollbar":"::-webkit-scrollbar","::scrollbar-button":"::-webkit-scrollbar-button","::scrollbar-thumb":"::-webkit-scrollbar-thumb","::scrollbar-track":"::-webkit-scrollbar-track","::scrollbar-track-piece":"::-webkit-scrollbar-track-piece","::scrollbar-corner":"::-webkit-scrollbar-corner","::slider-thumb":["::-webkit-slider-thumb","::-moz-range-thumb"],"::slider-runnable-track":["::-webkit-slider-runnable-track","::-moz-range-track"],"::meter":"::-webkit-meter","::resizer":"::-webkit-resizer","::progress":"::-webkit-progress",":first":":first-child",":last":":last-child",":even":":nth-child(2n)",":odd":":nth-child(odd)",":nth(":":nth-child("};var $e={square:{"aspect-ratio":"1/1"},video:{"aspect-ratio":"16/9"},rounded:{"border-radius":"1e9em"},round:{"border-radius":"50%"},hidden:{display:"none"},hide:{display:"none"},block:{display:"block"},table:{display:"table"},flex:{display:"flex"},grid:{display:"grid"},contents:{display:"contents"},inline:{display:"inline"},"inline-block":{display:"inline-block"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-table":{display:"inline-table"},"table-cell":{display:"table-cell"},"table-caption":{display:"table-caption"},"flow-root":{display:"flow-root"},"list-item":{display:"list-item"},"table-row":{display:"table-row"},"table-column":{display:"table-column"},"table-row-group":{display:"table-row-group"},"table-column-group":{display:"table-column-group"},"table-header-group":{display:"table-header-group"},"table-footer-group":{display:"table-footer-group"},italic:{"font-style":"italic"},oblique:{"font-style":"oblique"},isolate:{isolation:"isolate"},overflow:{overflow:"visible"},untouchable:{"pointer-events":"none"},static:{position:"static"},fixed:{position:"fixed"},abs:{position:"absolute"},rel:{position:"relative"},sticky:{position:"sticky"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},vw:{width:"100vw"},vh:{height:"100vh"},"max-vw":{"max-width":"100vw"},"max-vh":{"max-height":"100vh"},"min-vw":{"min-width":"100vw"},"min-vh":{"min-height":"100vh"},"center-content":{"justify-content":"center","align-items":"center"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap","border-width":"0"},full:{width:"100%",height:"100%"},center:{left:0,right:0,"margin-left":"auto","margin-right":"auto"},middle:{top:0,bottom:0,"margin-top":"auto","margin-bottom":"auto"},"break-spaces":{"white-space":"break-spaces"},"break-word":{"overflow-wrap":"break-word",overflow:"hidden"}};var je=["dark","light"];function re(e,t,r=""){let s="border-";r&&(r="-"+r);let o=/^b(order)?-?(.)?/.exec(e)[2],l=s+"left"+r,c=s+"right"+r,f=s+"top"+r,g=s+"bottom"+r;switch(o){case"x":return{[l]:t,[c]:t};case"y":return{[f]:t,[g]:t};case"l":return{[l]:t};case"r":return{[c]:t};case"t":return{[f]:t};case"b":return{[g]:t};default:return{["border"+r]:t}}}function ye(e,t,{rootSize:r}){let s="",o=0;return function l(c,f){let g="",h=f?t(f):"",n=()=>{g&&(s+=!h||Number.isNaN(+g)?g:+g/(h==="rem"?r:1)+h,g="")};for(;o<e.length;o++){let i=e[o];if(i===c&&(c!=="'"||e[o+1]===")")){n(),s+=i;break}else i===","||i===" "?(n(),s+=i):!g&&i==="'"?(s+=i,o++,l(i),g=""):g&&i==="("?(s+=g+i,o++,l(")",g),g=""):g+=i}n()}(),s}var X={content:"content-box",border:"border-box",padding:"padding-box"};var se={min:"min-content",max:"max-content"};var _={full:"100%",fit:"fit-content",max:"max-content",min:"min-content"};for(let e in ee)_[e]=ee[e]/16+"rem";var Ae={group:{matches:"^(?:.+?[*_>~+])?\\{.+?\\}",unit:"",prop:!1,analyzeToken(e,t,r){let s=0;for(;s<e.length&&!(e[s]==="{"&&e[s-1]!=="\\");s++);return[e.slice(0,s),...Z(e.slice(s),t,r)]},getThemeProps(e,t){let r={},s=(h,n)=>{let i=n.indexOf(":");if(i!==-1){h in r||(r[h]={});let u=r[h],p=n.slice(0,i);p in u||(u[p]=n.slice(i+1))}},o=h=>{let n=(i,u)=>{let p=u.slice(ce(h.className).length).match(/\{(.*)\}/)[1].split(";");for(let x of p)s(i,x)};if(this.theme){let i=h.natives.find(u=>u.theme===this.theme)??h.natives.find(u=>!u.theme);i&&n(this.theme,i.text)}else for(let i of h.natives)n(i.theme,i.text)},l=[],c="",f=()=>{c&&(l.push(c.replace(/ /g,"")),c="")},g=1;(function h(n){for(;g<e.value.length;g++){let i=e.value[g];if(!n){if(i===";"){f();continue}if(i==="}")break}if(c+=i,n===i){if(n==="'"||n==='"'){let u=0;for(let p=c.length-2;c[p]==="\\";p--)u++;if(u%2)continue}break}else i in Y&&n!=="'"&&n!=='"'&&(g++,h(Y[i]))}})(void 0),f();for(let h of l){let n=t.create(h);if(Array.isArray(n))for(let i of n)o(i);else n?o(n):s(this.theme??"",h)}return r}},variable:{matches:"^\\$[^ (){}A-Z]+:[^ ]",unit:"",prop:!1,get(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{matches:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},fontWeight:{matches:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",unit:"",values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{matches:"^f(?:ont)?:(?:$values)(?!\\|)",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:{matches:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",unit:"",prop:!1,get(e){let t={};switch(e.value){case"subpixel-antialiased":t["-webkit-font-smoothing"]=t["-moz-osx-font-smoothing"]={...e,value:"auto"};break;case"antialiased":t["-webkit-font-smoothing"]={...e,value:"antialiased"},t["-moz-osx-font-smoothing"]={...e,value:"grayscale"};break}return t}},fontStyle:{matches:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",unit:"deg"},fontVariantNumeric:{matches:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)"},fontFeatureSettings:{matches:"^font-feature:."},font:{matches:"^f:.",unit:"",order:-1},color:{matches:"^(?:color|fg|foreground):.",colorful:!0,unit:""},spacing:{matches:"^[pm][xytblr]?:.",prop:!1,get(e){let r=this.prefix[0]==="m"?"margin":"padding",s=r+"-left",o=r+"-right",l=r+"-top",c=r+"-bottom";switch(this.prefix[1]){case"x":return{[s]:e,[o]:e};case"y":return{[l]:e,[c]:e};case"l":return{[s]:e};case"r":return{[o]:e};case"t":return{[l]:e};case"b":return{[c]:e};default:return{[r]:e}}},get order(){return this.prefix==="p:"||this.prefix==="m:"?-1:0}},margin:{matches:"^margin(?:-(?:left|right|top|bottom))?:.",prop:!1,get(e){return{[this.prefix.slice(0,-1)]:e}},get order(){return this.prefix==="margin:"?-1:0}},padding:{matches:"^padding(?:-(?:left|right|top|bottom))?:.",prop:!1,get(e){return{[this.prefix.slice(0,-1)]:e}},get order(){return this.prefix==="padding:"?-1:0}},flexBasis:{values:_},flexWrap:{matches:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)"},flexGrow:{unit:""},flexShrink:{unit:""},flexDirection:{matches:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",values:{col:"column","col-reverse":"column-reverse"}},flex:{unit:"",order:-1},display:{matches:"^d:."},width:{matches:"^w:.",values:_},height:{matches:"^h:.",values:_},minWidth:{matches:"^min-w:.",values:_},minHeight:{matches:"^min-h:.",values:_},wH:{matches:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",prop:!1,analyzeToken(e,t,r){return["",...Z(e,t,r,["x"])]},get(e){let[t,r]=e.value.split(" x ");return{width:{...e,value:t},height:{...e,value:r}}}},minWH:{matches:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",prop:!1,analyzeToken(e,t,r){return["",...Z(e.slice(4),t,r,["x"])]},get(e){let[t,r]=e.value.split(" x ");return{"min-width":{...e,value:t},"min-height":{...e,value:r}}}},maxWH:{matches:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",prop:!1,analyzeToken(e,t,r){return["",...Z(e.slice(4),t,r,["x"])]},get(e){let[t,r]=e.value.split(" x ");return{"max-width":{...e,value:t},"max-height":{...e,value:r}}}},contain:{},content:{},counterIncrement:{unit:""},counterReset:{unit:""},letterSpacing:{matches:"^ls:.",unit:"em"},lineHeight:{matches:"^lh:.",unit:""},objectFit:{matches:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)"},objectPosition:{matches:"^(?:object|obj):(?:top|bottom|right|left|center|$values)"},textAlign:{matches:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)"},textDecorationColor:{colorStarts:"text-decoration:",colorful:!0},textDecorationStyle:{matches:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)"},textDecorationThickness:{matches:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",unit:"em"},textDecorationLine:{matches:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)"},textDecoration:{matches:"^t(?:ext)?:(?:underline|line-through|overline|$values)",colorful:!0,order:-1},textUnderlineOffset:{},textOverflow:{matches:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))"},textOrientation:{matches:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)"},textTransform:{matches:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)"},textRendering:{matches:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)"},textIndent:{},verticalAlign:{matches:"^(?:v|vertical):."},columns:{matches:"^(?:columns|cols):.",unit:"",order:-1},whiteSpace:{unit:""},inset:{matches:"^(?:top|bottom|left|right):.",get(e){return{[this.prefix.slice(0,-1)]:e}}},lines:{matches:"^lines:.",unit:"",prop:!1,get(e){return{overflow:{...e,value:"hidden"},display:{...e,value:"-webkit-box"},"overflow-wrap":{...e,value:"break-word"},"text-overflow":{...e,value:"ellipsis"},"-webkit-box-orient":{...e,value:"vertical"},"-webkit-line-clamp":e}}},maxHeight:{matches:"^max-h:.",values:_},maxWidth:{matches:"^max-w:.",values:_},boxSizing:{matches:"^box:(?:$values)(?!\\|)",values:{content:"content-box",border:"border-box"}},opacity:{unit:""},visibility:{},clear:{},float:{},isolation:{},overflow:{matches:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",prop:!1,get(e){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":e};case"y":return{"overflow-y":e}}return{overflow:e}},get order(){return-1}},overscrollBehavior:{matches:"^overscroll-behavior(?:-[xy])?:",prop:!1,get(e){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":e};case"y":return{"overscroll-behavior-y":e};default:return{"overscroll-behavior":e}}}},zIndex:{matches:"^z:.",unit:""},position:{values:{abs:"absolute",rel:"relative"}},cursor:{},pointerEvents:{},resize:{},touchAction:{},wordBreak:{unit:""},wordSpacing:{unit:"em"},userDrag:{get(e){return{"user-drag":e,"-webkit-user-drag":e}}},userSelect:{get(e){return{"user-select":e,"-webkit-user-select":e}}},textShadow:{colorful:!0},textSize:{matches:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",prop:!1,get(e){let{unit:t,value:r}=e,s=.75;return{"font-size":e,"line-height":{...e,value:t==="em"?r+s+t:`calc(${r}${t} + ${s}em)`,unit:""}}}},textFillColor:{matches:"^text-fill-color:.",colorStarts:"(?:text-fill|text|t):",colorful:!0,prop:!1,get(e){return{"-webkit-text-fill-color":e}}},textStrokeWidth:{matches:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",prop:!1,get(e){return{"-webkit-text-stroke-width":e}}},textStrokeColor:{matches:"^text-stroke-color:.",colorStarts:"text-stroke:",colorful:!0,prop:!1,get(e){return{"-webkit-text-stroke-color":e}}},textStroke:{matches:"^text-stroke:.",prop:!1,get(e){return{"-webkit-text-stroke":e}}},boxShadow:{matches:"^s(?:hadow)?:.",colorful:!0},tableLayout:{},transformBox:{matches:"^transform:(?:$values)(?!\\|)",values:{...X,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{matches:"^transform:(?:flat|preserve-3d|$values)(?!\\|)"},transformOrigin:{matches:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",unit:"px"},transform:{matches:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",unit:"",parseValue(e,{rootSize:t}){return e.replace(/(translate|scale|skew|rotate|perspective|matrix)(3d|[XYZ])?\((.*?)\)/g,(r,s,o,l)=>{let c,f;switch(s){case"translate":c="rem";break;case"skew":c="deg";break;case"rotate":o==="3d"&&(f=!0),c="deg";break;default:return r}let g=l.split(",");return r.replace(l,g.map((h,n)=>!f||g.length-1===n?Number.isNaN(+h)?h:h/(c==="rem"?t:1)+c:h).join(","))})}},transitionProperty:{matches:"^~property:."},transitionTimingFunction:{matches:"^~easing:."},transitionDuration:{matches:"^~duration:.",unit:"ms"},transitionDelay:{matches:"^~delay:.",unit:"ms"},transition:{symbol:"~",order:-1},animationDelay:{matches:"^@delay:.",unit:"ms"},animationDirection:{matches:"^@direction:."},animationDuration:{matches:"^@duration:.",unit:"ms"},animationFillMode:{matches:"^@fill-mode:."},animationIterationCount:{matches:"^@iteration-count:.",unit:""},animationName:{matches:"^@name:."},animationPlayState:{matches:"^@play-state:."},animationTimingFunction:{matches:"^@easing:."},animation:{symbol:"@",unit:"",order:-1},borderColor:{matches:"^border(?:-(?:left|right|top|bottom))?-color:.",colorStarts:"b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?:",colorful:!0,prop:!1,get(e){return re(this.prefix,e,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{matches:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",prop:!1,get(e){if(this.prefix){let r="",s=this.prefix.split("-");if(s.length>1)for(let o=1;o<s.length-1;o++)r+=s[o][0];else r=this.prefix.slice(1,-1);switch(r){case"t":return{"border-top-left-radius":e,"border-top-right-radius":e};case"tl":case"lt":return{"border-top-left-radius":e};case"rt":case"tr":return{"border-top-right-radius":e};case"b":return{"border-bottom-left-radius":e,"border-bottom-right-radius":e};case"bl":case"lb":return{"border-bottom-left-radius":e};case"br":case"rb":return{"border-bottom-right-radius":e};case"l":return{"border-top-left-radius":e,"border-bottom-left-radius":e};case"r":return{"border-top-right-radius":e,"border-bottom-right-radius":e};default:return{"border-radius":e}}}let t=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(t)?t:"border-radius"]:e}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{matches:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",prop:!1,get(e){return re(this.prefix,e,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{matches:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",prop:!1,get(e){return re(this.prefix,e,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{matches:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)"},borderSpacing:{},borderImageOutset:{},borderImageRepeat:{matches:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)"},borderImageSlice:{unit:""},borderImageSource:{matches:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)"},borderImageWidth:{matches:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},borderImage:{unit:""},border:{matches:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",colorful:!0,prop:!1,get(e){return re(this.prefix,e)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{matches:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)"},backgroundBlendMode:{},backgroundColor:{colorStarts:"(?:bg|background):",unit:"",colorful:!0},backgroundClip:{matches:"^(?:bg|background):(?:text|$values)(?!\\|)",get(e){return{"-webkit-background-clip":e,"background-clip":e}},values:X},backgroundOrigin:{matches:"^(?:bg|background):(?:$values)(?!\\|)",values:X},backgroundPosition:{matches:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",unit:"px"},backgroundRepeat:{matches:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])"},backgroundSize:{matches:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)"},backgroundImage:{matches:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",colorful:!0},background:{matches:"^bg:.",colorful:!0,order:-1},mixBlendMode:{matches:"^blend:."},backdropFilter:{matches:"^bd:.",colorful:!0,get(e){return{"backdrop-filter":e,"-webkit-backdrop-filter":e}},parseValue(e,t){return ye(e,r=>{switch(r){case"blur":case"drop-shadow":return"rem";case"hue-rotate":return"deg"}return""},t)}},filter:{matches:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",colorful:!0,parseValue(e,t){return ye(e,r=>{switch(r){case"blur":case"drop-shadow":return"rem";case"hue-rotate":return"deg"}return""},t)}},fill:{colorStarts:"fill:",colorful:!0},strokeDasharray:{},strokeDashoffset:{},strokeWidth:{matches:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},stroke:{colorful:!0},x:{unit:""},y:{unit:""},cx:{unit:""},cy:{unit:""},rx:{unit:""},ry:{unit:""},gridColumnStart:{matches:"^grid-col-start:.",unit:""},gridColumnEnd:{matches:"^grid-col-end:.",unit:""},gridColumn:{matches:"^grid-col(?:umn)?(?:-span)?:.",unit:"",order:-1,parseValue(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{matches:"^grid-cols:.",unit:"",get(e){return{display:{...e,value:"grid"},"grid-template-columns":{...this,value:"repeat("+e.value+",minmax(0,1fr))"}}}},gridRowStart:{unit:""},gridRowEnd:{unit:""},gridRow:{matches:"^grid-row-span:.",unit:"",order:-1,parseValue(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{unit:"",get(e){return{display:{...e,value:"grid"},"grid-auto-flow":{...e,value:"column"},"grid-template-rows":{...e,value:"repeat("+e.value+",minmax(0,1fr))"}}}},gridAutoColumns:{matches:"^grid-auto-cols:.",values:se},gridAutoFlow:{matches:"^grid-flow:."},gridAutoRows:{values:se},gridTemplateAreas:{},gridTemplateColumns:{matches:"^grid-template-cols:.",values:se},gridTemplateRows:{values:se},gridTemplate:{order:-1},gridArea:{unit:"",order:-1},grid:{order:-1},gap:{matches:"^gap(?:-x|-y)?:.",order:-1,prop:!1,get(e){switch(this.prefix[4]){case"x":return{"column-gap":e};case"y":return{"row-gap":e};default:return{gap:e}}}},order:{matches:"^o:.",unit:"",values:{first:-999999,last:999999}},breakInside:{},breakBefore:{},breakAfter:{},boxDecorationBreak:{matches:"^box:(?:slice|clone|$values)(?!\\|)",get(e){return{"box-decoration-break":e,"-webkit-box-decoration-break":e}}},aspectRatio:{matches:"^aspect:.",unit:""},columnSpan:{matches:"^col-span:."},alignContent:{matches:"^ac:."},alignItems:{matches:"^ai:."},alignSelf:{matches:"^as:"},justifyContent:{matches:"^jc:."},justifyItems:{matches:"^ji:."},justifySelf:{matches:"^js:."},placeContent:{order:-1},placeItems:{order:-1},placeSelf:{order:-1},listStylePosition:{matches:"^list-style:(?:inside|outside|$values)(?!\\|)"},listStyleType:{matches:"^list-style:(?:disc|decimal|$values)(?!\\|)"},listStyleImage:{matches:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)"},listStyle:{order:-1},outlineColor:{colorStarts:"outline:",colorful:!0},outlineOffset:{},outlineStyle:{matches:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)"},outlineWidth:{matches:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},outline:{order:-1,colorful:!0},accentColor:{colorStarts:"accent:",colorful:!0},appearance:{},caretColor:{colorStarts:"caret:",colorful:!0},scrollBehavior:{},scrollMargin:{matches:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",prop:!1,get(e){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":e,"scroll-margin-right":e};case"y":return{"scroll-margin-top":e,"scroll-margin-bottom":e};case"l":return{"scroll-margin-left":e};case"r":return{"scroll-margin-right":e};case"t":return{"scroll-margin-top":e};case"b":return{"scroll-margin-bottom":e}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:e}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{matches:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",prop:!1,get(e){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":e,"scroll-padding-right":e};case"y":return{"scroll-padding-top":e,"scroll-padding-bottom":e};case"l":return{"scroll-padding-left":e};case"r":return{"scroll-padding-right":e};case"t":return{"scroll-padding-top":e};case"b":return{"scroll-padding-bottom":e}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:e}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{matches:"^scroll-snap:(?:start|end|center|$values)"},scrollSnapStop:{matches:"^scroll-snap:(?:normal|always|$values)(?!\\|)"},scrollSnapType:{matches:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)"},willChange:{},writingMode:{matches:"^writing:."},direction:{},shapeOutside:{matches:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",values:{...X,margin:"margin-box"}},shapeMargin:{matches:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$"},shapeImageThreshold:{unit:""},clipPath:{matches:"^clip:.",values:{...X,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{},maskImage:{get(e){return{"mask-image":e,"-webkit-mask-image":e}}}};var he={breakpoints:ee,colors:Me,rootSize:16,scope:Oe,selectors:Ee,semantics:$e,themes:je,rules:Ae,override:!1,observe:!0,important:!1};var Ne=[",",".","#","[","!","*",">","+","~",":","@"];var de=typeof window<"u",J=class{constructor(t){this.config=t;this.config?.override||(this.config=q(he,t)),this.cache(),de&&this.config.observe&&this.observe(document),J.instances.push(this),this.ready=!0}rules=[];ruleOfClass={};countOfClass={};ready=!1;r=de?new MutationObserver(t=>{let r={},s=[],o=[],l=[],c=(n,i)=>{i?n.classList.forEach(g):n.classList.forEach(f);let u=n.children;for(let p=0;p<u.length;p++){let x=u[p];x.classList&&(o.push(x),c(x,i))}},f=n=>{n in r?r[n]++:r[n]=1},g=n=>{n in r?r[n]--:n in this.countOfClass&&(r[n]=-1)},h=(n,i)=>{for(let u=0;u<n.length;u++){let p=n[u];p.classList&&!o.includes(p)&&!l.includes(p)&&(p.isConnected!==i?(o.push(p),c(p,i)):l.push(p))}};for(let n=0;n<t.length;n++){let i=t[n],{addedNodes:u,removedNodes:p,type:x,target:b}=i;if(x==="attributes"){if(s.find(S=>S.target===b))continue;s.push(i)}else h(u,!1),(!b.isConnected||!o.includes(b))&&h(p,!0)}if(!(!s.length&&!Object.keys(r).length)){for(let{oldValue:n,target:i}of s){let u=o.includes(i),p=i.classList,x=n?n.split(" "):[];if(u){if(i.isConnected)continue;for(let b of x)p.contains(b)||g(b)}else if(i.isConnected){p.forEach(b=>{x.includes(b)||f(b)});for(let b of x)p.contains(b)||g(b)}}for(let n in r){let i=r[n],u=(this.countOfClass[n]||0)+i;u===0?(delete this.countOfClass[n],this.delete(n)):(n in this.countOfClass||this.insert(n),this.countOfClass[n]=u)}}}):null;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.relationThemesMap={},this.relations={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={};let{semantics:t,classes:r,selectors:s,themes:o,colors:l,values:c,breakpoints:f,mediaQueries:g,rules:h}=this.config;function n(a){return a.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function i(a,m,d="",k={}){let y=O=>O?(d?d+"-":"")+O:d,M=Object.entries(a),C=[],$=[];for(let O of M){let B=O[1];(typeof B=="object"&&!Array.isArray(B)?C:$).push(O)}for(let[O,B]of C)i(B,m,y(O),k);if(m&&d)$.length&&(k[d]=$.reduce((O,[B,P])=>(O[B]=P,O),{}));else for(let[O,B]of $)k[y(O)]=B;return k}if(t)for(let[a,m]of Object.entries(i(t,!0)))this.semantics.push([new RegExp("^"+n(a)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[a,m]]);if(s)for(let[a,m]of Object.entries(i(s,!1))){let d=new RegExp(n(a)+"(?![a-z-])");for(let k of Array.isArray(m)?m:[m]){let y=k.match(/^::-[a-z]+-/m)?.[0]??"",M=this.selectors[y];M||(M=this.selectors[y]=[]);let C=M.find(([$])=>$===d);C||(C=[d,[]],M.push(C)),C[1].push(k)}}c&&(this.globalValues=i(c,!1)),f&&(this.breakpoints=i(f,!1)),g&&(this.mediaQueries=i(g,!1));let u=r?i(r,!1):{},p=o&&!Array.isArray(o)?Object.entries(o).filter(([,{classes:a}])=>a).reduce((a,[m,{classes:d}])=>(a[m]=i(d,!1),a),{}):{},x=[...Object.keys(u),...Object.entries(p).flatMap(([a,m])=>Object.keys(m))],b=a=>{if(a in this.classes)return;let m=this.classes[a]=[],d=(k,y)=>{if(!y)return;let M=Array.isArray(y)?y:y.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let C of M){let $=O=>{O in this.relationThemesMap?k in this.relationThemesMap[O]?this.relationThemesMap[O][k].push(a):this.relationThemesMap[O][k]=[a]:this.relationThemesMap[O]={[k]:[a]},m.includes(O)||m.push(O)};if(x.includes(C)){b(C);for(let O of this.classes[C])$(O)}else $(C)}};d("",u?.[a]);for(let[k,y]of Object.entries(p))d(k,y?.[a])};for(let a of x)b(a);for(let a in this.relationThemesMap){let m=this.relations[a]=[];for(let d of Object.values(this.relationThemesMap[a]))for(let k of d)m.includes(k)||m.push(k)}let S=(a,m)=>{if(!m)return;let d=i(m,!0);for(let[k,y]of Object.entries(d)){let M=typeof y=="string"?{"":y}:y;for(let[C,$]of Object.entries(M)){let O=k+(C?"-"+C:"");O in this.colorThemesMap?this.colorThemesMap[O][a]=$:this.colorThemesMap[O]={[a]:$}}}for(let k in m)this.colorNames.includes(k)||this.colorNames.push(k)};if(S("",l),o)if(Array.isArray(o))this.themeNames.push(...o);else for(let a in o){let m=o[a];S(a,m.colors),this.themeNames.push(a)}let R=a=>{for(let[m,d]of Object.entries(this.colorThemesMap))for(let[k,y]of Object.entries(d))y.startsWith("#")||a(m,d,k,y)};if(R((a,m,d,k)=>{let y=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(k);if(y){let M="#"+fe(+y[1],+y[2],+y[3]);y[4]&&(M+=Math.round(255*+y[4]).toString(16)),m[d]=M}}),R((a,m,d,k)=>{let[y,M]=k.split("/"),C=this.colorThemesMap[y];if(C){let $=(d?C[d]:void 0)??C[""];m[d]=M?$.slice(0,7)+Math.round(255*+M).toString(16):$}else console.warn(`\`${k}\` doesn't exist in the extended config \`.colors\``),delete m[d],Object.keys(m).length||delete this.colorThemesMap[a]}),h)for(let a in h){let m=h[a],{matches:d,prop:k,values:y}=m;if(m.id=a,m.prop=k===!1?"":a.replace(/(?!^)[A-Z]/g,M=>"-"+M).toLowerCase(),y&&(this.values[a]=i(y,!1)),d){let M=Object.keys(this.values[a]??{}),C=d.indexOf("$values");this.matches[a]=new RegExp(C===-1?d:M.length?d.slice(0,C)+M.join("|")+d.slice(C+7):d.slice(0,C-(d[C-1]==="|"?1:0))+d.slice(C+7+(d[C+7]==="|"?1:0)))}}}observe(t,r={subtree:!0,childList:!0}){if(de&&t){this.root=t;let s=t===document;s&&(J.root=this),this.host=s?document.documentElement:root.host;let o=s?document.head:t,l=s?document.styleSheets:t.styleSheets;for(let f of l){let{title:g,href:h,ownerNode:n}=f;(g==="master"||h&&h.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(h))&&(this.style=n)}if(this.style)for(let f=0;f<this.style.sheet.cssRules.length;f++){let g=n=>{if(n.selectorText){let u=n.selectorText.split(", ")[0].split(" ");for(let p=0;p<u.length;p++){let x=u[p];if(x[0]==="."){let b=x.slice(1),S="";for(let R=0;R<b.length;R++){let a=b[R],m=b[R+1];if(a==="\\"){if(R++,m!=="\\"){S+=m;continue}}else if(Ne.includes(a))break;S+=a}if(!(S in this.ruleOfClass)&&!(S in this.classes)){let R=this.create(S)[0];if(R)return R}}}}else if(n.cssRules)for(let i=0;i<n.cssRules.length;i++){let u=g(n.cssRules[i]);if(u)return u}},h=g(this.style.sheet.cssRules[f]);if(h){this.rules.push(h),this.ruleOfClass[h.className]=h;for(let n=0;n<h.natives.length;n++)h.natives[n].cssRule=this.style.sheet.cssRules[f+n];f+=h.natives.length-1}}else{this.style=document.createElement("style"),this.style.title="master";let f=o.querySelector('link[rel="styleSheet"], style');f?f.before(this.style):o.append(this.style)}let c=f=>{f.forEach(g=>{g in this.countOfClass?this.countOfClass[g]++:(this.countOfClass[g]=1,this.insert(g))})};c(this.host.classList),r.subtree&&this.host.querySelectorAll("[class]").forEach(f=>c(f.classList)),this.r.observe(t,{...r,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]})}return this}disconnect(){this.r.disconnect(),this.ruleOfClass={},this.countOfClass={},this.rules.length=0;let t=this.style.sheet;if(t)for(let r=t.cssRules.length-1;r>=0;r--)t.deleteRule(r);this.style.remove(),this.style=null}match(t){for(let r in this.config.rules){let s=this.config.rules[r],o=this.matches[r],{colorStarts:l,symbol:c,prop:f}=s,{colorNames:g,colorThemesMap:h}=this;if(o&&o.test(t))return{origin:"matches",config:s};if(l){if(t.match("^"+l+"(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|current|inherit))"))return{origin:"matches",config:s};if(g.length&&t.indexOf("|")===-1){let n=t.match("^"+l+"((?:"+g.join("|")+")[0-9a-zA-Z-]*)");if(n&&n[1]in h)return{origin:"matches",config:s}}}if(c&&t.startsWith(c))return{origin:"symbol",config:s};if(f&&t.startsWith(f+":"))return{origin:"matches",config:s}}for(let r of this.semantics)if(t.match(r[0]))return{origin:"semantics",value:r[1]}}create(t){let r=s=>{if(s in this.ruleOfClass)return this.ruleOfClass[s];let o=this.match(s);if(o)return new ue(s,o,this)};return(t in this.classes?this.classes[t].map(s=>r(s)):[r(t)]).filter(s=>s&&s.text)}refresh(t){if(t?.override?this.config=t:this.config=q(he,t),this.cache(),!this.style)return;let r=document.createElement("style");r.title="master",this.style.replaceWith(r),this.style=r,this.rules.length=0,this.ruleOfClass={};for(let s in this.countOfClass)this.insert(s)}destroy(){let t=J.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let r=this.style.sheet,s=o=>{let l=this.ruleOfClass[o];if(!(!l||o in this.relations&&this.relations[o].some(c=>c in this.countOfClass))){if(l.natives.length){let c=l.natives[0];for(let f=0;f<r.cssRules.length;f++)if(r.cssRules[f]===c.cssRule){for(let h=0;h<l.natives.length;h++)r.deleteRule(f);this.rules.splice(this.rules.indexOf(l),1);break}}delete this.ruleOfClass[o]}};if(t in this.classes){for(let o of this.classes[t])o in this.countOfClass||s(o);delete this.ruleOfClass[t]}else s(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.ruleOfClass[r.className])continue;let s,o=this.rules.length-1,{media:l,order:c,priority:f,hasWhere:g,className:h}=r,n=(i,u,p,x)=>{let b=0,S;u&&(b=i.findIndex(u)),p&&(S=i.findIndex(p)),b===-1&&(b=i.length),(S===void 0||S===-1)&&(S=i.length);let R=i.slice(b,S);for(let a=0;a<R.length;a++){let m=R[a];if(!(m.priority===-1||x&&x(m))&&(m.priority<f||m.priority===f&&(g&&!m.hasWhere||m.order>=c)))return b+a}return b+R.length};if(l){let i=this.rules.findIndex(u=>u.media);if(i!==-1){let u=l.features["max-width"],p=l.features["min-width"];if(u&&p){let x=u.value-p.value;for(let b=o;b>=i;b--){s=b;let S=this.rules[b],R=S.media,a=R.features["max-width"],m=R.features["min-width"];if(!a||!m){s++;break}let d=a.value-m.value;if(d===x){if(g!==S.hasWhere)continue;if(f!==-1){let k=[this.rules[b]];for(let y=b-1;y>=i;y--){let M=this.rules[y];if(M.hasWhere!==g)break;let C=M.media,$=C.features["max-width"],O=C.features["min-width"];if(!$||!O||$.value-O.value!==d)break;k.unshift(this.rules[y])}s=n(this.rules,y=>y.media&&y.priority!==-1&&y.media.features["min-width"]&&y.media.features["max-width"])}break}else if(d>x)break}}else if(p)for(let x=i;x<=o;x++){s=x;let b=this.rules[x],S=b.media,R=S.features["max-width"],a=S.features["min-width"];if(R){if(a)break;continue}let m=a?.value;if(m===p.value){if(!g&&b.hasWhere){s++;continue}if(f!==-1)s=n(this.rules,d=>d.media,d=>d.media&&d.priority!==-1&&d.media.features["min-width"]&&d.media.features["max-width"],d=>!d.media.features["min-width"]&&!d.media.features["max-width"]);else for(let d=x;d<=o;d++){let k=this.rules[d],y=k.media,M=y.features["min-width"];if(!y.features["max-width"]){if(k.hasWhere!==g||M.value!==m||k.order>=c)break;s=d+1}}break}else{if(m>p.value)break;s++}}else if(u)for(let x=o;x>=i;x--){s=x;let b=this.rules[x],S=b.media,R=S.features["max-width"];if(S.features["min-width"])continue;let m=R?.value;if(!m||m>u.value){s++;break}else if(m===u.value){if(g&&!b.hasWhere)continue;if(f!==-1)s=n(this.rules,d=>d.media,d=>d.media&&d.priority!==-1&&d.media.features["min-width"]&&d.media.features["max-width"],d=>!d.media.features["min-width"]&&!d.media.features["max-width"]);else{let d=[this.rules[x]];for(let k=x-1;k>=i;k--){let y=this.rules[k],M=y.media,C=M.features["min-width"],$=M.features["max-width"];if(!C&&(!$||$.value!==m||y.hasWhere!==g))break;d.unshift(y)}for(let k=0;k<d.length;k++){let y=d[k];if(!y.media.features["min-width"]){if(y.order>=c)break;s=x-d.length+2+k}}}break}}}if(s===void 0)if(i===-1)s=o+1;else if(f!==-1)s=i+n(this.rules.slice(i),void 0,u=>u.media.features["max-width"]||u.media.features["min-width"]);else if(g){let u=i;for(;u<this.rules.length;u++){let p=this.rules[u];if(p.priority!==-1||!p.hasWhere||p.order>=c){s=u;break}}s===void 0&&(s=u)}else for(let u=i;u<=o;u++){s=u;let p=this.rules[u],x=p.media;if(p.priority!==-1||x.features["max-width"]||x.features["min-width"])break;if(p.hasWhere)s++;else if(p.order>=c)break}}else if(f===-1)if(g)s=this.rules.findIndex(i=>!i.hasWhere||i.media||i.priority!==-1||i.order>=c),s===-1&&(s=o+1);else{let i=0;for(;i<this.rules.length;i++){let u=this.rules[i];if(u.media||!u.hasWhere&&(u.order>=c||u.priority!==-1)){s=i;break}}s===void 0&&(s=i)}else s=n(this.rules,void 0,i=>i.media);if(this.rules.splice(s,0,r),this.ruleOfClass[h]=r,this.style){let i=this.style.sheet,u=0,p=x=>{let b=this.rules[x];if(b){if(!b.natives.length)return p(x-1);let S=b.natives[b.natives.length-1].cssRule;for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===S){u=R+1;break}}};p(s-1);for(let x=0;x<r.natives.length;)try{let b=r.natives[x];i.insertRule(b.text,u),b.cssRule=i.cssRules[u++],x++}catch(b){console.error(b),r.natives.splice(x,1)}}}}get text(){return this.rules.map(t=>t.text).join("")}},H=J;K(H,"root"),K(H,"config",he),K(H,"instances",[]),K(H,"refresh",t=>{for(let r of J.instances)r.refresh(t)});de&&(window.MasterCSS=H);var We={store:"theme",init:!0},Fe=typeof document<"u",Ie=typeof localStorage<"u",me=class{constructor(t,r=Fe?document.documentElement:null){this.settings=t;this.host=r;this.settings=t?q(We,t):We,this.settings.init&&this.init()}e=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;s;t;init(){let t=this.settings.default,r=this.storage;r&&(t=r),this.value=t}get storage(){let{store:t}=this.settings;if(Ie&&t)return localStorage.getItem(t)}get systemValue(){return this.e.matches?"dark":"light"}set value(t){this.s=t,t==="system"?(this.e?.addEventListener?.("change",this.i),this.current=this.systemValue):(this.n(),this.current=t)}get value(){return this.s}set current(t){let r=this.t;this.t=t,this.host&&(r&&this.host.classList.remove(r),this.host.classList.contains(t)||(this.host.classList.add(t),this.host.style&&(this.host.style.colorScheme=t)))}get current(){return this.t}switch(t,r={store:!0,emit:!0}){t&&t!==this.value&&(this.value=t,Ie&&this.storage!==t&&this.settings.store&&localStorage.setItem(this.settings.store,t),r.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}n(){this.e?.removeEventListener("change",this.i)}i=t=>{this.current=t.matches?"dark":"light"};destroy(){this.n()}};new H(window.masterCSSConfig);new me(window.masterCSSThemeSettings);})();
package/dist/index.d.ts CHANGED
@@ -5,5 +5,3 @@ export { MasterCSS as default } from './css';
5
5
  export { default as extend } from 'to-extend';
6
6
  export * from './methods';
7
7
  export * from './config';
8
- export type { Declaration, MediaQuery, MediaFeatureRule, RuleMeta } from './rule';
9
- export type { ThemeConfig, ThemeValue } from './theme';