effcss 3.12.0 → 3.12.1

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/README.md CHANGED
@@ -50,6 +50,7 @@ EffCSS is a self-confident CSS-in-JS library based only on the browser APIs. Use
50
50
  - [Preact](https://stackblitz.com/edit/effcss-3-preact-vitejs?file=index.html)
51
51
  - [Qwik](https://stackblitz.com/edit/effcss-3-qwik-vitejs?file=index.html)
52
52
  - [Lit](https://stackblitz.com/edit/effcss-3-lit-vitejs?file=index.html)
53
+ - [Astro](https://stackblitz.com/edit/effcss-3-ts-astro?file=src%2Fpages%2Findex.astro)
53
54
 
54
55
  ## Installation
55
56
 
@@ -1,7 +1,7 @@
1
1
  /*
2
- * EffCSS v3.12.0
2
+ * EffCSS v3.12.1
3
3
  * {@link https://gitverse.ru/msabitov/effcss}
4
4
  * Copyright (c) Marat Sabitov
5
5
  * @license Apache-2.0
6
6
  */
7
- "function"==typeof SuppressedError&&SuppressedError;const t=Object.entries,e=Array.isArray,s=(r,...n)=>n.length?n.reduce(((r,n)=>(t(n).forEach((([t,n])=>{n&&"object"==typeof n&&r[t]?e(r[t])&&e(n)?r[t]=[...r[t],...n]:s(r[t],n||{}):r[t]=n})),r)),r):r,r={def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},n={mode:"a",prefix:"f"},i=t=>Number((.1*184+.9*t).toFixed(2)),a={l:{dark:{bg:{xl:.24,l:.3,m:.36,s:.42,xs:.48},fg:{xl:.98,l:.93,m:.86,s:.79,xs:.72}},light:{bg:{xl:.98,l:.93,m:.88,s:.83,xs:.78},fg:{xl:0,l:.12,m:.24,s:.36,xs:.48}}},c:{dark:{bg:{pale:.02,base:.06,rich:.1},fg:{pale:.06,base:.1,rich:.14}},light:{bg:{pale:.01,base:.04,rich:.7},fg:{pale:.07,base:.11,rich:.15}}},h:{pri:184,sec:290,suc:i(142),inf:i(264),war:i(109),dan:i(29)}},c={bp:{"3xs":18,"2xs":24,xs:30,sm:40,md:48,lg:64,xl:80,"2xl":96},vars:{"":{rtime:"200ms",rem:"16px",rangle:"30deg",l:r,h:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},c:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},a:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},t:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},int:[...Array(12).keys()],fr:{0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ar:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778}},light:{l:r},dark:{l:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},palette:a,coef:{$0_:{xxs:.0625,xs:.125,s:.25,m:.5,l:.75,xl:.875,xxl:.9375},$1_:{xxs:1.0625,xs:1.125,s:1.25,m:1.5,l:1.75,xl:1.875,xxl:1.9375},$2_:{xxs:2.5,xs:4,s:5,m:7.5,l:10,xl:12,xxl:15},$16_:{xxs:20,xs:28,s:36,m:48,l:64,xl:80,xxl:120},max:150}},l=(t,e,s)=>Object.entries(t).reduce(e,s),o=Symbol("noParse"),u=(t,e,s)=>{var r,n,i;let a=""+t;return null==e?"":"object"!=typeof e||e.hasOwnProperty(o)?`${c=a,c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}:${""+e};`:(!s||(null===(r=s.startsWith)||void 0===r?void 0:r.call(s,"@"))||(null===(n=a.startsWith)||void 0===n?void 0:n.call(a,"&"))||(null===(i=a.startsWith)||void 0===i?void 0:i.call(a,"@"))?"":"&")+a+`{${l(e,((t,e)=>t+u(...e,a)),"")}}`;var c},h="@media",g="@container",m="@property",p="@keyframes",d="@layer",b="@scope",f="@supports",x="@starting-style",v=(t,e)=>{const s=h+` ${e||""}${e?" and ":""}(${t})`;return{s:s,q:t,t:e,toString:()=>s}};v.toString=()=>h;const y=t=>`(${t})`,$=t=>"string"==typeof t;function j(t){var e;if(!(null===(e=null==t?void 0:t.args)||void 0===e?void 0:e.length))return"";switch(t.key){case"or":return t.args.map((t=>$(t)?y(t):j(t))).join(" or ");case"and":return t.args.map((t=>{const e=!$(t);return e&&"or"===t.key?y(j(t)):e?j(t):y(t)})).join(" and ");case"not":const e=t.args[0];return"not "+($(e)?y(e):y(j(e)))}}const O=(t,e)=>{let s="";return t.length&&(s=t.join(" ")),e&&(s=s+(s?" and ":"")+(s&&"or"===e.key?y(j(e)):j(e))),s},k=(t={})=>{const{type:e=[],state:s}=t;return Object.defineProperties((t=>{const r=O(e,s);return{[`${h}${r?" "+r:""}`]:t}}),{key:{value:null==s?void 0:s.key},args:{value:null==s?void 0:s.args},all:{get:()=>k({state:s,type:["all"]})},print:{get:()=>k({state:s,type:["print"]})},screen:{get:()=>k({state:s,type:["screen"]})},and:{value:(...t)=>k({type:e,state:{key:"and",args:s?[s,...t]:t}})},or:{value:(...t)=>k({type:e,state:{key:"or",args:s?[s,...t]:t}})},not:{get:()=>k(s?{type:e,state:$(s)||"not"!==(null==s?void 0:s.key)?{key:"not",args:[s]}:s.args[0]}:{type:2===e.length?[e[1]]:["not",e[0]||"all"],state:s})}})},_=t=>{const{root:e="",limit:s="",mode:r=[!1,!1]}=t;return Object.defineProperties((t=>({[b+` ${e?`(${e}${r[0]?" > *":""})`:""}${e&&s?" ":""}${s?`to (${s}${r[1]?" > *":""})`:""}`]:t})),{limit:{value:t=>_({root:e,limit:t,mode:r})},root:{value:t=>_({root:t,limit:s,mode:r})},both:{value:()=>_({root:e,limit:s,mode:[!1,!0]})},none:{value:()=>_({root:e,limit:s,mode:[!0,!1]})},low:{value:()=>_({root:e,limit:s,mode:[!0,!0]})},high:{value:()=>_({root:e,limit:s,mode:[!1,!1]})},toString:{value:()=>":scope"}})},w=t=>({[x]:t}),S=t=>{const e={cp:1,lay:1,kf:1,cq:1},s=(s,r)=>{const n="string"==typeof r?r:t.name("cq",e.cq++),i=g+` ${n?n+" ":""}(${s})`;return{c:n,q:s,s:i,toString:()=>i}};s.toString=()=>g;const r=(s={})=>{const{scroll:n,type:i,name:a,state:c}=s;return Object.defineProperties((t=>{const e=O([],c);return{[`${g}${a?" "+a:""}${e?" "+e:""}`]:t}}),{container:{value:(a||"none")+" / "+(i&&n?`${i} scroll-state`:n?"scroll-state":i||"normal"),enumerable:!0},key:{value:null==c?void 0:c.key},args:{value:null==c?void 0:c.args},named:{get:()=>r({scroll:n,state:c,name:a||t.name("cq",e.cq++),type:i})},size:{get:()=>r({name:a,scroll:n,state:c,type:"size"})},isize:{get:()=>r({name:a,scroll:n,state:c,type:"inline-size"})},scroll:{get:()=>r({name:a,scroll:!0,state:c,type:i})},and:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"and",args:c?[c,...t]:t}})},or:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"or",args:c?[c,...t]:t}})},not:{value:t=>r({name:a,scroll:n,type:i,state:{key:"not",args:[t]}})},[o]:{value:!0}})},n=(s,r)=>{const n="--"+(s||t.name("cp",e.cp++)),i=m+" "+n;return{k:n,v:`var(${n})`,s:i,r:{[i]:{syntax:(null==r?void 0:r.syn)||'"*"',inherits:(null==r?void 0:r.inh)||!1,initialValue:null==r?void 0:r.ini}},toString:()=>i}};n.toString=()=>m;const i=s=>{const r=s||t.name("kf",e.kf++),n=p+" "+r;return{k:r,s:n,toString:()=>n}};i.toString=()=>p;const a=s=>{const r=s||t.name("lay",e.lay++),n=d+" "+r;return{k:r,s:n,toString:()=>n}};a.toString=()=>d;a.toString=()=>b;const c=(t="",e=!1)=>{const s=f+` ${e?"not ":""}(${t})`;return{c:t,n:e,s:s,toString:()=>s}};return c.toString=()=>f,{pr:n,kf:i,mq:v,cq:s,lay:a,sc:(t="",e="")=>{const s=b+` ${t?`(${t})`:""}${t&&e?" ":""}${e?`to (${e})`:""}`;return{r:t,l:e,s:s,toString:()=>s}},sup:c,keyframes:s=>{const r=t.name("kf",e.kf++),n=p+" "+r;return Object.defineProperties((t=>{if(!t)return{animationName:r};const{dur:e,tf:s,del:n,ic:i,dir:a,ps:c,fm:l}=t;return{animation:[e,s,n,i,a,c,l,r].filter(Boolean).join(" ")}}),{[n]:{value:s,enumerable:!0},toString:{value:()=>r},[o]:{value:!0}})},property:(s={})=>{const{syn:r='"*"',inh:n=!0,ini:i,def:a}=s,c="--"+t.name("cp",e.cp++),l=`var(${c}${void 0!==a?","+a:""})`,u=m+" "+c;return Object.defineProperties((t=>({[c]:t})),{[u]:{value:{syntax:r,inherits:n,initialValue:i},enumerable:!0},toString:{value:()=>l},[o]:{value:!0}})},scope:_({}),media:k({}),container:r({}),startingStyle:w}},q=t=>t+"px",A=t=>t+"vh",P=t=>t+"vw",E=t=>t+"vmin",z=t=>t+"vmax",C=t=>t+"em",M=t=>t+"rem",W=t=>t+"deg",N=t=>t+"rad",I=t=>t+"rad",K=t=>t+"ms",B=t=>t+"s",T=t=>t+"%",L=t=>t+"cqw",R=t=>t+"cqh",V=t=>t+"cqi",F=t=>t+"cqb",H=t=>t+"cqmin",J=t=>t+"cqmax",Z=Object.fromEntries,D=Object.entries,G=":first-",Q=":last-",U=":only-",X="child",Y=":nth-",tt="of-type",et=Y+X,st=":focus",rt={r:":root",h:":hover",f:st,fv:st+"-visible",a:":active",v:":visited",val:":valid",inv:":invalid",e:":empty",d:":disabled",rq:":required",o:":optional",m:":modal",l:":link",ph:":placeholder",ch:":checked",po:":popover-open",fc:G+X,lc:Q+X,oc:U+X,odd:et+"(odd)",even:et+"(even)",ft:G+tt,lt:Q+tt,ot:U+tt,bef:"::before",aft:"::after",bd:"::backdrop"},nt={has:":has",not:":not",is:":is",wh:":where",st:":state",nthc:et,ntho:Y+tt,dir:":dir",lang:":lang"},it="oklch",at=t=>it+`(${t})`,ct=t=>at(`from ${t}`),lt="def",ot=t=>{const e=(e,s)=>"string"==typeof s?t(e,s):s;class s{constructor(t={}){this.state={l:e("l",lt),c:e("c",lt),h:e("h",lt),a:e("a",lt)},this.merge=t=>new s(Object.assign(this.state,t)),this.l=t=>this.merge({l:e("l",t)}),this.c=t=>this.merge({c:e("c",t)}),this.h=t=>this.merge({h:e("h",t)}),this.a=t=>this.merge({a:e("a",t)}),this.state=Object.assign(this.state,t)}get s(){return this.toString()}toString(){const{l:t,c:e,h:s,a:r}=this.state;return at(`${t} ${e} ${s} / ${r}`)}}return t=>new s(t)},ut=(t,e=.1)=>ct(`${t} calc(l + ${e}) c h / alpha)`),ht=(t,e=.1)=>ct(`${t} calc(l - ${e}) c h / alpha)`),gt=(t,e=.1)=>ct(`${t} l c h / calc(alpha + ${e}))`),mt=(t,e=.1)=>ct(`${t} l c h / calc(alpha - ${e}))`),pt=(t,e=.04)=>ct(`${t} l calc(c + ${e}) h / alpha)`),dt=(t,e=.04)=>ct(`${t} l calc(c - ${e}) h / alpha)`),bt=(t,e=30)=>ct(`${t} l c calc(h${"number"==typeof e?e>0?" + "+e:" - "+-e:e}) / alpha)`),ft=({base:t,mixin:e,method:s,bpart:r,mpart:n})=>`color-mix(in ${s||it}, ${t}${void 0!==r?` ${r}%`:""}, ${e}${void 0!==n?` ${n}%`:""})`,xt=t=>({create:ot(t),oklch:at,lighten:ut,darken:ht,saturate:pt,desaturate:dt,fadein:gt,fadeout:mt,spin:bt,mix:ft}),vt="palette",yt=t=>{class e{constructor(t={}){this.state={l:"l",c:"base",h:"pri",a:1,m:"bg"},Object.assign(this,{[o]:!0}),this.state=Object.assign(this.state,t)}get xs(){return new e(Object.assign(Object.assign({},this.state),{l:"xs"}))}get s(){return new e(Object.assign(Object.assign({},this.state),{l:"s"}))}get m(){return new e(Object.assign(Object.assign({},this.state),{l:"m"}))}get l(){return new e(Object.assign(Object.assign({},this.state),{l:"l"}))}get xl(){return new e(Object.assign(Object.assign({},this.state),{l:"xl"}))}get lightness(){return{xs:this.xs,s:this.s,m:this.m,l:this.l,xl:this.xl}}get gray(){return new e(Object.assign(Object.assign({},this.state),{c:"gray"}))}get pale(){return new e(Object.assign(Object.assign({},this.state),{c:"pale"}))}get base(){return new e(Object.assign(Object.assign({},this.state),{c:"base"}))}get rich(){return new e(Object.assign(Object.assign({},this.state),{c:"rich"}))}get chroma(){return{gray:this.gray,pale:this.pale,base:this.base,rich:this.rich}}get pri(){return new e(Object.assign(Object.assign({},this.state),{h:"pri"}))}get sec(){return new e(Object.assign(Object.assign({},this.state),{h:"sec"}))}get suc(){return new e(Object.assign(Object.assign({},this.state),{h:"suc"}))}get inf(){return new e(Object.assign(Object.assign({},this.state),{h:"inf"}))}get war(){return new e(Object.assign(Object.assign({},this.state),{h:"war"}))}get dan(){return new e(Object.assign(Object.assign({},this.state),{h:"dan"}))}get hue(){return{pri:this.pri,sec:this.sec,suc:this.suc,inf:this.inf,war:this.war,dan:this.dan}}alpha(t=1){return new e(Object.assign(Object.assign({},this.state),{a:t}))}get bg(){return new e(Object.assign(Object.assign({},this.state),{m:"bg"}))}get fg(){return new e(Object.assign(Object.assign({},this.state),{m:"fg"}))}toString(){const{l:e,c:s,h:r,a:n,m:i}=this.state;return`oklch(${t(vt,"l",i,e)} ${t(vt,"c",i,s)} ${t(vt,"h",r)} / ${n})`}}return new e},$t="coef",jt=t=>{class e{constructor(t={}){this.state={center:8},this.state=Object.assign(this.state,t)}get min(){return t($t,this.state.center-4)}get xxs(){return t($t,this.state.center-3)}get xs(){return t($t,this.state.center-2)}get s(){return t($t,this.state.center-1)}get m(){return t($t,this.state.center)}get l(){return t($t,this.state.center+1)}get xl(){return t($t,this.state.center+2)}get xxl(){return t($t,this.state.center+3)}get max(){return t($t,this.state.center+4)}get $0_(){return new e({center:4})}get $1_(){return new e({center:12})}get $2_(){return new e({center:20})}get $16_(){return new e({center:28})}get $1(){return new e({center:8})}get $2(){return new e({center:16})}get $16(){return new e({center:24})}get short(){return{s:this.s,m:this.m,l:this.l}}get base(){return Object.assign(Object.assign({xs:this.xs},this.short),{xl:this.xl})}get long(){return Object.assign(Object.assign({xxs:this.xxs},this.base),{xxl:this.xxl})}get full(){return Object.assign(Object.assign({min:this.min},this.long),{max:this.max})}get main(){return{min:this.min,m:this.m,max:this.max}}get sparse(){return{min:this.min,xs:this.xs,m:this.m,xl:this.xl,max:this.max}}}return new e},Ot=Object.assign,kt=Object.entries,_t={dash:(...t)=>t.join("-"),comma:(...t)=>t.join(),space:(...t)=>t.join(" "),range:(t,e)=>Array.from(Array(t).entries()).reduce(((t,[s])=>Ot(t,e(s+1))),{}),each:(t,e)=>kt(t).reduce(((t,[s,r])=>Ot(t,e(s,r))),{}),when:(t,e,s={})=>t?e:s},wt="width: ",St=t=>{const{scope:e,globalKey:r="",bp:n={}}=t,i=e(r).varExp,a=t=>i(...t.split(".")),c=(t=1)=>`calc(${t} * ${a("rtime")})`,o=(t=1)=>`calc(${t} * ${a("rangle")})`,h=(t=1)=>`calc(${t} * 1rem)`;return{compile:({key:t,maker:r})=>{const g=e(t),m=S(g),p=t=>{const e=n[t]||t;return"number"==typeof e?e+"rem":""},d=t=>"min-"+wt+p(t),b=t=>"max-"+wt+p(t),f=(t,e)=>"string"==typeof e?m.cq(t,e):m.mq(t),x=(t,e,s)=>""+f(d(t)+") and ("+b(e),s),v={up:(t,e)=>""+f(d(t),e),down:(t,e)=>""+f(b(t),e),between:x,only:(t,e)=>x(t,t,e)};return y=r(Object.assign(_t,{key:t,vars:a,size:h,time:c,angle:o,bem:g.selector,pseudo:Object.assign(Z(D(rt).map((([t,e])=>{function s(t=""){return t+e}return s.toString=()=>e,[t,s]}))),Z(D(nt).map((([t,e])=>{function s(t,s=""){return s+e+`(${t})`}return s.toString=()=>e,[t,s]})))),color:xt(i),palette:yt(i),coef:jt(i),units:{px:q,vh:A,vw:P,vmin:E,vmax:z,em:C,rem:M,deg:W,rad:N,turn:I,ms:K,s:B,pc:T,cqw:L,cqh:R,cqb:F,cqi:V,cqmin:H,cqmax:J},at:m,limit:v,merge:s})),l(y,((t,e)=>t+u(...e)),"");var y}}};const qt=()=>{const t=new Set,e=new Map;return{use(s,r){const n=e.get(s);return n||(t.add(r),e.set(s,r),r)},useMany(t){return Object.entries(t).map((([t,e])=>this.use(e,t)))},getKey:t=>e.get(t),get keys(){return[...t]},get makers(){return Object.fromEntries(e.entries().map((([t,e])=>[e,t])))}}},At=({prefix:t=n.prefix})=>{let e=1;return{get base(){return t+0},get current(){return t+e},next(){return e++,this.current},reset(){e=1}}},Pt=void 0,Et=Object.entries,zt=Object.defineProperties,Ct=t=>"string"==typeof t,Mt=t=>null!==t&&"object"==typeof t,Wt=t=>t.split("."),Nt=(t,e)=>Et(t).reduce(((t,[s,r])=>{if(Mt(r)){const n=Et(r);n.length?t.push(...n.reduce(((t,[r,n])=>{if((t=>null!==t&&t!==Pt)(r)&&e&&t.push([s,r,Pt,Pt]),Mt(n)){const e=Et(n);e.length&&t.push(...e.reduce(((t,[e,n])=>{const i=typeof n;return"string"!==i&&"number"!==i||t.push([s,r,e,n]),t}),[]))}return t}),[])):t.push([s,Pt,Pt,Pt])}return t}),[]),It=(t,e,s,r)=>""+(((t,e)=>`${t||""}${e?"__"+e:""}`)(t,e)+(s?"_"+s:"")+(s&&r?"_"+r:""))||"_",Kt=(t,e)=>"."+(e?t+(e.startsWith("_")?"":"-")+e:t),Bt=(t,e)=>`[data-${t}${e?`~="${e}"`:""}]`;const Tt=t=>t||"",Lt="effcss-provider",Rt="theme",Vt="size",Ft="time",Ht="angle",Jt="palette",Zt=Object.assign,Dt=Object.entries,Gt=Object.fromEntries,Qt=(t,e)=>t.getAttribute(e)||n[e],Ut=(t,e)=>(t=>null!==t?Number(t):null)(Qt(t,e)),Xt=(t,e,s)=>null===s?t.removeAttribute(e):t.setAttribute(e,s+""),Yt=t=>`:root:has(script[is=${Lt}]${t?`[${t}]`:""})`,te=t=>[t.xxs,t.xs,t.s,t.m,t.l,t.xl,t.xxl],ee=["xs","s","m","l","xl"],se=["pale","base","rich"],re=({scope:t,keyMaker:e,provider:s})=>{const r=s.settings,n=null==r?void 0:r.vars,{varName:i}=t(e.base),a=t=>i("",t);function c(t,e){return Dt(t).reduce(((t,[s,r])=>r&&"object"==typeof r?Zt(t,c(r,[...e,s])):(t[i(...e,s)]=r,t)),{})}const l=Gt(Dt(n||{}).map((([t,e])=>[t,c(e,[])]))),{"":o={},dark:u,light:h}=l,g=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}(l,["","dark","light"]),m=s.size,p=s.time,d=s.angle,{l:b,c:f,h:x}=r.palette,v=r.coef,y=[0,...te(v.$0_),1,...te(v.$1_),2,...te(v.$2_),16,...te(v.$16_),v.max];return({bem:t,each:e,when:s,vars:r,merge:n,at:{media:c},units:{px:u,ms:h,deg:v}})=>{const $="prefers-color-scheme",j={light:`${$}: light`,dark:`${$}: dark`};return n({[Yt()]:n({fontSize:r("rem")},o,e(y,((t,e)=>({[i("coef",t)]:e}))),e(x,((t,e)=>({[i(Jt,"h",t)]:e}))),{[i(Jt,"c","bg","gray")]:0,[i(Jt,"c","fg","gray")]:0},e(j,((t,s)=>c.and(s)(n(l[t]||{},e(ee,((e,s)=>({[i(Jt,"l","bg",s)]:b[t].bg[s],[i(Jt,"l","fg",s)]:b[t].fg[s]}))),e(se,((e,s)=>({[i(Jt,"c","bg",s)]:f[t].bg[s],[i(Jt,"c","fg",s)]:f[t].fg[s]}))))))))},e(g,((e,s)=>({[Yt(`${Rt}=${e}`)]:s,[t(`..theme.${e}`)]:s}))),s(!!m,{[Yt(Vt)]:{[a("rem")]:u(m)}}),s(!!p,{[Yt(Ft)]:{[a("rtime")]:h(p)}}),s(!!d,{[Yt(Ht)]:{[a("rangle")]:v(d)}}))}};!function(t={}){const e=globalThis.document,r=globalThis.customElements;if(null==r?void 0:r.get(Lt))return!1;{class n extends HTMLScriptElement{constructor(){super(...arguments),this._c=qt(),this._settings=c,this._cust=()=>{this._=re({scope:this._s,keyMaker:this._k,provider:this}),this.use(this._,this._k.base,!0)}}static get observedAttributes(){return[Vt,Ft,Ht]}get settings(){return this._settings}set settings(t){var e,r,n;const i=s({},this._settings,t),{makers:a,bp:c,off:l}=i;(c&&(null===(e=this._settings)||void 0===e?void 0:e.bp)!==c||!this._p)&&(this._p=St({scope:this._s,globalKey:this._k.base,bp:c})),a&&(null===(r=this._settings)||void 0===r?void 0:r.makers)!==a&&(this._c.useMany(a),this.usePublic(a),(null==l?void 0:l.length)&&this._settings.off!==l&&this.off(...l)),this._settings=i,(!(null===(n=this._m)||void 0===n?void 0:n.has(this._k.base))||t.vars||t.palette||t.coef)&&this._cust()}get makers(){return this._c.makers}attributeChangedCallback(){this._k&&this._cust()}connectedCallback(){var r;this.textContent?this._settings=s(this._settings,JSON.parse(this.textContent)):t&&(this._settings=s(this._settings,t)),r=this,Object.defineProperties(r,{prefix:{get:()=>r.getAttribute("prefix")||"f"},mode:{get:()=>r.getAttribute("mode")||"a"},min:{get:()=>""===r.getAttribute("min")},hydrate:{get:()=>""===r.getAttribute("hydrate")},theme:{set(t){Xt(r,Rt,t)},get:()=>Qt(r,Rt)||""},size:{set(t){Xt(r,Vt,t)},get:()=>Ut(r,Vt)},time:{set(t){Xt(r,Ft,t)},get:()=>Ut(r,Ft)},angle:{set(t){Xt(r,Ht,t)},get:()=>Ut(r,Ht)}}),this._k=At({prefix:this.prefix}),this._s=((t={})=>{const{mode:e,min:s}=t;let r,n;return r="a"===e?Bt:Kt,s&&(n={}),t=>{let s=0,i=Tt,a=Tt;n&&(n[t]||(n[t]={}),i=e=>{var r;return null!==(r=n[t][e])&&void 0!==r?r:n[t][e]=(s++).toString(36)},a=e=>n[t][e]);let c=(...e)=>[t,...e].filter(Boolean).join("-"),l="class",o=e=>e?t+(e.startsWith("_")?"":"-")+e:void 0===e?void 0:t;"a"===e&&(l="data-"+t,o=Tt);const u=(...t)=>"--"+c(...t),h=t=>{if(void 0===t)return function(t){const e=({b:s,e:r,m:n})=>({b:t=>e({b:t,e:"",m:{}}),e:t=>e({b:s,e:t,m:{}}),m:(t={})=>e({b:s,e:r,m:t}),get $(){return t({[s]:{[r]:n}})}});return e({b:"",e:"",m:{}})}(h);let e,s,r,n,i="";const c=Ct(t);return i=c||Array.isArray(t)?[...(c?[t]:t).reduce(((t,i)=>([e,s,r,n]=Wt(i),t.add(o(a(It(e,s)))),r&&t.add(o(a(It(e,s,r,n)))),t)),new Set).values()].join(" "):t&&Nt(t,!0).map((([t,e,s,r])=>o(a(It(t,e,s,r))))).join(" "),zt({[l]:i},{toString:{value:()=>`${l}="${i}"`},$:{value:i}})};return{selector:e=>{let s,n,a,c;return Ct(e)?([s,n,a,c]=Wt(e),r(t,i(It(s,n,a,c)))):e&&Nt(e).map((([e,s,n,a])=>r(t,i(It(e,s,n,a))))).join(",")},attr:h,name:c,varName:u,varExp:(...t)=>`var(${u(...t)})`}}})({mode:this.mode,min:this.min}),this._p=St({scope:this._s,globalKey:this._k.base,bp:t.bp||this.settings.bp}),this._m=function(t){const e={};null==t||t.forEach((t=>{const s=t.dataset.effcss;s&&(e[s]=t)}));let s={},r={},n=[],i=[];const a=(t,e)=>(e.toString=()=>"effcss-"+t,e),c=t=>{var e;return t.adoptedStyleSheets=[...(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)?[...t.adoptedStyleSheets].filter((t=>!(t+"").startsWith("effcss-"))):[],...n]},l=()=>{i=i.reduce(((t,e)=>{const s=e.deref();return s&&(c(s),t.push(e)),t}),[])},o=t=>n.findIndex((e=>e===t)),u=t=>t?s[t]:void 0,h=(t,r)=>{if(!s[t]){s[t]=a(t,r),n.push(s[t]);const i=e[t];return i&&(i.disabled=!0),l(),!0}},g=t=>{const e=u(t);return!!e&&-1!==o(e)};return{apply:c,notify:l,getIndex:o,get:u,has:t=>!!t&&!!u(t),getAll:()=>s,add:h,status:g,on:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);return!(!s||g(e))&&(n.push(s),t)}),!0);return l(),e},off:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);if(s&&g(e)){const e=o(s);return n.splice(e,1),t}return!1}),!0);return l(),e},remove:t=>{const e=u(t);if(!e)return;const i=o(e);return i>-1&&(n.splice(i,1),delete s[t],delete r[t]),l(),!0},removeAll:()=>(n.splice(0),s={},r={},l(),!0),pack:(t,e)=>{let r=s[t]||new CSSStyleSheet;return r.replaceSync(e),r=a(t,r),!!r.cssRules.length&&h(t,r)},replace:(t,e)=>{const r=s[t];if(r)return r.replaceSync(e),l(),!0},register:t=>{i.findIndex((e=>e.deref()===t))>=0||(i.push(new WeakRef(t)),c(t))},unregister:t=>{const e=i.findIndex((e=>e.deref()===t));e>=0&&i.splice(e,1)}}}(e.querySelectorAll("[data-effcss]"));const n=(({scope:t,keyMaker:e,collector:s,manager:r,processor:n})=>{const i=t=>"string"==typeof t?t:s.getKey(t),a=s=>t(s||e.base).attr,c=(t,e)=>n.compile({key:e,maker:t}),l=(t,n,i)=>{const l=n||e.current;let o=s.use(t,l);return(i||r&&!r.has(o))&&(r.pack(o,c(t,o)),n||e.next()),a(o)};return{key:i,resolve:a,use:l,usePublic:t=>Gt(Dt(t).map((([t,e])=>[t,l(e,t)]))),usePrivate:t=>t.map((t=>l(t))),css:c,status:t=>{const e=i(t);return!!e&&r.status(e)},on:(...t)=>r.on(...t.map(i)),off:(...t)=>r.off(...t.map(i)),stylesheets:(...t)=>{let e;return e=t.length?1===t.length&&Array.isArray(t[0])?t[0]:t:s.keys,e.map((t=>r.get(i(t))))}}})({scope:this._s,processor:this._p,keyMaker:this._k,manager:this._m,collector:this._c});Object.assign(this,n),this._cust();const i=this;this._n={set adoptedStyleSheets(t){i.dispatchEvent(new CustomEvent("effcsschanges",{detail:{styles:t},bubbles:!0}))}},this._m.register(this._n),this._m.register(e)}toString(){return`<script ${[...this.attributes].map((t=>t.value?`${t.name}="${t.value}"`:""===t.value?t.name:"")).filter(Boolean).join(" ")}>${this.textContent}<\/script>`}}r.define(Lt,n,{extends:"script"})}}();
7
+ "function"==typeof SuppressedError&&SuppressedError;const t=Object.entries,e=Array.isArray,s=(r,...n)=>n.length?n.reduce(((r,n)=>(t(n).forEach((([t,n])=>{n&&"object"==typeof n&&r[t]?e(r[t])&&e(n)?r[t]=[...r[t],...n]:s(r[t],n||{}):r[t]=n})),r)),r):r,r={def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},n={mode:"a",prefix:"f"},i=t=>Number((.1*184+.9*t).toFixed(2)),a={l:{dark:{bg:{xl:.24,l:.3,m:.36,s:.42,xs:.48},fg:{xl:.98,l:.93,m:.86,s:.79,xs:.72}},light:{bg:{xl:.98,l:.93,m:.88,s:.83,xs:.78},fg:{xl:0,l:.12,m:.24,s:.36,xs:.48}}},c:{dark:{bg:{pale:.02,base:.06,rich:.1},fg:{pale:.06,base:.1,rich:.14}},light:{bg:{pale:.01,base:.04,rich:.7},fg:{pale:.07,base:.11,rich:.15}}},h:{pri:184,sec:290,suc:i(142),inf:i(264),war:i(109),dan:i(29)}},c={bp:{"3xs":18,"2xs":24,xs:30,sm:40,md:48,lg:64,xl:80,"2xl":96},vars:{"":{rtime:"200ms",rem:"16px",rangle:"30deg",l:r,h:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},c:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},a:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},t:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},int:[...Array(12).keys()],fr:{0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ar:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778}},light:{l:r},dark:{l:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},palette:a,coef:{$0_:{xxs:.0625,xs:.125,s:.25,m:.5,l:.75,xl:.875,xxl:.9375},$1_:{xxs:1.0625,xs:1.125,s:1.25,m:1.5,l:1.75,xl:1.875,xxl:1.9375},$2_:{xxs:2.5,xs:4,s:5,m:7.5,l:10,xl:12,xxl:15},$16_:{xxs:20,xs:28,s:36,m:48,l:64,xl:80,xxl:120},max:150}},l=(t,e,s)=>Object.entries(t).reduce(e,s),o=Symbol("noParse"),u=(t,e,s)=>{var r,n,i;let a=""+t;return null==e?"":"object"!=typeof e||e.hasOwnProperty(o)?`${c=a,c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}:${""+e};`:(!s||(null===(r=s.startsWith)||void 0===r?void 0:r.call(s,"@"))||(null===(n=a.startsWith)||void 0===n?void 0:n.call(a,"&"))||(null===(i=a.startsWith)||void 0===i?void 0:i.call(a,"@"))?"":"&")+a+`{${l(e,((t,e)=>t+u(...e,a)),"")}}`;var c},h="@media",g="@container",m="@property",p="@keyframes",d="@layer",b="@scope",f="@supports",x="@starting-style",v=(t,e)=>{const s=h+` ${e||""}${e?" and ":""}(${t})`;return{s:s,q:t,t:e,toString:()=>s}};v.toString=()=>h;const y=t=>`(${t})`,$=t=>"string"==typeof t;function j(t){var e;if(!(null===(e=null==t?void 0:t.args)||void 0===e?void 0:e.length))return"";switch(t.key){case"or":return t.args.map((t=>$(t)?y(t):j(t))).join(" or ");case"and":return t.args.map((t=>{const e=!$(t);return e&&"or"===t.key?y(j(t)):e?j(t):y(t)})).join(" and ");case"not":const e=t.args[0];return"not "+($(e)?y(e):y(j(e)))}}const O=(t,e)=>{let s="";return t.length&&(s=t.join(" ")),e&&(s=s+(s?" and ":"")+(s&&"or"===e.key?y(j(e)):j(e))),s},k=(t={})=>{const{type:e=[],state:s}=t;return Object.defineProperties((t=>{const r=O(e,s);return{[`${h}${r?" "+r:""}`]:t}}),{key:{value:null==s?void 0:s.key},args:{value:null==s?void 0:s.args},all:{get:()=>k({state:s,type:["all"]})},print:{get:()=>k({state:s,type:["print"]})},screen:{get:()=>k({state:s,type:["screen"]})},and:{value:(...t)=>k({type:e,state:{key:"and",args:s?[s,...t]:t}})},or:{value:(...t)=>k({type:e,state:{key:"or",args:s?[s,...t]:t}})},not:{get:()=>k(s?{type:e,state:$(s)||"not"!==(null==s?void 0:s.key)?{key:"not",args:[s]}:s.args[0]}:{type:2===e.length?[e[1]]:["not",e[0]||"all"],state:s})}})},_=t=>{const{root:e="",limit:s="",mode:r=[!1,!1]}=t;return Object.defineProperties((t=>({[b+` ${e?`(${e}${r[0]?" > *":""})`:""}${e&&s?" ":""}${s?`to (${s}${r[1]?" > *":""})`:""}`]:t})),{limit:{value:t=>_({root:e,limit:t,mode:r})},root:{value:t=>_({root:t,limit:s,mode:r})},both:{value:()=>_({root:e,limit:s,mode:[!1,!0]})},none:{value:()=>_({root:e,limit:s,mode:[!0,!1]})},low:{value:()=>_({root:e,limit:s,mode:[!0,!0]})},high:{value:()=>_({root:e,limit:s,mode:[!1,!1]})},toString:{value:()=>":scope"}})},w=t=>({[x]:t}),S=t=>{const e={cp:1,lay:1,kf:1,cq:1},s=(s,r)=>{const n="string"==typeof r?r:t.name("cq",e.cq++),i=g+` ${n?n+" ":""}(${s})`;return{c:n,q:s,s:i,toString:()=>i}};s.toString=()=>g;const r=(s={})=>{const{scroll:n,type:i,name:a,state:c}=s;return Object.defineProperties((t=>{const e=O([],c);return{[`${g}${a?" "+a:""}${e?" "+e:""}`]:t}}),{container:{value:(a||"none")+" / "+(i&&n?`${i} scroll-state`:n?"scroll-state":i||"normal"),enumerable:!0},key:{value:null==c?void 0:c.key},args:{value:null==c?void 0:c.args},named:{get:()=>r({scroll:n,state:c,name:a||t.name("cq",e.cq++),type:i})},size:{get:()=>r({name:a,scroll:n,state:c,type:"size"})},isize:{get:()=>r({name:a,scroll:n,state:c,type:"inline-size"})},scroll:{get:()=>r({name:a,scroll:!0,state:c,type:i})},and:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"and",args:c?[c,...t]:t}})},or:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"or",args:c?[c,...t]:t}})},not:{value:t=>r({name:a,scroll:n,type:i,state:{key:"not",args:[t]}})},[o]:{value:!0}})},n=(s,r)=>{const n="--"+(s||t.name("cp",e.cp++)),i=m+" "+n;return{k:n,v:`var(${n})`,s:i,r:{[i]:{syntax:(null==r?void 0:r.syn)||'"*"',inherits:(null==r?void 0:r.inh)||!1,initialValue:null==r?void 0:r.ini}},toString:()=>i}};n.toString=()=>m;const i=s=>{const r=s||t.name("kf",e.kf++),n=p+" "+r;return{k:r,s:n,toString:()=>n}};i.toString=()=>p;const a=s=>{const r=s||t.name("lay",e.lay++),n=d+" "+r;return{k:r,s:n,toString:()=>n}};a.toString=()=>d;a.toString=()=>b;const c=(t="",e=!1)=>{const s=f+` ${e?"not ":""}(${t})`;return{c:t,n:e,s:s,toString:()=>s}};return c.toString=()=>f,{pr:n,kf:i,mq:v,cq:s,lay:a,sc:(t="",e="")=>{const s=b+` ${t?`(${t})`:""}${t&&e?" ":""}${e?`to (${e})`:""}`;return{r:t,l:e,s:s,toString:()=>s}},sup:c,keyframes:s=>{const r=t.name("kf",e.kf++),n=p+" "+r;return Object.defineProperties((t=>{if(!t)return{animationName:r};const{dur:e,tf:s,del:n,ic:i,dir:a,ps:c,fm:l}=t;return{animation:[e,s,n,i,a,c,l,r].filter(Boolean).join(" ")}}),{[n]:{value:s,enumerable:!0},toString:{value:()=>r},[o]:{value:!0}})},property:(s={})=>{const{syn:r='"*"',inh:n=!0,ini:i,def:a}=s,c="--"+t.name("cp",e.cp++),l=`var(${c}${void 0!==a?","+a:""})`,u=m+" "+c;return Object.defineProperties((t=>({[c]:t})),{[u]:{value:{syntax:r,inherits:n,initialValue:i},enumerable:!0},toString:{value:()=>l},fallback:{value:t=>`var(${c},${t})`},[o]:{value:!0}})},scope:_({}),media:k({}),container:r({}),startingStyle:w}},q=t=>t+"px",A=t=>t+"vh",P=t=>t+"vw",E=t=>t+"vmin",C=t=>t+"vmax",z=t=>t+"em",M=t=>t+"rem",N=t=>t+"deg",W=t=>t+"rad",I=t=>t+"rad",K=t=>t+"ms",B=t=>t+"s",T=t=>t+"%",J=t=>t+"cqw",L=t=>t+"cqh",R=t=>t+"cqi",V=t=>t+"cqb",F=t=>t+"cqmin",H=t=>t+"cqmax",Z=Object.fromEntries,D=Object.entries,G=":first-",Q=":last-",U=":only-",X="child",Y=":nth-",tt="of-type",et=Y+X,st=":focus",rt={r:":root",h:":hover",f:st,fv:st+"-visible",a:":active",v:":visited",val:":valid",inv:":invalid",e:":empty",d:":disabled",rq:":required",o:":optional",m:":modal",l:":link",ph:":placeholder",ch:":checked",po:":popover-open",fc:G+X,lc:Q+X,oc:U+X,odd:et+"(odd)",even:et+"(even)",ft:G+tt,lt:Q+tt,ot:U+tt,bef:"::before",aft:"::after",bd:"::backdrop"},nt={has:":has",not:":not",is:":is",wh:":where",st:":state",nthc:et,ntho:Y+tt,dir:":dir",lang:":lang"},it="oklch",at=t=>it+`(${t})`,ct=t=>at(`from ${t}`),lt="def",ot=t=>{const e=(e,s)=>"string"==typeof s?t(e,s):s;class s{constructor(t={}){this.state={l:e("l",lt),c:e("c",lt),h:e("h",lt),a:e("a",lt)},this.merge=t=>new s(Object.assign(this.state,t)),this.l=t=>this.merge({l:e("l",t)}),this.c=t=>this.merge({c:e("c",t)}),this.h=t=>this.merge({h:e("h",t)}),this.a=t=>this.merge({a:e("a",t)}),this.state=Object.assign(this.state,t)}get s(){return this.toString()}toString(){const{l:t,c:e,h:s,a:r}=this.state;return at(`${t} ${e} ${s} / ${r}`)}}return t=>new s(t)},ut=(t,e=.1)=>ct(`${t} calc(l + ${e}) c h / alpha)`),ht=(t,e=.1)=>ct(`${t} calc(l - ${e}) c h / alpha)`),gt=(t,e=.1)=>ct(`${t} l c h / calc(alpha + ${e}))`),mt=(t,e=.1)=>ct(`${t} l c h / calc(alpha - ${e}))`),pt=(t,e=.04)=>ct(`${t} l calc(c + ${e}) h / alpha)`),dt=(t,e=.04)=>ct(`${t} l calc(c - ${e}) h / alpha)`),bt=(t,e=30)=>ct(`${t} l c calc(h${"number"==typeof e?e>0?" + "+e:" - "+-e:e}) / alpha)`),ft=({base:t,mixin:e,method:s,bpart:r,mpart:n})=>`color-mix(in ${s||it}, ${t}${void 0!==r?` ${r}%`:""}, ${e}${void 0!==n?` ${n}%`:""})`,xt=t=>({create:ot(t),oklch:at,lighten:ut,darken:ht,saturate:pt,desaturate:dt,fadein:gt,fadeout:mt,spin:bt,mix:ft}),vt="palette",yt=t=>{class e{constructor(t={}){this.state={l:"l",c:"base",h:"pri",a:1,m:"bg"},Object.assign(this,{[o]:!0}),this.state=Object.assign(this.state,t)}get xs(){return new e(Object.assign(Object.assign({},this.state),{l:"xs"}))}get s(){return new e(Object.assign(Object.assign({},this.state),{l:"s"}))}get m(){return new e(Object.assign(Object.assign({},this.state),{l:"m"}))}get l(){return new e(Object.assign(Object.assign({},this.state),{l:"l"}))}get xl(){return new e(Object.assign(Object.assign({},this.state),{l:"xl"}))}get lightness(){return{xs:this.xs,s:this.s,m:this.m,l:this.l,xl:this.xl}}get gray(){return new e(Object.assign(Object.assign({},this.state),{c:"gray"}))}get pale(){return new e(Object.assign(Object.assign({},this.state),{c:"pale"}))}get base(){return new e(Object.assign(Object.assign({},this.state),{c:"base"}))}get rich(){return new e(Object.assign(Object.assign({},this.state),{c:"rich"}))}get chroma(){return{gray:this.gray,pale:this.pale,base:this.base,rich:this.rich}}get pri(){return new e(Object.assign(Object.assign({},this.state),{h:"pri"}))}get sec(){return new e(Object.assign(Object.assign({},this.state),{h:"sec"}))}get suc(){return new e(Object.assign(Object.assign({},this.state),{h:"suc"}))}get inf(){return new e(Object.assign(Object.assign({},this.state),{h:"inf"}))}get war(){return new e(Object.assign(Object.assign({},this.state),{h:"war"}))}get dan(){return new e(Object.assign(Object.assign({},this.state),{h:"dan"}))}get hue(){return{pri:this.pri,sec:this.sec,suc:this.suc,inf:this.inf,war:this.war,dan:this.dan}}alpha(t=1){return new e(Object.assign(Object.assign({},this.state),{a:t}))}get bg(){return new e(Object.assign(Object.assign({},this.state),{m:"bg"}))}get fg(){return new e(Object.assign(Object.assign({},this.state),{m:"fg"}))}toString(){const{l:e,c:s,h:r,a:n,m:i}=this.state;return`oklch(${t(vt,"l",i,e)} ${t(vt,"c",i,s)} ${t(vt,"h",r)} / ${n})`}}return new e},$t="coef",jt=t=>{class e{constructor(t={}){this.state={center:8},this.state=Object.assign(this.state,t)}get min(){return t($t,this.state.center-4)}get xxs(){return t($t,this.state.center-3)}get xs(){return t($t,this.state.center-2)}get s(){return t($t,this.state.center-1)}get m(){return t($t,this.state.center)}get l(){return t($t,this.state.center+1)}get xl(){return t($t,this.state.center+2)}get xxl(){return t($t,this.state.center+3)}get max(){return t($t,this.state.center+4)}get $0_(){return new e({center:4})}get $1_(){return new e({center:12})}get $2_(){return new e({center:20})}get $16_(){return new e({center:28})}get $1(){return new e({center:8})}get $2(){return new e({center:16})}get $16(){return new e({center:24})}get short(){return{s:this.s,m:this.m,l:this.l}}get base(){return Object.assign(Object.assign({xs:this.xs},this.short),{xl:this.xl})}get long(){return Object.assign(Object.assign({xxs:this.xxs},this.base),{xxl:this.xxl})}get full(){return Object.assign(Object.assign({min:this.min},this.long),{max:this.max})}get main(){return{min:this.min,m:this.m,max:this.max}}get sparse(){return{min:this.min,xs:this.xs,m:this.m,xl:this.xl,max:this.max}}}return new e},Ot=Object.assign,kt=Object.entries,_t={dash:(...t)=>t.join("-"),comma:(...t)=>t.join(),space:(...t)=>t.join(" "),range:(t,e)=>Array.from(Array(t).entries()).reduce(((t,[s])=>Ot(t,e(s+1))),{}),each:(t,e)=>kt(t).reduce(((t,[s,r])=>Ot(t,e(s,r))),{}),when:(t,e,s={})=>t?e:s},wt="width: ",St=t=>{const{scope:e,globalKey:r="",bp:n={}}=t,i=e(r).varExp,a=t=>i(...t.split(".")),c=(t=1)=>`calc(${t} * ${a("rtime")})`,o=(t=1)=>`calc(${t} * ${a("rangle")})`,h=(t=1)=>`calc(${t} * 1rem)`;return{compile:({key:t,maker:r})=>{const g=e(t),m=S(g),p=t=>{const e=n[t]||t;return"number"==typeof e?e+"rem":""},d=t=>"min-"+wt+p(t),b=t=>"max-"+wt+p(t),f=(t,e)=>"string"==typeof e?m.cq(t,e):m.mq(t),x=(t,e,s)=>""+f(d(t)+") and ("+b(e),s),v={up:(t,e)=>""+f(d(t),e),down:(t,e)=>""+f(b(t),e),between:x,only:(t,e)=>x(t,t,e)};return y=r(Object.assign(_t,{key:t,vars:a,size:h,time:c,angle:o,bem:g.selector,pseudo:Object.assign(Z(D(rt).map((([t,e])=>{function s(t=""){return t+e}return s.toString=()=>e,[t,s]}))),Z(D(nt).map((([t,e])=>{function s(t,s=""){return s+e+`(${t})`}return s.toString=()=>e,[t,s]})))),color:xt(i),palette:yt(i),coef:jt(i),units:{px:q,vh:A,vw:P,vmin:E,vmax:C,em:z,rem:M,deg:N,rad:W,turn:I,ms:K,s:B,pc:T,cqw:J,cqh:L,cqb:V,cqi:R,cqmin:F,cqmax:H},at:m,limit:v,merge:s})),l(y,((t,e)=>t+u(...e)),"");var y}}};const qt=()=>{const t=new Set,e=new Map;return{use(s,r){const n=e.get(s);return n||(t.add(r),e.set(s,r),r)},useMany(t){return Object.entries(t).map((([t,e])=>this.use(e,t)))},getKey:t=>e.get(t),get keys(){return[...t]},get makers(){return Object.fromEntries(e.entries().map((([t,e])=>[e,t])))}}},At=({prefix:t=n.prefix})=>{let e=1;return{get base(){return t+0},get current(){return t+e},next(){return e++,this.current},reset(){e=1}}},Pt=void 0,Et=Object.entries,Ct=Object.defineProperties,zt=t=>"string"==typeof t,Mt=t=>null!==t&&"object"==typeof t,Nt=t=>t.split("."),Wt=(t,e)=>Et(t).reduce(((t,[s,r])=>{if(Mt(r)){const n=Et(r);n.length?t.push(...n.reduce(((t,[r,n])=>{if((t=>null!==t&&t!==Pt)(r)&&e&&t.push([s,r,Pt,Pt]),Mt(n)){const e=Et(n);e.length&&t.push(...e.reduce(((t,[e,n])=>{const i=typeof n;return"string"!==i&&"number"!==i||t.push([s,r,e,n]),t}),[]))}return t}),[])):t.push([s,Pt,Pt,Pt])}return t}),[]),It=(t,e,s,r)=>""+(((t,e)=>`${t||""}${e?"__"+e:""}`)(t,e)+(s?"_"+s:"")+(s&&r?"_"+r:""))||"_",Kt=(t,e)=>"."+(e?t+(e.startsWith("_")?"":"-")+e:t),Bt=(t,e)=>`[data-${t}${e?`~="${e}"`:""}]`;const Tt=t=>t||"",Jt="effcss-provider",Lt="script",Rt="theme",Vt="size",Ft="time",Ht="angle",Zt="palette",Dt="data-effcss",Gt=Dt+"-scope",Qt=Object.assign,Ut=Object.entries,Xt=Object.fromEntries,Yt=(t,e)=>t.getAttribute(e)||n[e],te=(t,e)=>(t=>null!==t?Number(t):null)(Yt(t,e)),ee=(t,e,s)=>null===s?t.removeAttribute(e):t.setAttribute(e,s+""),se=t=>`:root:has(${Lt}[is=${Jt}]${t?`[${t}]`:""})`,re=t=>[t.xxs,t.xs,t.s,t.m,t.l,t.xl,t.xxl],ne=["xs","s","m","l","xl"],ie=["pale","base","rich"],ae=({scope:t,keyMaker:e,provider:s})=>{const r=s.settings,n=null==r?void 0:r.vars,{varName:i}=t(e.base),a=t=>i("",t);function c(t,e){return Ut(t).reduce(((t,[s,r])=>r&&"object"==typeof r?Qt(t,c(r,[...e,s])):(t[i(...e,s)]=r,t)),{})}const l=Xt(Ut(n||{}).map((([t,e])=>[t,c(e,[])]))),{"":o={},dark:u,light:h}=l,g=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}(l,["","dark","light"]),m=s.size,p=s.time,d=s.angle,{l:b,c:f,h:x}=r.palette,v=r.coef,y=[0,...re(v.$0_),1,...re(v.$1_),2,...re(v.$2_),16,...re(v.$16_),v.max];return({bem:t,each:e,when:s,vars:r,merge:n,at:{media:c},units:{px:u,ms:h,deg:v}})=>{const $="prefers-color-scheme",j={light:`${$}: light`,dark:`${$}: dark`};return n({[se()]:n({fontSize:r("rem")},o,e(y,((t,e)=>({[i("coef",t)]:e}))),e(x,((t,e)=>({[i(Zt,"h",t)]:e}))),{[i(Zt,"c","bg","gray")]:0,[i(Zt,"c","fg","gray")]:0},e(j,((t,s)=>c.and(s)(n(l[t]||{},e(ne,((e,s)=>({[i(Zt,"l","bg",s)]:b[t].bg[s],[i(Zt,"l","fg",s)]:b[t].fg[s]}))),e(ie,((e,s)=>({[i(Zt,"c","bg",s)]:f[t].bg[s],[i(Zt,"c","fg",s)]:f[t].fg[s]}))))))))},e(g,((e,s)=>({[se(`${Rt}=${e}`)]:s,[t(`..theme.${e}`)]:s}))),s(!!m,{[se(Vt)]:{[a("rem")]:u(m)}}),s(!!p,{[se(Ft)]:{[a("rtime")]:h(p)}}),s(!!d,{[se(Ht)]:{[a("rangle")]:v(d)}}))}};!function(t={}){const e=globalThis.document,r=globalThis.customElements;if(null==r?void 0:r.get(Jt))return!1;{class n extends HTMLScriptElement{constructor(){super(...arguments),this._c=qt(),this._settings=c,this._cust=()=>{this._=ae({scope:this._s,keyMaker:this._k,provider:this}),this.use(this._,this._k.base,!0)}}static get observedAttributes(){return[Vt,Ft,Ht]}get settings(){return this._settings}set settings(t){var e,r,n;const i=s({},this._settings,t),{makers:a,bp:c,off:l}=i;(c&&(null===(e=this._settings)||void 0===e?void 0:e.bp)!==c||!this._p)&&(this._p=St({scope:this._s,globalKey:this._k.base,bp:c})),a&&(null===(r=this._settings)||void 0===r?void 0:r.makers)!==a&&(this._c.useMany(a),this.usePublic(a),(null==l?void 0:l.length)&&this._settings.off!==l&&this.off(...l)),this._settings=i,(!(null===(n=this._m)||void 0===n?void 0:n.has(this._k.base))||t.vars||t.palette||t.coef)&&this._cust()}get makers(){return this._c.makers}attributeChangedCallback(){this._k&&this._cust()}connectedCallback(){var r,n;this.textContent?this._settings=s(this._settings,JSON.parse(this.textContent)):t&&(this._settings=s(this._settings,t)),n=this,Object.defineProperties(n,{prefix:{get:()=>n.getAttribute("prefix")||"f"},mode:{get:()=>n.getAttribute("mode")||"a"},min:{get:()=>""===n.getAttribute("min")},hydrate:{get:()=>""===n.getAttribute("hydrate")},theme:{set(t){ee(n,Rt,t)},get:()=>Yt(n,Rt)||""},size:{set(t){ee(n,Vt,t)},get:()=>te(n,Vt)},time:{set(t){ee(n,Ft,t)},get:()=>te(n,Ft)},angle:{set(t){ee(n,Ht,t)},get:()=>te(n,Ht)}});const i=null===(r=e.querySelector(`script[${Gt}]`))||void 0===r?void 0:r.textContent;this._k=At({prefix:this.prefix}),this._s=((t={})=>{const{mode:e,min:s,dict:r={}}=t;let n;n="a"===e?Bt:Kt;const i=t=>{let s=0,r=Tt,a=Tt;const c=i.dict;c&&(c[t]||(c[t]={}),r=e=>{var r;return null!==(r=c[t][e])&&void 0!==r?r:c[t][e]=(s++).toString(36)},a=e=>c[t][e]);let l=(...e)=>[t,...e].filter(Boolean).join("-"),o="class",u=e=>e?t+(e.startsWith("_")?"":"-")+e:void 0===e?void 0:t;"a"===e&&(o="data-"+t,u=Tt);const h=(...t)=>"--"+l(...t),g=t=>{if(void 0===t)return function(t){const e=({b:s,e:r,m:n})=>({b:t=>e({b:t,e:"",m:{}}),e:t=>e({b:s,e:t,m:{}}),m:(t={})=>e({b:s,e:r,m:t}),get $(){return t({[s]:{[r]:n}})}});return e({b:"",e:"",m:{}})}(g);let e,s,r,n,i="";const c=zt(t);return i=c||Array.isArray(t)?[...(c?[t]:t).reduce(((t,i)=>([e,s,r,n]=Nt(i),t.add(u(a(It(e,s)))),r&&t.add(u(a(It(e,s,r,n)))),t)),new Set).values()].join(" "):t&&Wt(t,!0).map((([t,e,s,r])=>u(a(It(t,e,s,r))))).join(" "),Ct({[o]:i},{toString:{value:()=>`${o}="${i}"`},$:{value:i}})};return{selector:e=>{let s,i,a,c;return zt(e)?([s,i,a,c]=Nt(e),n(t,r(It(s,i,a,c)))):e&&Wt(e).map((([e,s,i,a])=>n(t,r(It(e,s,i,a))))).join(",")},attr:g,name:l,varName:h,varExp:(...t)=>`var(${h(...t)})`}};return s&&(i.dict=r),i})({mode:this.mode,min:this.min,dict:i&&JSON.parse(i)}),this._p=St({scope:this._s,globalKey:this._k.base,bp:t.bp||this.settings.bp}),this._m=function(t){const e={};null==t||t.forEach((t=>{const s=t.dataset.effcss;s&&(e[s]=t)}));let s={},r={},n=[],i=[];const a=(t,e)=>(e.toString=()=>"effcss-"+t,e),c=t=>{var e;return t.adoptedStyleSheets=[...(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)?[...t.adoptedStyleSheets].filter((t=>!(t+"").startsWith("effcss-"))):[],...n]},l=()=>{i=i.reduce(((t,e)=>{const s=e.deref();return s&&(c(s),t.push(e)),t}),[])},o=t=>n.findIndex((e=>e===t)),u=t=>t?s[t]:void 0,h=(t,r)=>{if(!s[t]){s[t]=a(t,r),n.push(s[t]);const i=e[t];return i&&(i.disabled=!0),l(),!0}},g=t=>{const e=u(t);return!!e&&-1!==o(e)};return{apply:c,notify:l,getIndex:o,get:u,has:t=>!!t&&!!u(t),getAll:()=>s,add:h,status:g,on:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);return!(!s||g(e))&&(n.push(s),t)}),!0);return l(),e},off:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);if(s&&g(e)){const e=o(s);return n.splice(e,1),t}return!1}),!0);return l(),e},remove:t=>{const e=u(t);if(!e)return;const i=o(e);return i>-1&&(n.splice(i,1),delete s[t],delete r[t]),l(),!0},removeAll:()=>(n.splice(0),s={},r={},l(),!0),pack:(t,e)=>{let r=s[t]||new CSSStyleSheet;return r.replaceSync(e),r=a(t,r),!!r.cssRules.length&&h(t,r)},replace:(t,e)=>{const r=s[t];if(r)return r.replaceSync(e),l(),!0},register:t=>{i.findIndex((e=>e.deref()===t))>=0||(i.push(new WeakRef(t)),c(t))},unregister:t=>{const e=i.findIndex((e=>e.deref()===t));e>=0&&i.splice(e,1)},hydrate:t=>e[t]&&!e[t].disabled&&e[t].textContent||void 0}}(e.querySelectorAll(`style[${Dt}]`));const a=(({scope:t,keyMaker:e,collector:s,manager:r,processor:n})=>{const i=t=>"string"==typeof t?t:s.getKey(t),a=s=>t(s||e.base).attr,c=(t,e)=>n.compile({key:e,maker:t}),l=(t,n,i)=>{const l=n||e.current;let o=s.use(t,l);return(i||r&&!r.has(o))&&(r.pack(o,r.hydrate(o)||c(t,o)),n||e.next()),a(o)};return{key:i,resolve:a,use:l,usePublic:t=>Xt(Ut(t).map((([t,e])=>[t,l(e,t)]))),usePrivate:t=>t.map((t=>l(t))),css:c,status:t=>{const e=i(t);return!!e&&r.status(e)},on:(...t)=>r.on(...t.map(i)),off:(...t)=>r.off(...t.map(i)),stylesheets:(...t)=>{let e;return e=t.length?1===t.length&&Array.isArray(t[0])?t[0]:t:s.keys,e.map((t=>r.get(i(t))))}}})({scope:this._s,processor:this._p,keyMaker:this._k,manager:this._m,collector:this._c});Object.assign(this,a),this._cust();const c=this;this._n={set adoptedStyleSheets(t){c.dispatchEvent(new CustomEvent("effcsschanges",{detail:{styles:t},bubbles:!0}))}},this._m.register(this._n),this._m.register(e)}toString(){const t=[...this.attributes].map((t=>t.value?`${t.name}="${t.value}"`:""===t.value?t.name:"")).filter(Boolean).join(" ");return`<${Lt} ${t}>${this.textContent}</${Lt}>`}}r.define(Jt,n,{extends:Lt})}}();
package/dist/consumer.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * EffCSS v3.12.0
2
+ * EffCSS v3.12.1
3
3
  * {@link https://gitverse.ru/msabitov/effcss}
4
4
  * Copyright (c) Marat Sabitov
5
5
  * @license Apache-2.0
6
6
  */
7
- function t(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}"function"==typeof SuppressedError&&SuppressedError;const e=Object.entries,s=Array.isArray,r=(t,...n)=>n.length?n.reduce(((t,n)=>(e(n).forEach((([e,n])=>{n&&"object"==typeof n&&t[e]?s(t[e])&&s(n)?t[e]=[...t[e],...n]:r(t[e],n||{}):t[e]=n})),t)),t):t,n={def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},i={mode:"a",prefix:"f"},a=t=>Number((.1*184+.9*t).toFixed(2)),c={l:{dark:{bg:{xl:.24,l:.3,m:.36,s:.42,xs:.48},fg:{xl:.98,l:.93,m:.86,s:.79,xs:.72}},light:{bg:{xl:.98,l:.93,m:.88,s:.83,xs:.78},fg:{xl:0,l:.12,m:.24,s:.36,xs:.48}}},c:{dark:{bg:{pale:.02,base:.06,rich:.1},fg:{pale:.06,base:.1,rich:.14}},light:{bg:{pale:.01,base:.04,rich:.7},fg:{pale:.07,base:.11,rich:.15}}},h:{pri:184,sec:290,suc:a(142),inf:a(264),war:a(109),dan:a(29)}},o={bp:{"3xs":18,"2xs":24,xs:30,sm:40,md:48,lg:64,xl:80,"2xl":96},vars:{"":{rtime:"200ms",rem:"16px",rangle:"30deg",l:n,h:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},c:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},a:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},t:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},int:[...Array(12).keys()],fr:{0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ar:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778}},light:{l:n},dark:{l:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},palette:c,coef:{$0_:{xxs:.0625,xs:.125,s:.25,m:.5,l:.75,xl:.875,xxl:.9375},$1_:{xxs:1.0625,xs:1.125,s:1.25,m:1.5,l:1.75,xl:1.875,xxl:1.9375},$2_:{xxs:2.5,xs:4,s:5,m:7.5,l:10,xl:12,xxl:15},$16_:{xxs:20,xs:28,s:36,m:48,l:64,xl:80,xxl:120},max:150}},l=(t,e,s)=>Object.entries(t).reduce(e,s),u=Symbol("noParse"),h=(t,e,s)=>{var r,n,i;let a=""+t;return null==e?"":"object"!=typeof e||e.hasOwnProperty(u)?`${c=a,c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}:${""+e};`:(!s||(null===(r=s.startsWith)||void 0===r?void 0:r.call(s,"@"))||(null===(n=a.startsWith)||void 0===n?void 0:n.call(a,"&"))||(null===(i=a.startsWith)||void 0===i?void 0:i.call(a,"@"))?"":"&")+a+`{${l(e,((t,e)=>t+h(...e,a)),"")}}`;var c},g="@media",m="@container",p="@property",d="@keyframes",b="@layer",f="@scope",x="@supports",y="@starting-style",v=(t,e)=>{const s=g+` ${e||""}${e?" and ":""}(${t})`;return{s:s,q:t,t:e,toString:()=>s}};v.toString=()=>g;const $=t=>`(${t})`,j=t=>"string"==typeof t;function O(t){var e;if(!(null===(e=null==t?void 0:t.args)||void 0===e?void 0:e.length))return"";switch(t.key){case"or":return t.args.map((t=>j(t)?$(t):O(t))).join(" or ");case"and":return t.args.map((t=>{const e=!j(t);return e&&"or"===t.key?$(O(t)):e?O(t):$(t)})).join(" and ");case"not":const e=t.args[0];return"not "+(j(e)?$(e):$(O(e)))}}const k=(t,e)=>{let s="";return t.length&&(s=t.join(" ")),e&&(s=s+(s?" and ":"")+(s&&"or"===e.key?$(O(e)):O(e))),s},_=(t={})=>{const{type:e=[],state:s}=t;return Object.defineProperties((t=>{const r=k(e,s);return{[`${g}${r?" "+r:""}`]:t}}),{key:{value:null==s?void 0:s.key},args:{value:null==s?void 0:s.args},all:{get:()=>_({state:s,type:["all"]})},print:{get:()=>_({state:s,type:["print"]})},screen:{get:()=>_({state:s,type:["screen"]})},and:{value:(...t)=>_({type:e,state:{key:"and",args:s?[s,...t]:t}})},or:{value:(...t)=>_({type:e,state:{key:"or",args:s?[s,...t]:t}})},not:{get:()=>_(s?{type:e,state:j(s)||"not"!==(null==s?void 0:s.key)?{key:"not",args:[s]}:s.args[0]}:{type:2===e.length?[e[1]]:["not",e[0]||"all"],state:s})}})},w=t=>{const{root:e="",limit:s="",mode:r=[!1,!1]}=t;return Object.defineProperties((t=>({[f+` ${e?`(${e}${r[0]?" > *":""})`:""}${e&&s?" ":""}${s?`to (${s}${r[1]?" > *":""})`:""}`]:t})),{limit:{value:t=>w({root:e,limit:t,mode:r})},root:{value:t=>w({root:t,limit:s,mode:r})},both:{value:()=>w({root:e,limit:s,mode:[!1,!0]})},none:{value:()=>w({root:e,limit:s,mode:[!0,!1]})},low:{value:()=>w({root:e,limit:s,mode:[!0,!0]})},high:{value:()=>w({root:e,limit:s,mode:[!1,!1]})},toString:{value:()=>":scope"}})},S=t=>({[y]:t}),q=t=>{const e={cp:1,lay:1,kf:1,cq:1},s=(s,r)=>{const n="string"==typeof r?r:t.name("cq",e.cq++),i=m+` ${n?n+" ":""}(${s})`;return{c:n,q:s,s:i,toString:()=>i}};s.toString=()=>m;const r=(s={})=>{const{scroll:n,type:i,name:a,state:c}=s;return Object.defineProperties((t=>{const e=k([],c);return{[`${m}${a?" "+a:""}${e?" "+e:""}`]:t}}),{container:{value:(a||"none")+" / "+(i&&n?`${i} scroll-state`:n?"scroll-state":i||"normal"),enumerable:!0},key:{value:null==c?void 0:c.key},args:{value:null==c?void 0:c.args},named:{get:()=>r({scroll:n,state:c,name:a||t.name("cq",e.cq++),type:i})},size:{get:()=>r({name:a,scroll:n,state:c,type:"size"})},isize:{get:()=>r({name:a,scroll:n,state:c,type:"inline-size"})},scroll:{get:()=>r({name:a,scroll:!0,state:c,type:i})},and:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"and",args:c?[c,...t]:t}})},or:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"or",args:c?[c,...t]:t}})},not:{value:t=>r({name:a,scroll:n,type:i,state:{key:"not",args:[t]}})},[u]:{value:!0}})},n=(s,r)=>{const n="--"+(s||t.name("cp",e.cp++)),i=p+" "+n;return{k:n,v:`var(${n})`,s:i,r:{[i]:{syntax:(null==r?void 0:r.syn)||'"*"',inherits:(null==r?void 0:r.inh)||!1,initialValue:null==r?void 0:r.ini}},toString:()=>i}};n.toString=()=>p;const i=s=>{const r=s||t.name("kf",e.kf++),n=d+" "+r;return{k:r,s:n,toString:()=>n}};i.toString=()=>d;const a=s=>{const r=s||t.name("lay",e.lay++),n=b+" "+r;return{k:r,s:n,toString:()=>n}};a.toString=()=>b;a.toString=()=>f;const c=(t="",e=!1)=>{const s=x+` ${e?"not ":""}(${t})`;return{c:t,n:e,s:s,toString:()=>s}};return c.toString=()=>x,{pr:n,kf:i,mq:v,cq:s,lay:a,sc:(t="",e="")=>{const s=f+` ${t?`(${t})`:""}${t&&e?" ":""}${e?`to (${e})`:""}`;return{r:t,l:e,s:s,toString:()=>s}},sup:c,keyframes:s=>{const r=t.name("kf",e.kf++),n=d+" "+r;return Object.defineProperties((t=>{if(!t)return{animationName:r};const{dur:e,tf:s,del:n,ic:i,dir:a,ps:c,fm:o}=t;return{animation:[e,s,n,i,a,c,o,r].filter(Boolean).join(" ")}}),{[n]:{value:s,enumerable:!0},toString:{value:()=>r},[u]:{value:!0}})},property:(s={})=>{const{syn:r='"*"',inh:n=!0,ini:i,def:a}=s,c="--"+t.name("cp",e.cp++),o=`var(${c}${void 0!==a?","+a:""})`,l=p+" "+c;return Object.defineProperties((t=>({[c]:t})),{[l]:{value:{syntax:r,inherits:n,initialValue:i},enumerable:!0},toString:{value:()=>o},[u]:{value:!0}})},scope:w({}),media:_({}),container:r({}),startingStyle:S}},A=t=>t+"px",E=t=>t+"vh",P=t=>t+"vw",z=t=>t+"vmin",C=t=>t+"vmax",M=t=>t+"em",N=t=>t+"rem",W=t=>t+"deg",I=t=>t+"rad",K=t=>t+"rad",T=t=>t+"ms",B=t=>t+"s",D=t=>t+"%",J=t=>t+"cqw",L=t=>t+"cqh",R=t=>t+"cqi",V=t=>t+"cqb",F=t=>t+"cqmin",H=t=>t+"cqmax",Z=Object.fromEntries,G=Object.entries,Q=":first-",U=":last-",X=":only-",Y="child",tt=":nth-",et="of-type",st=tt+Y,rt=":focus",nt={r:":root",h:":hover",f:rt,fv:rt+"-visible",a:":active",v:":visited",val:":valid",inv:":invalid",e:":empty",d:":disabled",rq:":required",o:":optional",m:":modal",l:":link",ph:":placeholder",ch:":checked",po:":popover-open",fc:Q+Y,lc:U+Y,oc:X+Y,odd:st+"(odd)",even:st+"(even)",ft:Q+et,lt:U+et,ot:X+et,bef:"::before",aft:"::after",bd:"::backdrop"},it={has:":has",not:":not",is:":is",wh:":where",st:":state",nthc:st,ntho:tt+et,dir:":dir",lang:":lang"},at="oklch",ct=t=>at+`(${t})`,ot=t=>ct(`from ${t}`),lt="def",ut=t=>{const e=(e,s)=>"string"==typeof s?t(e,s):s;class s{constructor(t={}){this.state={l:e("l",lt),c:e("c",lt),h:e("h",lt),a:e("a",lt)},this.merge=t=>new s(Object.assign(this.state,t)),this.l=t=>this.merge({l:e("l",t)}),this.c=t=>this.merge({c:e("c",t)}),this.h=t=>this.merge({h:e("h",t)}),this.a=t=>this.merge({a:e("a",t)}),this.state=Object.assign(this.state,t)}get s(){return this.toString()}toString(){const{l:t,c:e,h:s,a:r}=this.state;return ct(`${t} ${e} ${s} / ${r}`)}}return t=>new s(t)},ht=(t,e=.1)=>ot(`${t} calc(l + ${e}) c h / alpha)`),gt=(t,e=.1)=>ot(`${t} calc(l - ${e}) c h / alpha)`),mt=(t,e=.1)=>ot(`${t} l c h / calc(alpha + ${e}))`),pt=(t,e=.1)=>ot(`${t} l c h / calc(alpha - ${e}))`),dt=(t,e=.04)=>ot(`${t} l calc(c + ${e}) h / alpha)`),bt=(t,e=.04)=>ot(`${t} l calc(c - ${e}) h / alpha)`),ft=(t,e=30)=>ot(`${t} l c calc(h${"number"==typeof e?e>0?" + "+e:" - "+-e:e}) / alpha)`),xt=({base:t,mixin:e,method:s,bpart:r,mpart:n})=>`color-mix(in ${s||at}, ${t}${void 0!==r?` ${r}%`:""}, ${e}${void 0!==n?` ${n}%`:""})`,yt=t=>({create:ut(t),oklch:ct,lighten:ht,darken:gt,saturate:dt,desaturate:bt,fadein:mt,fadeout:pt,spin:ft,mix:xt}),vt="palette",$t=t=>{class e{constructor(t={}){this.state={l:"l",c:"base",h:"pri",a:1,m:"bg"},Object.assign(this,{[u]:!0}),this.state=Object.assign(this.state,t)}get xs(){return new e(Object.assign(Object.assign({},this.state),{l:"xs"}))}get s(){return new e(Object.assign(Object.assign({},this.state),{l:"s"}))}get m(){return new e(Object.assign(Object.assign({},this.state),{l:"m"}))}get l(){return new e(Object.assign(Object.assign({},this.state),{l:"l"}))}get xl(){return new e(Object.assign(Object.assign({},this.state),{l:"xl"}))}get lightness(){return{xs:this.xs,s:this.s,m:this.m,l:this.l,xl:this.xl}}get gray(){return new e(Object.assign(Object.assign({},this.state),{c:"gray"}))}get pale(){return new e(Object.assign(Object.assign({},this.state),{c:"pale"}))}get base(){return new e(Object.assign(Object.assign({},this.state),{c:"base"}))}get rich(){return new e(Object.assign(Object.assign({},this.state),{c:"rich"}))}get chroma(){return{gray:this.gray,pale:this.pale,base:this.base,rich:this.rich}}get pri(){return new e(Object.assign(Object.assign({},this.state),{h:"pri"}))}get sec(){return new e(Object.assign(Object.assign({},this.state),{h:"sec"}))}get suc(){return new e(Object.assign(Object.assign({},this.state),{h:"suc"}))}get inf(){return new e(Object.assign(Object.assign({},this.state),{h:"inf"}))}get war(){return new e(Object.assign(Object.assign({},this.state),{h:"war"}))}get dan(){return new e(Object.assign(Object.assign({},this.state),{h:"dan"}))}get hue(){return{pri:this.pri,sec:this.sec,suc:this.suc,inf:this.inf,war:this.war,dan:this.dan}}alpha(t=1){return new e(Object.assign(Object.assign({},this.state),{a:t}))}get bg(){return new e(Object.assign(Object.assign({},this.state),{m:"bg"}))}get fg(){return new e(Object.assign(Object.assign({},this.state),{m:"fg"}))}toString(){const{l:e,c:s,h:r,a:n,m:i}=this.state;return`oklch(${t(vt,"l",i,e)} ${t(vt,"c",i,s)} ${t(vt,"h",r)} / ${n})`}}return new e},jt="coef",Ot=t=>{class e{constructor(t={}){this.state={center:8},this.state=Object.assign(this.state,t)}get min(){return t(jt,this.state.center-4)}get xxs(){return t(jt,this.state.center-3)}get xs(){return t(jt,this.state.center-2)}get s(){return t(jt,this.state.center-1)}get m(){return t(jt,this.state.center)}get l(){return t(jt,this.state.center+1)}get xl(){return t(jt,this.state.center+2)}get xxl(){return t(jt,this.state.center+3)}get max(){return t(jt,this.state.center+4)}get $0_(){return new e({center:4})}get $1_(){return new e({center:12})}get $2_(){return new e({center:20})}get $16_(){return new e({center:28})}get $1(){return new e({center:8})}get $2(){return new e({center:16})}get $16(){return new e({center:24})}get short(){return{s:this.s,m:this.m,l:this.l}}get base(){return Object.assign(Object.assign({xs:this.xs},this.short),{xl:this.xl})}get long(){return Object.assign(Object.assign({xxs:this.xxs},this.base),{xxl:this.xxl})}get full(){return Object.assign(Object.assign({min:this.min},this.long),{max:this.max})}get main(){return{min:this.min,m:this.m,max:this.max}}get sparse(){return{min:this.min,xs:this.xs,m:this.m,xl:this.xl,max:this.max}}}return new e},kt=Object.assign,_t=Object.entries,wt={dash:(...t)=>t.join("-"),comma:(...t)=>t.join(),space:(...t)=>t.join(" "),range:(t,e)=>Array.from(Array(t).entries()).reduce(((t,[s])=>kt(t,e(s+1))),{}),each:(t,e)=>_t(t).reduce(((t,[s,r])=>kt(t,e(s,r))),{}),when:(t,e,s={})=>t?e:s},St="width: ",qt=t=>{const{scope:e,globalKey:s="",bp:n={}}=t,i=e(s).varExp,a=t=>i(...t.split(".")),c=(t=1)=>`calc(${t} * ${a("rtime")})`,o=(t=1)=>`calc(${t} * ${a("rangle")})`,u=(t=1)=>`calc(${t} * 1rem)`;return{compile:({key:t,maker:s})=>{const g=e(t),m=q(g),p=t=>{const e=n[t]||t;return"number"==typeof e?e+"rem":""},d=t=>"min-"+St+p(t),b=t=>"max-"+St+p(t),f=(t,e)=>"string"==typeof e?m.cq(t,e):m.mq(t),x=(t,e,s)=>""+f(d(t)+") and ("+b(e),s),y={up:(t,e)=>""+f(d(t),e),down:(t,e)=>""+f(b(t),e),between:x,only:(t,e)=>x(t,t,e)};return v=s(Object.assign(wt,{key:t,vars:a,size:u,time:c,angle:o,bem:g.selector,pseudo:Object.assign(Z(G(nt).map((([t,e])=>{function s(t=""){return t+e}return s.toString=()=>e,[t,s]}))),Z(G(it).map((([t,e])=>{function s(t,s=""){return s+e+`(${t})`}return s.toString=()=>e,[t,s]})))),color:yt(i),palette:$t(i),coef:Ot(i),units:{px:A,vh:E,vw:P,vmin:z,vmax:C,em:M,rem:N,deg:W,rad:I,turn:K,ms:T,s:B,pc:D,cqw:J,cqh:L,cqb:V,cqi:R,cqmin:F,cqmax:H},at:m,limit:y,merge:r})),l(v,((t,e)=>t+h(...e)),"");var v}}};const At=()=>{const t=new Set,e=new Map;return{use(s,r){const n=e.get(s);return n||(t.add(r),e.set(s,r),r)},useMany(t){return Object.entries(t).map((([t,e])=>this.use(e,t)))},getKey:t=>e.get(t),get keys(){return[...t]},get makers(){return Object.fromEntries(e.entries().map((([t,e])=>[e,t])))}}},Et=({prefix:t=i.prefix})=>{let e=1;return{get base(){return t+0},get current(){return t+e},next(){return e++,this.current},reset(){e=1}}},Pt=void 0,zt=Object.entries,Ct=Object.defineProperties,Mt=t=>"string"==typeof t,Nt=t=>null!==t&&"object"==typeof t,Wt=t=>t.split("."),It=(t,e)=>zt(t).reduce(((t,[s,r])=>{if(Nt(r)){const n=zt(r);n.length?t.push(...n.reduce(((t,[r,n])=>{if((t=>null!==t&&t!==Pt)(r)&&e&&t.push([s,r,Pt,Pt]),Nt(n)){const e=zt(n);e.length&&t.push(...e.reduce(((t,[e,n])=>{const i=typeof n;return"string"!==i&&"number"!==i||t.push([s,r,e,n]),t}),[]))}return t}),[])):t.push([s,Pt,Pt,Pt])}return t}),[]),Kt=(t,e,s,r)=>""+(((t,e)=>`${t||""}${e?"__"+e:""}`)(t,e)+(s?"_"+s:"")+(s&&r?"_"+r:""))||"_",Tt=(t,e)=>"."+(e?t+(e.startsWith("_")?"":"-")+e:t),Bt=(t,e)=>`[data-${t}${e?`~="${e}"`:""}]`;const Dt=t=>t||"",Jt=(t={})=>{const{mode:e,min:s}=t;let r,n;return r="a"===e?Bt:Tt,s&&(n={}),t=>{let s=0,i=Dt,a=Dt;n&&(n[t]||(n[t]={}),i=e=>{var r;return null!==(r=n[t][e])&&void 0!==r?r:n[t][e]=(s++).toString(36)},a=e=>n[t][e]);let c=(...e)=>[t,...e].filter(Boolean).join("-"),o="class",l=e=>e?t+(e.startsWith("_")?"":"-")+e:void 0===e?void 0:t;"a"===e&&(o="data-"+t,l=Dt);const u=(...t)=>"--"+c(...t),h=t=>{if(void 0===t)return function(t){const e=({b:s,e:r,m:n})=>({b:t=>e({b:t,e:"",m:{}}),e:t=>e({b:s,e:t,m:{}}),m:(t={})=>e({b:s,e:r,m:t}),get $(){return t({[s]:{[r]:n}})}});return e({b:"",e:"",m:{}})}(h);let e,s,r,n,i="";const c=Mt(t);return i=c||Array.isArray(t)?[...(c?[t]:t).reduce(((t,i)=>([e,s,r,n]=Wt(i),t.add(l(a(Kt(e,s)))),r&&t.add(l(a(Kt(e,s,r,n)))),t)),new Set).values()].join(" "):t&&It(t,!0).map((([t,e,s,r])=>l(a(Kt(t,e,s,r))))).join(" "),Ct({[o]:i},{toString:{value:()=>`${o}="${i}"`},$:{value:i}})};return{selector:e=>{let s,n,a,c;return Mt(e)?([s,n,a,c]=Wt(e),r(t,i(Kt(s,n,a,c)))):e&&It(e).map((([e,s,n,a])=>r(t,i(Kt(e,s,n,a))))).join(",")},attr:h,name:c,varName:u,varExp:(...t)=>`var(${u(...t)})`}}},Lt="effcss-provider",Rt="theme",Vt="size",Ft="time",Ht="angle",Zt="palette",Gt=Object.assign,Qt=Object.entries,Ut=Object.fromEntries,Xt=(t,e)=>t.getAttribute(e)||i[e],Yt=(t,e)=>(t=>null!==t?Number(t):null)(Xt(t,e)),te=(t,e,s)=>null===s?t.removeAttribute(e):t.setAttribute(e,s+""),ee=t=>`:root:has(script[is=${Lt}]${t?`[${t}]`:""})`,se=t=>[t.xxs,t.xs,t.s,t.m,t.l,t.xl,t.xxl],re=["xs","s","m","l","xl"],ne=["pale","base","rich"],ie=({scope:e,keyMaker:s,provider:r})=>{const n=r.settings,i=null==n?void 0:n.vars,{varName:a}=e(s.base),c=t=>a("",t);function o(t,e){return Qt(t).reduce(((t,[s,r])=>r&&"object"==typeof r?Gt(t,o(r,[...e,s])):(t[a(...e,s)]=r,t)),{})}const l=Ut(Qt(i||{}).map((([t,e])=>[t,o(e,[])]))),{"":u={},dark:h,light:g}=l,m=t(l,["","dark","light"]),p=r.size,d=r.time,b=r.angle,{l:f,c:x,h:y}=n.palette,v=n.coef,$=[0,...se(v.$0_),1,...se(v.$1_),2,...se(v.$2_),16,...se(v.$16_),v.max];return({bem:t,each:e,when:s,vars:r,merge:n,at:{media:i},units:{px:o,ms:h,deg:g}})=>{const v="prefers-color-scheme",j={light:`${v}: light`,dark:`${v}: dark`};return n({[ee()]:n({fontSize:r("rem")},u,e($,((t,e)=>({[a("coef",t)]:e}))),e(y,((t,e)=>({[a(Zt,"h",t)]:e}))),{[a(Zt,"c","bg","gray")]:0,[a(Zt,"c","fg","gray")]:0},e(j,((t,s)=>i.and(s)(n(l[t]||{},e(re,((e,s)=>({[a(Zt,"l","bg",s)]:f[t].bg[s],[a(Zt,"l","fg",s)]:f[t].fg[s]}))),e(ne,((e,s)=>({[a(Zt,"c","bg",s)]:x[t].bg[s],[a(Zt,"c","fg",s)]:x[t].fg[s]}))))))))},e(m,((e,s)=>({[ee(`${Rt}=${e}`)]:s,[t(`..theme.${e}`)]:s}))),s(!!p,{[ee(Vt)]:{[c("rem")]:o(p)}}),s(!!d,{[ee(Ft)]:{[c("rtime")]:h(d)}}),s(!!b,{[ee(Ht)]:{[c("rangle")]:g(b)}}))}},ae=({scope:t,keyMaker:e,collector:s,manager:r,processor:n})=>{const i=t=>"string"==typeof t?t:s.getKey(t),a=s=>t(s||e.base).attr,c=(t,e)=>n.compile({key:e,maker:t}),o=(t,n,i)=>{const o=n||e.current;let l=s.use(t,o);return(i||r&&!r.has(l))&&(r.pack(l,c(t,l)),n||e.next()),a(l)};return{key:i,resolve:a,use:o,usePublic:t=>Ut(Qt(t).map((([t,e])=>[t,o(e,t)]))),usePrivate:t=>t.map((t=>o(t))),css:c,status:t=>{const e=i(t);return!!e&&r.status(e)},on:(...t)=>r.on(...t.map(i)),off:(...t)=>r.off(...t.map(i)),stylesheets:(...t)=>{let e;return e=t.length?1===t.length&&Array.isArray(t[0])?t[0]:t:s.keys,e.map((t=>r.get(i(t))))}}},ce=t=>Object.defineProperties(t,{prefix:{get:()=>t.getAttribute("prefix")||"f"},mode:{get:()=>t.getAttribute("mode")||"a"},min:{get:()=>""===t.getAttribute("min")},hydrate:{get:()=>""===t.getAttribute("hydrate")},theme:{set(e){te(t,Rt,e)},get:()=>Xt(t,Rt)||""},size:{set(e){te(t,Vt,e)},get:()=>Yt(t,Vt)},time:{set(e){te(t,Ft,e)},get:()=>Yt(t,Ft)},angle:{set(e){te(t,Ht,e)},get:()=>Yt(t,Ht)}});function oe(t={}){const e=globalThis.document,s=globalThis.customElements;if(null==s?void 0:s.get(Lt))return!1;{class n extends HTMLScriptElement{constructor(){super(...arguments),this._c=At(),this._settings=o,this._cust=()=>{this._=ie({scope:this._s,keyMaker:this._k,provider:this}),this.use(this._,this._k.base,!0)}}static get observedAttributes(){return[Vt,Ft,Ht]}get settings(){return this._settings}set settings(t){var e,s,n;const i=r({},this._settings,t),{makers:a,bp:c,off:o}=i;(c&&(null===(e=this._settings)||void 0===e?void 0:e.bp)!==c||!this._p)&&(this._p=qt({scope:this._s,globalKey:this._k.base,bp:c})),a&&(null===(s=this._settings)||void 0===s?void 0:s.makers)!==a&&(this._c.useMany(a),this.usePublic(a),(null==o?void 0:o.length)&&this._settings.off!==o&&this.off(...o)),this._settings=i,(!(null===(n=this._m)||void 0===n?void 0:n.has(this._k.base))||t.vars||t.palette||t.coef)&&this._cust()}get makers(){return this._c.makers}attributeChangedCallback(){this._k&&this._cust()}connectedCallback(){this.textContent?this._settings=r(this._settings,JSON.parse(this.textContent)):t&&(this._settings=r(this._settings,t)),ce(this),this._k=Et({prefix:this.prefix}),this._s=Jt({mode:this.mode,min:this.min}),this._p=qt({scope:this._s,globalKey:this._k.base,bp:t.bp||this.settings.bp}),this._m=function(t){const e={};null==t||t.forEach((t=>{const s=t.dataset.effcss;s&&(e[s]=t)}));let s={},r={},n=[],i=[];const a=(t,e)=>(e.toString=()=>"effcss-"+t,e),c=t=>{var e;return t.adoptedStyleSheets=[...(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)?[...t.adoptedStyleSheets].filter((t=>!(t+"").startsWith("effcss-"))):[],...n]},o=()=>{i=i.reduce(((t,e)=>{const s=e.deref();return s&&(c(s),t.push(e)),t}),[])},l=t=>n.findIndex((e=>e===t)),u=t=>t?s[t]:void 0,h=(t,r)=>{if(!s[t]){s[t]=a(t,r),n.push(s[t]);const i=e[t];return i&&(i.disabled=!0),o(),!0}},g=t=>{const e=u(t);return!!e&&-1!==l(e)};return{apply:c,notify:o,getIndex:l,get:u,has:t=>!!t&&!!u(t),getAll:()=>s,add:h,status:g,on:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);return!(!s||g(e))&&(n.push(s),t)}),!0);return o(),e},off:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);if(s&&g(e)){const e=l(s);return n.splice(e,1),t}return!1}),!0);return o(),e},remove:t=>{const e=u(t);if(!e)return;const i=l(e);return i>-1&&(n.splice(i,1),delete s[t],delete r[t]),o(),!0},removeAll:()=>(n.splice(0),s={},r={},o(),!0),pack:(t,e)=>{let r=s[t]||new CSSStyleSheet;return r.replaceSync(e),r=a(t,r),!!r.cssRules.length&&h(t,r)},replace:(t,e)=>{const r=s[t];if(r)return r.replaceSync(e),o(),!0},register:t=>{i.findIndex((e=>e.deref()===t))>=0||(i.push(new WeakRef(t)),c(t))},unregister:t=>{const e=i.findIndex((e=>e.deref()===t));e>=0&&i.splice(e,1)}}}(e.querySelectorAll("[data-effcss]"));const s=ae({scope:this._s,processor:this._p,keyMaker:this._k,manager:this._m,collector:this._c});Object.assign(this,s),this._cust();const n=this;this._n={set adoptedStyleSheets(t){n.dispatchEvent(new CustomEvent("effcsschanges",{detail:{styles:t},bubbles:!0}))}},this._m.register(this._n),this._m.register(e)}toString(){return`<script ${[...this.attributes].map((t=>t.value?`${t.name}="${t.value}"`:""===t.value?t.name:"")).filter(Boolean).join(" ")}>${this.textContent}<\/script>`}}return s.define(Lt,n,{extends:"script"}),!0}}const le=(e={})=>{let{noscript:s,attrs:n={}}=e,a=t(e,["noscript","attrs"]);const c=r(o,a);let{mode:l=i.mode,min:u,prefix:h=i.prefix,theme:g,hydrate:m,size:p,time:d,angle:b}=n;const f=Et({prefix:h}),x=Jt({mode:l,min:u}),y=qt({scope:x,globalKey:f.base,bp:c.bp}),v=At(),$={},j=[],O=t=>j.findIndex((e=>e===t)),k=ae({scope:x,processor:y,keyMaker:f,manager:{get:t=>t?$[t]:void 0,pack(t,e){const s=$[t]||{};if(!$[t])return $[t]=s,j.push(s),!0},has(t){return!!t&&!!this.get(t)},status(t){const e=this.get(t);return!!e&&-1!==O(e)},on(...t){return t.reduce(((t,e)=>{const s=this.get(e);return!(!s||this.status(e))&&(j.push(s),t)}),!0)},off(...t){return t.reduce(((t,e)=>{const s=this.get(e);if(s&&this.status(e)){const e=O(s);return j.splice(e,1),t}return!1}),!0)}},collector:v}),_=Object.assign(Object.assign({tagName:"",attributes:{prefix:h,mode:l,hydrate:m,min:u,theme:g,size:p,time:d,angle:b},getAttribute(t){const e=this.attributes[t];return e?"boolean"==typeof e?"":e:null},setAttribute(t,e){this.attributes[t]=e},removeAttribute(t){delete this.attributes[t]},get makers(){return v.makers},get settings(){return c},set settings(t){}},k),{toString(){const t=[[f.base,ie({scope:x,keyMaker:f,provider:this})],...Object.entries(v.makers)].map((([t,e])=>`<style data-effcss="${t}">${k.css(e,t)}</style>`)).join("");if(s)return t;const e=Object.keys(a).length?JSON.stringify(a):"";return t+`<script ${Object.entries(Object.assign({is:Lt,type:"application/json"},this.attributes)).map((([t,e])=>e&&e!==i[t]?"boolean"==typeof e?t:`${t}="${e}"`:"")).filter(Boolean).join(" ")}>${e}<\/script>`}});return ce(_)},ue=(e={})=>{const{emulate:s}=e,r=t(e,["emulate"]),n=null===globalThis||void 0===globalThis?void 0:globalThis.document;if(n&&!s){void 0===ue.isDefined&&(ue.isDefined=oe(r));const t=n.querySelector(`script[is=${Lt}]`);if(t)return t;const e=n.createElement("script",{is:Lt});e.setAttribute("is",Lt);const s=null==r?void 0:r.attrs;return s&&Object.entries(s).map((([t,s])=>s&&i[t]!==s&&e.setAttribute(t,"boolean"==typeof s?"":s+""))),n.head.appendChild(e),e}return le(r)},he=(t={})=>ue({attrs:t});export{he as createConsumer};
7
+ function t(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}"function"==typeof SuppressedError&&SuppressedError;const e=Object.entries,s=Array.isArray,r=(t,...n)=>n.length?n.reduce(((t,n)=>(e(n).forEach((([e,n])=>{n&&"object"==typeof n&&t[e]?s(t[e])&&s(n)?t[e]=[...t[e],...n]:r(t[e],n||{}):t[e]=n})),t)),t):t,n={def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},i={mode:"a",prefix:"f"},a=t=>Number((.1*184+.9*t).toFixed(2)),c={l:{dark:{bg:{xl:.24,l:.3,m:.36,s:.42,xs:.48},fg:{xl:.98,l:.93,m:.86,s:.79,xs:.72}},light:{bg:{xl:.98,l:.93,m:.88,s:.83,xs:.78},fg:{xl:0,l:.12,m:.24,s:.36,xs:.48}}},c:{dark:{bg:{pale:.02,base:.06,rich:.1},fg:{pale:.06,base:.1,rich:.14}},light:{bg:{pale:.01,base:.04,rich:.7},fg:{pale:.07,base:.11,rich:.15}}},h:{pri:184,sec:290,suc:a(142),inf:a(264),war:a(109),dan:a(29)}},o={bp:{"3xs":18,"2xs":24,xs:30,sm:40,md:48,lg:64,xl:80,"2xl":96},vars:{"":{rtime:"200ms",rem:"16px",rangle:"30deg",l:n,h:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},c:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},a:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},t:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},int:[...Array(12).keys()],fr:{0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ar:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778}},light:{l:n},dark:{l:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},palette:c,coef:{$0_:{xxs:.0625,xs:.125,s:.25,m:.5,l:.75,xl:.875,xxl:.9375},$1_:{xxs:1.0625,xs:1.125,s:1.25,m:1.5,l:1.75,xl:1.875,xxl:1.9375},$2_:{xxs:2.5,xs:4,s:5,m:7.5,l:10,xl:12,xxl:15},$16_:{xxs:20,xs:28,s:36,m:48,l:64,xl:80,xxl:120},max:150}},l=(t,e,s)=>Object.entries(t).reduce(e,s),u=Symbol("noParse"),h=(t,e,s)=>{var r,n,i;let a=""+t;return null==e?"":"object"!=typeof e||e.hasOwnProperty(u)?`${c=a,c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}:${""+e};`:(!s||(null===(r=s.startsWith)||void 0===r?void 0:r.call(s,"@"))||(null===(n=a.startsWith)||void 0===n?void 0:n.call(a,"&"))||(null===(i=a.startsWith)||void 0===i?void 0:i.call(a,"@"))?"":"&")+a+`{${l(e,((t,e)=>t+h(...e,a)),"")}}`;var c},g="@media",m="@container",p="@property",d="@keyframes",b="@layer",f="@scope",y="@supports",x="@starting-style",v=(t,e)=>{const s=g+` ${e||""}${e?" and ":""}(${t})`;return{s:s,q:t,t:e,toString:()=>s}};v.toString=()=>g;const $=t=>`(${t})`,j=t=>"string"==typeof t;function O(t){var e;if(!(null===(e=null==t?void 0:t.args)||void 0===e?void 0:e.length))return"";switch(t.key){case"or":return t.args.map((t=>j(t)?$(t):O(t))).join(" or ");case"and":return t.args.map((t=>{const e=!j(t);return e&&"or"===t.key?$(O(t)):e?O(t):$(t)})).join(" and ");case"not":const e=t.args[0];return"not "+(j(e)?$(e):$(O(e)))}}const k=(t,e)=>{let s="";return t.length&&(s=t.join(" ")),e&&(s=s+(s?" and ":"")+(s&&"or"===e.key?$(O(e)):O(e))),s},_=(t={})=>{const{type:e=[],state:s}=t;return Object.defineProperties((t=>{const r=k(e,s);return{[`${g}${r?" "+r:""}`]:t}}),{key:{value:null==s?void 0:s.key},args:{value:null==s?void 0:s.args},all:{get:()=>_({state:s,type:["all"]})},print:{get:()=>_({state:s,type:["print"]})},screen:{get:()=>_({state:s,type:["screen"]})},and:{value:(...t)=>_({type:e,state:{key:"and",args:s?[s,...t]:t}})},or:{value:(...t)=>_({type:e,state:{key:"or",args:s?[s,...t]:t}})},not:{get:()=>_(s?{type:e,state:j(s)||"not"!==(null==s?void 0:s.key)?{key:"not",args:[s]}:s.args[0]}:{type:2===e.length?[e[1]]:["not",e[0]||"all"],state:s})}})},w=t=>{const{root:e="",limit:s="",mode:r=[!1,!1]}=t;return Object.defineProperties((t=>({[f+` ${e?`(${e}${r[0]?" > *":""})`:""}${e&&s?" ":""}${s?`to (${s}${r[1]?" > *":""})`:""}`]:t})),{limit:{value:t=>w({root:e,limit:t,mode:r})},root:{value:t=>w({root:t,limit:s,mode:r})},both:{value:()=>w({root:e,limit:s,mode:[!1,!0]})},none:{value:()=>w({root:e,limit:s,mode:[!0,!1]})},low:{value:()=>w({root:e,limit:s,mode:[!0,!0]})},high:{value:()=>w({root:e,limit:s,mode:[!1,!1]})},toString:{value:()=>":scope"}})},S=t=>({[x]:t}),q=t=>{const e={cp:1,lay:1,kf:1,cq:1},s=(s,r)=>{const n="string"==typeof r?r:t.name("cq",e.cq++),i=m+` ${n?n+" ":""}(${s})`;return{c:n,q:s,s:i,toString:()=>i}};s.toString=()=>m;const r=(s={})=>{const{scroll:n,type:i,name:a,state:c}=s;return Object.defineProperties((t=>{const e=k([],c);return{[`${m}${a?" "+a:""}${e?" "+e:""}`]:t}}),{container:{value:(a||"none")+" / "+(i&&n?`${i} scroll-state`:n?"scroll-state":i||"normal"),enumerable:!0},key:{value:null==c?void 0:c.key},args:{value:null==c?void 0:c.args},named:{get:()=>r({scroll:n,state:c,name:a||t.name("cq",e.cq++),type:i})},size:{get:()=>r({name:a,scroll:n,state:c,type:"size"})},isize:{get:()=>r({name:a,scroll:n,state:c,type:"inline-size"})},scroll:{get:()=>r({name:a,scroll:!0,state:c,type:i})},and:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"and",args:c?[c,...t]:t}})},or:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"or",args:c?[c,...t]:t}})},not:{value:t=>r({name:a,scroll:n,type:i,state:{key:"not",args:[t]}})},[u]:{value:!0}})},n=(s,r)=>{const n="--"+(s||t.name("cp",e.cp++)),i=p+" "+n;return{k:n,v:`var(${n})`,s:i,r:{[i]:{syntax:(null==r?void 0:r.syn)||'"*"',inherits:(null==r?void 0:r.inh)||!1,initialValue:null==r?void 0:r.ini}},toString:()=>i}};n.toString=()=>p;const i=s=>{const r=s||t.name("kf",e.kf++),n=d+" "+r;return{k:r,s:n,toString:()=>n}};i.toString=()=>d;const a=s=>{const r=s||t.name("lay",e.lay++),n=b+" "+r;return{k:r,s:n,toString:()=>n}};a.toString=()=>b;a.toString=()=>f;const c=(t="",e=!1)=>{const s=y+` ${e?"not ":""}(${t})`;return{c:t,n:e,s:s,toString:()=>s}};return c.toString=()=>y,{pr:n,kf:i,mq:v,cq:s,lay:a,sc:(t="",e="")=>{const s=f+` ${t?`(${t})`:""}${t&&e?" ":""}${e?`to (${e})`:""}`;return{r:t,l:e,s:s,toString:()=>s}},sup:c,keyframes:s=>{const r=t.name("kf",e.kf++),n=d+" "+r;return Object.defineProperties((t=>{if(!t)return{animationName:r};const{dur:e,tf:s,del:n,ic:i,dir:a,ps:c,fm:o}=t;return{animation:[e,s,n,i,a,c,o,r].filter(Boolean).join(" ")}}),{[n]:{value:s,enumerable:!0},toString:{value:()=>r},[u]:{value:!0}})},property:(s={})=>{const{syn:r='"*"',inh:n=!0,ini:i,def:a}=s,c="--"+t.name("cp",e.cp++),o=`var(${c}${void 0!==a?","+a:""})`,l=p+" "+c;return Object.defineProperties((t=>({[c]:t})),{[l]:{value:{syntax:r,inherits:n,initialValue:i},enumerable:!0},toString:{value:()=>o},fallback:{value:t=>`var(${c},${t})`},[u]:{value:!0}})},scope:w({}),media:_({}),container:r({}),startingStyle:S}},A=t=>t+"px",E=t=>t+"vh",P=t=>t+"vw",C=t=>t+"vmin",z=t=>t+"vmax",M=t=>t+"em",N=t=>t+"rem",W=t=>t+"deg",I=t=>t+"rad",K=t=>t+"rad",T=t=>t+"ms",B=t=>t+"s",J=t=>t+"%",D=t=>t+"cqw",L=t=>t+"cqh",R=t=>t+"cqi",V=t=>t+"cqb",F=t=>t+"cqmin",H=t=>t+"cqmax",Z=Object.fromEntries,G=Object.entries,Q=":first-",U=":last-",X=":only-",Y="child",tt=":nth-",et="of-type",st=tt+Y,rt=":focus",nt={r:":root",h:":hover",f:rt,fv:rt+"-visible",a:":active",v:":visited",val:":valid",inv:":invalid",e:":empty",d:":disabled",rq:":required",o:":optional",m:":modal",l:":link",ph:":placeholder",ch:":checked",po:":popover-open",fc:Q+Y,lc:U+Y,oc:X+Y,odd:st+"(odd)",even:st+"(even)",ft:Q+et,lt:U+et,ot:X+et,bef:"::before",aft:"::after",bd:"::backdrop"},it={has:":has",not:":not",is:":is",wh:":where",st:":state",nthc:st,ntho:tt+et,dir:":dir",lang:":lang"},at="oklch",ct=t=>at+`(${t})`,ot=t=>ct(`from ${t}`),lt="def",ut=t=>{const e=(e,s)=>"string"==typeof s?t(e,s):s;class s{constructor(t={}){this.state={l:e("l",lt),c:e("c",lt),h:e("h",lt),a:e("a",lt)},this.merge=t=>new s(Object.assign(this.state,t)),this.l=t=>this.merge({l:e("l",t)}),this.c=t=>this.merge({c:e("c",t)}),this.h=t=>this.merge({h:e("h",t)}),this.a=t=>this.merge({a:e("a",t)}),this.state=Object.assign(this.state,t)}get s(){return this.toString()}toString(){const{l:t,c:e,h:s,a:r}=this.state;return ct(`${t} ${e} ${s} / ${r}`)}}return t=>new s(t)},ht=(t,e=.1)=>ot(`${t} calc(l + ${e}) c h / alpha)`),gt=(t,e=.1)=>ot(`${t} calc(l - ${e}) c h / alpha)`),mt=(t,e=.1)=>ot(`${t} l c h / calc(alpha + ${e}))`),pt=(t,e=.1)=>ot(`${t} l c h / calc(alpha - ${e}))`),dt=(t,e=.04)=>ot(`${t} l calc(c + ${e}) h / alpha)`),bt=(t,e=.04)=>ot(`${t} l calc(c - ${e}) h / alpha)`),ft=(t,e=30)=>ot(`${t} l c calc(h${"number"==typeof e?e>0?" + "+e:" - "+-e:e}) / alpha)`),yt=({base:t,mixin:e,method:s,bpart:r,mpart:n})=>`color-mix(in ${s||at}, ${t}${void 0!==r?` ${r}%`:""}, ${e}${void 0!==n?` ${n}%`:""})`,xt=t=>({create:ut(t),oklch:ct,lighten:ht,darken:gt,saturate:dt,desaturate:bt,fadein:mt,fadeout:pt,spin:ft,mix:yt}),vt="palette",$t=t=>{class e{constructor(t={}){this.state={l:"l",c:"base",h:"pri",a:1,m:"bg"},Object.assign(this,{[u]:!0}),this.state=Object.assign(this.state,t)}get xs(){return new e(Object.assign(Object.assign({},this.state),{l:"xs"}))}get s(){return new e(Object.assign(Object.assign({},this.state),{l:"s"}))}get m(){return new e(Object.assign(Object.assign({},this.state),{l:"m"}))}get l(){return new e(Object.assign(Object.assign({},this.state),{l:"l"}))}get xl(){return new e(Object.assign(Object.assign({},this.state),{l:"xl"}))}get lightness(){return{xs:this.xs,s:this.s,m:this.m,l:this.l,xl:this.xl}}get gray(){return new e(Object.assign(Object.assign({},this.state),{c:"gray"}))}get pale(){return new e(Object.assign(Object.assign({},this.state),{c:"pale"}))}get base(){return new e(Object.assign(Object.assign({},this.state),{c:"base"}))}get rich(){return new e(Object.assign(Object.assign({},this.state),{c:"rich"}))}get chroma(){return{gray:this.gray,pale:this.pale,base:this.base,rich:this.rich}}get pri(){return new e(Object.assign(Object.assign({},this.state),{h:"pri"}))}get sec(){return new e(Object.assign(Object.assign({},this.state),{h:"sec"}))}get suc(){return new e(Object.assign(Object.assign({},this.state),{h:"suc"}))}get inf(){return new e(Object.assign(Object.assign({},this.state),{h:"inf"}))}get war(){return new e(Object.assign(Object.assign({},this.state),{h:"war"}))}get dan(){return new e(Object.assign(Object.assign({},this.state),{h:"dan"}))}get hue(){return{pri:this.pri,sec:this.sec,suc:this.suc,inf:this.inf,war:this.war,dan:this.dan}}alpha(t=1){return new e(Object.assign(Object.assign({},this.state),{a:t}))}get bg(){return new e(Object.assign(Object.assign({},this.state),{m:"bg"}))}get fg(){return new e(Object.assign(Object.assign({},this.state),{m:"fg"}))}toString(){const{l:e,c:s,h:r,a:n,m:i}=this.state;return`oklch(${t(vt,"l",i,e)} ${t(vt,"c",i,s)} ${t(vt,"h",r)} / ${n})`}}return new e},jt="coef",Ot=t=>{class e{constructor(t={}){this.state={center:8},this.state=Object.assign(this.state,t)}get min(){return t(jt,this.state.center-4)}get xxs(){return t(jt,this.state.center-3)}get xs(){return t(jt,this.state.center-2)}get s(){return t(jt,this.state.center-1)}get m(){return t(jt,this.state.center)}get l(){return t(jt,this.state.center+1)}get xl(){return t(jt,this.state.center+2)}get xxl(){return t(jt,this.state.center+3)}get max(){return t(jt,this.state.center+4)}get $0_(){return new e({center:4})}get $1_(){return new e({center:12})}get $2_(){return new e({center:20})}get $16_(){return new e({center:28})}get $1(){return new e({center:8})}get $2(){return new e({center:16})}get $16(){return new e({center:24})}get short(){return{s:this.s,m:this.m,l:this.l}}get base(){return Object.assign(Object.assign({xs:this.xs},this.short),{xl:this.xl})}get long(){return Object.assign(Object.assign({xxs:this.xxs},this.base),{xxl:this.xxl})}get full(){return Object.assign(Object.assign({min:this.min},this.long),{max:this.max})}get main(){return{min:this.min,m:this.m,max:this.max}}get sparse(){return{min:this.min,xs:this.xs,m:this.m,xl:this.xl,max:this.max}}}return new e},kt=Object.assign,_t=Object.entries,wt={dash:(...t)=>t.join("-"),comma:(...t)=>t.join(),space:(...t)=>t.join(" "),range:(t,e)=>Array.from(Array(t).entries()).reduce(((t,[s])=>kt(t,e(s+1))),{}),each:(t,e)=>_t(t).reduce(((t,[s,r])=>kt(t,e(s,r))),{}),when:(t,e,s={})=>t?e:s},St="width: ",qt=t=>{const{scope:e,globalKey:s="",bp:n={}}=t,i=e(s).varExp,a=t=>i(...t.split(".")),c=(t=1)=>`calc(${t} * ${a("rtime")})`,o=(t=1)=>`calc(${t} * ${a("rangle")})`,u=(t=1)=>`calc(${t} * 1rem)`;return{compile:({key:t,maker:s})=>{const g=e(t),m=q(g),p=t=>{const e=n[t]||t;return"number"==typeof e?e+"rem":""},d=t=>"min-"+St+p(t),b=t=>"max-"+St+p(t),f=(t,e)=>"string"==typeof e?m.cq(t,e):m.mq(t),y=(t,e,s)=>""+f(d(t)+") and ("+b(e),s),x={up:(t,e)=>""+f(d(t),e),down:(t,e)=>""+f(b(t),e),between:y,only:(t,e)=>y(t,t,e)};return v=s(Object.assign(wt,{key:t,vars:a,size:u,time:c,angle:o,bem:g.selector,pseudo:Object.assign(Z(G(nt).map((([t,e])=>{function s(t=""){return t+e}return s.toString=()=>e,[t,s]}))),Z(G(it).map((([t,e])=>{function s(t,s=""){return s+e+`(${t})`}return s.toString=()=>e,[t,s]})))),color:xt(i),palette:$t(i),coef:Ot(i),units:{px:A,vh:E,vw:P,vmin:C,vmax:z,em:M,rem:N,deg:W,rad:I,turn:K,ms:T,s:B,pc:J,cqw:D,cqh:L,cqb:V,cqi:R,cqmin:F,cqmax:H},at:m,limit:x,merge:r})),l(v,((t,e)=>t+h(...e)),"");var v}}};const At=()=>{const t=new Set,e=new Map;return{use(s,r){const n=e.get(s);return n||(t.add(r),e.set(s,r),r)},useMany(t){return Object.entries(t).map((([t,e])=>this.use(e,t)))},getKey:t=>e.get(t),get keys(){return[...t]},get makers(){return Object.fromEntries(e.entries().map((([t,e])=>[e,t])))}}},Et=({prefix:t=i.prefix})=>{let e=1;return{get base(){return t+0},get current(){return t+e},next(){return e++,this.current},reset(){e=1}}},Pt=void 0,Ct=Object.entries,zt=Object.defineProperties,Mt=t=>"string"==typeof t,Nt=t=>null!==t&&"object"==typeof t,Wt=t=>t.split("."),It=(t,e)=>Ct(t).reduce(((t,[s,r])=>{if(Nt(r)){const n=Ct(r);n.length?t.push(...n.reduce(((t,[r,n])=>{if((t=>null!==t&&t!==Pt)(r)&&e&&t.push([s,r,Pt,Pt]),Nt(n)){const e=Ct(n);e.length&&t.push(...e.reduce(((t,[e,n])=>{const i=typeof n;return"string"!==i&&"number"!==i||t.push([s,r,e,n]),t}),[]))}return t}),[])):t.push([s,Pt,Pt,Pt])}return t}),[]),Kt=(t,e,s,r)=>""+(((t,e)=>`${t||""}${e?"__"+e:""}`)(t,e)+(s?"_"+s:"")+(s&&r?"_"+r:""))||"_",Tt=(t,e)=>"."+(e?t+(e.startsWith("_")?"":"-")+e:t),Bt=(t,e)=>`[data-${t}${e?`~="${e}"`:""}]`;const Jt=t=>t||"",Dt=(t={})=>{const{mode:e,min:s,dict:r={}}=t;let n;n="a"===e?Bt:Tt;const i=t=>{let s=0,r=Jt,a=Jt;const c=i.dict;c&&(c[t]||(c[t]={}),r=e=>{var r;return null!==(r=c[t][e])&&void 0!==r?r:c[t][e]=(s++).toString(36)},a=e=>c[t][e]);let o=(...e)=>[t,...e].filter(Boolean).join("-"),l="class",u=e=>e?t+(e.startsWith("_")?"":"-")+e:void 0===e?void 0:t;"a"===e&&(l="data-"+t,u=Jt);const h=(...t)=>"--"+o(...t),g=t=>{if(void 0===t)return function(t){const e=({b:s,e:r,m:n})=>({b:t=>e({b:t,e:"",m:{}}),e:t=>e({b:s,e:t,m:{}}),m:(t={})=>e({b:s,e:r,m:t}),get $(){return t({[s]:{[r]:n}})}});return e({b:"",e:"",m:{}})}(g);let e,s,r,n,i="";const c=Mt(t);return i=c||Array.isArray(t)?[...(c?[t]:t).reduce(((t,i)=>([e,s,r,n]=Wt(i),t.add(u(a(Kt(e,s)))),r&&t.add(u(a(Kt(e,s,r,n)))),t)),new Set).values()].join(" "):t&&It(t,!0).map((([t,e,s,r])=>u(a(Kt(t,e,s,r))))).join(" "),zt({[l]:i},{toString:{value:()=>`${l}="${i}"`},$:{value:i}})};return{selector:e=>{let s,i,a,c;return Mt(e)?([s,i,a,c]=Wt(e),n(t,r(Kt(s,i,a,c)))):e&&It(e).map((([e,s,i,a])=>n(t,r(Kt(e,s,i,a))))).join(",")},attr:g,name:o,varName:h,varExp:(...t)=>`var(${h(...t)})`}};return s&&(i.dict=r),i},Lt="effcss-provider",Rt="script",Vt="theme",Ft="size",Ht="time",Zt="angle",Gt="palette",Qt="data-effcss",Ut=Qt+"-scope",Xt="application/json",Yt=Object.assign,te=Object.entries,ee=Object.fromEntries,se=t=>"boolean"==typeof t,re=(t,e)=>t.getAttribute(e)||i[e],ne=(t,e)=>(t=>null!==t?Number(t):null)(re(t,e)),ie=(t,e,s)=>null===s?t.removeAttribute(e):t.setAttribute(e,s+""),ae=t=>`:root:has(${Rt}[is=${Lt}]${t?`[${t}]`:""})`,ce=t=>[t.xxs,t.xs,t.s,t.m,t.l,t.xl,t.xxl],oe=["xs","s","m","l","xl"],le=["pale","base","rich"],ue=({scope:e,keyMaker:s,provider:r})=>{const n=r.settings,i=null==n?void 0:n.vars,{varName:a}=e(s.base),c=t=>a("",t);function o(t,e){return te(t).reduce(((t,[s,r])=>r&&"object"==typeof r?Yt(t,o(r,[...e,s])):(t[a(...e,s)]=r,t)),{})}const l=ee(te(i||{}).map((([t,e])=>[t,o(e,[])]))),{"":u={},dark:h,light:g}=l,m=t(l,["","dark","light"]),p=r.size,d=r.time,b=r.angle,{l:f,c:y,h:x}=n.palette,v=n.coef,$=[0,...ce(v.$0_),1,...ce(v.$1_),2,...ce(v.$2_),16,...ce(v.$16_),v.max];return({bem:t,each:e,when:s,vars:r,merge:n,at:{media:i},units:{px:o,ms:h,deg:g}})=>{const v="prefers-color-scheme",j={light:`${v}: light`,dark:`${v}: dark`};return n({[ae()]:n({fontSize:r("rem")},u,e($,((t,e)=>({[a("coef",t)]:e}))),e(x,((t,e)=>({[a(Gt,"h",t)]:e}))),{[a(Gt,"c","bg","gray")]:0,[a(Gt,"c","fg","gray")]:0},e(j,((t,s)=>i.and(s)(n(l[t]||{},e(oe,((e,s)=>({[a(Gt,"l","bg",s)]:f[t].bg[s],[a(Gt,"l","fg",s)]:f[t].fg[s]}))),e(le,((e,s)=>({[a(Gt,"c","bg",s)]:y[t].bg[s],[a(Gt,"c","fg",s)]:y[t].fg[s]}))))))))},e(m,((e,s)=>({[ae(`${Vt}=${e}`)]:s,[t(`..theme.${e}`)]:s}))),s(!!p,{[ae(Ft)]:{[c("rem")]:o(p)}}),s(!!d,{[ae(Ht)]:{[c("rtime")]:h(d)}}),s(!!b,{[ae(Zt)]:{[c("rangle")]:g(b)}}))}},he=({scope:t,keyMaker:e,collector:s,manager:r,processor:n})=>{const i=t=>"string"==typeof t?t:s.getKey(t),a=s=>t(s||e.base).attr,c=(t,e)=>n.compile({key:e,maker:t}),o=(t,n,i)=>{const o=n||e.current;let l=s.use(t,o);return(i||r&&!r.has(l))&&(r.pack(l,r.hydrate(l)||c(t,l)),n||e.next()),a(l)};return{key:i,resolve:a,use:o,usePublic:t=>ee(te(t).map((([t,e])=>[t,o(e,t)]))),usePrivate:t=>t.map((t=>o(t))),css:c,status:t=>{const e=i(t);return!!e&&r.status(e)},on:(...t)=>r.on(...t.map(i)),off:(...t)=>r.off(...t.map(i)),stylesheets:(...t)=>{let e;return e=t.length?1===t.length&&Array.isArray(t[0])?t[0]:t:s.keys,e.map((t=>r.get(i(t))))}}},ge=t=>Object.defineProperties(t,{prefix:{get:()=>t.getAttribute("prefix")||"f"},mode:{get:()=>t.getAttribute("mode")||"a"},min:{get:()=>""===t.getAttribute("min")},hydrate:{get:()=>""===t.getAttribute("hydrate")},theme:{set(e){ie(t,Vt,e)},get:()=>re(t,Vt)||""},size:{set(e){ie(t,Ft,e)},get:()=>ne(t,Ft)},time:{set(e){ie(t,Ht,e)},get:()=>ne(t,Ht)},angle:{set(e){ie(t,Zt,e)},get:()=>ne(t,Zt)}});function me(t={}){const e=globalThis.document,s=globalThis.customElements;if(null==s?void 0:s.get(Lt))return!1;{class n extends HTMLScriptElement{constructor(){super(...arguments),this._c=At(),this._settings=o,this._cust=()=>{this._=ue({scope:this._s,keyMaker:this._k,provider:this}),this.use(this._,this._k.base,!0)}}static get observedAttributes(){return[Ft,Ht,Zt]}get settings(){return this._settings}set settings(t){var e,s,n;const i=r({},this._settings,t),{makers:a,bp:c,off:o}=i;(c&&(null===(e=this._settings)||void 0===e?void 0:e.bp)!==c||!this._p)&&(this._p=qt({scope:this._s,globalKey:this._k.base,bp:c})),a&&(null===(s=this._settings)||void 0===s?void 0:s.makers)!==a&&(this._c.useMany(a),this.usePublic(a),(null==o?void 0:o.length)&&this._settings.off!==o&&this.off(...o)),this._settings=i,(!(null===(n=this._m)||void 0===n?void 0:n.has(this._k.base))||t.vars||t.palette||t.coef)&&this._cust()}get makers(){return this._c.makers}attributeChangedCallback(){this._k&&this._cust()}connectedCallback(){var s;this.textContent?this._settings=r(this._settings,JSON.parse(this.textContent)):t&&(this._settings=r(this._settings,t)),ge(this);const n=null===(s=e.querySelector(`script[${Ut}]`))||void 0===s?void 0:s.textContent;this._k=Et({prefix:this.prefix}),this._s=Dt({mode:this.mode,min:this.min,dict:n&&JSON.parse(n)}),this._p=qt({scope:this._s,globalKey:this._k.base,bp:t.bp||this.settings.bp}),this._m=function(t){const e={};null==t||t.forEach((t=>{const s=t.dataset.effcss;s&&(e[s]=t)}));let s={},r={},n=[],i=[];const a=(t,e)=>(e.toString=()=>"effcss-"+t,e),c=t=>{var e;return t.adoptedStyleSheets=[...(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)?[...t.adoptedStyleSheets].filter((t=>!(t+"").startsWith("effcss-"))):[],...n]},o=()=>{i=i.reduce(((t,e)=>{const s=e.deref();return s&&(c(s),t.push(e)),t}),[])},l=t=>n.findIndex((e=>e===t)),u=t=>t?s[t]:void 0,h=(t,r)=>{if(!s[t]){s[t]=a(t,r),n.push(s[t]);const i=e[t];return i&&(i.disabled=!0),o(),!0}},g=t=>{const e=u(t);return!!e&&-1!==l(e)};return{apply:c,notify:o,getIndex:l,get:u,has:t=>!!t&&!!u(t),getAll:()=>s,add:h,status:g,on:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);return!(!s||g(e))&&(n.push(s),t)}),!0);return o(),e},off:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);if(s&&g(e)){const e=l(s);return n.splice(e,1),t}return!1}),!0);return o(),e},remove:t=>{const e=u(t);if(!e)return;const i=l(e);return i>-1&&(n.splice(i,1),delete s[t],delete r[t]),o(),!0},removeAll:()=>(n.splice(0),s={},r={},o(),!0),pack:(t,e)=>{let r=s[t]||new CSSStyleSheet;return r.replaceSync(e),r=a(t,r),!!r.cssRules.length&&h(t,r)},replace:(t,e)=>{const r=s[t];if(r)return r.replaceSync(e),o(),!0},register:t=>{i.findIndex((e=>e.deref()===t))>=0||(i.push(new WeakRef(t)),c(t))},unregister:t=>{const e=i.findIndex((e=>e.deref()===t));e>=0&&i.splice(e,1)},hydrate:t=>e[t]&&!e[t].disabled&&e[t].textContent||void 0}}(e.querySelectorAll(`style[${Qt}]`));const i=he({scope:this._s,processor:this._p,keyMaker:this._k,manager:this._m,collector:this._c});Object.assign(this,i),this._cust();const a=this;this._n={set adoptedStyleSheets(t){a.dispatchEvent(new CustomEvent("effcsschanges",{detail:{styles:t},bubbles:!0}))}},this._m.register(this._n),this._m.register(e)}toString(){const t=[...this.attributes].map((t=>t.value?`${t.name}="${t.value}"`:""===t.value?t.name:"")).filter(Boolean).join(" ");return`<${Rt} ${t}>${this.textContent}</${Rt}>`}}return s.define(Lt,n,{extends:Rt}),!0}}const pe=(e={})=>{let{noscript:s,attrs:n={}}=e,a=t(e,["noscript","attrs"]);const c=r(o,a);let{mode:l=i.mode,min:u,prefix:h=i.prefix,theme:g,hydrate:m,size:p,time:d,angle:b}=n;const f=Et({prefix:h}),y=Dt({mode:l,min:u}),x=qt({scope:y,globalKey:f.base,bp:c.bp}),v=At(),$={},j=[],O=t=>j.findIndex((e=>e===t)),k=he({scope:y,processor:x,keyMaker:f,manager:{hydrate(t){},get:t=>t?$[t]:void 0,pack(t,e){const s=$[t]||{key:t,styles:e};if(!$[t])return $[t]=s,j.push(s),!0},has(t){return!!t&&!!this.get(t)},status(t){const e=this.get(t);return!!e&&-1!==O(e)},on(...t){return t.reduce(((t,e)=>{const s=this.get(e);return!(!s||this.status(e))&&(j.push(s),t)}),!0)},off(...t){return t.reduce(((t,e)=>{const s=this.get(e);if(s&&this.status(e)){const e=O(s);return j.splice(e,1),t}return!1}),!0)}},collector:v}),_=Object.assign(Object.assign({tagName:"",attributes:{prefix:h,mode:l,hydrate:m,min:u,theme:g,size:p,time:d,angle:b},getAttribute(t){const e=this.attributes[t];return e?se(e)?"":e:null},setAttribute(t,e){this.attributes[t]=e},removeAttribute(t){delete this.attributes[t]},get makers(){return v.makers},get settings(){return c},set settings(t){}},k),{toString(){const t=[{key:f.base,styles:k.css(ue({scope:y,keyMaker:f,provider:this}),f.base)},...j].map((({key:t,styles:e})=>`<style ${Qt}="${t}">${e}</style>`)).join("");if(s)return t;const e=u&&v.keys.length>1?`<${Rt} ${Ut} type="${Xt}">${JSON.stringify(y.dict)}</${Rt}>`:"",r=Object.keys(a).length?JSON.stringify(a):"",n=Object.entries(Object.assign({is:Lt,type:Xt},this.attributes)).map((([t,e])=>e&&e!==i[t]?se(e)?t:`${t}="${e}"`:"")).filter(Boolean).join(" ");return t+e+`<${Rt} ${n}>${r}</${Rt}>`}});return ge(_)},de=(e={})=>{const{emulate:s}=e,r=t(e,["emulate"]),n=null===globalThis||void 0===globalThis?void 0:globalThis.document;if(n&&!s){void 0===de.isDefined&&(de.isDefined=me(r));const t=n.querySelector(Rt+`[is=${Lt}]`);if(t)return t;const e=n.createElement(Rt,{is:Lt});e.setAttribute("is",Lt);const s=null==r?void 0:r.attrs;return s&&Object.entries(s).map((([t,s])=>s&&i[t]!==s&&e.setAttribute(t,se(s)?"":s+""))),n.head.appendChild(e),e}return pe(r)},be=(t={})=>de({attrs:t});export{be as createConsumer};
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * EffCSS v3.12.0
2
+ * EffCSS v3.12.1
3
3
  * {@link https://gitverse.ru/msabitov/effcss}
4
4
  * Copyright (c) Marat Sabitov
5
5
  * @license Apache-2.0
6
6
  */
7
- function t(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}"function"==typeof SuppressedError&&SuppressedError;const e=Object.entries,s=Array.isArray,r=(t,...n)=>n.length?n.reduce(((t,n)=>(e(n).forEach((([e,n])=>{n&&"object"==typeof n&&t[e]?s(t[e])&&s(n)?t[e]=[...t[e],...n]:r(t[e],n||{}):t[e]=n})),t)),t):t,n={def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},i={mode:"a",prefix:"f"},a=t=>Number((.1*184+.9*t).toFixed(2)),c={l:{dark:{bg:{xl:.24,l:.3,m:.36,s:.42,xs:.48},fg:{xl:.98,l:.93,m:.86,s:.79,xs:.72}},light:{bg:{xl:.98,l:.93,m:.88,s:.83,xs:.78},fg:{xl:0,l:.12,m:.24,s:.36,xs:.48}}},c:{dark:{bg:{pale:.02,base:.06,rich:.1},fg:{pale:.06,base:.1,rich:.14}},light:{bg:{pale:.01,base:.04,rich:.7},fg:{pale:.07,base:.11,rich:.15}}},h:{pri:184,sec:290,suc:a(142),inf:a(264),war:a(109),dan:a(29)}},o={bp:{"3xs":18,"2xs":24,xs:30,sm:40,md:48,lg:64,xl:80,"2xl":96},vars:{"":{rtime:"200ms",rem:"16px",rangle:"30deg",l:n,h:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},c:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},a:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},t:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},int:[...Array(12).keys()],fr:{0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ar:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778}},light:{l:n},dark:{l:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},palette:c,coef:{$0_:{xxs:.0625,xs:.125,s:.25,m:.5,l:.75,xl:.875,xxl:.9375},$1_:{xxs:1.0625,xs:1.125,s:1.25,m:1.5,l:1.75,xl:1.875,xxl:1.9375},$2_:{xxs:2.5,xs:4,s:5,m:7.5,l:10,xl:12,xxl:15},$16_:{xxs:20,xs:28,s:36,m:48,l:64,xl:80,xxl:120},max:150}},l=(t,e,s)=>Object.entries(t).reduce(e,s),u=Symbol("noParse"),h=(t,e,s)=>{var r,n,i;let a=""+t;return null==e?"":"object"!=typeof e||e.hasOwnProperty(u)?`${c=a,c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}:${""+e};`:(!s||(null===(r=s.startsWith)||void 0===r?void 0:r.call(s,"@"))||(null===(n=a.startsWith)||void 0===n?void 0:n.call(a,"&"))||(null===(i=a.startsWith)||void 0===i?void 0:i.call(a,"@"))?"":"&")+a+`{${l(e,((t,e)=>t+h(...e,a)),"")}}`;var c},g="@media",m="@container",p="@property",d="@keyframes",b="@layer",f="@scope",x="@supports",y="@starting-style",v=(t,e)=>{const s=g+` ${e||""}${e?" and ":""}(${t})`;return{s:s,q:t,t:e,toString:()=>s}};v.toString=()=>g;const $=t=>`(${t})`,j=t=>"string"==typeof t;function O(t){var e;if(!(null===(e=null==t?void 0:t.args)||void 0===e?void 0:e.length))return"";switch(t.key){case"or":return t.args.map((t=>j(t)?$(t):O(t))).join(" or ");case"and":return t.args.map((t=>{const e=!j(t);return e&&"or"===t.key?$(O(t)):e?O(t):$(t)})).join(" and ");case"not":const e=t.args[0];return"not "+(j(e)?$(e):$(O(e)))}}const k=(t,e)=>{let s="";return t.length&&(s=t.join(" ")),e&&(s=s+(s?" and ":"")+(s&&"or"===e.key?$(O(e)):O(e))),s},_=(t={})=>{const{type:e=[],state:s}=t;return Object.defineProperties((t=>{const r=k(e,s);return{[`${g}${r?" "+r:""}`]:t}}),{key:{value:null==s?void 0:s.key},args:{value:null==s?void 0:s.args},all:{get:()=>_({state:s,type:["all"]})},print:{get:()=>_({state:s,type:["print"]})},screen:{get:()=>_({state:s,type:["screen"]})},and:{value:(...t)=>_({type:e,state:{key:"and",args:s?[s,...t]:t}})},or:{value:(...t)=>_({type:e,state:{key:"or",args:s?[s,...t]:t}})},not:{get:()=>_(s?{type:e,state:j(s)||"not"!==(null==s?void 0:s.key)?{key:"not",args:[s]}:s.args[0]}:{type:2===e.length?[e[1]]:["not",e[0]||"all"],state:s})}})},w=t=>{const{root:e="",limit:s="",mode:r=[!1,!1]}=t;return Object.defineProperties((t=>({[f+` ${e?`(${e}${r[0]?" > *":""})`:""}${e&&s?" ":""}${s?`to (${s}${r[1]?" > *":""})`:""}`]:t})),{limit:{value:t=>w({root:e,limit:t,mode:r})},root:{value:t=>w({root:t,limit:s,mode:r})},both:{value:()=>w({root:e,limit:s,mode:[!1,!0]})},none:{value:()=>w({root:e,limit:s,mode:[!0,!1]})},low:{value:()=>w({root:e,limit:s,mode:[!0,!0]})},high:{value:()=>w({root:e,limit:s,mode:[!1,!1]})},toString:{value:()=>":scope"}})},S=t=>({[y]:t}),q=t=>{const e={cp:1,lay:1,kf:1,cq:1},s=(s,r)=>{const n="string"==typeof r?r:t.name("cq",e.cq++),i=m+` ${n?n+" ":""}(${s})`;return{c:n,q:s,s:i,toString:()=>i}};s.toString=()=>m;const r=(s={})=>{const{scroll:n,type:i,name:a,state:c}=s;return Object.defineProperties((t=>{const e=k([],c);return{[`${m}${a?" "+a:""}${e?" "+e:""}`]:t}}),{container:{value:(a||"none")+" / "+(i&&n?`${i} scroll-state`:n?"scroll-state":i||"normal"),enumerable:!0},key:{value:null==c?void 0:c.key},args:{value:null==c?void 0:c.args},named:{get:()=>r({scroll:n,state:c,name:a||t.name("cq",e.cq++),type:i})},size:{get:()=>r({name:a,scroll:n,state:c,type:"size"})},isize:{get:()=>r({name:a,scroll:n,state:c,type:"inline-size"})},scroll:{get:()=>r({name:a,scroll:!0,state:c,type:i})},and:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"and",args:c?[c,...t]:t}})},or:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"or",args:c?[c,...t]:t}})},not:{value:t=>r({name:a,scroll:n,type:i,state:{key:"not",args:[t]}})},[u]:{value:!0}})},n=(s,r)=>{const n="--"+(s||t.name("cp",e.cp++)),i=p+" "+n;return{k:n,v:`var(${n})`,s:i,r:{[i]:{syntax:(null==r?void 0:r.syn)||'"*"',inherits:(null==r?void 0:r.inh)||!1,initialValue:null==r?void 0:r.ini}},toString:()=>i}};n.toString=()=>p;const i=s=>{const r=s||t.name("kf",e.kf++),n=d+" "+r;return{k:r,s:n,toString:()=>n}};i.toString=()=>d;const a=s=>{const r=s||t.name("lay",e.lay++),n=b+" "+r;return{k:r,s:n,toString:()=>n}};a.toString=()=>b;a.toString=()=>f;const c=(t="",e=!1)=>{const s=x+` ${e?"not ":""}(${t})`;return{c:t,n:e,s:s,toString:()=>s}};return c.toString=()=>x,{pr:n,kf:i,mq:v,cq:s,lay:a,sc:(t="",e="")=>{const s=f+` ${t?`(${t})`:""}${t&&e?" ":""}${e?`to (${e})`:""}`;return{r:t,l:e,s:s,toString:()=>s}},sup:c,keyframes:s=>{const r=t.name("kf",e.kf++),n=d+" "+r;return Object.defineProperties((t=>{if(!t)return{animationName:r};const{dur:e,tf:s,del:n,ic:i,dir:a,ps:c,fm:o}=t;return{animation:[e,s,n,i,a,c,o,r].filter(Boolean).join(" ")}}),{[n]:{value:s,enumerable:!0},toString:{value:()=>r},[u]:{value:!0}})},property:(s={})=>{const{syn:r='"*"',inh:n=!0,ini:i,def:a}=s,c="--"+t.name("cp",e.cp++),o=`var(${c}${void 0!==a?","+a:""})`,l=p+" "+c;return Object.defineProperties((t=>({[c]:t})),{[l]:{value:{syntax:r,inherits:n,initialValue:i},enumerable:!0},toString:{value:()=>o},[u]:{value:!0}})},scope:w({}),media:_({}),container:r({}),startingStyle:S}},A=t=>t+"px",E=t=>t+"vh",P=t=>t+"vw",z=t=>t+"vmin",C=t=>t+"vmax",M=t=>t+"em",N=t=>t+"rem",W=t=>t+"deg",I=t=>t+"rad",K=t=>t+"rad",T=t=>t+"ms",B=t=>t+"s",D=t=>t+"%",J=t=>t+"cqw",L=t=>t+"cqh",R=t=>t+"cqi",V=t=>t+"cqb",F=t=>t+"cqmin",H=t=>t+"cqmax",Z=Object.fromEntries,G=Object.entries,Q=":first-",U=":last-",X=":only-",Y="child",tt=":nth-",et="of-type",st=tt+Y,rt=":focus",nt={r:":root",h:":hover",f:rt,fv:rt+"-visible",a:":active",v:":visited",val:":valid",inv:":invalid",e:":empty",d:":disabled",rq:":required",o:":optional",m:":modal",l:":link",ph:":placeholder",ch:":checked",po:":popover-open",fc:Q+Y,lc:U+Y,oc:X+Y,odd:st+"(odd)",even:st+"(even)",ft:Q+et,lt:U+et,ot:X+et,bef:"::before",aft:"::after",bd:"::backdrop"},it={has:":has",not:":not",is:":is",wh:":where",st:":state",nthc:st,ntho:tt+et,dir:":dir",lang:":lang"},at="oklch",ct=t=>at+`(${t})`,ot=t=>ct(`from ${t}`),lt="def",ut=t=>{const e=(e,s)=>"string"==typeof s?t(e,s):s;class s{constructor(t={}){this.state={l:e("l",lt),c:e("c",lt),h:e("h",lt),a:e("a",lt)},this.merge=t=>new s(Object.assign(this.state,t)),this.l=t=>this.merge({l:e("l",t)}),this.c=t=>this.merge({c:e("c",t)}),this.h=t=>this.merge({h:e("h",t)}),this.a=t=>this.merge({a:e("a",t)}),this.state=Object.assign(this.state,t)}get s(){return this.toString()}toString(){const{l:t,c:e,h:s,a:r}=this.state;return ct(`${t} ${e} ${s} / ${r}`)}}return t=>new s(t)},ht=(t,e=.1)=>ot(`${t} calc(l + ${e}) c h / alpha)`),gt=(t,e=.1)=>ot(`${t} calc(l - ${e}) c h / alpha)`),mt=(t,e=.1)=>ot(`${t} l c h / calc(alpha + ${e}))`),pt=(t,e=.1)=>ot(`${t} l c h / calc(alpha - ${e}))`),dt=(t,e=.04)=>ot(`${t} l calc(c + ${e}) h / alpha)`),bt=(t,e=.04)=>ot(`${t} l calc(c - ${e}) h / alpha)`),ft=(t,e=30)=>ot(`${t} l c calc(h${"number"==typeof e?e>0?" + "+e:" - "+-e:e}) / alpha)`),xt=({base:t,mixin:e,method:s,bpart:r,mpart:n})=>`color-mix(in ${s||at}, ${t}${void 0!==r?` ${r}%`:""}, ${e}${void 0!==n?` ${n}%`:""})`,yt=t=>({create:ut(t),oklch:ct,lighten:ht,darken:gt,saturate:dt,desaturate:bt,fadein:mt,fadeout:pt,spin:ft,mix:xt}),vt="palette",$t=t=>{class e{constructor(t={}){this.state={l:"l",c:"base",h:"pri",a:1,m:"bg"},Object.assign(this,{[u]:!0}),this.state=Object.assign(this.state,t)}get xs(){return new e(Object.assign(Object.assign({},this.state),{l:"xs"}))}get s(){return new e(Object.assign(Object.assign({},this.state),{l:"s"}))}get m(){return new e(Object.assign(Object.assign({},this.state),{l:"m"}))}get l(){return new e(Object.assign(Object.assign({},this.state),{l:"l"}))}get xl(){return new e(Object.assign(Object.assign({},this.state),{l:"xl"}))}get lightness(){return{xs:this.xs,s:this.s,m:this.m,l:this.l,xl:this.xl}}get gray(){return new e(Object.assign(Object.assign({},this.state),{c:"gray"}))}get pale(){return new e(Object.assign(Object.assign({},this.state),{c:"pale"}))}get base(){return new e(Object.assign(Object.assign({},this.state),{c:"base"}))}get rich(){return new e(Object.assign(Object.assign({},this.state),{c:"rich"}))}get chroma(){return{gray:this.gray,pale:this.pale,base:this.base,rich:this.rich}}get pri(){return new e(Object.assign(Object.assign({},this.state),{h:"pri"}))}get sec(){return new e(Object.assign(Object.assign({},this.state),{h:"sec"}))}get suc(){return new e(Object.assign(Object.assign({},this.state),{h:"suc"}))}get inf(){return new e(Object.assign(Object.assign({},this.state),{h:"inf"}))}get war(){return new e(Object.assign(Object.assign({},this.state),{h:"war"}))}get dan(){return new e(Object.assign(Object.assign({},this.state),{h:"dan"}))}get hue(){return{pri:this.pri,sec:this.sec,suc:this.suc,inf:this.inf,war:this.war,dan:this.dan}}alpha(t=1){return new e(Object.assign(Object.assign({},this.state),{a:t}))}get bg(){return new e(Object.assign(Object.assign({},this.state),{m:"bg"}))}get fg(){return new e(Object.assign(Object.assign({},this.state),{m:"fg"}))}toString(){const{l:e,c:s,h:r,a:n,m:i}=this.state;return`oklch(${t(vt,"l",i,e)} ${t(vt,"c",i,s)} ${t(vt,"h",r)} / ${n})`}}return new e},jt="coef",Ot=t=>{class e{constructor(t={}){this.state={center:8},this.state=Object.assign(this.state,t)}get min(){return t(jt,this.state.center-4)}get xxs(){return t(jt,this.state.center-3)}get xs(){return t(jt,this.state.center-2)}get s(){return t(jt,this.state.center-1)}get m(){return t(jt,this.state.center)}get l(){return t(jt,this.state.center+1)}get xl(){return t(jt,this.state.center+2)}get xxl(){return t(jt,this.state.center+3)}get max(){return t(jt,this.state.center+4)}get $0_(){return new e({center:4})}get $1_(){return new e({center:12})}get $2_(){return new e({center:20})}get $16_(){return new e({center:28})}get $1(){return new e({center:8})}get $2(){return new e({center:16})}get $16(){return new e({center:24})}get short(){return{s:this.s,m:this.m,l:this.l}}get base(){return Object.assign(Object.assign({xs:this.xs},this.short),{xl:this.xl})}get long(){return Object.assign(Object.assign({xxs:this.xxs},this.base),{xxl:this.xxl})}get full(){return Object.assign(Object.assign({min:this.min},this.long),{max:this.max})}get main(){return{min:this.min,m:this.m,max:this.max}}get sparse(){return{min:this.min,xs:this.xs,m:this.m,xl:this.xl,max:this.max}}}return new e},kt=Object.assign,_t=Object.entries,wt={dash:(...t)=>t.join("-"),comma:(...t)=>t.join(),space:(...t)=>t.join(" "),range:(t,e)=>Array.from(Array(t).entries()).reduce(((t,[s])=>kt(t,e(s+1))),{}),each:(t,e)=>_t(t).reduce(((t,[s,r])=>kt(t,e(s,r))),{}),when:(t,e,s={})=>t?e:s},St="width: ",qt=t=>{const{scope:e,globalKey:s="",bp:n={}}=t,i=e(s).varExp,a=t=>i(...t.split(".")),c=(t=1)=>`calc(${t} * ${a("rtime")})`,o=(t=1)=>`calc(${t} * ${a("rangle")})`,u=(t=1)=>`calc(${t} * 1rem)`;return{compile:({key:t,maker:s})=>{const g=e(t),m=q(g),p=t=>{const e=n[t]||t;return"number"==typeof e?e+"rem":""},d=t=>"min-"+St+p(t),b=t=>"max-"+St+p(t),f=(t,e)=>"string"==typeof e?m.cq(t,e):m.mq(t),x=(t,e,s)=>""+f(d(t)+") and ("+b(e),s),y={up:(t,e)=>""+f(d(t),e),down:(t,e)=>""+f(b(t),e),between:x,only:(t,e)=>x(t,t,e)};return v=s(Object.assign(wt,{key:t,vars:a,size:u,time:c,angle:o,bem:g.selector,pseudo:Object.assign(Z(G(nt).map((([t,e])=>{function s(t=""){return t+e}return s.toString=()=>e,[t,s]}))),Z(G(it).map((([t,e])=>{function s(t,s=""){return s+e+`(${t})`}return s.toString=()=>e,[t,s]})))),color:yt(i),palette:$t(i),coef:Ot(i),units:{px:A,vh:E,vw:P,vmin:z,vmax:C,em:M,rem:N,deg:W,rad:I,turn:K,ms:T,s:B,pc:D,cqw:J,cqh:L,cqb:V,cqi:R,cqmin:F,cqmax:H},at:m,limit:y,merge:r})),l(v,((t,e)=>t+h(...e)),"");var v}}};const At=()=>{const t=new Set,e=new Map;return{use(s,r){const n=e.get(s);return n||(t.add(r),e.set(s,r),r)},useMany(t){return Object.entries(t).map((([t,e])=>this.use(e,t)))},getKey:t=>e.get(t),get keys(){return[...t]},get makers(){return Object.fromEntries(e.entries().map((([t,e])=>[e,t])))}}},Et=({prefix:t=i.prefix})=>{let e=1;return{get base(){return t+0},get current(){return t+e},next(){return e++,this.current},reset(){e=1}}},Pt=void 0,zt=Object.entries,Ct=Object.defineProperties,Mt=t=>"string"==typeof t,Nt=t=>null!==t&&"object"==typeof t,Wt=t=>t.split("."),It=(t,e)=>zt(t).reduce(((t,[s,r])=>{if(Nt(r)){const n=zt(r);n.length?t.push(...n.reduce(((t,[r,n])=>{if((t=>null!==t&&t!==Pt)(r)&&e&&t.push([s,r,Pt,Pt]),Nt(n)){const e=zt(n);e.length&&t.push(...e.reduce(((t,[e,n])=>{const i=typeof n;return"string"!==i&&"number"!==i||t.push([s,r,e,n]),t}),[]))}return t}),[])):t.push([s,Pt,Pt,Pt])}return t}),[]),Kt=(t,e,s,r)=>""+(((t,e)=>`${t||""}${e?"__"+e:""}`)(t,e)+(s?"_"+s:"")+(s&&r?"_"+r:""))||"_",Tt=(t,e)=>"."+(e?t+(e.startsWith("_")?"":"-")+e:t),Bt=(t,e)=>`[data-${t}${e?`~="${e}"`:""}]`;const Dt=t=>t||"",Jt=(t={})=>{const{mode:e,min:s}=t;let r,n;return r="a"===e?Bt:Tt,s&&(n={}),t=>{let s=0,i=Dt,a=Dt;n&&(n[t]||(n[t]={}),i=e=>{var r;return null!==(r=n[t][e])&&void 0!==r?r:n[t][e]=(s++).toString(36)},a=e=>n[t][e]);let c=(...e)=>[t,...e].filter(Boolean).join("-"),o="class",l=e=>e?t+(e.startsWith("_")?"":"-")+e:void 0===e?void 0:t;"a"===e&&(o="data-"+t,l=Dt);const u=(...t)=>"--"+c(...t),h=t=>{if(void 0===t)return function(t){const e=({b:s,e:r,m:n})=>({b:t=>e({b:t,e:"",m:{}}),e:t=>e({b:s,e:t,m:{}}),m:(t={})=>e({b:s,e:r,m:t}),get $(){return t({[s]:{[r]:n}})}});return e({b:"",e:"",m:{}})}(h);let e,s,r,n,i="";const c=Mt(t);return i=c||Array.isArray(t)?[...(c?[t]:t).reduce(((t,i)=>([e,s,r,n]=Wt(i),t.add(l(a(Kt(e,s)))),r&&t.add(l(a(Kt(e,s,r,n)))),t)),new Set).values()].join(" "):t&&It(t,!0).map((([t,e,s,r])=>l(a(Kt(t,e,s,r))))).join(" "),Ct({[o]:i},{toString:{value:()=>`${o}="${i}"`},$:{value:i}})};return{selector:e=>{let s,n,a,c;return Mt(e)?([s,n,a,c]=Wt(e),r(t,i(Kt(s,n,a,c)))):e&&It(e).map((([e,s,n,a])=>r(t,i(Kt(e,s,n,a))))).join(",")},attr:h,name:c,varName:u,varExp:(...t)=>`var(${u(...t)})`}}},Lt="effcss-provider",Rt="theme",Vt="size",Ft="time",Ht="angle",Zt="palette",Gt=Object.assign,Qt=Object.entries,Ut=Object.fromEntries,Xt=(t,e)=>t.getAttribute(e)||i[e],Yt=(t,e)=>(t=>null!==t?Number(t):null)(Xt(t,e)),te=(t,e,s)=>null===s?t.removeAttribute(e):t.setAttribute(e,s+""),ee=t=>`:root:has(script[is=${Lt}]${t?`[${t}]`:""})`,se=t=>[t.xxs,t.xs,t.s,t.m,t.l,t.xl,t.xxl],re=["xs","s","m","l","xl"],ne=["pale","base","rich"],ie=({scope:e,keyMaker:s,provider:r})=>{const n=r.settings,i=null==n?void 0:n.vars,{varName:a}=e(s.base),c=t=>a("",t);function o(t,e){return Qt(t).reduce(((t,[s,r])=>r&&"object"==typeof r?Gt(t,o(r,[...e,s])):(t[a(...e,s)]=r,t)),{})}const l=Ut(Qt(i||{}).map((([t,e])=>[t,o(e,[])]))),{"":u={},dark:h,light:g}=l,m=t(l,["","dark","light"]),p=r.size,d=r.time,b=r.angle,{l:f,c:x,h:y}=n.palette,v=n.coef,$=[0,...se(v.$0_),1,...se(v.$1_),2,...se(v.$2_),16,...se(v.$16_),v.max];return({bem:t,each:e,when:s,vars:r,merge:n,at:{media:i},units:{px:o,ms:h,deg:g}})=>{const v="prefers-color-scheme",j={light:`${v}: light`,dark:`${v}: dark`};return n({[ee()]:n({fontSize:r("rem")},u,e($,((t,e)=>({[a("coef",t)]:e}))),e(y,((t,e)=>({[a(Zt,"h",t)]:e}))),{[a(Zt,"c","bg","gray")]:0,[a(Zt,"c","fg","gray")]:0},e(j,((t,s)=>i.and(s)(n(l[t]||{},e(re,((e,s)=>({[a(Zt,"l","bg",s)]:f[t].bg[s],[a(Zt,"l","fg",s)]:f[t].fg[s]}))),e(ne,((e,s)=>({[a(Zt,"c","bg",s)]:x[t].bg[s],[a(Zt,"c","fg",s)]:x[t].fg[s]}))))))))},e(m,((e,s)=>({[ee(`${Rt}=${e}`)]:s,[t(`..theme.${e}`)]:s}))),s(!!p,{[ee(Vt)]:{[c("rem")]:o(p)}}),s(!!d,{[ee(Ft)]:{[c("rtime")]:h(d)}}),s(!!b,{[ee(Ht)]:{[c("rangle")]:g(b)}}))}},ae=({scope:t,keyMaker:e,collector:s,manager:r,processor:n})=>{const i=t=>"string"==typeof t?t:s.getKey(t),a=s=>t(s||e.base).attr,c=(t,e)=>n.compile({key:e,maker:t}),o=(t,n,i)=>{const o=n||e.current;let l=s.use(t,o);return(i||r&&!r.has(l))&&(r.pack(l,c(t,l)),n||e.next()),a(l)};return{key:i,resolve:a,use:o,usePublic:t=>Ut(Qt(t).map((([t,e])=>[t,o(e,t)]))),usePrivate:t=>t.map((t=>o(t))),css:c,status:t=>{const e=i(t);return!!e&&r.status(e)},on:(...t)=>r.on(...t.map(i)),off:(...t)=>r.off(...t.map(i)),stylesheets:(...t)=>{let e;return e=t.length?1===t.length&&Array.isArray(t[0])?t[0]:t:s.keys,e.map((t=>r.get(i(t))))}}},ce=t=>Object.defineProperties(t,{prefix:{get:()=>t.getAttribute("prefix")||"f"},mode:{get:()=>t.getAttribute("mode")||"a"},min:{get:()=>""===t.getAttribute("min")},hydrate:{get:()=>""===t.getAttribute("hydrate")},theme:{set(e){te(t,Rt,e)},get:()=>Xt(t,Rt)||""},size:{set(e){te(t,Vt,e)},get:()=>Yt(t,Vt)},time:{set(e){te(t,Ft,e)},get:()=>Yt(t,Ft)},angle:{set(e){te(t,Ht,e)},get:()=>Yt(t,Ht)}});function oe(t={}){const e=globalThis.document,s=globalThis.customElements;if(null==s?void 0:s.get(Lt))return!1;{class n extends HTMLScriptElement{constructor(){super(...arguments),this._c=At(),this._settings=o,this._cust=()=>{this._=ie({scope:this._s,keyMaker:this._k,provider:this}),this.use(this._,this._k.base,!0)}}static get observedAttributes(){return[Vt,Ft,Ht]}get settings(){return this._settings}set settings(t){var e,s,n;const i=r({},this._settings,t),{makers:a,bp:c,off:o}=i;(c&&(null===(e=this._settings)||void 0===e?void 0:e.bp)!==c||!this._p)&&(this._p=qt({scope:this._s,globalKey:this._k.base,bp:c})),a&&(null===(s=this._settings)||void 0===s?void 0:s.makers)!==a&&(this._c.useMany(a),this.usePublic(a),(null==o?void 0:o.length)&&this._settings.off!==o&&this.off(...o)),this._settings=i,(!(null===(n=this._m)||void 0===n?void 0:n.has(this._k.base))||t.vars||t.palette||t.coef)&&this._cust()}get makers(){return this._c.makers}attributeChangedCallback(){this._k&&this._cust()}connectedCallback(){this.textContent?this._settings=r(this._settings,JSON.parse(this.textContent)):t&&(this._settings=r(this._settings,t)),ce(this),this._k=Et({prefix:this.prefix}),this._s=Jt({mode:this.mode,min:this.min}),this._p=qt({scope:this._s,globalKey:this._k.base,bp:t.bp||this.settings.bp}),this._m=function(t){const e={};null==t||t.forEach((t=>{const s=t.dataset.effcss;s&&(e[s]=t)}));let s={},r={},n=[],i=[];const a=(t,e)=>(e.toString=()=>"effcss-"+t,e),c=t=>{var e;return t.adoptedStyleSheets=[...(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)?[...t.adoptedStyleSheets].filter((t=>!(t+"").startsWith("effcss-"))):[],...n]},o=()=>{i=i.reduce(((t,e)=>{const s=e.deref();return s&&(c(s),t.push(e)),t}),[])},l=t=>n.findIndex((e=>e===t)),u=t=>t?s[t]:void 0,h=(t,r)=>{if(!s[t]){s[t]=a(t,r),n.push(s[t]);const i=e[t];return i&&(i.disabled=!0),o(),!0}},g=t=>{const e=u(t);return!!e&&-1!==l(e)};return{apply:c,notify:o,getIndex:l,get:u,has:t=>!!t&&!!u(t),getAll:()=>s,add:h,status:g,on:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);return!(!s||g(e))&&(n.push(s),t)}),!0);return o(),e},off:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);if(s&&g(e)){const e=l(s);return n.splice(e,1),t}return!1}),!0);return o(),e},remove:t=>{const e=u(t);if(!e)return;const i=l(e);return i>-1&&(n.splice(i,1),delete s[t],delete r[t]),o(),!0},removeAll:()=>(n.splice(0),s={},r={},o(),!0),pack:(t,e)=>{let r=s[t]||new CSSStyleSheet;return r.replaceSync(e),r=a(t,r),!!r.cssRules.length&&h(t,r)},replace:(t,e)=>{const r=s[t];if(r)return r.replaceSync(e),o(),!0},register:t=>{i.findIndex((e=>e.deref()===t))>=0||(i.push(new WeakRef(t)),c(t))},unregister:t=>{const e=i.findIndex((e=>e.deref()===t));e>=0&&i.splice(e,1)}}}(e.querySelectorAll("[data-effcss]"));const s=ae({scope:this._s,processor:this._p,keyMaker:this._k,manager:this._m,collector:this._c});Object.assign(this,s),this._cust();const n=this;this._n={set adoptedStyleSheets(t){n.dispatchEvent(new CustomEvent("effcsschanges",{detail:{styles:t},bubbles:!0}))}},this._m.register(this._n),this._m.register(e)}toString(){return`<script ${[...this.attributes].map((t=>t.value?`${t.name}="${t.value}"`:""===t.value?t.name:"")).filter(Boolean).join(" ")}>${this.textContent}<\/script>`}}return s.define(Lt,n,{extends:"script"}),!0}}const le=(e={})=>{let{noscript:s,attrs:n={}}=e,a=t(e,["noscript","attrs"]);const c=r(o,a);let{mode:l=i.mode,min:u,prefix:h=i.prefix,theme:g,hydrate:m,size:p,time:d,angle:b}=n;const f=Et({prefix:h}),x=Jt({mode:l,min:u}),y=qt({scope:x,globalKey:f.base,bp:c.bp}),v=At(),$={},j=[],O=t=>j.findIndex((e=>e===t)),k=ae({scope:x,processor:y,keyMaker:f,manager:{get:t=>t?$[t]:void 0,pack(t,e){const s=$[t]||{};if(!$[t])return $[t]=s,j.push(s),!0},has(t){return!!t&&!!this.get(t)},status(t){const e=this.get(t);return!!e&&-1!==O(e)},on(...t){return t.reduce(((t,e)=>{const s=this.get(e);return!(!s||this.status(e))&&(j.push(s),t)}),!0)},off(...t){return t.reduce(((t,e)=>{const s=this.get(e);if(s&&this.status(e)){const e=O(s);return j.splice(e,1),t}return!1}),!0)}},collector:v}),_=Object.assign(Object.assign({tagName:"",attributes:{prefix:h,mode:l,hydrate:m,min:u,theme:g,size:p,time:d,angle:b},getAttribute(t){const e=this.attributes[t];return e?"boolean"==typeof e?"":e:null},setAttribute(t,e){this.attributes[t]=e},removeAttribute(t){delete this.attributes[t]},get makers(){return v.makers},get settings(){return c},set settings(t){}},k),{toString(){const t=[[f.base,ie({scope:x,keyMaker:f,provider:this})],...Object.entries(v.makers)].map((([t,e])=>`<style data-effcss="${t}">${k.css(e,t)}</style>`)).join("");if(s)return t;const e=Object.keys(a).length?JSON.stringify(a):"";return t+`<script ${Object.entries(Object.assign({is:Lt,type:"application/json"},this.attributes)).map((([t,e])=>e&&e!==i[t]?"boolean"==typeof e?t:`${t}="${e}"`:"")).filter(Boolean).join(" ")}>${e}<\/script>`}});return ce(_)},ue=(e={})=>{const{emulate:s}=e,r=t(e,["emulate"]),n=null===globalThis||void 0===globalThis?void 0:globalThis.document;if(n&&!s){void 0===ue.isDefined&&(ue.isDefined=oe(r));const t=n.querySelector(`script[is=${Lt}]`);if(t)return t;const e=n.createElement("script",{is:Lt});e.setAttribute("is",Lt);const s=null==r?void 0:r.attrs;return s&&Object.entries(s).map((([t,s])=>s&&i[t]!==s&&e.setAttribute(t,"boolean"==typeof s?"":s+""))),n.head.appendChild(e),e}return le(r)};export{Lt as TAG_NAME,oe as defineProvider,ue as useStyleProvider};
7
+ function t(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(s[r[n]]=t[r[n]])}return s}"function"==typeof SuppressedError&&SuppressedError;const e=Object.entries,s=Array.isArray,r=(t,...n)=>n.length?n.reduce(((t,n)=>(e(n).forEach((([e,n])=>{n&&"object"==typeof n&&t[e]?s(t[e])&&s(n)?t[e]=[...t[e],...n]:r(t[e],n||{}):t[e]=n})),t)),t):t,n={def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},i={mode:"a",prefix:"f"},a=t=>Number((.1*184+.9*t).toFixed(2)),c={l:{dark:{bg:{xl:.24,l:.3,m:.36,s:.42,xs:.48},fg:{xl:.98,l:.93,m:.86,s:.79,xs:.72}},light:{bg:{xl:.98,l:.93,m:.88,s:.83,xs:.78},fg:{xl:0,l:.12,m:.24,s:.36,xs:.48}}},c:{dark:{bg:{pale:.02,base:.06,rich:.1},fg:{pale:.06,base:.1,rich:.14}},light:{bg:{pale:.01,base:.04,rich:.7},fg:{pale:.07,base:.11,rich:.15}}},h:{pri:184,sec:290,suc:a(142),inf:a(264),war:a(109),dan:a(29)}},o={bp:{"3xs":18,"2xs":24,xs:30,sm:40,md:48,lg:64,xl:80,"2xl":96},vars:{"":{rtime:"200ms",rem:"16px",rangle:"30deg",l:n,h:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},c:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},a:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},t:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},int:[...Array(12).keys()],fr:{0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ar:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778}},light:{l:n},dark:{l:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},palette:c,coef:{$0_:{xxs:.0625,xs:.125,s:.25,m:.5,l:.75,xl:.875,xxl:.9375},$1_:{xxs:1.0625,xs:1.125,s:1.25,m:1.5,l:1.75,xl:1.875,xxl:1.9375},$2_:{xxs:2.5,xs:4,s:5,m:7.5,l:10,xl:12,xxl:15},$16_:{xxs:20,xs:28,s:36,m:48,l:64,xl:80,xxl:120},max:150}},l=(t,e,s)=>Object.entries(t).reduce(e,s),u=Symbol("noParse"),h=(t,e,s)=>{var r,n,i;let a=""+t;return null==e?"":"object"!=typeof e||e.hasOwnProperty(u)?`${c=a,c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}:${""+e};`:(!s||(null===(r=s.startsWith)||void 0===r?void 0:r.call(s,"@"))||(null===(n=a.startsWith)||void 0===n?void 0:n.call(a,"&"))||(null===(i=a.startsWith)||void 0===i?void 0:i.call(a,"@"))?"":"&")+a+`{${l(e,((t,e)=>t+h(...e,a)),"")}}`;var c},g="@media",m="@container",p="@property",d="@keyframes",b="@layer",f="@scope",y="@supports",x="@starting-style",v=(t,e)=>{const s=g+` ${e||""}${e?" and ":""}(${t})`;return{s:s,q:t,t:e,toString:()=>s}};v.toString=()=>g;const $=t=>`(${t})`,j=t=>"string"==typeof t;function O(t){var e;if(!(null===(e=null==t?void 0:t.args)||void 0===e?void 0:e.length))return"";switch(t.key){case"or":return t.args.map((t=>j(t)?$(t):O(t))).join(" or ");case"and":return t.args.map((t=>{const e=!j(t);return e&&"or"===t.key?$(O(t)):e?O(t):$(t)})).join(" and ");case"not":const e=t.args[0];return"not "+(j(e)?$(e):$(O(e)))}}const k=(t,e)=>{let s="";return t.length&&(s=t.join(" ")),e&&(s=s+(s?" and ":"")+(s&&"or"===e.key?$(O(e)):O(e))),s},_=(t={})=>{const{type:e=[],state:s}=t;return Object.defineProperties((t=>{const r=k(e,s);return{[`${g}${r?" "+r:""}`]:t}}),{key:{value:null==s?void 0:s.key},args:{value:null==s?void 0:s.args},all:{get:()=>_({state:s,type:["all"]})},print:{get:()=>_({state:s,type:["print"]})},screen:{get:()=>_({state:s,type:["screen"]})},and:{value:(...t)=>_({type:e,state:{key:"and",args:s?[s,...t]:t}})},or:{value:(...t)=>_({type:e,state:{key:"or",args:s?[s,...t]:t}})},not:{get:()=>_(s?{type:e,state:j(s)||"not"!==(null==s?void 0:s.key)?{key:"not",args:[s]}:s.args[0]}:{type:2===e.length?[e[1]]:["not",e[0]||"all"],state:s})}})},w=t=>{const{root:e="",limit:s="",mode:r=[!1,!1]}=t;return Object.defineProperties((t=>({[f+` ${e?`(${e}${r[0]?" > *":""})`:""}${e&&s?" ":""}${s?`to (${s}${r[1]?" > *":""})`:""}`]:t})),{limit:{value:t=>w({root:e,limit:t,mode:r})},root:{value:t=>w({root:t,limit:s,mode:r})},both:{value:()=>w({root:e,limit:s,mode:[!1,!0]})},none:{value:()=>w({root:e,limit:s,mode:[!0,!1]})},low:{value:()=>w({root:e,limit:s,mode:[!0,!0]})},high:{value:()=>w({root:e,limit:s,mode:[!1,!1]})},toString:{value:()=>":scope"}})},S=t=>({[x]:t}),q=t=>{const e={cp:1,lay:1,kf:1,cq:1},s=(s,r)=>{const n="string"==typeof r?r:t.name("cq",e.cq++),i=m+` ${n?n+" ":""}(${s})`;return{c:n,q:s,s:i,toString:()=>i}};s.toString=()=>m;const r=(s={})=>{const{scroll:n,type:i,name:a,state:c}=s;return Object.defineProperties((t=>{const e=k([],c);return{[`${m}${a?" "+a:""}${e?" "+e:""}`]:t}}),{container:{value:(a||"none")+" / "+(i&&n?`${i} scroll-state`:n?"scroll-state":i||"normal"),enumerable:!0},key:{value:null==c?void 0:c.key},args:{value:null==c?void 0:c.args},named:{get:()=>r({scroll:n,state:c,name:a||t.name("cq",e.cq++),type:i})},size:{get:()=>r({name:a,scroll:n,state:c,type:"size"})},isize:{get:()=>r({name:a,scroll:n,state:c,type:"inline-size"})},scroll:{get:()=>r({name:a,scroll:!0,state:c,type:i})},and:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"and",args:c?[c,...t]:t}})},or:{value:(...t)=>r({name:a,scroll:n,type:i,state:{key:"or",args:c?[c,...t]:t}})},not:{value:t=>r({name:a,scroll:n,type:i,state:{key:"not",args:[t]}})},[u]:{value:!0}})},n=(s,r)=>{const n="--"+(s||t.name("cp",e.cp++)),i=p+" "+n;return{k:n,v:`var(${n})`,s:i,r:{[i]:{syntax:(null==r?void 0:r.syn)||'"*"',inherits:(null==r?void 0:r.inh)||!1,initialValue:null==r?void 0:r.ini}},toString:()=>i}};n.toString=()=>p;const i=s=>{const r=s||t.name("kf",e.kf++),n=d+" "+r;return{k:r,s:n,toString:()=>n}};i.toString=()=>d;const a=s=>{const r=s||t.name("lay",e.lay++),n=b+" "+r;return{k:r,s:n,toString:()=>n}};a.toString=()=>b;a.toString=()=>f;const c=(t="",e=!1)=>{const s=y+` ${e?"not ":""}(${t})`;return{c:t,n:e,s:s,toString:()=>s}};return c.toString=()=>y,{pr:n,kf:i,mq:v,cq:s,lay:a,sc:(t="",e="")=>{const s=f+` ${t?`(${t})`:""}${t&&e?" ":""}${e?`to (${e})`:""}`;return{r:t,l:e,s:s,toString:()=>s}},sup:c,keyframes:s=>{const r=t.name("kf",e.kf++),n=d+" "+r;return Object.defineProperties((t=>{if(!t)return{animationName:r};const{dur:e,tf:s,del:n,ic:i,dir:a,ps:c,fm:o}=t;return{animation:[e,s,n,i,a,c,o,r].filter(Boolean).join(" ")}}),{[n]:{value:s,enumerable:!0},toString:{value:()=>r},[u]:{value:!0}})},property:(s={})=>{const{syn:r='"*"',inh:n=!0,ini:i,def:a}=s,c="--"+t.name("cp",e.cp++),o=`var(${c}${void 0!==a?","+a:""})`,l=p+" "+c;return Object.defineProperties((t=>({[c]:t})),{[l]:{value:{syntax:r,inherits:n,initialValue:i},enumerable:!0},toString:{value:()=>o},fallback:{value:t=>`var(${c},${t})`},[u]:{value:!0}})},scope:w({}),media:_({}),container:r({}),startingStyle:S}},A=t=>t+"px",E=t=>t+"vh",P=t=>t+"vw",C=t=>t+"vmin",z=t=>t+"vmax",M=t=>t+"em",N=t=>t+"rem",W=t=>t+"deg",I=t=>t+"rad",K=t=>t+"rad",T=t=>t+"ms",B=t=>t+"s",J=t=>t+"%",D=t=>t+"cqw",L=t=>t+"cqh",R=t=>t+"cqi",V=t=>t+"cqb",F=t=>t+"cqmin",H=t=>t+"cqmax",Z=Object.fromEntries,G=Object.entries,Q=":first-",U=":last-",X=":only-",Y="child",tt=":nth-",et="of-type",st=tt+Y,rt=":focus",nt={r:":root",h:":hover",f:rt,fv:rt+"-visible",a:":active",v:":visited",val:":valid",inv:":invalid",e:":empty",d:":disabled",rq:":required",o:":optional",m:":modal",l:":link",ph:":placeholder",ch:":checked",po:":popover-open",fc:Q+Y,lc:U+Y,oc:X+Y,odd:st+"(odd)",even:st+"(even)",ft:Q+et,lt:U+et,ot:X+et,bef:"::before",aft:"::after",bd:"::backdrop"},it={has:":has",not:":not",is:":is",wh:":where",st:":state",nthc:st,ntho:tt+et,dir:":dir",lang:":lang"},at="oklch",ct=t=>at+`(${t})`,ot=t=>ct(`from ${t}`),lt="def",ut=t=>{const e=(e,s)=>"string"==typeof s?t(e,s):s;class s{constructor(t={}){this.state={l:e("l",lt),c:e("c",lt),h:e("h",lt),a:e("a",lt)},this.merge=t=>new s(Object.assign(this.state,t)),this.l=t=>this.merge({l:e("l",t)}),this.c=t=>this.merge({c:e("c",t)}),this.h=t=>this.merge({h:e("h",t)}),this.a=t=>this.merge({a:e("a",t)}),this.state=Object.assign(this.state,t)}get s(){return this.toString()}toString(){const{l:t,c:e,h:s,a:r}=this.state;return ct(`${t} ${e} ${s} / ${r}`)}}return t=>new s(t)},ht=(t,e=.1)=>ot(`${t} calc(l + ${e}) c h / alpha)`),gt=(t,e=.1)=>ot(`${t} calc(l - ${e}) c h / alpha)`),mt=(t,e=.1)=>ot(`${t} l c h / calc(alpha + ${e}))`),pt=(t,e=.1)=>ot(`${t} l c h / calc(alpha - ${e}))`),dt=(t,e=.04)=>ot(`${t} l calc(c + ${e}) h / alpha)`),bt=(t,e=.04)=>ot(`${t} l calc(c - ${e}) h / alpha)`),ft=(t,e=30)=>ot(`${t} l c calc(h${"number"==typeof e?e>0?" + "+e:" - "+-e:e}) / alpha)`),yt=({base:t,mixin:e,method:s,bpart:r,mpart:n})=>`color-mix(in ${s||at}, ${t}${void 0!==r?` ${r}%`:""}, ${e}${void 0!==n?` ${n}%`:""})`,xt=t=>({create:ut(t),oklch:ct,lighten:ht,darken:gt,saturate:dt,desaturate:bt,fadein:mt,fadeout:pt,spin:ft,mix:yt}),vt="palette",$t=t=>{class e{constructor(t={}){this.state={l:"l",c:"base",h:"pri",a:1,m:"bg"},Object.assign(this,{[u]:!0}),this.state=Object.assign(this.state,t)}get xs(){return new e(Object.assign(Object.assign({},this.state),{l:"xs"}))}get s(){return new e(Object.assign(Object.assign({},this.state),{l:"s"}))}get m(){return new e(Object.assign(Object.assign({},this.state),{l:"m"}))}get l(){return new e(Object.assign(Object.assign({},this.state),{l:"l"}))}get xl(){return new e(Object.assign(Object.assign({},this.state),{l:"xl"}))}get lightness(){return{xs:this.xs,s:this.s,m:this.m,l:this.l,xl:this.xl}}get gray(){return new e(Object.assign(Object.assign({},this.state),{c:"gray"}))}get pale(){return new e(Object.assign(Object.assign({},this.state),{c:"pale"}))}get base(){return new e(Object.assign(Object.assign({},this.state),{c:"base"}))}get rich(){return new e(Object.assign(Object.assign({},this.state),{c:"rich"}))}get chroma(){return{gray:this.gray,pale:this.pale,base:this.base,rich:this.rich}}get pri(){return new e(Object.assign(Object.assign({},this.state),{h:"pri"}))}get sec(){return new e(Object.assign(Object.assign({},this.state),{h:"sec"}))}get suc(){return new e(Object.assign(Object.assign({},this.state),{h:"suc"}))}get inf(){return new e(Object.assign(Object.assign({},this.state),{h:"inf"}))}get war(){return new e(Object.assign(Object.assign({},this.state),{h:"war"}))}get dan(){return new e(Object.assign(Object.assign({},this.state),{h:"dan"}))}get hue(){return{pri:this.pri,sec:this.sec,suc:this.suc,inf:this.inf,war:this.war,dan:this.dan}}alpha(t=1){return new e(Object.assign(Object.assign({},this.state),{a:t}))}get bg(){return new e(Object.assign(Object.assign({},this.state),{m:"bg"}))}get fg(){return new e(Object.assign(Object.assign({},this.state),{m:"fg"}))}toString(){const{l:e,c:s,h:r,a:n,m:i}=this.state;return`oklch(${t(vt,"l",i,e)} ${t(vt,"c",i,s)} ${t(vt,"h",r)} / ${n})`}}return new e},jt="coef",Ot=t=>{class e{constructor(t={}){this.state={center:8},this.state=Object.assign(this.state,t)}get min(){return t(jt,this.state.center-4)}get xxs(){return t(jt,this.state.center-3)}get xs(){return t(jt,this.state.center-2)}get s(){return t(jt,this.state.center-1)}get m(){return t(jt,this.state.center)}get l(){return t(jt,this.state.center+1)}get xl(){return t(jt,this.state.center+2)}get xxl(){return t(jt,this.state.center+3)}get max(){return t(jt,this.state.center+4)}get $0_(){return new e({center:4})}get $1_(){return new e({center:12})}get $2_(){return new e({center:20})}get $16_(){return new e({center:28})}get $1(){return new e({center:8})}get $2(){return new e({center:16})}get $16(){return new e({center:24})}get short(){return{s:this.s,m:this.m,l:this.l}}get base(){return Object.assign(Object.assign({xs:this.xs},this.short),{xl:this.xl})}get long(){return Object.assign(Object.assign({xxs:this.xxs},this.base),{xxl:this.xxl})}get full(){return Object.assign(Object.assign({min:this.min},this.long),{max:this.max})}get main(){return{min:this.min,m:this.m,max:this.max}}get sparse(){return{min:this.min,xs:this.xs,m:this.m,xl:this.xl,max:this.max}}}return new e},kt=Object.assign,_t=Object.entries,wt={dash:(...t)=>t.join("-"),comma:(...t)=>t.join(),space:(...t)=>t.join(" "),range:(t,e)=>Array.from(Array(t).entries()).reduce(((t,[s])=>kt(t,e(s+1))),{}),each:(t,e)=>_t(t).reduce(((t,[s,r])=>kt(t,e(s,r))),{}),when:(t,e,s={})=>t?e:s},St="width: ",qt=t=>{const{scope:e,globalKey:s="",bp:n={}}=t,i=e(s).varExp,a=t=>i(...t.split(".")),c=(t=1)=>`calc(${t} * ${a("rtime")})`,o=(t=1)=>`calc(${t} * ${a("rangle")})`,u=(t=1)=>`calc(${t} * 1rem)`;return{compile:({key:t,maker:s})=>{const g=e(t),m=q(g),p=t=>{const e=n[t]||t;return"number"==typeof e?e+"rem":""},d=t=>"min-"+St+p(t),b=t=>"max-"+St+p(t),f=(t,e)=>"string"==typeof e?m.cq(t,e):m.mq(t),y=(t,e,s)=>""+f(d(t)+") and ("+b(e),s),x={up:(t,e)=>""+f(d(t),e),down:(t,e)=>""+f(b(t),e),between:y,only:(t,e)=>y(t,t,e)};return v=s(Object.assign(wt,{key:t,vars:a,size:u,time:c,angle:o,bem:g.selector,pseudo:Object.assign(Z(G(nt).map((([t,e])=>{function s(t=""){return t+e}return s.toString=()=>e,[t,s]}))),Z(G(it).map((([t,e])=>{function s(t,s=""){return s+e+`(${t})`}return s.toString=()=>e,[t,s]})))),color:xt(i),palette:$t(i),coef:Ot(i),units:{px:A,vh:E,vw:P,vmin:C,vmax:z,em:M,rem:N,deg:W,rad:I,turn:K,ms:T,s:B,pc:J,cqw:D,cqh:L,cqb:V,cqi:R,cqmin:F,cqmax:H},at:m,limit:x,merge:r})),l(v,((t,e)=>t+h(...e)),"");var v}}};const At=()=>{const t=new Set,e=new Map;return{use(s,r){const n=e.get(s);return n||(t.add(r),e.set(s,r),r)},useMany(t){return Object.entries(t).map((([t,e])=>this.use(e,t)))},getKey:t=>e.get(t),get keys(){return[...t]},get makers(){return Object.fromEntries(e.entries().map((([t,e])=>[e,t])))}}},Et=({prefix:t=i.prefix})=>{let e=1;return{get base(){return t+0},get current(){return t+e},next(){return e++,this.current},reset(){e=1}}},Pt=void 0,Ct=Object.entries,zt=Object.defineProperties,Mt=t=>"string"==typeof t,Nt=t=>null!==t&&"object"==typeof t,Wt=t=>t.split("."),It=(t,e)=>Ct(t).reduce(((t,[s,r])=>{if(Nt(r)){const n=Ct(r);n.length?t.push(...n.reduce(((t,[r,n])=>{if((t=>null!==t&&t!==Pt)(r)&&e&&t.push([s,r,Pt,Pt]),Nt(n)){const e=Ct(n);e.length&&t.push(...e.reduce(((t,[e,n])=>{const i=typeof n;return"string"!==i&&"number"!==i||t.push([s,r,e,n]),t}),[]))}return t}),[])):t.push([s,Pt,Pt,Pt])}return t}),[]),Kt=(t,e,s,r)=>""+(((t,e)=>`${t||""}${e?"__"+e:""}`)(t,e)+(s?"_"+s:"")+(s&&r?"_"+r:""))||"_",Tt=(t,e)=>"."+(e?t+(e.startsWith("_")?"":"-")+e:t),Bt=(t,e)=>`[data-${t}${e?`~="${e}"`:""}]`;const Jt=t=>t||"",Dt=(t={})=>{const{mode:e,min:s,dict:r={}}=t;let n;n="a"===e?Bt:Tt;const i=t=>{let s=0,r=Jt,a=Jt;const c=i.dict;c&&(c[t]||(c[t]={}),r=e=>{var r;return null!==(r=c[t][e])&&void 0!==r?r:c[t][e]=(s++).toString(36)},a=e=>c[t][e]);let o=(...e)=>[t,...e].filter(Boolean).join("-"),l="class",u=e=>e?t+(e.startsWith("_")?"":"-")+e:void 0===e?void 0:t;"a"===e&&(l="data-"+t,u=Jt);const h=(...t)=>"--"+o(...t),g=t=>{if(void 0===t)return function(t){const e=({b:s,e:r,m:n})=>({b:t=>e({b:t,e:"",m:{}}),e:t=>e({b:s,e:t,m:{}}),m:(t={})=>e({b:s,e:r,m:t}),get $(){return t({[s]:{[r]:n}})}});return e({b:"",e:"",m:{}})}(g);let e,s,r,n,i="";const c=Mt(t);return i=c||Array.isArray(t)?[...(c?[t]:t).reduce(((t,i)=>([e,s,r,n]=Wt(i),t.add(u(a(Kt(e,s)))),r&&t.add(u(a(Kt(e,s,r,n)))),t)),new Set).values()].join(" "):t&&It(t,!0).map((([t,e,s,r])=>u(a(Kt(t,e,s,r))))).join(" "),zt({[l]:i},{toString:{value:()=>`${l}="${i}"`},$:{value:i}})};return{selector:e=>{let s,i,a,c;return Mt(e)?([s,i,a,c]=Wt(e),n(t,r(Kt(s,i,a,c)))):e&&It(e).map((([e,s,i,a])=>n(t,r(Kt(e,s,i,a))))).join(",")},attr:g,name:o,varName:h,varExp:(...t)=>`var(${h(...t)})`}};return s&&(i.dict=r),i},Lt="effcss-provider",Rt="script",Vt="theme",Ft="size",Ht="time",Zt="angle",Gt="palette",Qt="data-effcss",Ut=Qt+"-scope",Xt="application/json",Yt=Object.assign,te=Object.entries,ee=Object.fromEntries,se=t=>"boolean"==typeof t,re=(t,e)=>t.getAttribute(e)||i[e],ne=(t,e)=>(t=>null!==t?Number(t):null)(re(t,e)),ie=(t,e,s)=>null===s?t.removeAttribute(e):t.setAttribute(e,s+""),ae=t=>`:root:has(${Rt}[is=${Lt}]${t?`[${t}]`:""})`,ce=t=>[t.xxs,t.xs,t.s,t.m,t.l,t.xl,t.xxl],oe=["xs","s","m","l","xl"],le=["pale","base","rich"],ue=({scope:e,keyMaker:s,provider:r})=>{const n=r.settings,i=null==n?void 0:n.vars,{varName:a}=e(s.base),c=t=>a("",t);function o(t,e){return te(t).reduce(((t,[s,r])=>r&&"object"==typeof r?Yt(t,o(r,[...e,s])):(t[a(...e,s)]=r,t)),{})}const l=ee(te(i||{}).map((([t,e])=>[t,o(e,[])]))),{"":u={},dark:h,light:g}=l,m=t(l,["","dark","light"]),p=r.size,d=r.time,b=r.angle,{l:f,c:y,h:x}=n.palette,v=n.coef,$=[0,...ce(v.$0_),1,...ce(v.$1_),2,...ce(v.$2_),16,...ce(v.$16_),v.max];return({bem:t,each:e,when:s,vars:r,merge:n,at:{media:i},units:{px:o,ms:h,deg:g}})=>{const v="prefers-color-scheme",j={light:`${v}: light`,dark:`${v}: dark`};return n({[ae()]:n({fontSize:r("rem")},u,e($,((t,e)=>({[a("coef",t)]:e}))),e(x,((t,e)=>({[a(Gt,"h",t)]:e}))),{[a(Gt,"c","bg","gray")]:0,[a(Gt,"c","fg","gray")]:0},e(j,((t,s)=>i.and(s)(n(l[t]||{},e(oe,((e,s)=>({[a(Gt,"l","bg",s)]:f[t].bg[s],[a(Gt,"l","fg",s)]:f[t].fg[s]}))),e(le,((e,s)=>({[a(Gt,"c","bg",s)]:y[t].bg[s],[a(Gt,"c","fg",s)]:y[t].fg[s]}))))))))},e(m,((e,s)=>({[ae(`${Vt}=${e}`)]:s,[t(`..theme.${e}`)]:s}))),s(!!p,{[ae(Ft)]:{[c("rem")]:o(p)}}),s(!!d,{[ae(Ht)]:{[c("rtime")]:h(d)}}),s(!!b,{[ae(Zt)]:{[c("rangle")]:g(b)}}))}},he=({scope:t,keyMaker:e,collector:s,manager:r,processor:n})=>{const i=t=>"string"==typeof t?t:s.getKey(t),a=s=>t(s||e.base).attr,c=(t,e)=>n.compile({key:e,maker:t}),o=(t,n,i)=>{const o=n||e.current;let l=s.use(t,o);return(i||r&&!r.has(l))&&(r.pack(l,r.hydrate(l)||c(t,l)),n||e.next()),a(l)};return{key:i,resolve:a,use:o,usePublic:t=>ee(te(t).map((([t,e])=>[t,o(e,t)]))),usePrivate:t=>t.map((t=>o(t))),css:c,status:t=>{const e=i(t);return!!e&&r.status(e)},on:(...t)=>r.on(...t.map(i)),off:(...t)=>r.off(...t.map(i)),stylesheets:(...t)=>{let e;return e=t.length?1===t.length&&Array.isArray(t[0])?t[0]:t:s.keys,e.map((t=>r.get(i(t))))}}},ge=t=>Object.defineProperties(t,{prefix:{get:()=>t.getAttribute("prefix")||"f"},mode:{get:()=>t.getAttribute("mode")||"a"},min:{get:()=>""===t.getAttribute("min")},hydrate:{get:()=>""===t.getAttribute("hydrate")},theme:{set(e){ie(t,Vt,e)},get:()=>re(t,Vt)||""},size:{set(e){ie(t,Ft,e)},get:()=>ne(t,Ft)},time:{set(e){ie(t,Ht,e)},get:()=>ne(t,Ht)},angle:{set(e){ie(t,Zt,e)},get:()=>ne(t,Zt)}});function me(t={}){const e=globalThis.document,s=globalThis.customElements;if(null==s?void 0:s.get(Lt))return!1;{class n extends HTMLScriptElement{constructor(){super(...arguments),this._c=At(),this._settings=o,this._cust=()=>{this._=ue({scope:this._s,keyMaker:this._k,provider:this}),this.use(this._,this._k.base,!0)}}static get observedAttributes(){return[Ft,Ht,Zt]}get settings(){return this._settings}set settings(t){var e,s,n;const i=r({},this._settings,t),{makers:a,bp:c,off:o}=i;(c&&(null===(e=this._settings)||void 0===e?void 0:e.bp)!==c||!this._p)&&(this._p=qt({scope:this._s,globalKey:this._k.base,bp:c})),a&&(null===(s=this._settings)||void 0===s?void 0:s.makers)!==a&&(this._c.useMany(a),this.usePublic(a),(null==o?void 0:o.length)&&this._settings.off!==o&&this.off(...o)),this._settings=i,(!(null===(n=this._m)||void 0===n?void 0:n.has(this._k.base))||t.vars||t.palette||t.coef)&&this._cust()}get makers(){return this._c.makers}attributeChangedCallback(){this._k&&this._cust()}connectedCallback(){var s;this.textContent?this._settings=r(this._settings,JSON.parse(this.textContent)):t&&(this._settings=r(this._settings,t)),ge(this);const n=null===(s=e.querySelector(`script[${Ut}]`))||void 0===s?void 0:s.textContent;this._k=Et({prefix:this.prefix}),this._s=Dt({mode:this.mode,min:this.min,dict:n&&JSON.parse(n)}),this._p=qt({scope:this._s,globalKey:this._k.base,bp:t.bp||this.settings.bp}),this._m=function(t){const e={};null==t||t.forEach((t=>{const s=t.dataset.effcss;s&&(e[s]=t)}));let s={},r={},n=[],i=[];const a=(t,e)=>(e.toString=()=>"effcss-"+t,e),c=t=>{var e;return t.adoptedStyleSheets=[...(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)?[...t.adoptedStyleSheets].filter((t=>!(t+"").startsWith("effcss-"))):[],...n]},o=()=>{i=i.reduce(((t,e)=>{const s=e.deref();return s&&(c(s),t.push(e)),t}),[])},l=t=>n.findIndex((e=>e===t)),u=t=>t?s[t]:void 0,h=(t,r)=>{if(!s[t]){s[t]=a(t,r),n.push(s[t]);const i=e[t];return i&&(i.disabled=!0),o(),!0}},g=t=>{const e=u(t);return!!e&&-1!==l(e)};return{apply:c,notify:o,getIndex:l,get:u,has:t=>!!t&&!!u(t),getAll:()=>s,add:h,status:g,on:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);return!(!s||g(e))&&(n.push(s),t)}),!0);return o(),e},off:(...t)=>{const e=t.reduce(((t,e)=>{const s=u(e);if(s&&g(e)){const e=l(s);return n.splice(e,1),t}return!1}),!0);return o(),e},remove:t=>{const e=u(t);if(!e)return;const i=l(e);return i>-1&&(n.splice(i,1),delete s[t],delete r[t]),o(),!0},removeAll:()=>(n.splice(0),s={},r={},o(),!0),pack:(t,e)=>{let r=s[t]||new CSSStyleSheet;return r.replaceSync(e),r=a(t,r),!!r.cssRules.length&&h(t,r)},replace:(t,e)=>{const r=s[t];if(r)return r.replaceSync(e),o(),!0},register:t=>{i.findIndex((e=>e.deref()===t))>=0||(i.push(new WeakRef(t)),c(t))},unregister:t=>{const e=i.findIndex((e=>e.deref()===t));e>=0&&i.splice(e,1)},hydrate:t=>e[t]&&!e[t].disabled&&e[t].textContent||void 0}}(e.querySelectorAll(`style[${Qt}]`));const i=he({scope:this._s,processor:this._p,keyMaker:this._k,manager:this._m,collector:this._c});Object.assign(this,i),this._cust();const a=this;this._n={set adoptedStyleSheets(t){a.dispatchEvent(new CustomEvent("effcsschanges",{detail:{styles:t},bubbles:!0}))}},this._m.register(this._n),this._m.register(e)}toString(){const t=[...this.attributes].map((t=>t.value?`${t.name}="${t.value}"`:""===t.value?t.name:"")).filter(Boolean).join(" ");return`<${Rt} ${t}>${this.textContent}</${Rt}>`}}return s.define(Lt,n,{extends:Rt}),!0}}const pe=(e={})=>{let{noscript:s,attrs:n={}}=e,a=t(e,["noscript","attrs"]);const c=r(o,a);let{mode:l=i.mode,min:u,prefix:h=i.prefix,theme:g,hydrate:m,size:p,time:d,angle:b}=n;const f=Et({prefix:h}),y=Dt({mode:l,min:u}),x=qt({scope:y,globalKey:f.base,bp:c.bp}),v=At(),$={},j=[],O=t=>j.findIndex((e=>e===t)),k=he({scope:y,processor:x,keyMaker:f,manager:{hydrate(t){},get:t=>t?$[t]:void 0,pack(t,e){const s=$[t]||{key:t,styles:e};if(!$[t])return $[t]=s,j.push(s),!0},has(t){return!!t&&!!this.get(t)},status(t){const e=this.get(t);return!!e&&-1!==O(e)},on(...t){return t.reduce(((t,e)=>{const s=this.get(e);return!(!s||this.status(e))&&(j.push(s),t)}),!0)},off(...t){return t.reduce(((t,e)=>{const s=this.get(e);if(s&&this.status(e)){const e=O(s);return j.splice(e,1),t}return!1}),!0)}},collector:v}),_=Object.assign(Object.assign({tagName:"",attributes:{prefix:h,mode:l,hydrate:m,min:u,theme:g,size:p,time:d,angle:b},getAttribute(t){const e=this.attributes[t];return e?se(e)?"":e:null},setAttribute(t,e){this.attributes[t]=e},removeAttribute(t){delete this.attributes[t]},get makers(){return v.makers},get settings(){return c},set settings(t){}},k),{toString(){const t=[{key:f.base,styles:k.css(ue({scope:y,keyMaker:f,provider:this}),f.base)},...j].map((({key:t,styles:e})=>`<style ${Qt}="${t}">${e}</style>`)).join("");if(s)return t;const e=u&&v.keys.length>1?`<${Rt} ${Ut} type="${Xt}">${JSON.stringify(y.dict)}</${Rt}>`:"",r=Object.keys(a).length?JSON.stringify(a):"",n=Object.entries(Object.assign({is:Lt,type:Xt},this.attributes)).map((([t,e])=>e&&e!==i[t]?se(e)?t:`${t}="${e}"`:"")).filter(Boolean).join(" ");return t+e+`<${Rt} ${n}>${r}</${Rt}>`}});return ge(_)},de=(e={})=>{const{emulate:s}=e,r=t(e,["emulate"]),n=null===globalThis||void 0===globalThis?void 0:globalThis.document;if(n&&!s){void 0===de.isDefined&&(de.isDefined=me(r));const t=n.querySelector(Rt+`[is=${Lt}]`);if(t)return t;const e=n.createElement(Rt,{is:Lt});e.setAttribute("is",Lt);const s=null==r?void 0:r.attrs;return s&&Object.entries(s).map((([t,s])=>s&&i[t]!==s&&e.setAttribute(t,se(s)?"":s+""))),n.head.appendChild(e),e}return pe(r)};export{Lt as TAG_NAME,me as defineProvider,de as useStyleProvider};
@@ -1,6 +1,10 @@
1
1
  import type { TCreateScope } from '../scope';
