@master/css 2.0.0-beta.143 → 2.0.0-beta.144
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.
- package/dist/cjs/css.js +1 -1
- package/dist/esm/css.mjs +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var U=(y,t,i)=>t in y?N(y,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[t]=i;var Y=(y,t)=>{for(var i in t)N(y,i,{get:t[i],enumerable:!0})},G=(y,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Z(t))!q.call(y,u)&&u!==i&&N(y,u,{get:()=>t[u],enumerable:!(n=_(t,u))||n.enumerable});return y};var J=y=>G(N({},"__esModule",{value:!0}),y);var T=(y,t,i)=>(U(y,typeof t!="symbol"?t+"":t,i),i);var P={};Y(P,{MasterCSS:()=>M});module.exports=J(P);function I(y){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&y instanceof t||y instanceof Date||y instanceof RegExp)}function $(y){if(typeof Buffer<"u"&&Buffer&&y instanceof Buffer){let t=Buffer.alloc(y.length);return y.copy(t),t}else{if(y instanceof Date)return new Date(y.getTime());if(y instanceof RegExp)return new RegExp(y);throw new Error("Unexpected situation")}}function F(y){let t=[];return y.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?t[n]=F(i):I(i)?t[n]=$(i):t[n]=O({},i):t[n]=i}),t}function W(y,t){return t==="__proto__"?void 0:y[t]}function O(...y){let t={},i,n;return y.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(v){if(n=W(t,v),i=W(u,v),i!==t)if(typeof i!="object"||i===null){t[v]=i;return}else if(Array.isArray(i)){t[v]=F(i);return}else if(I(i)){t[v]=$(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[v]=O({},i);return}else{t[v]=O(n,i);return}})}),t}var D=require("./rule"),j=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var L=typeof window<"u",V=()=>{let y=document.createElement("style");return y.id="master",y},S=class{constructor(t=j.config){this.config=t;t?.override||(this.config=O(j.config,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),L&&this.config.observe&&this.observe(document),S.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:t,classes:i,selectors:n,themes:u,colors:v,values:E,breakpoints:R,mediaQueries:p,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(e,s,l="",c={}){let m=x=>x?(l?l+"-":"")+x:l,b=Object.entries(e),w=[],A=[];for(let x of b){let k=x[1];(typeof k=="object"&&!Array.isArray(k)?w:A).push(x)}for(let[x,k]of w)a(k,s,m(x),c);if(s&&l)A.length&&(c[l]=A.reduce((x,[k,z])=>(x[k]=z,x),{}));else for(let[x,k]of A)c[m(x)]=k;return c}if(t)for(let[e,s]of Object.entries(a(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(a(n,!1))){let l=new RegExp(B(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let m=c.match(/^::-[a-z]+-/m)?.[0]??"",b=this.selectors[m];b||(b=this.selectors[m]=[]);let w=b.find(([A])=>A===l);w||(w=[l,[]],b.push(w)),w[1].push(c)}}E&&(this.globalValues=a(E,!1)),R&&(this.breakpoints=a(R,!1)),p&&(this.mediaQueries=a(p,!1));let d=i?a(i,!1):{},g=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:l}])=>(e[s]=a(l,!1),e),{}):{},h=[...Object.keys(d),...Object.entries(g).flatMap(([e,s])=>Object.keys(s))],f=e=>{if(e in this.classes)return;let s=this.classes[e]=[],l=(c,m)=>{if(!m)return;let b=Array.isArray(m)?m:m.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let w of b){let A=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(e):this.themeAffectedClassesBy[x][c]=[e]:this.themeAffectedClassesBy[x]={[c]:[e]},s.includes(x)||s.push(x)};if(h.includes(w)){f(w);for(let x of this.classes[w])A(x)}else A(w)}};l("",d?.[e]);for(let[c,m]of Object.entries(g))l(c,m?.[e])};for(let e of h)f(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let l of Object.values(this.themeAffectedClassesBy[e]))for(let c of l)s.includes(c)||s.push(c)}let o=(e,s)=>{if(!s)return;let l=a(s,!0);for(let[c,m]of Object.entries(l)){let b=typeof m=="string"?{"":m}:m;for(let[w,A]of Object.entries(b)){let x=c+(w?"-"+w:"");x in this.colorThemesMap?this.colorThemesMap[x][e]=A:this.colorThemesMap[x]={[e]:A}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(o("",v),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let e in u){let s=u[e];o(e,s.colors),this.themeNames.push(e)}let r=e=>{for(let[s,l]of Object.entries(this.colorThemesMap))for(let[c,m]of Object.entries(l))m.startsWith("#")||e(s,l,c,m)};if(r((e,s,l,c)=>{let m=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(m){let b="#"+(0,H.rgbToHex)(+m[1],+m[2],+m[3]);m[4]&&(b+=Math.round(255*+m[4]).toString(16)),s[l]=b}}),r((e,s,l,c)=>{let[m,b]=c.split("/"),w=this.colorThemesMap[m];if(w){let A=(l?w[l]:void 0)??w[""];s[l]=b?A.slice(0,7)+Math.round(255*+b).toString(16):A}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[l],Object.keys(s).length||delete this.colorThemesMap[e]}),C)for(let e in C){let s=C[e],{native:l,values:c,colored:m}=s,b=s.match;if(s.id=e,s.native=l===!0?e.replace(/(?!^)[A-Z]/g,w=>"-"+w).toLowerCase():void 0,c&&(this.values[e]=a(c,!1)),b){let w=Object.keys(this.values[e]??{});b.includes("$values")&&(b=w.length?b.replace(/\$values/,w.join("|")):b.replace(/(?:\|)?\$values/,"")),m&&b.includes("$colors")&&(b=this.colorNames.length?b.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):b.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(b)}}}observe(t,i={subtree:!0,childList:!0}){if(this.root!==t){if(L&&t){this.root=t;let n=t===document;n&&(S.root=this),this.host=n?document.documentElement:root.host;let u=n?document.head:t,v=n?document.styleSheets:t.styleSheets;for(let R of v){let{ownerNode:p}=R;if(p.id==="master"){this.style=p;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let p=this.style.sheet.cssRules[R];if(p.constructor.name==="CSSKeyframesRule")continue;let C=a=>{if(a.selectorText){let g=a.selectorText.split(", ")[0].split(" ");for(let h=0;h<g.length;h++){let f=g[h];if(f[0]==="."){let o=f.slice(1),r="";for(let e=0;e<o.length;e++){let s=o[e],l=o[e+1];if(s==="\\"){if(e++,l!=="\\"){r+=l;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;r+=s}if(!(r in this.ruleBy)&&!(r in this.classes)){let e=this.create(r)[0];if(e)return e}}}}else if(a.cssRules)for(let d=0;d<a.cssRules.length;d++){let g=C(a.cssRules[d]);if(g)return g}},B=C(p);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let a=0;a<B.natives.length;a++)B.natives[a].cssRule=this.style.sheet.cssRules[R+a];R+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=V(),u.append(this.style);let E=R=>{R.forEach(p=>{p in this.countBy?this.countBy[p]++:(this.countBy[p]=1,this.insert(p))})};E(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(R=>E(R.classList)),this.observer=new MutationObserver(R=>{let p={},C=[],B=[],a=[],d=(o,r)=>{r?o.classList.forEach(h):o.classList.forEach(g);let e=o.children;for(let s=0;s<e.length;s++){let l=e[s];l.classList&&(B.push(l),d(l,r))}},g=o=>{o in p?p[o]++:p[o]=1},h=o=>{o in p?p[o]--:o in this.countBy&&(p[o]=-1)},f=(o,r)=>{for(let e=0;e<o.length;e++){let s=o[e];s.classList&&!B.includes(s)&&!a.includes(s)&&(s.isConnected!==r?(B.push(s),d(s,r)):a.push(s))}};for(let o=0;o<R.length;o++){let r=R[o],{addedNodes:e,removedNodes:s,type:l,target:c}=r;if(l==="attributes"){if(C.find(m=>m.target===c))continue;C.push(r)}else f(e,!1),(!c.isConnected||!B.includes(c))&&f(s,!0)}if(!(!C.length&&!Object.keys(p).length)){for(let{oldValue:o,target:r}of C){let e=B.includes(r),s=r.classList,l=o?o.split(" "):[];if(e){if(r.isConnected)continue;for(let c of l)s.contains(c)||h(c)}else if(r.isConnected){s.forEach(c=>{l.includes(c)||g(c)});for(let c of l)s.contains(c)||h(c)}}for(let o in p){let r=p[o],e=(this.countBy[o]||0)+r;e===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=e)}}}),this.observer.observe(t,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let t=this.style?.sheet;if(t?.cssRules)for(let i=t.cssRules.length-1;i>=0;i--)t.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(t){for(let i in this.config.rules){let n=this.config.rules[i],u=this.matches[i],{symbol:v,native:E}=n;if(u&&u.test(t))return{origin:"match",config:n};if(v&&t.startsWith(v))return{origin:"symbol",config:n};if(E&&t.startsWith(E+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(t.match(i[0]))return{origin:"semantics",value:i[1]}}create(t){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new D.Rule(n,u,this)};return(t in this.classes?this.classes[t].map(n=>i(n)):[i(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=O(j.config,t),this.cache(),!this.style)return;let i=V();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=S.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let i=this.style?.sheet,n=u=>{let v=this.ruleBy[u];if(!(!v||u in this.classesBy&&this.classesBy[u].some(E=>E in this.countBy))){if(i&&v.natives.length){let E=v.natives[0];for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===E.cssRule){for(let C=0;C<v.natives.length;C++)i.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(v),1),delete this.ruleBy[u],v.config.delete&&v.config.delete.call(v,u)}};if(t in this.classes){for(let u of this.classes[t])u in this.countBy||n(u);delete this.ruleBy[t]}else n(t)}insert(t){let i=this.create(t);return i.length?(this.insertRules(i),!0):!1}insertRules(t){for(let i of t){if(this.ruleBy[i.className])continue;let n,u=Object.keys(this.keyframes).length,v=this.rules.length-1,{media:E,order:R,priority:p,hasWhere:C,className:B}=i,a=(h,f,o)=>{let r=h;for(;r<=v;r++){let e=this.rules[r];if(f?.(e))return o?-1:r-1;if(o?.(e))return r}return o?-1:r-1},d,g;if(E){let h=this.rules.findIndex(f=>f.media);if(h===-1)n=v+1;else{let{"max-width":f,"min-width":o}=E.features;if(f||o){let r=this.rules.findIndex(e=>e.media?.features["max-width"]||e.media?.features["min-width"]);if(r===-1)n=v+1;else if(f&&o){if(p===-1?(d=a(r,e=>e.priority!==-1,e=>e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.priority!==-1)):(d=a(r,void 0,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=v),d!==-1){let e=f.value-o.value,s=g,l=d;for(d=void 0;s>=l;s--){let{"max-width":c,"min-width":m}=this.rules[s].media.features,b=c.value-m.value;if(b<e)g=s-1;else if(b===e)d=s;else break}}if(d!==-1){let e=f.value-o.value;for(let s=g;s>=d;s--){let{"max-width":l,"min-width":c}=this.rules[s].media.features,m=l.value-c.value;if(m<e)g=s-1;else if(m>e){d=s+1;break}}}}else if(o){if(p===-1?(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["min-width"].value;if(s>o.value)g=e-1;else if(s<o.value){d=e+1;break}}}else if(p===-1?(d=a(r,e=>e.media.features["min-width"]||e.priority!==-1,e=>e.media.features["max-width"]),g=a(r,e=>e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["min-width"]&&e.priority!==-1,e=>e.media.features["max-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["max-width"].value;if(s<f.value)g=e-1;else if(s>f.value){d=e+1;break}}}else p===-1?(d=h,g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]||r.priority!==-1)):(d=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"],r=>r.priority!==-1),g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]))}}else{let h=u?1:0;p===-1?(d=h,g=a(h,f=>f.media||f.priority!==-1)):(d=a(h,f=>f.media,f=>f.priority!==-1),g=a(h,f=>f.media))}if(n===void 0)if(d===-1)n=g+1;else{if(p===-1)for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)&&(C&&!f.hasWhere||f.order>=R)){n=h;break}}else for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)){if(C&&!f.hasWhere){n=h;break}if(f.priority<p){n=h;break}else if(f.priority===p){if(f.order>=R){n=h;break}}else n=h+1}}n===void 0&&(n=g+1)}if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let h=this.style.sheet,f=0,o=r=>{let e=this.rules[r];if(e){if(!e.natives.length)return o(r-1);let s=e.natives[e.natives.length-1].cssRule;for(let l=0;l<h.cssRules.length;l++)if(h.cssRules[l]===s){f=l+1;break}}};o(n-1);for(let r=0;r<i.natives.length;)try{let e=i.natives[r];h.insertRule(e.text,f),e.cssRule=h.cssRules[f++],r++}catch(e){console.error(e),i.natives.splice(r,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(t=>t.text).join("")}},M=S;T(M,"root"),T(M,"config",j.config),T(M,"instances",[]),T(M,"refresh",t=>{for(let i of S.instances)i.refresh(t)});L&&(window.MasterCSS=M);0&&(module.exports={MasterCSS});
|
|
1
|
+
var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var U=(y,t,i)=>t in y?N(y,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[t]=i;var Y=(y,t)=>{for(var i in t)N(y,i,{get:t[i],enumerable:!0})},G=(y,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Z(t))!q.call(y,u)&&u!==i&&N(y,u,{get:()=>t[u],enumerable:!(n=_(t,u))||n.enumerable});return y};var J=y=>G(N({},"__esModule",{value:!0}),y);var T=(y,t,i)=>(U(y,typeof t!="symbol"?t+"":t,i),i);var P={};Y(P,{MasterCSS:()=>M});module.exports=J(P);function I(y){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&y instanceof t||y instanceof Date||y instanceof RegExp)}function $(y){if(typeof Buffer<"u"&&Buffer&&y instanceof Buffer){let t=Buffer.alloc(y.length);return y.copy(t),t}else{if(y instanceof Date)return new Date(y.getTime());if(y instanceof RegExp)return new RegExp(y);throw new Error("Unexpected situation")}}function F(y){let t=[];return y.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?t[n]=F(i):I(i)?t[n]=$(i):t[n]=O({},i):t[n]=i}),t}function W(y,t){return t==="__proto__"?void 0:y[t]}function O(...y){let t={},i,n;return y.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(v){if(n=W(t,v),i=W(u,v),i!==t)if(typeof i!="object"||i===null){t[v]=i;return}else if(Array.isArray(i)){t[v]=F(i);return}else if(I(i)){t[v]=$(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[v]=O({},i);return}else{t[v]=O(n,i);return}})}),t}var D=require("./rule"),j=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var L=typeof window<"u",V=()=>{let y=document.createElement("style");return y.id="master",y},S=class{constructor(t=j.config){this.config=t;t?.override||(this.config=O(j.config,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),L&&this.config.observe&&this.observe(document),S.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:t,classes:i,selectors:n,themes:u,colors:v,values:E,breakpoints:R,mediaQueries:p,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(e,s,l="",c={}){let m=x=>x?(l?l+"-":"")+x:l,b=Object.entries(e),w=[],A=[];for(let x of b){let k=x[1];(typeof k=="object"&&!Array.isArray(k)?w:A).push(x)}for(let[x,k]of w)a(k,s,m(x),c);if(s&&l)A.length&&(c[l]=A.reduce((x,[k,z])=>(x[k]=z,x),{}));else for(let[x,k]of A)c[m(x)]=k;return c}if(t)for(let[e,s]of Object.entries(a(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(a(n,!1))){let l=new RegExp(B(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let m=c.match(/^::-[a-z]+-/m)?.[0]??"",b=this.selectors[m];b||(b=this.selectors[m]=[]);let w=b.find(([A])=>A===l);w||(w=[l,[]],b.push(w)),w[1].push(c)}}E&&(this.globalValues=a(E,!1)),R&&(this.breakpoints=a(R,!1)),p&&(this.mediaQueries=a(p,!1));let d=i?a(i,!1):{},g=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:l}])=>(e[s]=a(l,!1),e),{}):{},h=[...Object.keys(d),...Object.entries(g).flatMap(([e,s])=>Object.keys(s))],f=e=>{if(e in this.classes)return;let s=this.classes[e]=[],l=(c,m)=>{if(!m)return;let b=Array.isArray(m)?m:m.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let w of b){let A=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(e):this.themeAffectedClassesBy[x][c]=[e]:this.themeAffectedClassesBy[x]={[c]:[e]},s.includes(x)||s.push(x)};if(h.includes(w)){f(w);for(let x of this.classes[w])A(x)}else A(w)}};l("",d?.[e]);for(let[c,m]of Object.entries(g))l(c,m?.[e])};for(let e of h)f(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let l of Object.values(this.themeAffectedClassesBy[e]))for(let c of l)s.includes(c)||s.push(c)}let o=(e,s)=>{if(!s)return;let l=a(s,!0);for(let[c,m]of Object.entries(l)){let b=typeof m=="string"?{"":m}:m;for(let[w,A]of Object.entries(b)){let x=c+(w?"-"+w:"");x in this.colorThemesMap?this.colorThemesMap[x][e]=A:this.colorThemesMap[x]={[e]:A}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(o("",v),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let e in u){let s=u[e];o(e,s.colors),this.themeNames.push(e)}let r=e=>{for(let[s,l]of Object.entries(this.colorThemesMap))for(let[c,m]of Object.entries(l))m.startsWith("#")||e(s,l,c,m)};if(r((e,s,l,c)=>{let m=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(m){let b="#"+(0,H.rgbToHex)(+m[1],+m[2],+m[3]);m[4]&&(b+=Math.round(255*+m[4]).toString(16)),s[l]=b}}),r((e,s,l,c)=>{let[m,b]=c.split("/"),w=this.colorThemesMap[m];if(w){let A=(l?w[l]:void 0)??w[""];s[l]=b?A.slice(0,7)+Math.round(255*+b).toString(16):A}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[l],Object.keys(s).length||delete this.colorThemesMap[e]}),C)for(let e in C){let s=C[e],{native:l,values:c,colored:m}=s,b=s.match;if(s.id=e,s.native=l===!0?e.replace(/(?!^)[A-Z]/g,w=>"-"+w).toLowerCase():void 0,c&&(this.values[e]=a(c,!1)),b){let w=Object.keys(this.values[e]??{});b.includes("$values")&&(b=w.length?b.replace(/\$values/,w.join("|")):b.replace(/(?:\|)?\$values/,"")),m&&b.includes("$colors")&&(b=this.colorNames.length?b.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):b.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(b)}}}observe(t,i={subtree:!0,childList:!0}){if(this.root!==t){if(L&&t){this.root=t;let n=t===document;n&&(S.root=this),this.host=n?document.documentElement:this.root.host;let u=n?document.head:t,v=n?document.styleSheets:t.styleSheets;for(let R of v){let{ownerNode:p}=R;if(p.id==="master"){this.style=p;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let p=this.style.sheet.cssRules[R];if(p.constructor.name==="CSSKeyframesRule")continue;let C=a=>{if(a.selectorText){let g=a.selectorText.split(", ")[0].split(" ");for(let h=0;h<g.length;h++){let f=g[h];if(f[0]==="."){let o=f.slice(1),r="";for(let e=0;e<o.length;e++){let s=o[e],l=o[e+1];if(s==="\\"){if(e++,l!=="\\"){r+=l;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;r+=s}if(!(r in this.ruleBy)&&!(r in this.classes)){let e=this.create(r)[0];if(e)return e}}}}else if(a.cssRules)for(let d=0;d<a.cssRules.length;d++){let g=C(a.cssRules[d]);if(g)return g}},B=C(p);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let a=0;a<B.natives.length;a++)B.natives[a].cssRule=this.style.sheet.cssRules[R+a];R+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=V(),u.append(this.style);let E=R=>{R.forEach(p=>{p in this.countBy?this.countBy[p]++:(this.countBy[p]=1,this.insert(p))})};E(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(R=>E(R.classList)),this.observer=new MutationObserver(R=>{let p={},C=[],B=[],a=[],d=(o,r)=>{r?o.classList.forEach(h):o.classList.forEach(g);let e=o.children;for(let s=0;s<e.length;s++){let l=e[s];l.classList&&(B.push(l),d(l,r))}},g=o=>{o in p?p[o]++:p[o]=1},h=o=>{o in p?p[o]--:o in this.countBy&&(p[o]=-1)},f=(o,r)=>{for(let e=0;e<o.length;e++){let s=o[e];s.classList&&!B.includes(s)&&!a.includes(s)&&(s.isConnected!==r?(B.push(s),d(s,r)):a.push(s))}};for(let o=0;o<R.length;o++){let r=R[o],{addedNodes:e,removedNodes:s,type:l,target:c}=r;if(l==="attributes"){if(C.find(m=>m.target===c))continue;C.push(r)}else f(e,!1),(!c.isConnected||!B.includes(c))&&f(s,!0)}if(!(!C.length&&!Object.keys(p).length)){for(let{oldValue:o,target:r}of C){let e=B.includes(r),s=r.classList,l=o?o.split(" "):[];if(e){if(r.isConnected)continue;for(let c of l)s.contains(c)||h(c)}else if(r.isConnected){s.forEach(c=>{l.includes(c)||g(c)});for(let c of l)s.contains(c)||h(c)}}for(let o in p){let r=p[o],e=(this.countBy[o]||0)+r;e===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=e)}}}),this.observer.observe(t,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let t=this.style?.sheet;if(t?.cssRules)for(let i=t.cssRules.length-1;i>=0;i--)t.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(t){for(let i in this.config.rules){let n=this.config.rules[i],u=this.matches[i],{symbol:v,native:E}=n;if(u&&u.test(t))return{origin:"match",config:n};if(v&&t.startsWith(v))return{origin:"symbol",config:n};if(E&&t.startsWith(E+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(t.match(i[0]))return{origin:"semantics",value:i[1]}}create(t){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new D.Rule(n,u,this)};return(t in this.classes?this.classes[t].map(n=>i(n)):[i(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=O(j.config,t),this.cache(),!this.style)return;let i=V();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=S.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let i=this.style?.sheet,n=u=>{let v=this.ruleBy[u];if(!(!v||u in this.classesBy&&this.classesBy[u].some(E=>E in this.countBy))){if(i&&v.natives.length){let E=v.natives[0];for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===E.cssRule){for(let C=0;C<v.natives.length;C++)i.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(v),1),delete this.ruleBy[u],v.config.delete&&v.config.delete.call(v,u)}};if(t in this.classes){for(let u of this.classes[t])u in this.countBy||n(u);delete this.ruleBy[t]}else n(t)}insert(t){let i=this.create(t);return i.length?(this.insertRules(i),!0):!1}insertRules(t){for(let i of t){if(this.ruleBy[i.className])continue;let n,u=Object.keys(this.keyframes).length,v=this.rules.length-1,{media:E,order:R,priority:p,hasWhere:C,className:B}=i,a=(h,f,o)=>{let r=h;for(;r<=v;r++){let e=this.rules[r];if(f?.(e))return o?-1:r-1;if(o?.(e))return r}return o?-1:r-1},d,g;if(E){let h=this.rules.findIndex(f=>f.media);if(h===-1)n=v+1;else{let{"max-width":f,"min-width":o}=E.features;if(f||o){let r=this.rules.findIndex(e=>e.media?.features["max-width"]||e.media?.features["min-width"]);if(r===-1)n=v+1;else if(f&&o){if(p===-1?(d=a(r,e=>e.priority!==-1,e=>e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.priority!==-1)):(d=a(r,void 0,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=v),d!==-1){let e=f.value-o.value,s=g,l=d;for(d=void 0;s>=l;s--){let{"max-width":c,"min-width":m}=this.rules[s].media.features,b=c.value-m.value;if(b<e)g=s-1;else if(b===e)d=s;else break}}if(d!==-1){let e=f.value-o.value;for(let s=g;s>=d;s--){let{"max-width":l,"min-width":c}=this.rules[s].media.features,m=l.value-c.value;if(m<e)g=s-1;else if(m>e){d=s+1;break}}}}else if(o){if(p===-1?(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["min-width"].value;if(s>o.value)g=e-1;else if(s<o.value){d=e+1;break}}}else if(p===-1?(d=a(r,e=>e.media.features["min-width"]||e.priority!==-1,e=>e.media.features["max-width"]),g=a(r,e=>e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["min-width"]&&e.priority!==-1,e=>e.media.features["max-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["max-width"].value;if(s<f.value)g=e-1;else if(s>f.value){d=e+1;break}}}else p===-1?(d=h,g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]||r.priority!==-1)):(d=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"],r=>r.priority!==-1),g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]))}}else{let h=u?1:0;p===-1?(d=h,g=a(h,f=>f.media||f.priority!==-1)):(d=a(h,f=>f.media,f=>f.priority!==-1),g=a(h,f=>f.media))}if(n===void 0)if(d===-1)n=g+1;else{if(p===-1)for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)&&(C&&!f.hasWhere||f.order>=R)){n=h;break}}else for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)){if(C&&!f.hasWhere){n=h;break}if(f.priority<p){n=h;break}else if(f.priority===p){if(f.order>=R){n=h;break}}else n=h+1}}n===void 0&&(n=g+1)}if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let h=this.style.sheet,f=0,o=r=>{let e=this.rules[r];if(e){if(!e.natives.length)return o(r-1);let s=e.natives[e.natives.length-1].cssRule;for(let l=0;l<h.cssRules.length;l++)if(h.cssRules[l]===s){f=l+1;break}}};o(n-1);for(let r=0;r<i.natives.length;)try{let e=i.natives[r];h.insertRule(e.text,f),e.cssRule=h.cssRules[f++],r++}catch(e){console.error(e),i.natives.splice(r,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(t=>t.text).join("")}},M=S;T(M,"root"),T(M,"config",j.config),T(M,"instances",[]),T(M,"refresh",t=>{for(let i of S.instances)i.refresh(t)});L&&(window.MasterCSS=M);0&&(module.exports={MasterCSS});
|
package/dist/esm/css.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var D=Object.defineProperty;var H=(v,t,i)=>t in v?D(v,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):v[t]=i;var S=(v,t,i)=>(H(v,typeof t!="symbol"?t+"":t,i),i);function W(v){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&v instanceof t||v instanceof Date||v instanceof RegExp)}function I(v){if(typeof Buffer<"u"&&Buffer&&v instanceof Buffer){let t=Buffer.alloc(v.length);return v.copy(t),t}else{if(v instanceof Date)return new Date(v.getTime());if(v instanceof RegExp)return new RegExp(v);throw new Error("Unexpected situation")}}function $(v){let t=[];return v.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?t[n]=$(i):W(i)?t[n]=I(i):t[n]=M({},i):t[n]=i}),t}function L(v,t){return t==="__proto__"?void 0:v[t]}function M(...v){let t={},i,n;return v.forEach(function(y){typeof y!="object"||y===null||Array.isArray(y)||Object.keys(y).forEach(function(b){if(n=L(t,b),i=L(y,b),i!==t)if(typeof i!="object"||i===null){t[b]=i;return}else if(Array.isArray(i)){t[b]=$(i);return}else if(W(i)){t[b]=I(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[b]=M({},i);return}else{t[b]=M(n,i);return}})}),t}import{Rule as Q}from"./rule.mjs";import{config as T}from"./config/index.mjs";import{rgbToHex as z}from"./utils/rgb-to-hex.mjs";import{SELECTOR_SYMBOLS as _}from"./constants/selector-symbols.mjs";var N=typeof window<"u",F=()=>{let v=document.createElement("style");return v.id="master",v},O=class{constructor(t=T){this.config=t;t?.override||(this.config=M(T,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),N&&this.config.observe&&this.observe(document),O.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:t,classes:i,selectors:n,themes:y,colors:b,values:E,breakpoints:R,mediaQueries:g,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(e,s,l="",c={}){let d=x=>x?(l?l+"-":"")+x:l,p=Object.entries(e),w=[],A=[];for(let x of p){let j=x[1];(typeof j=="object"&&!Array.isArray(j)?w:A).push(x)}for(let[x,j]of w)a(j,s,d(x),c);if(s&&l)A.length&&(c[l]=A.reduce((x,[j,V])=>(x[j]=V,x),{}));else for(let[x,j]of A)c[d(x)]=j;return c}if(t)for(let[e,s]of Object.entries(a(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(a(n,!1))){let l=new RegExp(B(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let d=c.match(/^::-[a-z]+-/m)?.[0]??"",p=this.selectors[d];p||(p=this.selectors[d]=[]);let w=p.find(([A])=>A===l);w||(w=[l,[]],p.push(w)),w[1].push(c)}}E&&(this.globalValues=a(E,!1)),R&&(this.breakpoints=a(R,!1)),g&&(this.mediaQueries=a(g,!1));let u=i?a(i,!1):{},m=y&&!Array.isArray(y)?Object.entries(y).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:l}])=>(e[s]=a(l,!1),e),{}):{},h=[...Object.keys(u),...Object.entries(m).flatMap(([e,s])=>Object.keys(s))],f=e=>{if(e in this.classes)return;let s=this.classes[e]=[],l=(c,d)=>{if(!d)return;let p=Array.isArray(d)?d:d.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let w of p){let A=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(e):this.themeAffectedClassesBy[x][c]=[e]:this.themeAffectedClassesBy[x]={[c]:[e]},s.includes(x)||s.push(x)};if(h.includes(w)){f(w);for(let x of this.classes[w])A(x)}else A(w)}};l("",u?.[e]);for(let[c,d]of Object.entries(m))l(c,d?.[e])};for(let e of h)f(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let l of Object.values(this.themeAffectedClassesBy[e]))for(let c of l)s.includes(c)||s.push(c)}let o=(e,s)=>{if(!s)return;let l=a(s,!0);for(let[c,d]of Object.entries(l)){let p=typeof d=="string"?{"":d}:d;for(let[w,A]of Object.entries(p)){let x=c+(w?"-"+w:"");x in this.colorThemesMap?this.colorThemesMap[x][e]=A:this.colorThemesMap[x]={[e]:A}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(o("",b),y)if(Array.isArray(y))this.themeNames.push(...y);else for(let e in y){let s=y[e];o(e,s.colors),this.themeNames.push(e)}let r=e=>{for(let[s,l]of Object.entries(this.colorThemesMap))for(let[c,d]of Object.entries(l))d.startsWith("#")||e(s,l,c,d)};if(r((e,s,l,c)=>{let d=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(d){let p="#"+z(+d[1],+d[2],+d[3]);d[4]&&(p+=Math.round(255*+d[4]).toString(16)),s[l]=p}}),r((e,s,l,c)=>{let[d,p]=c.split("/"),w=this.colorThemesMap[d];if(w){let A=(l?w[l]:void 0)??w[""];s[l]=p?A.slice(0,7)+Math.round(255*+p).toString(16):A}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[l],Object.keys(s).length||delete this.colorThemesMap[e]}),C)for(let e in C){let s=C[e],{native:l,values:c,colored:d}=s,p=s.match;if(s.id=e,s.native=l===!0?e.replace(/(?!^)[A-Z]/g,w=>"-"+w).toLowerCase():void 0,c&&(this.values[e]=a(c,!1)),p){let w=Object.keys(this.values[e]??{});p.includes("$values")&&(p=w.length?p.replace(/\$values/,w.join("|")):p.replace(/(?:\|)?\$values/,"")),d&&p.includes("$colors")&&(p=this.colorNames.length?p.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):p.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(p)}}}observe(t,i={subtree:!0,childList:!0}){if(this.root!==t){if(N&&t){this.root=t;let n=t===document;n&&(O.root=this),this.host=n?document.documentElement:root.host;let y=n?document.head:t,b=n?document.styleSheets:t.styleSheets;for(let R of b){let{ownerNode:g}=R;if(g.id==="master"){this.style=g;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let g=this.style.sheet.cssRules[R];if(g.constructor.name==="CSSKeyframesRule")continue;let C=a=>{if(a.selectorText){let m=a.selectorText.split(", ")[0].split(" ");for(let h=0;h<m.length;h++){let f=m[h];if(f[0]==="."){let o=f.slice(1),r="";for(let e=0;e<o.length;e++){let s=o[e],l=o[e+1];if(s==="\\"){if(e++,l!=="\\"){r+=l;continue}}else if(_.includes(s))break;r+=s}if(!(r in this.ruleBy)&&!(r in this.classes)){let e=this.create(r)[0];if(e)return e}}}}else if(a.cssRules)for(let u=0;u<a.cssRules.length;u++){let m=C(a.cssRules[u]);if(m)return m}},B=C(g);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let a=0;a<B.natives.length;a++)B.natives[a].cssRule=this.style.sheet.cssRules[R+a];R+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=F(),y.append(this.style);let E=R=>{R.forEach(g=>{g in this.countBy?this.countBy[g]++:(this.countBy[g]=1,this.insert(g))})};E(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(R=>E(R.classList)),this.observer=new MutationObserver(R=>{let g={},C=[],B=[],a=[],u=(o,r)=>{r?o.classList.forEach(h):o.classList.forEach(m);let e=o.children;for(let s=0;s<e.length;s++){let l=e[s];l.classList&&(B.push(l),u(l,r))}},m=o=>{o in g?g[o]++:g[o]=1},h=o=>{o in g?g[o]--:o in this.countBy&&(g[o]=-1)},f=(o,r)=>{for(let e=0;e<o.length;e++){let s=o[e];s.classList&&!B.includes(s)&&!a.includes(s)&&(s.isConnected!==r?(B.push(s),u(s,r)):a.push(s))}};for(let o=0;o<R.length;o++){let r=R[o],{addedNodes:e,removedNodes:s,type:l,target:c}=r;if(l==="attributes"){if(C.find(d=>d.target===c))continue;C.push(r)}else f(e,!1),(!c.isConnected||!B.includes(c))&&f(s,!0)}if(!(!C.length&&!Object.keys(g).length)){for(let{oldValue:o,target:r}of C){let e=B.includes(r),s=r.classList,l=o?o.split(" "):[];if(e){if(r.isConnected)continue;for(let c of l)s.contains(c)||h(c)}else if(r.isConnected){s.forEach(c=>{l.includes(c)||m(c)});for(let c of l)s.contains(c)||h(c)}}for(let o in g){let r=g[o],e=(this.countBy[o]||0)+r;e===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=e)}}}),this.observer.observe(t,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let t=this.style?.sheet;if(t?.cssRules)for(let i=t.cssRules.length-1;i>=0;i--)t.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(t){for(let i in this.config.rules){let n=this.config.rules[i],y=this.matches[i],{symbol:b,native:E}=n;if(y&&y.test(t))return{origin:"match",config:n};if(b&&t.startsWith(b))return{origin:"symbol",config:n};if(E&&t.startsWith(E+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(t.match(i[0]))return{origin:"semantics",value:i[1]}}create(t){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let y=this.match(n);if(y)return new Q(n,y,this)};return(t in this.classes?this.classes[t].map(n=>i(n)):[i(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=M(T,t),this.cache(),!this.style)return;let i=F();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=O.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let i=this.style?.sheet,n=y=>{let b=this.ruleBy[y];if(!(!b||y in this.classesBy&&this.classesBy[y].some(E=>E in this.countBy))){if(i&&b.natives.length){let E=b.natives[0];for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===E.cssRule){for(let C=0;C<b.natives.length;C++)i.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(b),1),delete this.ruleBy[y],b.config.delete&&b.config.delete.call(b,y)}};if(t in this.classes){for(let y of this.classes[t])y in this.countBy||n(y);delete this.ruleBy[t]}else n(t)}insert(t){let i=this.create(t);return i.length?(this.insertRules(i),!0):!1}insertRules(t){for(let i of t){if(this.ruleBy[i.className])continue;let n,y=Object.keys(this.keyframes).length,b=this.rules.length-1,{media:E,order:R,priority:g,hasWhere:C,className:B}=i,a=(h,f,o)=>{let r=h;for(;r<=b;r++){let e=this.rules[r];if(f?.(e))return o?-1:r-1;if(o?.(e))return r}return o?-1:r-1},u,m;if(E){let h=this.rules.findIndex(f=>f.media);if(h===-1)n=b+1;else{let{"max-width":f,"min-width":o}=E.features;if(f||o){let r=this.rules.findIndex(e=>e.media?.features["max-width"]||e.media?.features["min-width"]);if(r===-1)n=b+1;else if(f&&o){if(g===-1?(u=a(r,e=>e.priority!==-1,e=>e.media.features["max-width"]&&e.media.features["min-width"]),m=a(r,e=>e.priority!==-1)):(u=a(r,void 0,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),m=b),u!==-1){let e=f.value-o.value,s=m,l=u;for(u=void 0;s>=l;s--){let{"max-width":c,"min-width":d}=this.rules[s].media.features,p=c.value-d.value;if(p<e)m=s-1;else if(p===e)u=s;else break}}if(u!==-1){let e=f.value-o.value;for(let s=m;s>=u;s--){let{"max-width":l,"min-width":c}=this.rules[s].media.features,d=l.value-c.value;if(d<e)m=s-1;else if(d>e){u=s+1;break}}}}else if(o){if(g===-1?(u=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]),m=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1)):(u=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),m=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1)),u!==-1)for(let e=m;e>=u;e--){let s=this.rules[e].media.features["min-width"].value;if(s>o.value)m=e-1;else if(s<o.value){u=e+1;break}}}else if(g===-1?(u=a(r,e=>e.media.features["min-width"]||e.priority!==-1,e=>e.media.features["max-width"]),m=a(r,e=>e.media.features["min-width"]||e.priority!==-1)):(u=a(r,e=>e.media.features["min-width"]&&e.priority!==-1,e=>e.media.features["max-width"]&&e.priority!==-1),m=a(r,e=>e.media.features["min-width"]&&e.priority!==-1)),u!==-1)for(let e=m;e>=u;e--){let s=this.rules[e].media.features["max-width"].value;if(s<f.value)m=e-1;else if(s>f.value){u=e+1;break}}}else g===-1?(u=h,m=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]||r.priority!==-1)):(u=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"],r=>r.priority!==-1),m=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]))}}else{let h=y?1:0;g===-1?(u=h,m=a(h,f=>f.media||f.priority!==-1)):(u=a(h,f=>f.media,f=>f.priority!==-1),m=a(h,f=>f.media))}if(n===void 0)if(u===-1)n=m+1;else{if(g===-1)for(let h=u;h<=m;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)&&(C&&!f.hasWhere||f.order>=R)){n=h;break}}else for(let h=u;h<=m;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)){if(C&&!f.hasWhere){n=h;break}if(f.priority<g){n=h;break}else if(f.priority===g){if(f.order>=R){n=h;break}}else n=h+1}}n===void 0&&(n=m+1)}if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let h=this.style.sheet,f=0,o=r=>{let e=this.rules[r];if(e){if(!e.natives.length)return o(r-1);let s=e.natives[e.natives.length-1].cssRule;for(let l=0;l<h.cssRules.length;l++)if(h.cssRules[l]===s){f=l+1;break}}};o(n-1);for(let r=0;r<i.natives.length;)try{let e=i.natives[r];h.insertRule(e.text,f),e.cssRule=h.cssRules[f++],r++}catch(e){console.error(e),i.natives.splice(r,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(t=>t.text).join("")}},k=O;S(k,"root"),S(k,"config",T),S(k,"instances",[]),S(k,"refresh",t=>{for(let i of O.instances)i.refresh(t)});N&&(window.MasterCSS=k);export{k as MasterCSS};
|
|
1
|
+
var D=Object.defineProperty;var H=(v,t,i)=>t in v?D(v,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):v[t]=i;var S=(v,t,i)=>(H(v,typeof t!="symbol"?t+"":t,i),i);function W(v){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&v instanceof t||v instanceof Date||v instanceof RegExp)}function I(v){if(typeof Buffer<"u"&&Buffer&&v instanceof Buffer){let t=Buffer.alloc(v.length);return v.copy(t),t}else{if(v instanceof Date)return new Date(v.getTime());if(v instanceof RegExp)return new RegExp(v);throw new Error("Unexpected situation")}}function $(v){let t=[];return v.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?t[n]=$(i):W(i)?t[n]=I(i):t[n]=M({},i):t[n]=i}),t}function L(v,t){return t==="__proto__"?void 0:v[t]}function M(...v){let t={},i,n;return v.forEach(function(y){typeof y!="object"||y===null||Array.isArray(y)||Object.keys(y).forEach(function(b){if(n=L(t,b),i=L(y,b),i!==t)if(typeof i!="object"||i===null){t[b]=i;return}else if(Array.isArray(i)){t[b]=$(i);return}else if(W(i)){t[b]=I(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[b]=M({},i);return}else{t[b]=M(n,i);return}})}),t}import{Rule as Q}from"./rule.mjs";import{config as T}from"./config/index.mjs";import{rgbToHex as z}from"./utils/rgb-to-hex.mjs";import{SELECTOR_SYMBOLS as _}from"./constants/selector-symbols.mjs";var N=typeof window<"u",F=()=>{let v=document.createElement("style");return v.id="master",v},O=class{constructor(t=T){this.config=t;t?.override||(this.config=M(T,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),N&&this.config.observe&&this.observe(document),O.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:t,classes:i,selectors:n,themes:y,colors:b,values:E,breakpoints:R,mediaQueries:g,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(e,s,l="",c={}){let d=x=>x?(l?l+"-":"")+x:l,p=Object.entries(e),w=[],A=[];for(let x of p){let j=x[1];(typeof j=="object"&&!Array.isArray(j)?w:A).push(x)}for(let[x,j]of w)a(j,s,d(x),c);if(s&&l)A.length&&(c[l]=A.reduce((x,[j,V])=>(x[j]=V,x),{}));else for(let[x,j]of A)c[d(x)]=j;return c}if(t)for(let[e,s]of Object.entries(a(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(a(n,!1))){let l=new RegExp(B(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let d=c.match(/^::-[a-z]+-/m)?.[0]??"",p=this.selectors[d];p||(p=this.selectors[d]=[]);let w=p.find(([A])=>A===l);w||(w=[l,[]],p.push(w)),w[1].push(c)}}E&&(this.globalValues=a(E,!1)),R&&(this.breakpoints=a(R,!1)),g&&(this.mediaQueries=a(g,!1));let u=i?a(i,!1):{},m=y&&!Array.isArray(y)?Object.entries(y).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:l}])=>(e[s]=a(l,!1),e),{}):{},h=[...Object.keys(u),...Object.entries(m).flatMap(([e,s])=>Object.keys(s))],f=e=>{if(e in this.classes)return;let s=this.classes[e]=[],l=(c,d)=>{if(!d)return;let p=Array.isArray(d)?d:d.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let w of p){let A=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(e):this.themeAffectedClassesBy[x][c]=[e]:this.themeAffectedClassesBy[x]={[c]:[e]},s.includes(x)||s.push(x)};if(h.includes(w)){f(w);for(let x of this.classes[w])A(x)}else A(w)}};l("",u?.[e]);for(let[c,d]of Object.entries(m))l(c,d?.[e])};for(let e of h)f(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let l of Object.values(this.themeAffectedClassesBy[e]))for(let c of l)s.includes(c)||s.push(c)}let o=(e,s)=>{if(!s)return;let l=a(s,!0);for(let[c,d]of Object.entries(l)){let p=typeof d=="string"?{"":d}:d;for(let[w,A]of Object.entries(p)){let x=c+(w?"-"+w:"");x in this.colorThemesMap?this.colorThemesMap[x][e]=A:this.colorThemesMap[x]={[e]:A}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(o("",b),y)if(Array.isArray(y))this.themeNames.push(...y);else for(let e in y){let s=y[e];o(e,s.colors),this.themeNames.push(e)}let r=e=>{for(let[s,l]of Object.entries(this.colorThemesMap))for(let[c,d]of Object.entries(l))d.startsWith("#")||e(s,l,c,d)};if(r((e,s,l,c)=>{let d=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(d){let p="#"+z(+d[1],+d[2],+d[3]);d[4]&&(p+=Math.round(255*+d[4]).toString(16)),s[l]=p}}),r((e,s,l,c)=>{let[d,p]=c.split("/"),w=this.colorThemesMap[d];if(w){let A=(l?w[l]:void 0)??w[""];s[l]=p?A.slice(0,7)+Math.round(255*+p).toString(16):A}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[l],Object.keys(s).length||delete this.colorThemesMap[e]}),C)for(let e in C){let s=C[e],{native:l,values:c,colored:d}=s,p=s.match;if(s.id=e,s.native=l===!0?e.replace(/(?!^)[A-Z]/g,w=>"-"+w).toLowerCase():void 0,c&&(this.values[e]=a(c,!1)),p){let w=Object.keys(this.values[e]??{});p.includes("$values")&&(p=w.length?p.replace(/\$values/,w.join("|")):p.replace(/(?:\|)?\$values/,"")),d&&p.includes("$colors")&&(p=this.colorNames.length?p.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):p.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(p)}}}observe(t,i={subtree:!0,childList:!0}){if(this.root!==t){if(N&&t){this.root=t;let n=t===document;n&&(O.root=this),this.host=n?document.documentElement:this.root.host;let y=n?document.head:t,b=n?document.styleSheets:t.styleSheets;for(let R of b){let{ownerNode:g}=R;if(g.id==="master"){this.style=g;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let g=this.style.sheet.cssRules[R];if(g.constructor.name==="CSSKeyframesRule")continue;let C=a=>{if(a.selectorText){let m=a.selectorText.split(", ")[0].split(" ");for(let h=0;h<m.length;h++){let f=m[h];if(f[0]==="."){let o=f.slice(1),r="";for(let e=0;e<o.length;e++){let s=o[e],l=o[e+1];if(s==="\\"){if(e++,l!=="\\"){r+=l;continue}}else if(_.includes(s))break;r+=s}if(!(r in this.ruleBy)&&!(r in this.classes)){let e=this.create(r)[0];if(e)return e}}}}else if(a.cssRules)for(let u=0;u<a.cssRules.length;u++){let m=C(a.cssRules[u]);if(m)return m}},B=C(g);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let a=0;a<B.natives.length;a++)B.natives[a].cssRule=this.style.sheet.cssRules[R+a];R+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=F(),y.append(this.style);let E=R=>{R.forEach(g=>{g in this.countBy?this.countBy[g]++:(this.countBy[g]=1,this.insert(g))})};E(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(R=>E(R.classList)),this.observer=new MutationObserver(R=>{let g={},C=[],B=[],a=[],u=(o,r)=>{r?o.classList.forEach(h):o.classList.forEach(m);let e=o.children;for(let s=0;s<e.length;s++){let l=e[s];l.classList&&(B.push(l),u(l,r))}},m=o=>{o in g?g[o]++:g[o]=1},h=o=>{o in g?g[o]--:o in this.countBy&&(g[o]=-1)},f=(o,r)=>{for(let e=0;e<o.length;e++){let s=o[e];s.classList&&!B.includes(s)&&!a.includes(s)&&(s.isConnected!==r?(B.push(s),u(s,r)):a.push(s))}};for(let o=0;o<R.length;o++){let r=R[o],{addedNodes:e,removedNodes:s,type:l,target:c}=r;if(l==="attributes"){if(C.find(d=>d.target===c))continue;C.push(r)}else f(e,!1),(!c.isConnected||!B.includes(c))&&f(s,!0)}if(!(!C.length&&!Object.keys(g).length)){for(let{oldValue:o,target:r}of C){let e=B.includes(r),s=r.classList,l=o?o.split(" "):[];if(e){if(r.isConnected)continue;for(let c of l)s.contains(c)||h(c)}else if(r.isConnected){s.forEach(c=>{l.includes(c)||m(c)});for(let c of l)s.contains(c)||h(c)}}for(let o in g){let r=g[o],e=(this.countBy[o]||0)+r;e===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=e)}}}),this.observer.observe(t,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let t=this.style?.sheet;if(t?.cssRules)for(let i=t.cssRules.length-1;i>=0;i--)t.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(t){for(let i in this.config.rules){let n=this.config.rules[i],y=this.matches[i],{symbol:b,native:E}=n;if(y&&y.test(t))return{origin:"match",config:n};if(b&&t.startsWith(b))return{origin:"symbol",config:n};if(E&&t.startsWith(E+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(t.match(i[0]))return{origin:"semantics",value:i[1]}}create(t){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let y=this.match(n);if(y)return new Q(n,y,this)};return(t in this.classes?this.classes[t].map(n=>i(n)):[i(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=M(T,t),this.cache(),!this.style)return;let i=F();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=O.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let i=this.style?.sheet,n=y=>{let b=this.ruleBy[y];if(!(!b||y in this.classesBy&&this.classesBy[y].some(E=>E in this.countBy))){if(i&&b.natives.length){let E=b.natives[0];for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===E.cssRule){for(let C=0;C<b.natives.length;C++)i.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(b),1),delete this.ruleBy[y],b.config.delete&&b.config.delete.call(b,y)}};if(t in this.classes){for(let y of this.classes[t])y in this.countBy||n(y);delete this.ruleBy[t]}else n(t)}insert(t){let i=this.create(t);return i.length?(this.insertRules(i),!0):!1}insertRules(t){for(let i of t){if(this.ruleBy[i.className])continue;let n,y=Object.keys(this.keyframes).length,b=this.rules.length-1,{media:E,order:R,priority:g,hasWhere:C,className:B}=i,a=(h,f,o)=>{let r=h;for(;r<=b;r++){let e=this.rules[r];if(f?.(e))return o?-1:r-1;if(o?.(e))return r}return o?-1:r-1},u,m;if(E){let h=this.rules.findIndex(f=>f.media);if(h===-1)n=b+1;else{let{"max-width":f,"min-width":o}=E.features;if(f||o){let r=this.rules.findIndex(e=>e.media?.features["max-width"]||e.media?.features["min-width"]);if(r===-1)n=b+1;else if(f&&o){if(g===-1?(u=a(r,e=>e.priority!==-1,e=>e.media.features["max-width"]&&e.media.features["min-width"]),m=a(r,e=>e.priority!==-1)):(u=a(r,void 0,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),m=b),u!==-1){let e=f.value-o.value,s=m,l=u;for(u=void 0;s>=l;s--){let{"max-width":c,"min-width":d}=this.rules[s].media.features,p=c.value-d.value;if(p<e)m=s-1;else if(p===e)u=s;else break}}if(u!==-1){let e=f.value-o.value;for(let s=m;s>=u;s--){let{"max-width":l,"min-width":c}=this.rules[s].media.features,d=l.value-c.value;if(d<e)m=s-1;else if(d>e){u=s+1;break}}}}else if(o){if(g===-1?(u=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]),m=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1)):(u=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),m=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1)),u!==-1)for(let e=m;e>=u;e--){let s=this.rules[e].media.features["min-width"].value;if(s>o.value)m=e-1;else if(s<o.value){u=e+1;break}}}else if(g===-1?(u=a(r,e=>e.media.features["min-width"]||e.priority!==-1,e=>e.media.features["max-width"]),m=a(r,e=>e.media.features["min-width"]||e.priority!==-1)):(u=a(r,e=>e.media.features["min-width"]&&e.priority!==-1,e=>e.media.features["max-width"]&&e.priority!==-1),m=a(r,e=>e.media.features["min-width"]&&e.priority!==-1)),u!==-1)for(let e=m;e>=u;e--){let s=this.rules[e].media.features["max-width"].value;if(s<f.value)m=e-1;else if(s>f.value){u=e+1;break}}}else g===-1?(u=h,m=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]||r.priority!==-1)):(u=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"],r=>r.priority!==-1),m=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]))}}else{let h=y?1:0;g===-1?(u=h,m=a(h,f=>f.media||f.priority!==-1)):(u=a(h,f=>f.media,f=>f.priority!==-1),m=a(h,f=>f.media))}if(n===void 0)if(u===-1)n=m+1;else{if(g===-1)for(let h=u;h<=m;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)&&(C&&!f.hasWhere||f.order>=R)){n=h;break}}else for(let h=u;h<=m;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)){if(C&&!f.hasWhere){n=h;break}if(f.priority<g){n=h;break}else if(f.priority===g){if(f.order>=R){n=h;break}}else n=h+1}}n===void 0&&(n=m+1)}if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let h=this.style.sheet,f=0,o=r=>{let e=this.rules[r];if(e){if(!e.natives.length)return o(r-1);let s=e.natives[e.natives.length-1].cssRule;for(let l=0;l<h.cssRules.length;l++)if(h.cssRules[l]===s){f=l+1;break}}};o(n-1);for(let r=0;r<i.natives.length;)try{let e=i.natives[r];h.insertRule(e.text,f),e.cssRule=h.cssRules[f++],r++}catch(e){console.error(e),i.natives.splice(r,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(t=>t.text).join("")}},k=O;S(k,"root"),S(k,"config",T),S(k,"instances",[]),S(k,"refresh",t=>{for(let i of O.instances)i.refresh(t)});N&&(window.MasterCSS=k);export{k as MasterCSS};
|
package/dist/index.browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var We=Object.defineProperty;var ze=(t,e,i)=>e in t?We(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ne=(t,e,i)=>(ze(t,typeof e!="symbol"?e+"":e,i),i);function ve(t){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&t instanceof e||t instanceof Date||t instanceof RegExp)}function xe(t){if(typeof Buffer<"u"&&Buffer&&t instanceof Buffer){let e=Buffer.alloc(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function ye(t){let e=[];return t.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?e[n]=ye(i):ve(i)?e[n]=xe(i):e[n]=G({},i):e[n]=i}),e}function be(t,e){return e==="__proto__"?void 0:t[e]}function G(...t){let e={},i,n;return t.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(o){if(n=be(e,o),i=be(u,o),i!==e)if(typeof i!="object"||i===null){e[o]=i;return}else if(Array.isArray(i)){e[o]=ye(i);return}else if(ve(i)){e[o]=xe(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){e[o]=G({},i);return}else{e[o]=G(n,i);return}})}),e}var re={"(":")","'":"'",'"':'"',"{":"}"};function ae(t){if(typeof CSS<"u")return CSS.escape(t);if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let e=String(t),i=e.length,n=-1,u="",o,x=e.charCodeAt(0);if(i==1&&x==45)return"\\"+e;for(;++n<i;){if(o=e.charCodeAt(n),o==0){u+="\uFFFD";continue}if(o>=1&&o<=31||o==127||n==0&&o>=48&&o<=57||n==1&&o>=48&&o<=57&&x==45){u+="\\"+o.toString(16)+" ";continue}if(o>=128||o==45||o==95||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122){u+=e.charAt(n);continue}u+="\\"+e.charAt(n)}return u}var De={unit:"",order:0,separators:[","]},le=class{constructor(e,i={},n){this.className=e;this.meta=i;this.css=n;this.config=G(De,i.config);let{unit:u,order:o,colored:x,native:l,analyze:m,transform:d,declare:v,create:a}=this.config,{scope:h,important:C,functions:w}=n.config,{themeNames:k,colorNames:p,colorThemesMap:c,selectors:r,breakpoints:s,mediaQueries:b,themeAffectedClassesBy:y,globalValues:R}=n,j=y[e];a&&a.call(this,e);let I,Y,A,U,q;if(i.origin==="semantics"){let[W,O]=i.value;U=e.slice(W.length),I=O}else{let W;if(m)[W,A]=m.call(this,e);else if(i.origin==="match"){let B=e.indexOf(":");this.prefix=e.slice(0,B+1),W=e.slice(B+1)}else i.origin==="symbol"&&(this.symbol=e[0],W=e.slice(1));q=[];let O=this,L=this.values,N=[","];this.config.separators.length&&N.push(...this.config.separators);let S="",g=0;(function B(f,M,T,$=void 0,E=[],X=[],z){let Q=$===void 0,F,J=D=>D==="'"||D==='"',ee=()=>F=S.length,Z=()=>{if(S){let D=S,P=Q?D:S.slice(F);if(S="",_="",L&&P in L&&!E.includes(P)){let H=g;g=0,B(L[P].toString(),M,void 0,$,[...E,P],X,z),g=H,Q||(S=S.slice(0,F)+S)}else if(R&&P in R&&!X.includes(P)){let H=g;g=0,B(R[P].toString(),M,void 0,$,E,[...X,P],z),g=H,Q||(S=S.slice(0,F)+S)}else if(Q){let H=!z&&O.analyzeUnitValue(P,M);q.push({value:H?.value??P,unit:H?.unit})}else{let H=!z&&O.analyzeUnitValue(P,M);S=H?D.slice(0,F)+H.value+H.unit:D}ee()}},K=J(T);ee();let _="";for(;g<f.length;g++){let D=f[g];if(D===T){if(K){S+=D;let P=0;for(let H=S.length-2;S[H]==="\\";H--)P++;if(P%2)continue}else Z(),S+=D;return}else if(!K&&D in re){let P=D==="("&&_&&w?.[_];P?.name&&(S=S.slice(0,S.length-_.length)+P.name,_=P.name),S+=D,g++;let H=re[D];B(f,P?.unit??M,H,_||$||"",E,X,z||!!P?.transform),P?.transform&&(S=S.slice(0,F+_.length+1)+P.transform.call(O,S.slice(F+_.length+1,-1))+S.slice(-1)),Q&&(J(H)?(q.push(S),S=""):Z()),_=""}else if((D==="|"||D===" ")&&T!=="}"&&(!K||$==="path"))Z(),Q||(S+=" ",F++);else{if(!K){if(D==="."){if(isNaN(+f[g+1]))break;f[g-1]==="-"&&(S+="0")}else if(N.includes(D)){Z(),Q?q.push(D):(S+=D,F++);continue}else if(Q&&(D==="#"&&(S||q.length&&f[g-1]!=="|"&&q[g-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(D)))break;_+=D}S+=D}}$===void 0&&Z()})(W,u),U=W.slice(g)}this.order=typeof o=="function"?o.call(this,this.prefix):o,U[0]==="!"&&(this.important=!0,U=U.slice(1));let pe=W=>{let O=W.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((g,B)=>B%3?g:g.replace(/_/g," ")).join(""),L=[],N="",S=0;for(let g=0;g<O.length;g++){let B=O[g];if(B==="\\"){N+=B+O[++g];continue}!S&&B===","?(L.push(N),N=""):(N+=B,S&&B===")"?S--:B==="("&&S++)}return N&&L.push(N),L};this.prefixSelectors=A?pe(A):[""];let de=U.split("@"),fe=de[0];if(fe){this.vendorSuffixSelectors={};let W=(g,B,f,M)=>{for(let[T,$]of B)if(T.test(g)){for(let E of $)W(g.replace(T,E),B,f,!0);return}M&&f.push(g)},O=[];""in r?W(fe,r[""],O,!0):O.push(fe);let L={};for(let[g,B]of Object.entries(r)){if(!g)continue;let f=[];for(let M of O)W(M,B,f,!1);f.length&&(L[g]=f)}let N=(g,B)=>{let f=B.reduce((M,T)=>(M.push(...pe(T)),M),[]);g in this.vendorSuffixSelectors?this.vendorSuffixSelectors[g].push(...f):this.vendorSuffixSelectors[g]=f},S=Object.keys(L);if(S.length)for(let g of S)N(g,L[g]);else N("",O);for(let g of Object.values(this.vendorSuffixSelectors))for(let B of g){this.hasWhere!==!1&&(this.hasWhere=B.includes(":where("));let f=[":disabled",":active",":focus",":hover"];for(let M=0;M<f.length;M++)if(B.includes(f[M])){(this.priority===-1||this.priority>M)&&(this.priority=M);break}}}else this.vendorSuffixSelectors={"":[""]};for(let W=1;W<de.length;W++){let O=de[W];if(O)if(k.includes(O))this.theme=O;else if(O==="rtl"||O==="ltr")this.direction=O;else{let L,N,S=O.indexOf("_");if(S!==-1)L=O.slice(0,S),N=O.slice(S);else{let g=O.indexOf("(");g!==-1&&(L=O.slice(0,g),N=O.slice(g))}if(!L){L="media";let g=[];this.media={token:O,features:{}};let B=O.split("&");for(let f of B)if(f==="all"||f==="print"||f==="screen"||f==="speech")this.media.type=f;else if(f==="\u{1F5A8}")this.media.type="print";else if(f==="landscape"||f==="portrait")g.push("(orientation:"+f+")");else if(f==="motion"||f==="reduced-motion")g.push("(prefers-reduced-motion:"+(f==="motion"?"no-preference":"reduce")+")");else if(b&&f in b)g.push(b[f]);else{let M={token:f},T="",$="",E=0;f.startsWith("<=")?($="<=",T="max-width"):f.startsWith(">=")||s[f]?($=">=",T="min-width"):f.startsWith(">")?($=">",T="min-width",E=.02):f.startsWith("<")&&($="<",T="max-width",E=-.02);let X=$?f.replace($,""):f,z=s[X];switch(T){case"max-width":case"min-width":z?Object.assign(M,this.analyzeUnitValue(z.toString(),"px")):Object.assign(M,this.analyzeUnitValue(X,"px")),M.unit==="px"&&(M.value+=E),this.media.features[T]=M,g.push("("+T+":"+(M.value+M.unit)+")");break}}N="",this.media.type&&(N=this.media.type),g.length&&(N+=(N?" and ":"")+g.join(" and "))}N&&(this.at[L]=(L in this.at?this.at[L]+" and ":"")+N.replace(/_/g," "))}}let me=(W,O)=>{let L,N=(B,f,M)=>{let T="";this.direction&&(T+="[dir="+this.direction+"] ");let $=this.prefixSelectors.map(z=>z+T),E=(z,Q)=>$.map(F=>(z?"."+z+" ":"")+(h?h+" ":"")+F).reduce((F,J)=>(F.push(M.reduce((ee,Z)=>(ee.push(J+"."+ae(Q)+Z),ee),[]).join(",")),F),[]).join(","),X=E(f,e)+(j?Object.entries(j).filter(([z])=>this.theme||!x||!f||!z||z===f).map(([z,Q])=>Q.reduce((F,J)=>F+","+E(this.theme??((x||Y)&&f||z),J),"")).join(""):"")+"{"+B+"}";for(let z of Object.keys(this.at).sort((Q,F)=>F==="supports"?-1:1))X="@"+z+" "+this.at[z]+"{"+X+"}";return X},S=[];if(q){let B=[this.theme??W,""],f,M=!1;for(let T of q)if(typeof T=="string")S.push(T);else{let $=T.value;if(T.unit)$+=T.unit;else if(x&&c&&p){let E=!1;$=$.replace(new RegExp(`(^|,| |\\()((?:${p.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(X,z,Q,F)=>{let J=c[Q];if(J){let ee,Z;for(let K of B)if(ee=J[K]){Z=K;break}if(ee){E=!O||Z===W,f||(f=E);let K=ee;if(F){let _=F.endsWith("%")?parseFloat(F)/100:+F;_=isNaN(_)?1:Math.min(Math.max(_,0),1),K+=Math.round(_*255).toString(16).toUpperCase().padStart(2,"0")}return z+K}else M=!0}return X})}S.push($)}if(O&&(M||(f===void 0?W:!f)))return;if(L=S.reduce((T,$,E)=>T+$+($===","||q[E+1]===","||E===q.length-1?"":" "),""),d&&(L=d.call(this,L,this.css.config)),x&&L==="current"&&(L="currentColor"),v){let T,$;if(q.length===1){let E=q[0];typeof E=="object"&&(T=E.value,$=E.unit)}I=v.call(this,$?T:L,$||"")}else I={[l]:L}}let g={};for(let B in I){let f=($,E)=>{let X=E+((this.important||C)&&!E.endsWith("!important")?"!important":"");$ in g?g[$].push(X):g[$]=[X]},M=B+":",T=I[B];if(typeof T=="object")if(Array.isArray(T))for(let $ of T)f(W,M+$.toString());else{Y=!0;for(let $ in T)f($,M+T[$])}else f(W,M+T.toString())}for(let B of Object.values(this.vendorSuffixSelectors))for(let f in g)this.natives.push({text:N(g[f].join(";"),f,B),theme:f})};if(this.theme)me(this.theme,!1);else if(x)for(let W of k)me(W,!0);else me("",!1)}at={};priority=-1;natives=[];keyframeNames;config;get values(){return this.css.values[this.config.id]}get text(){return this.natives.map(e=>e.text).join("")}resolveValue(e,i){return Number.isNaN(+e)?e:e/(i==="rem"||i==="em"?this.css.config.rootSize:1)+i}analyzeUnitValue(e,i){let n=i??this.config.unit;if(n){let u="",o=e.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(o)if(e.includes("/")){let[x,l]=e.split("/");return{value:+x/+l*100+"%",unit:u}}else{let x=+o[1];return u=o[3]||"",u||((n==="rem"||n==="em")&&(x=x/this.css.config.rootSize),u=n||""),{value:x,unit:u}}}}};var we={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560};function oe(t){t.startsWith("#")&&(t=t.slice(1));let e=t.match(/.{1,2}/g);return[parseInt(e[0],16),parseInt(e[1],16),parseInt(e[2],16)]}function ce(t,e,i){return((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)}function V(t){typeof t=="string"&&(t={"":t});let e=""in t,i=!1;for(let n in t)if(n&&+n>=100){i=!0;break}if(!i&&(!e||Object.keys(t).length>1)){let n=0,u="0"in t?oe(t[0]):[0,0,0],o,x,l=[],m=()=>{let d=o-n,v=x.map((a,h)=>(a-u[h])/d);for(let a of l){let h=a-n,C=u.map((w,k)=>Math.round(w+v[k]*h));t[a]="#"+ce.call(this,...C)}};for(let d=1;d<100;d++)d in t?(l.length?(o=d,x=oe(t[d]),m(),l.length=0,u=x):u=oe(t[d]),n=d):l.push(d);l.length&&(o=100,x="100"in t?oe(t[100]):[255,255,255],m())}return e||(t[""]=t[i?"500":"50"]),t}var ke={black:"#000000",white:"#ffffff",slate:V({5:"#141e2b",10:"#19212d",20:"#262f3e",30:"#323e52",40:"#41516b",50:"#616a84",55:"#6c7693",60:"#959db3",70:"#a3abbf",80:"#d7dae3",95:"#f6f7f8"}),gray:V({5:"#1e1d1f",10:"#212022",20:"#2f2e30",30:"#3e3d40",40:"#504f52",50:"#6b6a6d",55:"#777679",60:"#9e9da0",70:"#abaaae",80:"#dad9db",95:"#f5f4f7"}),brown:V({5:"#271b15",10:"#2b1e18",20:"#3c2b22",30:"#50382c",40:"#694839",50:"#8d604b",55:"#9d6b53",60:"#b79788",70:"#c1a598",80:"#efd5c9",95:"#faf2ef"}),orange:V({5:"#2e1907",10:"#331b07",20:"#47260b",30:"#5d320e",40:"#7a4111",50:"#a15717",55:"#b4611a",60:"#e38739",70:"#e79855",80:"#f7d4b5",95:"#fcf1e7"}),gold:V({5:"#281b00",10:"#2d1e01",20:"#3f2a00",30:"#543800",40:"#6d4900",50:"#906000",55:"#9c6d00",60:"#d09100",70:"#dca000",80:"#fbd67f",95:"#fff3d8"}),yellow:V({5:"#251d00",10:"#282000",20:"#3a2e01",30:"#4b3b00",40:"#624e00",50:"#806700",55:"#8e7200",60:"#be9900",70:"#d0a700",80:"#edda8f",95:"#fff5ca"}),grass:V({5:"#162106",10:"#182406",20:"#223308",30:"#2c4408",40:"#3a570b",50:"#4e750e",60:"#74ae15",70:"#7dbc17",80:"#bfe87c",95:"#ebfad4"}),green:V({5:"#042311",10:"#032611",20:"#023717",30:"#03481f",40:"#025d26",50:"#067b34",55:"#07883a",60:"#09b64d",70:"#0ac553",80:"#80f1a4",95:"#e0fae8"}),beryl:V({5:"#002319",10:"#00271c",20:"#003626",30:"#004732",40:"#005c41",50:"#007954",55:"#00875e",60:"#00b37c",70:"#00c387",80:"#72f0c5",95:"#d6fcef"}),teal:V({5:"#012220",10:"#012624",20:"#003532",30:"#004541",40:"#005a54",50:"#00776f",55:"#00857c",60:"#00b1a5",70:"#00bfb2",80:"#6aeee5",95:"#d4fcf8"}),cyan:V({5:"#00222b",10:"#00252e",20:"#013340",30:"#004457",40:"#00576f",50:"#007391",55:"#0080a1",60:"#00abd7",70:"#00b9e9",80:"#97e6fa",95:"#dff8ff"}),sky:V({5:"#031f34",10:"#032339",20:"#04314e",30:"#044169",40:"#065386",50:"#086eb3",55:"#097ac5",60:"#29a4f5",70:"#4db3f7",80:"#b3e0ff",95:"#eaf6fe"}),blue:V({5:"#07194a",10:"#081c53",20:"#0a2773",30:"#0e3496",40:"#1146b6",50:"#175fe9",55:"#2671ea",60:"#6b9ef1",70:"#81acf3",80:"#c6dbfe",95:"#edf4fe"}),indigo:V({5:"#1f1645",10:"#20174f",20:"#2b1f74",30:"#37289d",40:"#463fb1",50:"#5a5bd5",55:"#6464f1",60:"#9393f5",70:"#a1a5ee",80:"#d5d7fe",95:"#f1f2ff"}),violet:V({5:"#2b0a4e",10:"#2e0b57",20:"#3d1179",30:"#4e169f",40:"#5f2eba",50:"#7949e5",55:"#8755f5",60:"#ac8af8",70:"#b89bf9",80:"#e1d4fe",95:"#f5f1ff"}),purple:V({5:"#2e0c47",10:"#330c4e",20:"#460f6c",30:"#5b1390",40:"#7421b1",50:"#9832e4",55:"#a348e7",60:"#c184ef",70:"#ca96f1",80:"#ead1fe",95:"#f9f0ff"}),fuchsia:V({5:"#39092a",10:"#400932",20:"#560d4a",30:"#6f1165",40:"#8c158a",50:"#b61cbb",55:"#ca1fce",60:"#e66ee9",70:"#ea86ed",80:"#facbfb",95:"#feefff"}),pink:V({5:"#3d0722",10:"#430725",20:"#5d0933",30:"#790d44",40:"#9a1058",50:"#ca1473",55:"#e11681",60:"#f170b4",70:"#f388c0",80:"#fdcde6",95:"#fff0f8"}),crimson:V({5:"#430213",10:"#470314",20:"#62041c",30:"#800524",40:"#9f1036",50:"#ce1a4b",55:"#e8144c",60:"#f37596",70:"#f58ba7",80:"#fdceda",95:"#fff1f4"}),red:V({5:"#450001",10:"#490102",20:"#640304",30:"#800506",40:"#a11012",50:"#d11a1e",55:"#ed0a0e",60:"#f97476",70:"#fa8b8d",80:"#fdcfcf",95:"#fff1f1"})};var Se="";var Ce={"::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 Re={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"},overflowed:{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"},"gradient-text":{"-webkit-text-fill-color":"transparent","-webkit-background-clip":"text","background-clip":"text"}};var $e=["dark","light"];var Ne={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(t){let e=0;for(;e<t.length&&!(t[e]==="{"&&t[e-1]!=="\\");e++);return[t.slice(e),t.slice(0,e)]},declare(t){let e={},i=(d,v)=>{let a=v.indexOf(":");if(a!==-1){d in e||(e[d]={});let h=e[d],C=v.slice(0,a);C in h||(h[C]=v.slice(a+1))}},n=d=>{let v=(a,h)=>{let C=h.slice(ae(d.className).length).match(/\{(.*)\}/)[1].split(";");for(let w of C)i(a,w)};if(this.theme){let a=d.natives.find(h=>h.theme===this.theme)??d.natives.find(h=>!h.theme);a&&v(this.theme,a.text)}else for(let a of d.natives)v(a.theme,a.text)},u=[],o="",x=()=>{o&&(u.push(o.replace(/ /g,"")),o="")},l=1;(function d(v){for(;l<t.length;l++){let a=t[l];if(!v){if(a===";"){x();continue}if(a==="}")break}if(o+=a,v===a){if(v==="'"||v==='"'){let h=0;for(let C=o.length-2;o[C]==="\\";C--)h++;if(h%2)continue}break}else a in re&&v!=="'"&&v!=='"'&&(l++,d(re[a]))}})(void 0),x();for(let d of u){let v=this.css.create(d);if(Array.isArray(v))for(let a of v)n(a);else v?n(v):i(this.theme??"",d)}let m={};for(let d in e)for(let[v,a]of Object.entries(e[d]))v in m?m[v][d]=a:m[v]={[d]:a};return m}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(t){return{["--"+this.prefix.slice(1,-1)]:t}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(t){switch(t){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(t,e){return{"margin-left":t+e,"margin-right":t+e}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(t,e){return{"margin-top":t+e,"margin-bottom":t+e}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(t,e){return{"padding-left":t+e,"padding-right":t+e}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(t,e){return{"padding-top":t+e,"padding-bottom":t+e}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t]},declare(t){let[e,i]=t.split(" x ");return{width:e,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,i]=t.split(" x ");return{"min-width":e,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,i]=t.split(" x ");return{"max-width":e,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(t,e){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":t+e}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0,declare(t,e){return t==="overlay"?{"overflow-x":["auto",t]}:{"overflow-x":t}}},overflowY:{native:!0,declare(t,e){return t==="overlay"?{"overflow-y":["auto",t]}:{"overflow-y":t}}},overflow:{native:!0,order:-1,declare(t,e){return t==="overlay"?{overflow:["auto",t]}:{overflow:t}}},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(t,e){return{"user-drag":t+e,"-webkit-user-drag":t+e}}},userSelect:{native:!0,declare(t,e){return{"user-select":t+e,"-webkit-user-select":t+e}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(t,e){return{"font-size":t+e,"line-height":e==="em"?t+.875+e:`calc(${t}${e} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-fill-color":t+e}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(t,e){return{"-webkit-text-stroke-width":t+e}}},textStrokeColor:{match:"^text-stroke:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-stroke-color":t+e}}},textStroke:{unit:"rem",native:!0,declare(t,e){return{"-webkit-text-stroke":t+e}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(t){return Te.call(this,t)},delete(t){return Be.call(this,t)},insert(){return Me.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(t){return Te.call(this,t)},delete(t){return Be.call(this,t)},insert(){return Me.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(t,e){return{"border-left-color":t+e,"border-right-color":t+e}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(t,e){return{"border-top-color":t+e,"border-bottom-color":t+e}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(t,e){return{"border-top-left-radius":t+e,"border-top-right-radius":t+e}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(t,e){return{"border-bottom-left-radius":t+e,"border-bottom-right-radius":t+e}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(t,e){return{"border-top-left-radius":t+e,"border-bottom-left-radius":t+e}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(t,e){return{"border-top-right-radius":t+e,"border-bottom-right-radius":t+e}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(t,e){return{"border-left-style":t+e,"border-right-style":t+e}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(t,e){return{"border-top-style":t+e,"border-bottom-style":t+e}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(t,e){return{"border-left-width":t+e,"border-right-width":t+e}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(t,e){return{"border-top-width":t+e,"border-bottom-width":t+e}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(t){return{"border-left":t,"border-right":t}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(t){return{"border-top":t,"border-bottom":t}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(t,e){return{"-webkit-background-clip":t+e,"background-clip":t+e}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)|gradient\\(.*\\))(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"},analyze(t){if(t.startsWith("gradient"))return["linear-"+t];let e=t.indexOf(":");return this.prefix=t.slice(0,e+1),[t.slice(e+1)]}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"backdrop-filter":t+e,"-webkit-backdrop-filter":t+e}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridColumns:{match:"^grid-cols:.",declare(t,e){return{display:"grid","grid-template-columns":"repeat("+t+e+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridRows:{match:"^grid-rows:.",declare(t,e){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+t+e+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(t,e){return{"box-decoration-break":t+e,"-webkit-box-decoration-break":t+e}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-margin-left":t+e,"scroll-margin-right":t+e}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-margin-top":t+e,"scroll-margin-bottom":t+e}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-padding-left":t+e,"scroll-padding-right":t+e}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-padding-top":t+e,"scroll-padding-bottom":t+e}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(t,e){return{"mask-image":t+e,"-webkit-mask-image":t+e}}}},je=Ne;function Te(t){if(!this.css.config.keyframes)return;let e=(this.meta.origin==="symbol"?t.slice(this.meta.config.symbol.length):t.slice(t.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);e?.length&&(this.keyframeNames=e)}function Be(){if(this.keyframeNames?.length){let t=this.css.rules[0];for(let e of this.keyframeNames){let i=this.css.keyframes[e];if(!--i.count){let n=t.natives.indexOf(i.native);this.css.style.sheet.deleteRule(n),t.natives.splice(n,1),delete this.css.keyframes[e]}}t.natives.length||this.css.rules.splice(0,1)}}function Me(){if(this.keyframeNames){let{config:t,keyframes:e,style:i,rules:n}=this.css,u=i?.sheet;for(let o of this.keyframeNames)if(o in e)e[o].count++;else{let x={text:`@keyframes ${o}{`+Object.entries(t.keyframes[o]).map(([m,d])=>`${m}{${Object.entries(d).map(([v,a])=>v+":"+a).join(";")}}`).join("")+"}",theme:""},l;if(Object.keys(e).length?(l=n[0]).natives.push(x):n.splice(0,0,l={natives:[x],get text(){return this.natives.map(m=>m.text).join("")}}),u){let m;for(let d=0;d<u.cssRules.length;d++){let v=u.cssRules[d];if(v.constructor.name!=="CSSKeyframesRule")break;if(v.name===o){m=v;break}}if(m)x.cssRule=m;else{let d=l.natives.length-1;u.insertRule(x.text,d),x.cssRule=u.cssRules[d]}}e[o]={native:x,count:1}}}}var Oe={fade:{"0%":{opacity:0},to:{opacity:1}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},to:{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,to":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(.8,0,1,1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0,0,.2,1)"}},ping:{"75%,to":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},to:{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},to:{transform:"none"}}};var he={$:{name:"var",transform(t){return"--"+t}},calc:{transform(t){let e="",i,n="",u=!1,o=(x,l="",m="")=>{if(i===2&&!u){let d=this.analyzeUnitValue(n,he.calc.unit);d&&(n=d.value+d.unit)}e+=n+l+x+m,i=null,u=!1,n=""};for(let x=0;x<t.length;x++){let l=t[x];if(l==="("||l===")")o(l);else if(l===",")o(l,""," ");else if(l==="-"&&i!==1){let m=t[x-1];m==="("?e+=l:m===")"?o(l," "," "):isNaN(+t[x+1])?m==="-"?(o(l),i=1):o(l," "," "):o(l,n?" ":"",n?" ":"")}else if(l==="+"||l==="*"||l==="/")o(l," "," ");else{switch(i){case 1:break;case 2:l!=="."&&!/[0-9]/.test(l)&&(u=!0);break;default:i=isNaN(+l)?1:2}i?n+=l:e+=l}}return o(""),e}},translate:{unit:"rem"},translateX:{unit:"rem"},translateY:{unit:"rem"},translateZ:{unit:"rem"},translate3d:{unit:"rem"},skew:{unit:"deg"},skewX:{unit:"deg"},skewY:{unit:"deg"},skewZ:{unit:"deg"},skew3d:{unit:"deg"},rotate:{unit:"deg"},rotateX:{unit:"deg"},rotateY:{unit:"deg"},rotateZ:{unit:"deg"},rotate3d:{unit:"deg"},blur:{unit:"rem"},"drop-shadow":{unit:"rem"},"hue-rotate":{unit:"deg"},rgb:{unit:""},rgba:{unit:""},hsl:{unit:""},hsla:{unit:""},repeat:{unit:""}};var se={breakpoints:we,colors:ke,rootSize:16,scope:Se,selectors:Ce,semantics:Re,themes:$e,rules:je,override:!1,observe:!0,important:!1,functions:he,keyframes:Oe};var Ie=[",",".","#","[","!","*",">","+","~",":","@"];var ge=typeof window<"u",Ae=()=>{let t=document.createElement("style");return t.id="master",t},ie=class{constructor(e=se){this.config=e;e?.override||(this.config=G(se,e),"keyframes"in e&&Object.assign(this.config.keyframes,e.keyframes)),this.cache(),ge&&this.config.observe&&this.observe(document),ie.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:i,selectors:n,themes:u,colors:o,values:x,breakpoints:l,mediaQueries:m,rules:d}=this.config;function v(r){return r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(r,s,b="",y={}){let R=A=>A?(b?b+"-":"")+A:b,j=Object.entries(r),I=[],Y=[];for(let A of j){let U=A[1];(typeof U=="object"&&!Array.isArray(U)?I:Y).push(A)}for(let[A,U]of I)a(U,s,R(A),y);if(s&&b)Y.length&&(y[b]=Y.reduce((A,[U,q])=>(A[U]=q,A),{}));else for(let[A,U]of Y)y[R(A)]=U;return y}if(e)for(let[r,s]of Object.entries(a(e,!0)))this.semantics.push([new RegExp("^"+v(r)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[r,s]]);if(n)for(let[r,s]of Object.entries(a(n,!1))){let b=new RegExp(v(r)+"(?![a-z-])");for(let y of Array.isArray(s)?s:[s]){let R=y.match(/^::-[a-z]+-/m)?.[0]??"",j=this.selectors[R];j||(j=this.selectors[R]=[]);let I=j.find(([Y])=>Y===b);I||(I=[b,[]],j.push(I)),I[1].push(y)}}x&&(this.globalValues=a(x,!1)),l&&(this.breakpoints=a(l,!1)),m&&(this.mediaQueries=a(m,!1));let h=i?a(i,!1):{},C=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:r}])=>r).reduce((r,[s,{classes:b}])=>(r[s]=a(b,!1),r),{}):{},w=[...Object.keys(h),...Object.entries(C).flatMap(([r,s])=>Object.keys(s))],k=r=>{if(r in this.classes)return;let s=this.classes[r]=[],b=(y,R)=>{if(!R)return;let j=Array.isArray(R)?R:R.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let I of j){let Y=A=>{A in this.themeAffectedClassesBy?y in this.themeAffectedClassesBy[A]?this.themeAffectedClassesBy[A][y].push(r):this.themeAffectedClassesBy[A][y]=[r]:this.themeAffectedClassesBy[A]={[y]:[r]},s.includes(A)||s.push(A)};if(w.includes(I)){k(I);for(let A of this.classes[I])Y(A)}else Y(I)}};b("",h?.[r]);for(let[y,R]of Object.entries(C))b(y,R?.[r])};for(let r of w)k(r);for(let r in this.themeAffectedClassesBy){let s=this.classesBy[r]=[];for(let b of Object.values(this.themeAffectedClassesBy[r]))for(let y of b)s.includes(y)||s.push(y)}let p=(r,s)=>{if(!s)return;let b=a(s,!0);for(let[y,R]of Object.entries(b)){let j=typeof R=="string"?{"":R}:R;for(let[I,Y]of Object.entries(j)){let A=y+(I?"-"+I:"");A in this.colorThemesMap?this.colorThemesMap[A][r]=Y:this.colorThemesMap[A]={[r]:Y}}}for(let y in s)this.colorNames.includes(y)||this.colorNames.push(y)};if(p("",o),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let r in u){let s=u[r];p(r,s.colors),this.themeNames.push(r)}let c=r=>{for(let[s,b]of Object.entries(this.colorThemesMap))for(let[y,R]of Object.entries(b))R.startsWith("#")||r(s,b,y,R)};if(c((r,s,b,y)=>{let R=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(y);if(R){let j="#"+ce(+R[1],+R[2],+R[3]);R[4]&&(j+=Math.round(255*+R[4]).toString(16)),s[b]=j}}),c((r,s,b,y)=>{let[R,j]=y.split("/"),I=this.colorThemesMap[R];if(I){let Y=(b?I[b]:void 0)??I[""];s[b]=j?Y.slice(0,7)+Math.round(255*+j).toString(16):Y}else console.warn(`\`${y}\` doesn't exist in the extended config \`.colors\``),delete s[b],Object.keys(s).length||delete this.colorThemesMap[r]}),d)for(let r in d){let s=d[r],{native:b,values:y,colored:R}=s,j=s.match;if(s.id=r,s.native=b===!0?r.replace(/(?!^)[A-Z]/g,I=>"-"+I).toLowerCase():void 0,y&&(this.values[r]=a(y,!1)),j){let I=Object.keys(this.values[r]??{});j.includes("$values")&&(j=I.length?j.replace(/\$values/,I.join("|")):j.replace(/(?:\|)?\$values/,"")),R&&j.includes("$colors")&&(j=this.colorNames.length?j.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):j.replace(/(?:\|)?\$colors/,"")),this.matches[r]=new RegExp(j)}}}observe(e,i={subtree:!0,childList:!0}){if(this.root!==e){if(ge&&e){this.root=e;let n=e===document;n&&(ie.root=this),this.host=n?document.documentElement:root.host;let u=n?document.head:e,o=n?document.styleSheets:e.styleSheets;for(let l of o){let{ownerNode:m}=l;if(m.id==="master"){this.style=m;break}}if(this.style)for(let l=0;l<this.style.sheet.cssRules.length;l++){let m=this.style.sheet.cssRules[l];if(m.constructor.name==="CSSKeyframesRule")continue;let d=a=>{if(a.selectorText){let C=a.selectorText.split(", ")[0].split(" ");for(let w=0;w<C.length;w++){let k=C[w];if(k[0]==="."){let p=k.slice(1),c="";for(let r=0;r<p.length;r++){let s=p[r],b=p[r+1];if(s==="\\"){if(r++,b!=="\\"){c+=b;continue}}else if(Ie.includes(s))break;c+=s}if(!(c in this.ruleBy)&&!(c in this.classes)){let r=this.create(c)[0];if(r)return r}}}}else if(a.cssRules)for(let h=0;h<a.cssRules.length;h++){let C=d(a.cssRules[h]);if(C)return C}},v=d(m);if(v){this.rules.push(v),this.ruleBy[v.className]=v;for(let a=0;a<v.natives.length;a++)v.natives[a].cssRule=this.style.sheet.cssRules[l+a];l+=v.natives.length-1,v.config.insert?.call(v)}}else this.style=Ae(),u.append(this.style);let x=l=>{l.forEach(m=>{m in this.countBy?this.countBy[m]++:(this.countBy[m]=1,this.insert(m))})};x(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(l=>x(l.classList)),this.observer=new MutationObserver(l=>{let m={},d=[],v=[],a=[],h=(p,c)=>{c?p.classList.forEach(w):p.classList.forEach(C);let r=p.children;for(let s=0;s<r.length;s++){let b=r[s];b.classList&&(v.push(b),h(b,c))}},C=p=>{p in m?m[p]++:m[p]=1},w=p=>{p in m?m[p]--:p in this.countBy&&(m[p]=-1)},k=(p,c)=>{for(let r=0;r<p.length;r++){let s=p[r];s.classList&&!v.includes(s)&&!a.includes(s)&&(s.isConnected!==c?(v.push(s),h(s,c)):a.push(s))}};for(let p=0;p<l.length;p++){let c=l[p],{addedNodes:r,removedNodes:s,type:b,target:y}=c;if(b==="attributes"){if(d.find(R=>R.target===y))continue;d.push(c)}else k(r,!1),(!y.isConnected||!v.includes(y))&&k(s,!0)}if(!(!d.length&&!Object.keys(m).length)){for(let{oldValue:p,target:c}of d){let r=v.includes(c),s=c.classList,b=p?p.split(" "):[];if(r){if(c.isConnected)continue;for(let y of b)s.contains(y)||w(y)}else if(c.isConnected){s.forEach(y=>{b.includes(y)||C(y)});for(let y of b)s.contains(y)||w(y)}}for(let p in m){let c=m[p],r=(this.countBy[p]||0)+c;r===0?(delete this.countBy[p],this.delete(p)):(p in this.countBy||this.insert(p),this.countBy[p]=r)}}}),this.observer.observe(e,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let i=e.cssRules.length-1;i>=0;i--)e.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(e){for(let i in this.config.rules){let n=this.config.rules[i],u=this.matches[i],{symbol:o,native:x}=n;if(u&&u.test(e))return{origin:"match",config:n};if(o&&e.startsWith(o))return{origin:"symbol",config:n};if(x&&e.startsWith(x+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(e.match(i[0]))return{origin:"semantics",value:i[1]}}create(e){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new le(n,u,this)};return(e in this.classes?this.classes[e].map(n=>i(n)):[i(e)]).filter(n=>n&&n.text)}refresh(e){if(e?.override?this.config=e:this.config=G(se,e),this.cache(),!this.style)return;let i=Ae();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let e=ie.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let i=this.style?.sheet,n=u=>{let o=this.ruleBy[u];if(!(!o||u in this.classesBy&&this.classesBy[u].some(x=>x in this.countBy))){if(i&&o.natives.length){let x=o.natives[0];for(let l=0;l<i.cssRules.length;l++)if(i.cssRules[l]===x.cssRule){for(let d=0;d<o.natives.length;d++)i.deleteRule(l);break}}this.rules.splice(this.rules.indexOf(o),1),delete this.ruleBy[u],o.config.delete&&o.config.delete.call(o,u)}};if(e in this.classes){for(let u of this.classes[e])u in this.countBy||n(u);delete this.ruleBy[e]}else n(e)}insert(e){let i=this.create(e);return i.length?(this.insertRules(i),!0):!1}insertRules(e){for(let i of e){if(this.ruleBy[i.className])continue;let n,u=Object.keys(this.keyframes).length,o=this.rules.length-1,{media:x,order:l,priority:m,hasWhere:d,className:v}=i,a=(w,k,p)=>{let c=w;for(;c<=o;c++){let r=this.rules[c];if(k?.(r))return p?-1:c-1;if(p?.(r))return c}return p?-1:c-1},h,C;if(x){let w=this.rules.findIndex(k=>k.media);if(w===-1)n=o+1;else{let{"max-width":k,"min-width":p}=x.features;if(k||p){let c=this.rules.findIndex(r=>r.media?.features["max-width"]||r.media?.features["min-width"]);if(c===-1)n=o+1;else if(k&&p){if(m===-1?(h=a(c,r=>r.priority!==-1,r=>r.media.features["max-width"]&&r.media.features["min-width"]),C=a(c,r=>r.priority!==-1)):(h=a(c,void 0,r=>r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1),C=o),h!==-1){let r=k.value-p.value,s=C,b=h;for(h=void 0;s>=b;s--){let{"max-width":y,"min-width":R}=this.rules[s].media.features,j=y.value-R.value;if(j<r)C=s-1;else if(j===r)h=s;else break}}if(h!==-1){let r=k.value-p.value;for(let s=C;s>=h;s--){let{"max-width":b,"min-width":y}=this.rules[s].media.features,R=b.value-y.value;if(R<r)C=s-1;else if(R>r){h=s+1;break}}}}else if(p){if(m===-1?(h=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]||r.priority!==-1,r=>!r.media.features["max-width"]&&r.media.features["min-width"]),C=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]||r.priority!==-1)):(h=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1,r=>!r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1),C=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1)),h!==-1)for(let r=C;r>=h;r--){let s=this.rules[r].media.features["min-width"].value;if(s>p.value)C=r-1;else if(s<p.value){h=r+1;break}}}else if(m===-1?(h=a(c,r=>r.media.features["min-width"]||r.priority!==-1,r=>r.media.features["max-width"]),C=a(c,r=>r.media.features["min-width"]||r.priority!==-1)):(h=a(c,r=>r.media.features["min-width"]&&r.priority!==-1,r=>r.media.features["max-width"]&&r.priority!==-1),C=a(c,r=>r.media.features["min-width"]&&r.priority!==-1)),h!==-1)for(let r=C;r>=h;r--){let s=this.rules[r].media.features["max-width"].value;if(s<k.value)C=r-1;else if(s>k.value){h=r+1;break}}}else m===-1?(h=w,C=a(w,c=>c.media?.features["max-width"]||c.media?.features["min-width"]||c.priority!==-1)):(h=a(w,c=>c.media?.features["max-width"]||c.media?.features["min-width"],c=>c.priority!==-1),C=a(w,c=>c.media?.features["max-width"]||c.media?.features["min-width"]))}}else{let w=u?1:0;m===-1?(h=w,C=a(w,k=>k.media||k.priority!==-1)):(h=a(w,k=>k.media,k=>k.priority!==-1),C=a(w,k=>k.media))}if(n===void 0)if(h===-1)n=C+1;else{if(m===-1)for(let w=h;w<=C;w++){let k=this.rules[w];if(!(!d&&k.hasWhere)&&(d&&!k.hasWhere||k.order>=l)){n=w;break}}else for(let w=h;w<=C;w++){let k=this.rules[w];if(!(!d&&k.hasWhere)){if(d&&!k.hasWhere){n=w;break}if(k.priority<m){n=w;break}else if(k.priority===m){if(k.order>=l){n=w;break}}else n=w+1}}n===void 0&&(n=C+1)}if(this.rules.splice(n,0,i),this.ruleBy[v]=i,this.style){let w=this.style.sheet,k=0,p=c=>{let r=this.rules[c];if(r){if(!r.natives.length)return p(c-1);let s=r.natives[r.natives.length-1].cssRule;for(let b=0;b<w.cssRules.length;b++)if(w.cssRules[b]===s){k=b+1;break}}};p(n-1);for(let c=0;c<i.natives.length;)try{let r=i.natives[c];w.insertRule(r.text,k),r.cssRule=w.cssRules[k++],c++}catch(r){console.error(r),i.natives.splice(c,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(e=>e.text).join("")}},te=ie;ne(te,"root"),ne(te,"config",se),ne(te,"instances",[]),ne(te,"refresh",e=>{for(let i of ie.instances)i.refresh(e)});ge&&(window.MasterCSS=te);var Le={store:"theme",init:!0},Fe=typeof document<"u",Ee=typeof localStorage<"u",ue=class{constructor(e,i=Fe?document.documentElement:null){this.settings=e;this.host=i;this.settings=e?G(Le,e):Le,this.settings.init&&this.init()}e=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;r;t;init(){let e=this.settings.default,i=this.storage;i&&(e=i),this.value=e}get storage(){let{store:e}=this.settings;if(Ee&&e)return localStorage.getItem(e)}get systemValue(){return this.e.matches?"dark":"light"}set value(e){this.r=e,e==="system"?(this.e?.addEventListener?.("change",this.i),this.current=this.systemValue):(this.n(),this.current=e)}get value(){return this.r}set current(e){let i=this.t;this.t=e,this.host&&i!==e&&(i&&this.host.classList.remove(i),e&&!this.host.classList.contains(e)&&(this.host.classList.add(e),this.host.style&&(this.host.style.colorScheme=e)))}get current(){return this.t}switch(e,i={store:!0,emit:!0}){e&&e!==this.value&&(this.value=e,Ee&&this.storage!==e&&this.settings.store&&localStorage.setItem(this.settings.store,e),i.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}n(){this.e?.removeEventListener("change",this.i)}i=e=>{this.current=e.matches?"dark":"light"};destroy(){this.n()}};new te(window.masterCSSConfig);new ue(window.masterCSSThemeSettings);})();
|
|
1
|
+
(()=>{var We=Object.defineProperty;var ze=(t,e,i)=>e in t?We(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ne=(t,e,i)=>(ze(t,typeof e!="symbol"?e+"":e,i),i);function ve(t){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&t instanceof e||t instanceof Date||t instanceof RegExp)}function xe(t){if(typeof Buffer<"u"&&Buffer&&t instanceof Buffer){let e=Buffer.alloc(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function ye(t){let e=[];return t.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?e[n]=ye(i):ve(i)?e[n]=xe(i):e[n]=G({},i):e[n]=i}),e}function be(t,e){return e==="__proto__"?void 0:t[e]}function G(...t){let e={},i,n;return t.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(o){if(n=be(e,o),i=be(u,o),i!==e)if(typeof i!="object"||i===null){e[o]=i;return}else if(Array.isArray(i)){e[o]=ye(i);return}else if(ve(i)){e[o]=xe(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){e[o]=G({},i);return}else{e[o]=G(n,i);return}})}),e}var re={"(":")","'":"'",'"':'"',"{":"}"};function ae(t){if(typeof CSS<"u")return CSS.escape(t);if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let e=String(t),i=e.length,n=-1,u="",o,x=e.charCodeAt(0);if(i==1&&x==45)return"\\"+e;for(;++n<i;){if(o=e.charCodeAt(n),o==0){u+="\uFFFD";continue}if(o>=1&&o<=31||o==127||n==0&&o>=48&&o<=57||n==1&&o>=48&&o<=57&&x==45){u+="\\"+o.toString(16)+" ";continue}if(o>=128||o==45||o==95||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122){u+=e.charAt(n);continue}u+="\\"+e.charAt(n)}return u}var De={unit:"",order:0,separators:[","]},le=class{constructor(e,i={},n){this.className=e;this.meta=i;this.css=n;this.config=G(De,i.config);let{unit:u,order:o,colored:x,native:l,analyze:m,transform:d,declare:v,create:a}=this.config,{scope:h,important:C,functions:w}=n.config,{themeNames:k,colorNames:p,colorThemesMap:c,selectors:r,breakpoints:s,mediaQueries:b,themeAffectedClassesBy:y,globalValues:R}=n,j=y[e];a&&a.call(this,e);let I,Y,A,U,q;if(i.origin==="semantics"){let[W,O]=i.value;U=e.slice(W.length),I=O}else{let W;if(m)[W,A]=m.call(this,e);else if(i.origin==="match"){let B=e.indexOf(":");this.prefix=e.slice(0,B+1),W=e.slice(B+1)}else i.origin==="symbol"&&(this.symbol=e[0],W=e.slice(1));q=[];let O=this,L=this.values,N=[","];this.config.separators.length&&N.push(...this.config.separators);let S="",g=0;(function B(f,M,T,$=void 0,E=[],X=[],z){let Q=$===void 0,F,J=D=>D==="'"||D==='"',ee=()=>F=S.length,Z=()=>{if(S){let D=S,P=Q?D:S.slice(F);if(S="",_="",L&&P in L&&!E.includes(P)){let H=g;g=0,B(L[P].toString(),M,void 0,$,[...E,P],X,z),g=H,Q||(S=S.slice(0,F)+S)}else if(R&&P in R&&!X.includes(P)){let H=g;g=0,B(R[P].toString(),M,void 0,$,E,[...X,P],z),g=H,Q||(S=S.slice(0,F)+S)}else if(Q){let H=!z&&O.analyzeUnitValue(P,M);q.push({value:H?.value??P,unit:H?.unit})}else{let H=!z&&O.analyzeUnitValue(P,M);S=H?D.slice(0,F)+H.value+H.unit:D}ee()}},K=J(T);ee();let _="";for(;g<f.length;g++){let D=f[g];if(D===T){if(K){S+=D;let P=0;for(let H=S.length-2;S[H]==="\\";H--)P++;if(P%2)continue}else Z(),S+=D;return}else if(!K&&D in re){let P=D==="("&&_&&w?.[_];P?.name&&(S=S.slice(0,S.length-_.length)+P.name,_=P.name),S+=D,g++;let H=re[D];B(f,P?.unit??M,H,_||$||"",E,X,z||!!P?.transform),P?.transform&&(S=S.slice(0,F+_.length+1)+P.transform.call(O,S.slice(F+_.length+1,-1))+S.slice(-1)),Q&&(J(H)?(q.push(S),S=""):Z()),_=""}else if((D==="|"||D===" ")&&T!=="}"&&(!K||$==="path"))Z(),Q||(S+=" ",F++);else{if(!K){if(D==="."){if(isNaN(+f[g+1]))break;f[g-1]==="-"&&(S+="0")}else if(N.includes(D)){Z(),Q?q.push(D):(S+=D,F++);continue}else if(Q&&(D==="#"&&(S||q.length&&f[g-1]!=="|"&&q[g-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(D)))break;_+=D}S+=D}}$===void 0&&Z()})(W,u),U=W.slice(g)}this.order=typeof o=="function"?o.call(this,this.prefix):o,U[0]==="!"&&(this.important=!0,U=U.slice(1));let pe=W=>{let O=W.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((g,B)=>B%3?g:g.replace(/_/g," ")).join(""),L=[],N="",S=0;for(let g=0;g<O.length;g++){let B=O[g];if(B==="\\"){N+=B+O[++g];continue}!S&&B===","?(L.push(N),N=""):(N+=B,S&&B===")"?S--:B==="("&&S++)}return N&&L.push(N),L};this.prefixSelectors=A?pe(A):[""];let de=U.split("@"),fe=de[0];if(fe){this.vendorSuffixSelectors={};let W=(g,B,f,M)=>{for(let[T,$]of B)if(T.test(g)){for(let E of $)W(g.replace(T,E),B,f,!0);return}M&&f.push(g)},O=[];""in r?W(fe,r[""],O,!0):O.push(fe);let L={};for(let[g,B]of Object.entries(r)){if(!g)continue;let f=[];for(let M of O)W(M,B,f,!1);f.length&&(L[g]=f)}let N=(g,B)=>{let f=B.reduce((M,T)=>(M.push(...pe(T)),M),[]);g in this.vendorSuffixSelectors?this.vendorSuffixSelectors[g].push(...f):this.vendorSuffixSelectors[g]=f},S=Object.keys(L);if(S.length)for(let g of S)N(g,L[g]);else N("",O);for(let g of Object.values(this.vendorSuffixSelectors))for(let B of g){this.hasWhere!==!1&&(this.hasWhere=B.includes(":where("));let f=[":disabled",":active",":focus",":hover"];for(let M=0;M<f.length;M++)if(B.includes(f[M])){(this.priority===-1||this.priority>M)&&(this.priority=M);break}}}else this.vendorSuffixSelectors={"":[""]};for(let W=1;W<de.length;W++){let O=de[W];if(O)if(k.includes(O))this.theme=O;else if(O==="rtl"||O==="ltr")this.direction=O;else{let L,N,S=O.indexOf("_");if(S!==-1)L=O.slice(0,S),N=O.slice(S);else{let g=O.indexOf("(");g!==-1&&(L=O.slice(0,g),N=O.slice(g))}if(!L){L="media";let g=[];this.media={token:O,features:{}};let B=O.split("&");for(let f of B)if(f==="all"||f==="print"||f==="screen"||f==="speech")this.media.type=f;else if(f==="\u{1F5A8}")this.media.type="print";else if(f==="landscape"||f==="portrait")g.push("(orientation:"+f+")");else if(f==="motion"||f==="reduced-motion")g.push("(prefers-reduced-motion:"+(f==="motion"?"no-preference":"reduce")+")");else if(b&&f in b)g.push(b[f]);else{let M={token:f},T="",$="",E=0;f.startsWith("<=")?($="<=",T="max-width"):f.startsWith(">=")||s[f]?($=">=",T="min-width"):f.startsWith(">")?($=">",T="min-width",E=.02):f.startsWith("<")&&($="<",T="max-width",E=-.02);let X=$?f.replace($,""):f,z=s[X];switch(T){case"max-width":case"min-width":z?Object.assign(M,this.analyzeUnitValue(z.toString(),"px")):Object.assign(M,this.analyzeUnitValue(X,"px")),M.unit==="px"&&(M.value+=E),this.media.features[T]=M,g.push("("+T+":"+(M.value+M.unit)+")");break}}N="",this.media.type&&(N=this.media.type),g.length&&(N+=(N?" and ":"")+g.join(" and "))}N&&(this.at[L]=(L in this.at?this.at[L]+" and ":"")+N.replace(/_/g," "))}}let me=(W,O)=>{let L,N=(B,f,M)=>{let T="";this.direction&&(T+="[dir="+this.direction+"] ");let $=this.prefixSelectors.map(z=>z+T),E=(z,Q)=>$.map(F=>(z?"."+z+" ":"")+(h?h+" ":"")+F).reduce((F,J)=>(F.push(M.reduce((ee,Z)=>(ee.push(J+"."+ae(Q)+Z),ee),[]).join(",")),F),[]).join(","),X=E(f,e)+(j?Object.entries(j).filter(([z])=>this.theme||!x||!f||!z||z===f).map(([z,Q])=>Q.reduce((F,J)=>F+","+E(this.theme??((x||Y)&&f||z),J),"")).join(""):"")+"{"+B+"}";for(let z of Object.keys(this.at).sort((Q,F)=>F==="supports"?-1:1))X="@"+z+" "+this.at[z]+"{"+X+"}";return X},S=[];if(q){let B=[this.theme??W,""],f,M=!1;for(let T of q)if(typeof T=="string")S.push(T);else{let $=T.value;if(T.unit)$+=T.unit;else if(x&&c&&p){let E=!1;$=$.replace(new RegExp(`(^|,| |\\()((?:${p.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(X,z,Q,F)=>{let J=c[Q];if(J){let ee,Z;for(let K of B)if(ee=J[K]){Z=K;break}if(ee){E=!O||Z===W,f||(f=E);let K=ee;if(F){let _=F.endsWith("%")?parseFloat(F)/100:+F;_=isNaN(_)?1:Math.min(Math.max(_,0),1),K+=Math.round(_*255).toString(16).toUpperCase().padStart(2,"0")}return z+K}else M=!0}return X})}S.push($)}if(O&&(M||(f===void 0?W:!f)))return;if(L=S.reduce((T,$,E)=>T+$+($===","||q[E+1]===","||E===q.length-1?"":" "),""),d&&(L=d.call(this,L,this.css.config)),x&&L==="current"&&(L="currentColor"),v){let T,$;if(q.length===1){let E=q[0];typeof E=="object"&&(T=E.value,$=E.unit)}I=v.call(this,$?T:L,$||"")}else I={[l]:L}}let g={};for(let B in I){let f=($,E)=>{let X=E+((this.important||C)&&!E.endsWith("!important")?"!important":"");$ in g?g[$].push(X):g[$]=[X]},M=B+":",T=I[B];if(typeof T=="object")if(Array.isArray(T))for(let $ of T)f(W,M+$.toString());else{Y=!0;for(let $ in T)f($,M+T[$])}else f(W,M+T.toString())}for(let B of Object.values(this.vendorSuffixSelectors))for(let f in g)this.natives.push({text:N(g[f].join(";"),f,B),theme:f})};if(this.theme)me(this.theme,!1);else if(x)for(let W of k)me(W,!0);else me("",!1)}at={};priority=-1;natives=[];keyframeNames;config;get values(){return this.css.values[this.config.id]}get text(){return this.natives.map(e=>e.text).join("")}resolveValue(e,i){return Number.isNaN(+e)?e:e/(i==="rem"||i==="em"?this.css.config.rootSize:1)+i}analyzeUnitValue(e,i){let n=i??this.config.unit;if(n){let u="",o=e.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(o)if(e.includes("/")){let[x,l]=e.split("/");return{value:+x/+l*100+"%",unit:u}}else{let x=+o[1];return u=o[3]||"",u||((n==="rem"||n==="em")&&(x=x/this.css.config.rootSize),u=n||""),{value:x,unit:u}}}}};var we={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560};function oe(t){t.startsWith("#")&&(t=t.slice(1));let e=t.match(/.{1,2}/g);return[parseInt(e[0],16),parseInt(e[1],16),parseInt(e[2],16)]}function ce(t,e,i){return((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)}function V(t){typeof t=="string"&&(t={"":t});let e=""in t,i=!1;for(let n in t)if(n&&+n>=100){i=!0;break}if(!i&&(!e||Object.keys(t).length>1)){let n=0,u="0"in t?oe(t[0]):[0,0,0],o,x,l=[],m=()=>{let d=o-n,v=x.map((a,h)=>(a-u[h])/d);for(let a of l){let h=a-n,C=u.map((w,k)=>Math.round(w+v[k]*h));t[a]="#"+ce.call(this,...C)}};for(let d=1;d<100;d++)d in t?(l.length?(o=d,x=oe(t[d]),m(),l.length=0,u=x):u=oe(t[d]),n=d):l.push(d);l.length&&(o=100,x="100"in t?oe(t[100]):[255,255,255],m())}return e||(t[""]=t[i?"500":"50"]),t}var ke={black:"#000000",white:"#ffffff",slate:V({5:"#141e2b",10:"#19212d",20:"#262f3e",30:"#323e52",40:"#41516b",50:"#616a84",55:"#6c7693",60:"#959db3",70:"#a3abbf",80:"#d7dae3",95:"#f6f7f8"}),gray:V({5:"#1e1d1f",10:"#212022",20:"#2f2e30",30:"#3e3d40",40:"#504f52",50:"#6b6a6d",55:"#777679",60:"#9e9da0",70:"#abaaae",80:"#dad9db",95:"#f5f4f7"}),brown:V({5:"#271b15",10:"#2b1e18",20:"#3c2b22",30:"#50382c",40:"#694839",50:"#8d604b",55:"#9d6b53",60:"#b79788",70:"#c1a598",80:"#efd5c9",95:"#faf2ef"}),orange:V({5:"#2e1907",10:"#331b07",20:"#47260b",30:"#5d320e",40:"#7a4111",50:"#a15717",55:"#b4611a",60:"#e38739",70:"#e79855",80:"#f7d4b5",95:"#fcf1e7"}),gold:V({5:"#281b00",10:"#2d1e01",20:"#3f2a00",30:"#543800",40:"#6d4900",50:"#906000",55:"#9c6d00",60:"#d09100",70:"#dca000",80:"#fbd67f",95:"#fff3d8"}),yellow:V({5:"#251d00",10:"#282000",20:"#3a2e01",30:"#4b3b00",40:"#624e00",50:"#806700",55:"#8e7200",60:"#be9900",70:"#d0a700",80:"#edda8f",95:"#fff5ca"}),grass:V({5:"#162106",10:"#182406",20:"#223308",30:"#2c4408",40:"#3a570b",50:"#4e750e",60:"#74ae15",70:"#7dbc17",80:"#bfe87c",95:"#ebfad4"}),green:V({5:"#042311",10:"#032611",20:"#023717",30:"#03481f",40:"#025d26",50:"#067b34",55:"#07883a",60:"#09b64d",70:"#0ac553",80:"#80f1a4",95:"#e0fae8"}),beryl:V({5:"#002319",10:"#00271c",20:"#003626",30:"#004732",40:"#005c41",50:"#007954",55:"#00875e",60:"#00b37c",70:"#00c387",80:"#72f0c5",95:"#d6fcef"}),teal:V({5:"#012220",10:"#012624",20:"#003532",30:"#004541",40:"#005a54",50:"#00776f",55:"#00857c",60:"#00b1a5",70:"#00bfb2",80:"#6aeee5",95:"#d4fcf8"}),cyan:V({5:"#00222b",10:"#00252e",20:"#013340",30:"#004457",40:"#00576f",50:"#007391",55:"#0080a1",60:"#00abd7",70:"#00b9e9",80:"#97e6fa",95:"#dff8ff"}),sky:V({5:"#031f34",10:"#032339",20:"#04314e",30:"#044169",40:"#065386",50:"#086eb3",55:"#097ac5",60:"#29a4f5",70:"#4db3f7",80:"#b3e0ff",95:"#eaf6fe"}),blue:V({5:"#07194a",10:"#081c53",20:"#0a2773",30:"#0e3496",40:"#1146b6",50:"#175fe9",55:"#2671ea",60:"#6b9ef1",70:"#81acf3",80:"#c6dbfe",95:"#edf4fe"}),indigo:V({5:"#1f1645",10:"#20174f",20:"#2b1f74",30:"#37289d",40:"#463fb1",50:"#5a5bd5",55:"#6464f1",60:"#9393f5",70:"#a1a5ee",80:"#d5d7fe",95:"#f1f2ff"}),violet:V({5:"#2b0a4e",10:"#2e0b57",20:"#3d1179",30:"#4e169f",40:"#5f2eba",50:"#7949e5",55:"#8755f5",60:"#ac8af8",70:"#b89bf9",80:"#e1d4fe",95:"#f5f1ff"}),purple:V({5:"#2e0c47",10:"#330c4e",20:"#460f6c",30:"#5b1390",40:"#7421b1",50:"#9832e4",55:"#a348e7",60:"#c184ef",70:"#ca96f1",80:"#ead1fe",95:"#f9f0ff"}),fuchsia:V({5:"#39092a",10:"#400932",20:"#560d4a",30:"#6f1165",40:"#8c158a",50:"#b61cbb",55:"#ca1fce",60:"#e66ee9",70:"#ea86ed",80:"#facbfb",95:"#feefff"}),pink:V({5:"#3d0722",10:"#430725",20:"#5d0933",30:"#790d44",40:"#9a1058",50:"#ca1473",55:"#e11681",60:"#f170b4",70:"#f388c0",80:"#fdcde6",95:"#fff0f8"}),crimson:V({5:"#430213",10:"#470314",20:"#62041c",30:"#800524",40:"#9f1036",50:"#ce1a4b",55:"#e8144c",60:"#f37596",70:"#f58ba7",80:"#fdceda",95:"#fff1f4"}),red:V({5:"#450001",10:"#490102",20:"#640304",30:"#800506",40:"#a11012",50:"#d11a1e",55:"#ed0a0e",60:"#f97476",70:"#fa8b8d",80:"#fdcfcf",95:"#fff1f1"})};var Se="";var Ce={"::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 Re={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"},overflowed:{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"},"gradient-text":{"-webkit-text-fill-color":"transparent","-webkit-background-clip":"text","background-clip":"text"}};var $e=["dark","light"];var Ne={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(t){let e=0;for(;e<t.length&&!(t[e]==="{"&&t[e-1]!=="\\");e++);return[t.slice(e),t.slice(0,e)]},declare(t){let e={},i=(d,v)=>{let a=v.indexOf(":");if(a!==-1){d in e||(e[d]={});let h=e[d],C=v.slice(0,a);C in h||(h[C]=v.slice(a+1))}},n=d=>{let v=(a,h)=>{let C=h.slice(ae(d.className).length).match(/\{(.*)\}/)[1].split(";");for(let w of C)i(a,w)};if(this.theme){let a=d.natives.find(h=>h.theme===this.theme)??d.natives.find(h=>!h.theme);a&&v(this.theme,a.text)}else for(let a of d.natives)v(a.theme,a.text)},u=[],o="",x=()=>{o&&(u.push(o.replace(/ /g,"")),o="")},l=1;(function d(v){for(;l<t.length;l++){let a=t[l];if(!v){if(a===";"){x();continue}if(a==="}")break}if(o+=a,v===a){if(v==="'"||v==='"'){let h=0;for(let C=o.length-2;o[C]==="\\";C--)h++;if(h%2)continue}break}else a in re&&v!=="'"&&v!=='"'&&(l++,d(re[a]))}})(void 0),x();for(let d of u){let v=this.css.create(d);if(Array.isArray(v))for(let a of v)n(a);else v?n(v):i(this.theme??"",d)}let m={};for(let d in e)for(let[v,a]of Object.entries(e[d]))v in m?m[v][d]=a:m[v]={[d]:a};return m}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(t){return{["--"+this.prefix.slice(1,-1)]:t}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(t){switch(t){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(t,e){return{"margin-left":t+e,"margin-right":t+e}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(t,e){return{"margin-top":t+e,"margin-bottom":t+e}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(t,e){return{"padding-left":t+e,"padding-right":t+e}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(t,e){return{"padding-top":t+e,"padding-bottom":t+e}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t]},declare(t){let[e,i]=t.split(" x ");return{width:e,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,i]=t.split(" x ");return{"min-width":e,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,i]=t.split(" x ");return{"max-width":e,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(t,e){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":t+e}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0,declare(t,e){return t==="overlay"?{"overflow-x":["auto",t]}:{"overflow-x":t}}},overflowY:{native:!0,declare(t,e){return t==="overlay"?{"overflow-y":["auto",t]}:{"overflow-y":t}}},overflow:{native:!0,order:-1,declare(t,e){return t==="overlay"?{overflow:["auto",t]}:{overflow:t}}},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(t,e){return{"user-drag":t+e,"-webkit-user-drag":t+e}}},userSelect:{native:!0,declare(t,e){return{"user-select":t+e,"-webkit-user-select":t+e}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(t,e){return{"font-size":t+e,"line-height":e==="em"?t+.875+e:`calc(${t}${e} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-fill-color":t+e}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(t,e){return{"-webkit-text-stroke-width":t+e}}},textStrokeColor:{match:"^text-stroke:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-stroke-color":t+e}}},textStroke:{unit:"rem",native:!0,declare(t,e){return{"-webkit-text-stroke":t+e}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(t){return Te.call(this,t)},delete(t){return Be.call(this,t)},insert(){return Me.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(t){return Te.call(this,t)},delete(t){return Be.call(this,t)},insert(){return Me.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(t,e){return{"border-left-color":t+e,"border-right-color":t+e}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(t,e){return{"border-top-color":t+e,"border-bottom-color":t+e}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(t,e){return{"border-top-left-radius":t+e,"border-top-right-radius":t+e}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(t,e){return{"border-bottom-left-radius":t+e,"border-bottom-right-radius":t+e}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(t,e){return{"border-top-left-radius":t+e,"border-bottom-left-radius":t+e}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(t,e){return{"border-top-right-radius":t+e,"border-bottom-right-radius":t+e}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(t,e){return{"border-left-style":t+e,"border-right-style":t+e}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(t,e){return{"border-top-style":t+e,"border-bottom-style":t+e}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(t,e){return{"border-left-width":t+e,"border-right-width":t+e}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(t,e){return{"border-top-width":t+e,"border-bottom-width":t+e}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(t){return{"border-left":t,"border-right":t}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(t){return{"border-top":t,"border-bottom":t}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(t,e){return{"-webkit-background-clip":t+e,"background-clip":t+e}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)|gradient\\(.*\\))(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"},analyze(t){if(t.startsWith("gradient"))return["linear-"+t];let e=t.indexOf(":");return this.prefix=t.slice(0,e+1),[t.slice(e+1)]}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"backdrop-filter":t+e,"-webkit-backdrop-filter":t+e}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridColumns:{match:"^grid-cols:.",declare(t,e){return{display:"grid","grid-template-columns":"repeat("+t+e+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridRows:{match:"^grid-rows:.",declare(t,e){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+t+e+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(t,e){return{"box-decoration-break":t+e,"-webkit-box-decoration-break":t+e}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:#|(?:rgb|hsl)\\(.*\\)|transparent|currentColor|inherit|$values|$colors)[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-margin-left":t+e,"scroll-margin-right":t+e}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-margin-top":t+e,"scroll-margin-bottom":t+e}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-padding-left":t+e,"scroll-padding-right":t+e}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(t,e){return{"scroll-padding-top":t+e,"scroll-padding-bottom":t+e}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(t,e){return{"mask-image":t+e,"-webkit-mask-image":t+e}}}},je=Ne;function Te(t){if(!this.css.config.keyframes)return;let e=(this.meta.origin==="symbol"?t.slice(this.meta.config.symbol.length):t.slice(t.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);e?.length&&(this.keyframeNames=e)}function Be(){if(this.keyframeNames?.length){let t=this.css.rules[0];for(let e of this.keyframeNames){let i=this.css.keyframes[e];if(!--i.count){let n=t.natives.indexOf(i.native);this.css.style.sheet.deleteRule(n),t.natives.splice(n,1),delete this.css.keyframes[e]}}t.natives.length||this.css.rules.splice(0,1)}}function Me(){if(this.keyframeNames){let{config:t,keyframes:e,style:i,rules:n}=this.css,u=i?.sheet;for(let o of this.keyframeNames)if(o in e)e[o].count++;else{let x={text:`@keyframes ${o}{`+Object.entries(t.keyframes[o]).map(([m,d])=>`${m}{${Object.entries(d).map(([v,a])=>v+":"+a).join(";")}}`).join("")+"}",theme:""},l;if(Object.keys(e).length?(l=n[0]).natives.push(x):n.splice(0,0,l={natives:[x],get text(){return this.natives.map(m=>m.text).join("")}}),u){let m;for(let d=0;d<u.cssRules.length;d++){let v=u.cssRules[d];if(v.constructor.name!=="CSSKeyframesRule")break;if(v.name===o){m=v;break}}if(m)x.cssRule=m;else{let d=l.natives.length-1;u.insertRule(x.text,d),x.cssRule=u.cssRules[d]}}e[o]={native:x,count:1}}}}var Oe={fade:{"0%":{opacity:0},to:{opacity:1}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},to:{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,to":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(.8,0,1,1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0,0,.2,1)"}},ping:{"75%,to":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},to:{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},to:{transform:"none"}}};var he={$:{name:"var",transform(t){return"--"+t}},calc:{transform(t){let e="",i,n="",u=!1,o=(x,l="",m="")=>{if(i===2&&!u){let d=this.analyzeUnitValue(n,he.calc.unit);d&&(n=d.value+d.unit)}e+=n+l+x+m,i=null,u=!1,n=""};for(let x=0;x<t.length;x++){let l=t[x];if(l==="("||l===")")o(l);else if(l===",")o(l,""," ");else if(l==="-"&&i!==1){let m=t[x-1];m==="("?e+=l:m===")"?o(l," "," "):isNaN(+t[x+1])?m==="-"?(o(l),i=1):o(l," "," "):o(l,n?" ":"",n?" ":"")}else if(l==="+"||l==="*"||l==="/")o(l," "," ");else{switch(i){case 1:break;case 2:l!=="."&&!/[0-9]/.test(l)&&(u=!0);break;default:i=isNaN(+l)?1:2}i?n+=l:e+=l}}return o(""),e}},translate:{unit:"rem"},translateX:{unit:"rem"},translateY:{unit:"rem"},translateZ:{unit:"rem"},translate3d:{unit:"rem"},skew:{unit:"deg"},skewX:{unit:"deg"},skewY:{unit:"deg"},skewZ:{unit:"deg"},skew3d:{unit:"deg"},rotate:{unit:"deg"},rotateX:{unit:"deg"},rotateY:{unit:"deg"},rotateZ:{unit:"deg"},rotate3d:{unit:"deg"},blur:{unit:"rem"},"drop-shadow":{unit:"rem"},"hue-rotate":{unit:"deg"},rgb:{unit:""},rgba:{unit:""},hsl:{unit:""},hsla:{unit:""},repeat:{unit:""}};var se={breakpoints:we,colors:ke,rootSize:16,scope:Se,selectors:Ce,semantics:Re,themes:$e,rules:je,override:!1,observe:!0,important:!1,functions:he,keyframes:Oe};var Ie=[",",".","#","[","!","*",">","+","~",":","@"];var ge=typeof window<"u",Ae=()=>{let t=document.createElement("style");return t.id="master",t},ie=class{constructor(e=se){this.config=e;e?.override||(this.config=G(se,e),"keyframes"in e&&Object.assign(this.config.keyframes,e.keyframes)),this.cache(),ge&&this.config.observe&&this.observe(document),ie.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:i,selectors:n,themes:u,colors:o,values:x,breakpoints:l,mediaQueries:m,rules:d}=this.config;function v(r){return r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(r,s,b="",y={}){let R=A=>A?(b?b+"-":"")+A:b,j=Object.entries(r),I=[],Y=[];for(let A of j){let U=A[1];(typeof U=="object"&&!Array.isArray(U)?I:Y).push(A)}for(let[A,U]of I)a(U,s,R(A),y);if(s&&b)Y.length&&(y[b]=Y.reduce((A,[U,q])=>(A[U]=q,A),{}));else for(let[A,U]of Y)y[R(A)]=U;return y}if(e)for(let[r,s]of Object.entries(a(e,!0)))this.semantics.push([new RegExp("^"+v(r)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[r,s]]);if(n)for(let[r,s]of Object.entries(a(n,!1))){let b=new RegExp(v(r)+"(?![a-z-])");for(let y of Array.isArray(s)?s:[s]){let R=y.match(/^::-[a-z]+-/m)?.[0]??"",j=this.selectors[R];j||(j=this.selectors[R]=[]);let I=j.find(([Y])=>Y===b);I||(I=[b,[]],j.push(I)),I[1].push(y)}}x&&(this.globalValues=a(x,!1)),l&&(this.breakpoints=a(l,!1)),m&&(this.mediaQueries=a(m,!1));let h=i?a(i,!1):{},C=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:r}])=>r).reduce((r,[s,{classes:b}])=>(r[s]=a(b,!1),r),{}):{},w=[...Object.keys(h),...Object.entries(C).flatMap(([r,s])=>Object.keys(s))],k=r=>{if(r in this.classes)return;let s=this.classes[r]=[],b=(y,R)=>{if(!R)return;let j=Array.isArray(R)?R:R.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let I of j){let Y=A=>{A in this.themeAffectedClassesBy?y in this.themeAffectedClassesBy[A]?this.themeAffectedClassesBy[A][y].push(r):this.themeAffectedClassesBy[A][y]=[r]:this.themeAffectedClassesBy[A]={[y]:[r]},s.includes(A)||s.push(A)};if(w.includes(I)){k(I);for(let A of this.classes[I])Y(A)}else Y(I)}};b("",h?.[r]);for(let[y,R]of Object.entries(C))b(y,R?.[r])};for(let r of w)k(r);for(let r in this.themeAffectedClassesBy){let s=this.classesBy[r]=[];for(let b of Object.values(this.themeAffectedClassesBy[r]))for(let y of b)s.includes(y)||s.push(y)}let p=(r,s)=>{if(!s)return;let b=a(s,!0);for(let[y,R]of Object.entries(b)){let j=typeof R=="string"?{"":R}:R;for(let[I,Y]of Object.entries(j)){let A=y+(I?"-"+I:"");A in this.colorThemesMap?this.colorThemesMap[A][r]=Y:this.colorThemesMap[A]={[r]:Y}}}for(let y in s)this.colorNames.includes(y)||this.colorNames.push(y)};if(p("",o),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let r in u){let s=u[r];p(r,s.colors),this.themeNames.push(r)}let c=r=>{for(let[s,b]of Object.entries(this.colorThemesMap))for(let[y,R]of Object.entries(b))R.startsWith("#")||r(s,b,y,R)};if(c((r,s,b,y)=>{let R=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(y);if(R){let j="#"+ce(+R[1],+R[2],+R[3]);R[4]&&(j+=Math.round(255*+R[4]).toString(16)),s[b]=j}}),c((r,s,b,y)=>{let[R,j]=y.split("/"),I=this.colorThemesMap[R];if(I){let Y=(b?I[b]:void 0)??I[""];s[b]=j?Y.slice(0,7)+Math.round(255*+j).toString(16):Y}else console.warn(`\`${y}\` doesn't exist in the extended config \`.colors\``),delete s[b],Object.keys(s).length||delete this.colorThemesMap[r]}),d)for(let r in d){let s=d[r],{native:b,values:y,colored:R}=s,j=s.match;if(s.id=r,s.native=b===!0?r.replace(/(?!^)[A-Z]/g,I=>"-"+I).toLowerCase():void 0,y&&(this.values[r]=a(y,!1)),j){let I=Object.keys(this.values[r]??{});j.includes("$values")&&(j=I.length?j.replace(/\$values/,I.join("|")):j.replace(/(?:\|)?\$values/,"")),R&&j.includes("$colors")&&(j=this.colorNames.length?j.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):j.replace(/(?:\|)?\$colors/,"")),this.matches[r]=new RegExp(j)}}}observe(e,i={subtree:!0,childList:!0}){if(this.root!==e){if(ge&&e){this.root=e;let n=e===document;n&&(ie.root=this),this.host=n?document.documentElement:this.root.host;let u=n?document.head:e,o=n?document.styleSheets:e.styleSheets;for(let l of o){let{ownerNode:m}=l;if(m.id==="master"){this.style=m;break}}if(this.style)for(let l=0;l<this.style.sheet.cssRules.length;l++){let m=this.style.sheet.cssRules[l];if(m.constructor.name==="CSSKeyframesRule")continue;let d=a=>{if(a.selectorText){let C=a.selectorText.split(", ")[0].split(" ");for(let w=0;w<C.length;w++){let k=C[w];if(k[0]==="."){let p=k.slice(1),c="";for(let r=0;r<p.length;r++){let s=p[r],b=p[r+1];if(s==="\\"){if(r++,b!=="\\"){c+=b;continue}}else if(Ie.includes(s))break;c+=s}if(!(c in this.ruleBy)&&!(c in this.classes)){let r=this.create(c)[0];if(r)return r}}}}else if(a.cssRules)for(let h=0;h<a.cssRules.length;h++){let C=d(a.cssRules[h]);if(C)return C}},v=d(m);if(v){this.rules.push(v),this.ruleBy[v.className]=v;for(let a=0;a<v.natives.length;a++)v.natives[a].cssRule=this.style.sheet.cssRules[l+a];l+=v.natives.length-1,v.config.insert?.call(v)}}else this.style=Ae(),u.append(this.style);let x=l=>{l.forEach(m=>{m in this.countBy?this.countBy[m]++:(this.countBy[m]=1,this.insert(m))})};x(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(l=>x(l.classList)),this.observer=new MutationObserver(l=>{let m={},d=[],v=[],a=[],h=(p,c)=>{c?p.classList.forEach(w):p.classList.forEach(C);let r=p.children;for(let s=0;s<r.length;s++){let b=r[s];b.classList&&(v.push(b),h(b,c))}},C=p=>{p in m?m[p]++:m[p]=1},w=p=>{p in m?m[p]--:p in this.countBy&&(m[p]=-1)},k=(p,c)=>{for(let r=0;r<p.length;r++){let s=p[r];s.classList&&!v.includes(s)&&!a.includes(s)&&(s.isConnected!==c?(v.push(s),h(s,c)):a.push(s))}};for(let p=0;p<l.length;p++){let c=l[p],{addedNodes:r,removedNodes:s,type:b,target:y}=c;if(b==="attributes"){if(d.find(R=>R.target===y))continue;d.push(c)}else k(r,!1),(!y.isConnected||!v.includes(y))&&k(s,!0)}if(!(!d.length&&!Object.keys(m).length)){for(let{oldValue:p,target:c}of d){let r=v.includes(c),s=c.classList,b=p?p.split(" "):[];if(r){if(c.isConnected)continue;for(let y of b)s.contains(y)||w(y)}else if(c.isConnected){s.forEach(y=>{b.includes(y)||C(y)});for(let y of b)s.contains(y)||w(y)}}for(let p in m){let c=m[p],r=(this.countBy[p]||0)+c;r===0?(delete this.countBy[p],this.delete(p)):(p in this.countBy||this.insert(p),this.countBy[p]=r)}}}),this.observer.observe(e,{...i,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let i=e.cssRules.length-1;i>=0;i--)e.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(e){for(let i in this.config.rules){let n=this.config.rules[i],u=this.matches[i],{symbol:o,native:x}=n;if(u&&u.test(e))return{origin:"match",config:n};if(o&&e.startsWith(o))return{origin:"symbol",config:n};if(x&&e.startsWith(x+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(e.match(i[0]))return{origin:"semantics",value:i[1]}}create(e){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new le(n,u,this)};return(e in this.classes?this.classes[e].map(n=>i(n)):[i(e)]).filter(n=>n&&n.text)}refresh(e){if(e?.override?this.config=e:this.config=G(se,e),this.cache(),!this.style)return;let i=Ae();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let e=ie.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let i=this.style?.sheet,n=u=>{let o=this.ruleBy[u];if(!(!o||u in this.classesBy&&this.classesBy[u].some(x=>x in this.countBy))){if(i&&o.natives.length){let x=o.natives[0];for(let l=0;l<i.cssRules.length;l++)if(i.cssRules[l]===x.cssRule){for(let d=0;d<o.natives.length;d++)i.deleteRule(l);break}}this.rules.splice(this.rules.indexOf(o),1),delete this.ruleBy[u],o.config.delete&&o.config.delete.call(o,u)}};if(e in this.classes){for(let u of this.classes[e])u in this.countBy||n(u);delete this.ruleBy[e]}else n(e)}insert(e){let i=this.create(e);return i.length?(this.insertRules(i),!0):!1}insertRules(e){for(let i of e){if(this.ruleBy[i.className])continue;let n,u=Object.keys(this.keyframes).length,o=this.rules.length-1,{media:x,order:l,priority:m,hasWhere:d,className:v}=i,a=(w,k,p)=>{let c=w;for(;c<=o;c++){let r=this.rules[c];if(k?.(r))return p?-1:c-1;if(p?.(r))return c}return p?-1:c-1},h,C;if(x){let w=this.rules.findIndex(k=>k.media);if(w===-1)n=o+1;else{let{"max-width":k,"min-width":p}=x.features;if(k||p){let c=this.rules.findIndex(r=>r.media?.features["max-width"]||r.media?.features["min-width"]);if(c===-1)n=o+1;else if(k&&p){if(m===-1?(h=a(c,r=>r.priority!==-1,r=>r.media.features["max-width"]&&r.media.features["min-width"]),C=a(c,r=>r.priority!==-1)):(h=a(c,void 0,r=>r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1),C=o),h!==-1){let r=k.value-p.value,s=C,b=h;for(h=void 0;s>=b;s--){let{"max-width":y,"min-width":R}=this.rules[s].media.features,j=y.value-R.value;if(j<r)C=s-1;else if(j===r)h=s;else break}}if(h!==-1){let r=k.value-p.value;for(let s=C;s>=h;s--){let{"max-width":b,"min-width":y}=this.rules[s].media.features,R=b.value-y.value;if(R<r)C=s-1;else if(R>r){h=s+1;break}}}}else if(p){if(m===-1?(h=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]||r.priority!==-1,r=>!r.media.features["max-width"]&&r.media.features["min-width"]),C=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]||r.priority!==-1)):(h=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1,r=>!r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1),C=a(c,r=>r.media.features["max-width"]&&r.media.features["min-width"]&&r.priority!==-1)),h!==-1)for(let r=C;r>=h;r--){let s=this.rules[r].media.features["min-width"].value;if(s>p.value)C=r-1;else if(s<p.value){h=r+1;break}}}else if(m===-1?(h=a(c,r=>r.media.features["min-width"]||r.priority!==-1,r=>r.media.features["max-width"]),C=a(c,r=>r.media.features["min-width"]||r.priority!==-1)):(h=a(c,r=>r.media.features["min-width"]&&r.priority!==-1,r=>r.media.features["max-width"]&&r.priority!==-1),C=a(c,r=>r.media.features["min-width"]&&r.priority!==-1)),h!==-1)for(let r=C;r>=h;r--){let s=this.rules[r].media.features["max-width"].value;if(s<k.value)C=r-1;else if(s>k.value){h=r+1;break}}}else m===-1?(h=w,C=a(w,c=>c.media?.features["max-width"]||c.media?.features["min-width"]||c.priority!==-1)):(h=a(w,c=>c.media?.features["max-width"]||c.media?.features["min-width"],c=>c.priority!==-1),C=a(w,c=>c.media?.features["max-width"]||c.media?.features["min-width"]))}}else{let w=u?1:0;m===-1?(h=w,C=a(w,k=>k.media||k.priority!==-1)):(h=a(w,k=>k.media,k=>k.priority!==-1),C=a(w,k=>k.media))}if(n===void 0)if(h===-1)n=C+1;else{if(m===-1)for(let w=h;w<=C;w++){let k=this.rules[w];if(!(!d&&k.hasWhere)&&(d&&!k.hasWhere||k.order>=l)){n=w;break}}else for(let w=h;w<=C;w++){let k=this.rules[w];if(!(!d&&k.hasWhere)){if(d&&!k.hasWhere){n=w;break}if(k.priority<m){n=w;break}else if(k.priority===m){if(k.order>=l){n=w;break}}else n=w+1}}n===void 0&&(n=C+1)}if(this.rules.splice(n,0,i),this.ruleBy[v]=i,this.style){let w=this.style.sheet,k=0,p=c=>{let r=this.rules[c];if(r){if(!r.natives.length)return p(c-1);let s=r.natives[r.natives.length-1].cssRule;for(let b=0;b<w.cssRules.length;b++)if(w.cssRules[b]===s){k=b+1;break}}};p(n-1);for(let c=0;c<i.natives.length;)try{let r=i.natives[c];w.insertRule(r.text,k),r.cssRule=w.cssRules[k++],c++}catch(r){console.error(r),i.natives.splice(c,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(e=>e.text).join("")}},te=ie;ne(te,"root"),ne(te,"config",se),ne(te,"instances",[]),ne(te,"refresh",e=>{for(let i of ie.instances)i.refresh(e)});ge&&(window.MasterCSS=te);var Le={store:"theme",init:!0},Fe=typeof document<"u",Ee=typeof localStorage<"u",ue=class{constructor(e,i=Fe?document.documentElement:null){this.settings=e;this.host=i;this.settings=e?G(Le,e):Le,this.settings.init&&this.init()}e=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;r;t;init(){let e=this.settings.default,i=this.storage;i&&(e=i),this.value=e}get storage(){let{store:e}=this.settings;if(Ee&&e)return localStorage.getItem(e)}get systemValue(){return this.e.matches?"dark":"light"}set value(e){this.r=e,e==="system"?(this.e?.addEventListener?.("change",this.i),this.current=this.systemValue):(this.n(),this.current=e)}get value(){return this.r}set current(e){let i=this.t;this.t=e,this.host&&i!==e&&(i&&this.host.classList.remove(i),e&&!this.host.classList.contains(e)&&(this.host.classList.add(e),this.host.style&&(this.host.style.colorScheme=e)))}get current(){return this.t}switch(e,i={store:!0,emit:!0}){e&&e!==this.value&&(this.value=e,Ee&&this.storage!==e&&this.settings.store&&localStorage.setItem(this.settings.store,e),i.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}n(){this.e?.removeEventListener("change",this.i)}i=e=>{this.current=e.matches?"dark":"light"};destroy(){this.n()}};new te(window.masterCSSConfig);new ue(window.masterCSSThemeSettings);})();
|