2
2
  type TProperty = {
3
3
  (val: string | number | boolean): object;
4
+ /**
5
+ * Use property with fallback value
6
+ */
7
+ fallback(val: string | number): string;
4
8
  };
5
9
  type TKeyframes = {
6
10
  (config?: Partial<{
@@ -29,6 +29,11 @@ interface IStyleManager {
29
29
  * @param stylesheet - CSSStylesheet
30
30
  */
31
31
  add(key: string, stylesheet: CSSStyleSheet): TOptBool;
32
+ /**
33
+ * Hydrate stylesheet
34
+ * @param key - stylesheet key
35
+ */
36
+ hydrate(key: string): string | undefined;
32
37
  /**
33
38
  * Replace stylesheet content
34
39
  * @param key - stylesheet key
@@ -68,13 +68,17 @@ type TScope = {
68
68
  /**
69
69
  * Style scope resolver
70
70
  */
71
- type TScopeResolver = (key: string) => TScope;
71
+ type TScopeResolver = {
72
+ (key: string): TScope;
73
+ dict?: Record<string, Record<string, string>>;
74
+ };
72
75
  /**
73
76
  * Create stylesheet scope
74
77
  */
75
78
  export type TCreateScope = (params?: {
76
79
  mode?: string | null;
77
80
  min?: boolean;
81
+ dict?: Record<string, Record<string, string>>;
78
82
  }) => TScopeResolver;
79
83
  /**
80
84
  * Create BEM resolver
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effcss",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "description": "Self-confident CSS-in-JS",
5
5
  "type": "module",
6
6
  "scripts": {