effcss 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* EffCSS v2.1.
|
|
2
|
+
* EffCSS v2.1.2
|
|
3
3
|
* {@link https://gitverse.ru/msabitov/effcss}
|
|
4
4
|
* Copyright (c) Marat Sabitov
|
|
5
5
|
* @license Apache 2.0
|
|
6
6
|
*/
|
|
7
|
-
const t=Object.entries,e=(e,s,i)=>t(e).reduce(s,i),s=t=>"object"==typeof t,i=t=>`{${t}}`,r=Object.assign.bind(Object),n=(t,e)=>`${t}:${e};`,o=(t,e)=>["@property",t,i(n("syntax",e.syn||'"*"')+n("inherits",e.inh||!1)+(e.ini?n("initial-value",e.ini):""))].join(" "),l=t=>`var(${t})`,a=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,c=["l","c","h","a"];class h{constructor(h){this._outerKeys={},this._outerSets={},this._parseSelector=t=>{let e,s,i,r,n;return[e,n]=t.split(":"),e.startsWith("__")?[s,i,r]=e.slice(2).split("_"):[s,i,r]=e.split("_"),{e:s,m:i,mv:r,s:n}},this._prepareVarName=(...t)=>this._resolver.varName(...t),this._prepareKeyframesName=(...t)=>this._resolver.kfName(...t),this.compile=(h,f)=>{const{_:p,kf:m,k:b={},v:d={},c:u}=f,g=this._resolver.selector.bind(this),_=this._parseSelector;let y=r({},u),v=r({},b),$=r({_:{}},d),x="";if(p)for(let t in p){const e=p[t];if("c"===e.typ){const s={};c.forEach((i=>{const r=t+i,n=this._prepareVarName(h,r);s[i]=n,v["_"+r]=s[i],x+=o(n,e)})),$._[t]=a({l:l(s.l),c:l(s.c),h:l(s.h),a:l(s.a)}),e.all&&(y["_"+t+"l"]=`&lig=>${this._prepareVarName(h,t+"l")}:{1}`,y["_"+t+"c"]=`&chr=>${this._prepareVarName(h,t+"c")}:{1}`,y["_"+t+"h"]=`&hue=>${this._prepareVarName(h,t+"h")}:{1}`,y["_"+t+"a"]=`&alp=>${this._prepareVarName(h,t+"a")}:{1}`)}else{const s=this._prepareVarName(h,t);v["_"+t]=s,$._[t]=l(s),x+=o(s,e)}}const w=t=>v[t]||this._outerKeys[t],j=t=>{var e;return $[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},k=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=j(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+(w(s)||"")})),S=e=>{const s=e.split("?");let i;for(let e in s){const r=s[e],[n,o]=r.split("=>"),l=n.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[a,c,h]=l,f=j(c);if(!f)continue;i=f;let p=t(i);const m=null==h?void 0:h.slice(1,-1).split(",");if(m){const t=new Set(m);p=p.filter((([e,s])=>t.has(e)))}if(o){let[t,e]=o.split("|");void 0===e&&(e=t,t=""),p=p.map((([s,i])=>[t.replace("{0}",s)||s,k(e.replaceAll("{1}",""+i))]))}(m||o)&&(i=Object.fromEntries(p));break}return i};function O(t,r,o){var l,a,c,f;let p=""+t;if((null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"$"))&&(p=""+w(t.slice(1)),!p))return"";if(Array.isArray(r))return O(p,Object.assign({},...r.map((t=>"string"==typeof t?S(t):t))),o);if(null==r)return"";if(s(r)){const t=!o||(null===(a=o.startsWith)||void 0===a?void 0:a.call(o,"@"))||p.startsWith("&")||p.startsWith("@")?"":"&";if(p.startsWith("_")){const{e:n,m:o,mv:l}=_(p);return o&&"string"!=typeof l?e(r,((r,[l,a])=>{let c;return c=s(a)?e(a,((t,e)=>t+O(...e,p)),""):a+";",r+t+g({b:h,e:n,m:o,mv:l})+i(c)}),""):t+g({b:h,e:n,m:o,mv:l})+i(e(r,((t,e)=>t+O(...e,p)),""))}return t+p+i(e(r,((t,e)=>t+O(...e,p)),""))}{let t=""+r;return(null===(c=null==t?void 0:t.startsWith)||void 0===c?void 0:c.call(t,"&"))?O(p,S(t.slice(1)),o):(null===(f=null==t?void 0:t.includes)||void 0===f?void 0:f.call(t,"{"))?O(p,k(t),o):n(p.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let z="";if(m)for(let t in m){const s=m[t],r=this._prepareKeyframesName(h,t);v["kf_"+t]=r,z+=`@keyframes ${r} `+i(e(s,((t,[s,r])=>t+s+(String(+s)===s?"%":"")+i(e(r,((t,e)=>t+O(...e)),""))),""))}return x+z+e(y,((t,e)=>t+O(...e)),"")};const{sets:f,keys:p,resolver:m}=h;this._resolver=m,p&&(this._outerKeys=p),f&&(this._outerSets=f)}}class f{constructor(){this._stylesheets={},this._rules={},this._styleSheetsArray=[],this._listeners=[],this.get=t=>this._stylesheets[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._stylesheets,this.add=(t,e)=>{if(!this._stylesheets[t])return this._stylesheets[t]=e,this._styleSheetsArray.push(e),this.notify(),!0},this.status=t=>{const e=t&&this._stylesheets[t];return!!e&&-1!==this._styleSheetsArray.findIndex((t=>t===e))},this.on=t=>{const e=t&&this._stylesheets[t];if(e&&!this.status(t))return this._styleSheetsArray.push(e),this.notify(),!0},this.off=t=>{const e=t&&this._stylesheets[t];if(e&&this.status(t)){const t=this._styleSheetsArray.findIndex((t=>t===e));return this._styleSheetsArray.splice(t,1),this.notify(),!0}},this.remove=t=>{const e=this.get(t);if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[t],delete this._rules[t]),this.notify(),!0},this.pack=(t,e)=>{const s=new CSSStyleSheet;if(s.replaceSync(e),s.cssRules.length)return this.add(t,s);console.log(`StyleSheet '${t}' is empty`)},this.replace=(t,e)=>{const s=this._stylesheets[t];if(s)return s.replaceSync(e),this.notify(),!0},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{this._listeners.findIndex((e=>e.deref()===t))>=0||(this._listeners.push(new WeakRef(t)),this.apply(t))},this.unregisterNode=t=>{const e=this._listeners.findIndex((e=>e.deref()===t));e>=0&&this._listeners.splice(e,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((t,e)=>{const s=e.deref();return s&&(this.apply(s),t.push(e)),t}),[])}}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this.notify(),!0}}const p=(...t)=>t.join(","),m="rem",b="-",d=" ",u="-x",g="-y",_="down",y="horizontal",v="vertical",$="text",x=$+b,w="font",j=w+b,k="column",S=k+b,O="max-",z="min-",A="content",N=A+"s",C="-items",E="self",K="inline",W="block",V="size",P="-radius",I="direction",q="outline",M="style",R=b+M,T="end",B=b+T,J="start",L=b+J,G="center",H="word",Z="line",D="break",F=D+b,Q="wrap",U="no"+Q,X="rule",Y="object",tt="top",et=b+tt,st="left",it=b+st,rt="bottom",nt=b+rt,ot="right",lt=b+ot,at="width",ct=b+at,ht="color",ft=b+ht,pt="overflow",mt="align",bt="type",dt="transform",ut="all",gt="height",_t="normal",yt="opacity",vt="visibility",$t="scale",xt="box",wt=b+xt,jt="border",kt="position",St="none",Ot="auto",zt="fill",At="stroke",Nt="reverse",Ct="space",Et="fixed",Kt="origin",Wt="alpha",Vt="luminance",Pt="clip",It="zoom",qt="scroll",Mt="padding",Rt="margin",Tt="both",Bt="mode",Jt="repeat",Lt="light",Gt="linear",Ht="hidden",Zt="shadow",Dt="behavior",Ft="orientation",Qt="name",Ut="after",Xt="before",Yt="image",te="list"+R,ee=te+b+bt,se=te+b+kt,ie=te+b+Yt,re=ht+"-scheme",ne=jt+nt,oe=jt+it,le=jt+lt,ae=jt+et,ce=jt+b+W,he=jt+b+K,fe=ce+L,pe=ce+B,me=he+L,be=he+B,de=jt+ct,ue=ne+ct,ge=oe+ct,_e=le+ct,ye=ae+ct,ve=ce+ct,$e=he+ct,xe=fe+ct,we=pe+ct,je=me+ct,ke=be+ct,Se=jt+P,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+wn,zn=Tt+wn,An=x+"decoration",Nn=An+b+ht,Cn=An+b+"thickness",En=An+b+M,Kn=An+b+Z,Wn="white-"+Ct,Vn=x+dt,Pn=x+mt,In=v+b+mt,qn=x+pt,Mn=x+Ft,Rn=x+"rendering",Tn=x+Zt,Bn=x+"emphasis",Jn=Bn+ft,Ln=Bn+b+kt,Gn=Bn+R,Hn=x+Q,Zn=Hn+b+Bt,Dn=Hn+R,Fn=H+b+D,Qn=j+V,Un=j+"weight",Xn=j+"family",Yn=j+M,to=j+"synthesis",eo=j+"variant",so=eo+b+Yi+"s",io=eo+"-caps",ro=eo+"-numeric",no=eo+b+kt,oo=eo+"-east-asian",lo=eo+"-ligatures",ao=eo+"-settings",co="writing-"+Bt,ho=Z+b+gt,fo=Z+b+D,po=Z+"-through",mo="over"+Z,bo="under"+Z,uo="pre",go=uo+b+Z,_o=uo+b+Q,yo=F+Ct+"s",vo=F+ut,$o=F+H,xo=F+Ut,wo=F+Xt,jo=y+"-tb",ko=v+"-lr",So=v+"-rl",Oo="keep-"+ut,zo="pointer",Ao="pan",No=Ao+u,Co=Ao+it,Eo=Ao+lt,Ko=Ao+g,Wo=Ao+b+_,Vo="pinch-"+It,Po=v+b+$,Io="grab",qo=Io+"bing",Mo="resize",Ro="col-"+Mo,To="row-"+Mo,Bo="n-"+Mo,Jo="e-"+Mo,Lo="s-"+Mo,Go="w-"+Mo,Ho="ne-"+Mo,Zo="ew-"+Mo,Do="nw-"+Mo,Fo="se-"+Mo,Qo="sw-"+Mo,Uo="ns-"+Mo,Xo="nesw-"+Mo,Yo="nwse-"+Mo,tl=It+b+"in",el=It+b+"out",sl=zo+"-events",il=qt+b+kt,rl="caret"+ft,nl="accent"+ft,ol="filter",ll="backdrop-"+ol,al="background",cl=al+b,hl=cl+Yt,fl=cl+ht,pl=cl+Pt,ml=cl+Kt,bl=cl+kt,dl=bl+u,ul=bl+g,gl=cl+Jt,_l=cl+V,yl=cl+"blend-"+Bt,vl=cl+"attachment",$l="gradient",xl=Gt+b+$l,wl="radial-"+$l,jl="conic-"+$l,kl=A+b+vt,Sl=At+ct,Ol=At+b+yt,zl=zt+b+X,Al=zt+b+yt,Nl=ht+"-dodge",Cl=ht+"-burn",El="hard-"+Lt,Kl="soft-"+Lt,Wl=ht+"-mix",Vl="revert",Pl=Vl+"-layer",Il="container",ql=Il+b+bt,Ml=Il+b+Qt,Rl=":first-",Tl=":last-",Bl=":only-",Jl="child",Ll="of-type",Gl=":nth-child",Hl="prefers-",Zl=Hl+re,Dl="@media",Fl=ht+"-gamut",Ql=Hl+"contrast",Ul="scripting",Xl="::"+Ut,Yl="::"+Xt,ta="sideways",ea=ta+lt,sa={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"},ia=[...Array(12).keys()].reduce(((t,e)=>(t[e]=e,t)),{}),ra={u:{ini:"initial",inh:"inherit",u:"unset",r:Vl,rl:Pl},rep:{rx:vs,ry:$s,r:Jt,s:Ct,ro:"round",nr:xs},cnt:{n:_t,s:V,is:Mr},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:_t,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:_t,nw:U,p:uo,pl:go,pw:_o,bs:yo},wb:{n:_t,ba:vo,ka:Oo,bw:$o},wm:{htb:jo,vlr:ko,vrl:So},hyp:{no:St,m:"manual",a:Ot},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:po,o:mo,u:bo},tor:{m:"mixed",u:"upright",sr:ea,s:ta,ugo:"use-glyph-"+Ft},ta:{l:st,c:G,j:Ws,r:ot,s:J,e:T},fr:sa,coef:ia,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:Ar,max:Nr,fit:zr},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:Ot,f:zt,sd:fs},box:{c:ds,p:ms,b:bs,f:us,s:gs,v:_s,nc:ys,t:$},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:J,e:T,c:G,st:"stretch",sb:vi,sa:$i,se:xi,b:"baseline",fs:yi,fe:_i,no:St},dis:{g:Cs,ig:wi,f:Vs,if:qs,b:W,i:K},ca:ia,co:ia,ra:ia,ro:ia,fd:{r:Es,rr:di,c:k,cr:ui},fb:sa,fo:ia,fg:ia,fs:ia,fw:{w:Q,nw:U,wr:gi},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:Ot,any:"anywhere",n:_t,l:"loose",s:"strict"},ls:{no:St,dt:"dotted",i:gr,h:Ht,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Ht,s:qt,a:Ot,c:Pt,e:"ellipsis"},v:{h:Ht,v:"visible",c:"collapse",a:Ot},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},ttf:{l:Gt,e:sr,ei:ir,eo:nr,eio:rr,ss:lr,se:ar},tp:{col:p(ht,fl,Ve,Nn),icon:p(zt,At),flt:p(ol,ll),ind:p(Mt,Rt),sz:p(at,Er,Kr,gt,Wr,Vr),esz:p(qr,Pr,Ir,Tr,Mr,Rr),o:yt,b:jt,f:Vs,g:Cs,pos:p(kt,st,tt,rt,ot),tf:p(dt,cr,$t,hr,"skew",fr)},tb:{ad:"allow-discrete",n:_t},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:Ot,sp:il,c:N,tf:dt,o:yt,i:gr,tfi:p(dt,gr)},afm:{no:St,f:"forwards",b:"backwards",both:Tt},adir:{r:Nt,a:Yi,ar:tr},aps:{r:"running",p:"paused"},pe:{a:Ot,no:St,all:ut,f:zt,s:At},cur:{h:"help",a:Ot,p:zo,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:$,vt:Po,cp:"copy",m:"move",g:Io,gng:qo,cr:Ro,rr:To,nr:Bo,er:Jo,sr:Lo,wr:Go,ner:Ho,ewr:Zo,nwr:Do,ser:Fo,swr:Qo,nsr:Uo,neswr:Xo,nwser:Yo,zi:tl,zo:el},res:{n:St,v:v,h:y,b:Tt},toa:{a:Ot,no:St,px:No,pl:Co,pr:Eo,py:Ko,pu:"pan-up",pd:Wo,pz:Vo,m:"manipulation"},us:{n:St,t:$,all:ut,a:Ot},sb:{a:Ot,s:"smooth"},sss:{n:_t,a:"always"},sst:{n:St,x:"x",y:"y",b:W,i:K,both:Tt,xm:_n,ym:yn,bm:vn,im:$n,bothm:xn,xp:jn,yp:kn,bp:Sn,ip:On,bothp:zn},pos:{r:"relative",a:"absolute",f:Et,s:"static"},posv:{b:rt,t:tt,c:G,l:st,r:ot,lt:mr,rt:br,lb:dr,rb:ur},cf:{a:Ot,b:"balance"},cs:{no:St,all:ut},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:Wt,l:Vt},mm:{a:Wt,l:Vt,m:"match-source"},bgbm:{n:_t,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Lt+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:ht,lum:"luminosity",cd:Nl,cb:Cl,hl:El,sl:Kl},bga:{s:qt,f:Et,l:"local"}},na={a:Pi,an:qi,adur:Bi,adel:Ji,aps:Li,afm:Gi,adir:Ri,aic:Ti,atf:Mi,tn:Hi,tdur:Ui,tdel:Xi,tb:Di,tp:Fi,ttf:Qi,ba:xo,bb:wo,bor:jt,bw:de,br:Se,bs:He,bls:Ze,brs:De,bts:Fe,bbs:Qe,bbls:Ue,bis:Xe,bbss:Ye,bbes:ts,biss:es,bies:ss,brw:_e,blw:ge,btw:ye,bbw:ue,btlr:Ae,btrr:Ne,bbrr:ze,bblr:Oe,biw:$e,bblw:ve,bbew:we,bbsw:xe,bisw:je,biew:ke,besr:We,beer:Ke,bssr:Ee,bser:Ce,bc:Ve,blc:Pe,brc:Ie,btc:qe,bbc:Me,bblc:Re,bic:Te,bbsc:Be,bbec:Je,bisc:Le,biec:Ge,bg:al,bgi:hl,bgc:fl,c:ht,cmix:Wl,csh:re,acc:nl,ctc:rl,st:At,stw:Sl,sto:Ol,fi:zt,fir:zl,fio:Al,flt:ol,bf:ll,dis:"display",g:Cs,jc:Ls,ji:Gs,ai:Hs,pi:Is,ac:Zs,gt:Fs,gtr:Qs,gtc:Us,gp:Ks,rg:Xs,cg:Ys,as:Ds,js:ti,gr:ei,gre:si,grs:ii,gc:ri,gce:ni,gcs:oi,fx:Vs,fxd:Bs,fxw:Js,fxs:Ts,fxg:Rs,fxb:Ms,ord:"order",dir:I,m:Rt,ml:Os,mr:As,mt:zs,mb:Ns,p:Mt,pl:ws,pr:ks,pt:js,pb:Ss,out:q,oc:is,ow:rs,os:ns,oo:os,l:st,r:ot,t:tt,b:rt,ins:gr,ib:xr,ibe:wr,ibs:jr,ii:kr,iie:Sr,iis:Or,wc:"will-change",app:"appearance",pe:sl,cur:"cursor",toa:"touch-action",us:"user-select",res:Mo,lis:te,lisp:se,lisi:ie,list:ee,sb:Br,ssa:mn,sss:bn,sst:dn,sm:Jr,sml:Hr,smr:Zr,smt:Lr,smb:Gr,sp:tn,spl:rn,spr:nn,spt:en,spb:sn,smbl:Dr,smbe:Fr,smbs:Qr,smi:Ur,smie:Xr,smis:Yr,spbl:on,spbe:ln,spbs:an,spi:cn,spie:hn,spis:fn,osb:un,ar:"aspect-ratio",w:at,maxw:Er,minw:Kr,h:gt,minh:Vr,maxh:Wr,bl:Pr,maxb:Ir,minb:qr,i:Mr,mini:Tr,maxi:Rr,per:fr,pero:pr,rot:hr,sc:$t,tf:dt,tfb:yr,tfo:vr,tfs:$r,tr:cr,z:It,lts:"letter-spacing",lh:ho,lb:fo,f:w,fst:Yn,ff:Xn,fwg:Un,fsz:Qn,fsn:to,fv:eo,fva:so,fvc:io,fvea:oo,fvl:lo,fvn:ro,fvs:ao,fvp:no,tt:Vn,td:An,tdt:Cn,tds:En,tdl:Kn,ta:Pn,to:qn,trg:Rn,ts:Tn,te:Bn,tep:Ln,tec:Jn,tes:Gn,tw:Hn,twm:Zn,tws:Dn,va:In,ws:Wn,tor:Mn,wb:Fn,wm:co,hyp:"hyphens",bsz:Cr,bsh:ps,pos:kt,cf:ai,crs:fi,crc:hi,crw:pi,cs:mi,cw:bi,cc:li,bgcl:pl,bgp:bl,bgpx:dl,bgpy:ul,bgbm:yl,bgo:ml,bgr:gl,bga:vl,bgsz:_l,mcl:ki,mcm:Si,mm:Oi,mo:zi,mp:Ai,mre:Ni,msz:Ci,mtp:Ei,obf:cs,obp:hs,con:A,ov:pt,ovx:ls,ovy:as,v:vt,cv:kl,o:yt,zi:"z-index",lgr:xl,rgr:wl,cgr:jl,inf:"infinite",cnt:ql,cnn:Ml,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:Rl+Jl,$lc:Tl+Jl,$oc:Bl+Jl,$1:Gl+"(odd)",$2:Gl+"(even)",$ft:Rl+Ll,$lt:Tl+Ll,$ot:Bl+Ll,$bef:Yl,$aft:Xl,$bd:"::backdrop",$ba:`&${Yl},&${Xl}`,$pl:":placeholder",$light:Dl+`(${Zl}: light)`,$dark:Dl+`(${Zl}: dark)`,$red_m:Dl+"(prefers-reduced-motion: reduce)",$ori_l:Dl+`(${Ft}: landscape)`,$ori_p:Dl+`(${Ft}: portrait)`,$gam_srgb:Dl+`(${Fl}: srgb)`,$gam_p3:Dl+`(${Fl}: p3)`,$gam_rec:Dl+`(${Fl}: rec2020)`,$con_no:Dl+`(${Ql}: no-preference)`,$con_m:Dl+`(${Ql}: more)`,$con_l:Dl+`(${Ql}: less)`,$con_c:Dl+`(${Ql}: custom)`,$scr_no:Dl+`(${Ul}: none)`,$scr_ini:Dl+`(${Ul}: initial-only)`,$scr_en:Dl+`(${Ul}: enabled)`},oa={xs:30+m,sm:40+m,md:48+m,lg:64+m,xl:80+m},la={xs:10+m,sm:20+m,md:30+m,lg:40+m,xl:48+m},aa={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},ca={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},ha="{1}rem",fa="{1}deg",pa="span {1}",ma={fb:"calc(100% * {1})",ra:pa,ca:pa,sz:ha,sp:ha,rad:ha,th:ha,bp:ha,cbp:ha,fsz:ha,lsp:ha,tr:ha,pers:ha,sk:fa,rot:fa,time:"{1}ms"},ba="style-provider",da=t=>"object"==typeof t;class ua{constructor(t){this._counter=0,this._keys=new Set,this._configs=new Map,this.use=(t,e)=>{const s=this._configs.get(t);if(s)return s;const i=e||this._prefix+this._counter.toString(36);return this._keys.add(i),this._configs.set(t,i),this._counter++,i},this.mutate=(t,e)=>Object.assign(this.getConfigs()[t],e),this.getKey=t=>this._configs.get(t),this.getKeys=()=>[...this._keys],this.getConfigs=()=>Object.fromEntries(this._configs.entries().map((([t,e])=>[e,t]))),this._prefix=(null==t?void 0:t.prefix)||"eff",t.initContent&&Object.entries(t.initContent).forEach((([t,e])=>this.use(e,t))),t.hydrate&&(this._counter=0)}}const ga=globalThis.document,_a=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));!function(t={}){const{name:e=ba,styles:s={},settings:i={}}=t,r=globalThis.customElements;!(null==r?void 0:r.get(e))&&r.define(e,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get eventName(){return this.getAttribute("eventname")||"effcsschanges"}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||"effcss")}get _initSelector(){return"."+(this.getAttribute("initcls")||"effcss_init")}get settingsContent(){const t=null==ga?void 0:ga.querySelector(this._settingsSelector);let e;return e=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:i,e||{}}get initContent(){const t=ga.querySelectorAll(this._initSelector);let e=s||{};return t.forEach((t=>{let s;s=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):null==t?void 0:t.effcss,e=Object.assign(Object.assign({},e),s||{})})),e}get configs(){return this._collector.getConfigs()}constructor(){super(),this._setState=()=>{const{units:t,keys:s,sets:i,mediaBP:r=oa,containerBP:n=la,rootStyle:o=aa,themes:l=ca}=this.settingsContent,a=Object.assign(Object.assign({},ma),t||{}),c=Object.assign(Object.assign({},na),s||{}),h=Object.assign({},ra);i&&Object.entries(i).forEach((([t,e])=>h[t]=Object.assign({},e)));const f=Object.entries(l);if(a)for(const t in a)h[t]=h[t]&&Object.fromEntries(Object.entries(h[t]).map((([e,s])=>[e,a[t].replace("{1}",""+s)])));r&&Object.entries(r).forEach((([t,e])=>{c[`min_${t}_`]=`@media (min-width:${e})`,c[`max_${t}_`]=`@media (max-width:${e})`})),n&&Object.entries(n).forEach((([t,e])=>{c[`cmin_${t}_`]=`@container (min-width:${e})`,c[`cmax_${t}_`]=`@container (max-width:${e})`}));const p={},m={};l&&h&&f.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{var r;const n=this._resolver.varName(this.prefix,t,e);a[t]?s[n]=a[t].replace("{1}",""+i):s[n]=i,p[n]||(p[n]=(null===(r=h[t])||void 0===r?void 0:r[e])||"unset",h[t]||(h[t]={}),h[t][e]=`var(${n})`)}))})),m[t]=s})),this._dict={sets:h,keys:c},this._mainConfig={c:Object.assign(Object.assign({[e]:{display:"contents"},_theme:m,$$:Object.assign(p,o)},(null==m?void 0:m.dark)?{$$dark:{$$:m.dark}}:{}),(null==m?void 0:m.light)?{$$light:{$$:m.light}}:{})}},this.use=(t,e)=>{let s=this._collector.use(t,e);return this._manager&&!this._manager.has(e)&&this._manager.pack(s,this.css(t,s)),this.resolve(s)},this.alter=(t,e)=>{let s;if(s="string"==typeof t?t:this._collector.getKey(t),s){const t=this._collector.mutate(s,e);this._manager.replace(s,this.css(t,s))}return this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,e)=>{var s;return null===(s=this._processor)||void 0===s?void 0:s.compile(e,t)},this.status=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),!!e&&this._manager.status(e)},this.on=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.on(e):void 0},this.off=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.off(e):void 0},this.get=(t=this._mainConfig)=>{let e;return e="object"==typeof t?this._collector.getKey(t):t,this._manager.get(e)},this.getMany=(t=this._collector.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._resolver.attr(t||this._collector.getKey(this._mainConfig)),this.subscribe=t=>this._manager.registerNode(t),this.unsubscribe=t=>this._manager.unregisterNode(t)}connectedCallback(){this._resolver=(t=>{const{mode:e}=t,s=t=>Object.entries(t).reduce(((t,[e,s])=>(void 0!==s&&t.push(e+(s?"-"+s:"")),t)),[]).join(" "),i=(t,e)=>Object.defineProperties({[t]:e},{k:{value:t},v:{value:e}}),r=(...t)=>"--"+t.join("-"),n=(...t)=>t.join("-");return"c"===e?{selector:({b:t,e:e,m:s,mv:i})=>`.${t}${(e?"__"+e:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")}`,attr:t=>e=>r=>{let n=r||"";da(n)&&(n=s(n));const o=t+(e?"__"+e:"");return n=o+(n?" "+(null==n?void 0:n.split(" ").map((t=>o+"_"+t.split("-").join("_"))).join(" ")):""),i("class",n)},varName:r,kfName:n}:{selector:({b:t,e:e,m:s,mv:i})=>`[data-${t}${e?"-"+e:""}${s?'~="'+(s||"")+(i?"-"+i:"")+'"':""}]`,attr:t=>e=>r=>{const n=`data-${t}${e?"-"+e:""}`;let o=r||"";return da(o)&&(o=s(o)),i(n,o)},varName:r,kfName:n}})({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=(s={hydrate:this.hydrate,prefix:e,initContent:t},new ua(s)),this._processor=function(t){return new h(t)}({sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver}),this._manager=new f;const i=t=>this.dispatchEvent(new CustomEvent(this.eventName,{detail:{styles:t},bubbles:!0}));this._notifier={set adoptedStyleSheets(t){i(t)}},this.subscribe(this._notifier),this.use(this._mainConfig),this.usePublic(t),ga&&!this.isolated&&this._manager.registerNode(ga)}})}();
|
|
7
|
+
const t=Object.entries,e=(e,s,i)=>t(e).reduce(s,i),s=t=>"object"==typeof t,i=t=>`{${t}}`,r=Object.assign.bind(Object),n=(t,e)=>`${t}:${e};`,o=(t,e)=>["@property",t,i(n("syntax",e.syn||'"*"')+n("inherits",e.inh||!1)+(e.ini?n("initial-value",e.ini):""))].join(" "),l=t=>`var(${t})`,a=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,c=["l","c","h","a"];class h{constructor(h){this._outerKeys={},this._outerSets={},this._parseSelector=t=>{let e,s,i,r,n;return[e,n]=t.split(":"),e.startsWith("__")?[s,i,r]=e.slice(2).split("_"):[s,i,r]=e.split("_"),{e:s,m:i,mv:r,s:n}},this._prepareVarName=(...t)=>this._resolver.varName(...t),this._prepareKeyframesName=(...t)=>this._resolver.kfName(...t),this.compile=(h,f)=>{const{_:p,kf:m,k:b={},v:u={},c:d}=f,g=this._resolver.selector.bind(this),_=this._parseSelector;let y=r({},d),v=r({},b),$=r({_:{}},u),x="";if(p)for(let t in p){const e=p[t];if("c"===e.typ){const s={};c.forEach((i=>{const r=t+i,n=this._prepareVarName(h,r);s[i]=n,v["_"+r]=s[i],x+=o(n,e)})),$._[t]=a({l:l(s.l),c:l(s.c),h:l(s.h),a:l(s.a)}),e.all&&(y["_"+t+"l"]=`&lig=>${this._prepareVarName(h,t+"l")}:{1}`,y["_"+t+"c"]=`&chr=>${this._prepareVarName(h,t+"c")}:{1}`,y["_"+t+"h"]=`&hue=>${this._prepareVarName(h,t+"h")}:{1}`,y["_"+t+"a"]=`&alp=>${this._prepareVarName(h,t+"a")}:{1}`)}else{const s=this._prepareVarName(h,t);v["_"+t]=s,$._[t]=l(s),x+=o(s,e)}}const w=t=>v[t]||this._outerKeys[t],j=t=>{var e;return $[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},k=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=j(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+(w(s)||"")})),S=e=>{const s=e.split("?");let i;for(let e in s){const r=s[e],[n,o]=r.split("=>"),l=n.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[a,c,h]=l,f=j(c);if(!f)continue;i=f;let p=t(i);const m=null==h?void 0:h.slice(1,-1).split(",");if(m){const t=new Set(m);p=p.filter((([e,s])=>t.has(e)))}if(o){let[t,e]=o.split("|");void 0===e&&(e=t,t=""),p=p.map((([s,i])=>[t.replace("{0}",s)||s,k(e.replaceAll("{1}",""+i))]))}(m||o)&&(i=Object.fromEntries(p));break}return i};function A(t,r,o){var l,a,c,f;let p=""+t;if((null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"$"))&&(p=""+w(t.slice(1)),!p))return"";if(Array.isArray(r))return A(p,Object.assign({},...r.map((t=>"string"==typeof t?S(t):t))),o);if(null==r)return"";if(s(r)){const t=!o||(null===(a=o.startsWith)||void 0===a?void 0:a.call(o,"@"))||p.startsWith("&")||p.startsWith("@")?"":"&";if(p.startsWith("_")){const{e:n,m:o,mv:l}=_(p);return o&&"string"!=typeof l?e(r,((r,[l,a])=>{let c;return c=s(a)?e(a,((t,e)=>t+A(...e,p)),""):a+";",r+t+g({b:h,e:n,m:o,mv:l})+i(c)}),""):t+g({b:h,e:n,m:o,mv:l})+i(e(r,((t,e)=>t+A(...e,p)),""))}return t+p+i(e(r,((t,e)=>t+A(...e,p)),""))}{let t=""+r;return(null===(c=null==t?void 0:t.startsWith)||void 0===c?void 0:c.call(t,"&"))?A(p,S(t.slice(1)),o):(null===(f=null==t?void 0:t.includes)||void 0===f?void 0:f.call(t,"{"))?A(p,k(t),o):n(p.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let O="";if(m)for(let t in m){const s=m[t],r=this._prepareKeyframesName(h,t);v["kf_"+t]=r,O+=`@keyframes ${r} `+i(e(s,((t,[s,r])=>t+s+(String(+s)===s?"%":"")+i(e(r,((t,e)=>t+A(...e)),""))),""))}return x+O+e(y,((t,e)=>t+A(...e)),"")};const{sets:f,keys:p,resolver:m}=h;this._resolver=m,p&&(this._outerKeys=p),f&&(this._outerSets=f)}}class f{constructor(){this._stylesheets={},this._rules={},this._styleSheetsArray=[],this._listeners=[],this.get=t=>this._stylesheets[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._stylesheets,this.add=(t,e)=>{if(!this._stylesheets[t])return this._stylesheets[t]=e,this._styleSheetsArray.push(e),this.notify(),!0},this.status=t=>{const e=t&&this._stylesheets[t];return!!e&&-1!==this._styleSheetsArray.findIndex((t=>t===e))},this.on=t=>{const e=(Array.isArray(t)?t:[t]).reduce(((t,e)=>{const s=e&&this._stylesheets[e];return!(!s||this.status(e))&&(this._styleSheetsArray.push(s),t)}),!0);return this.notify(),e},this.off=t=>{const e=(Array.isArray(t)?t:[t]).reduce(((t,e)=>{const s=e&&this._stylesheets[e];if(s&&this.status(e)){const e=this._styleSheetsArray.findIndex((t=>t===s));return this._styleSheetsArray.splice(e,1),t}return!1}),!0);return this.notify(),e},this.remove=t=>{const e=this.get(t);if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[t],delete this._rules[t]),this.notify(),!0},this.pack=(t,e)=>{const s=new CSSStyleSheet;if(s.replaceSync(e),s.cssRules.length)return this.add(t,s);console.log(`StyleSheet '${t}' is empty`)},this.replace=(t,e)=>{const s=this._stylesheets[t];if(s)return s.replaceSync(e),this.notify(),!0},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{this._listeners.findIndex((e=>e.deref()===t))>=0||(this._listeners.push(new WeakRef(t)),this.apply(t))},this.unregisterNode=t=>{const e=this._listeners.findIndex((e=>e.deref()===t));e>=0&&this._listeners.splice(e,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((t,e)=>{const s=e.deref();return s&&(this.apply(s),t.push(e)),t}),[])}}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this.notify(),!0}}const p=(...t)=>t.join(","),m="rem",b="-",u=" ",d="-x",g="-y",_="down",y="horizontal",v="vertical",$="text",x=$+b,w="font",j=w+b,k="column",S=k+b,A="max-",O="min-",z="content",N=z+"s",C="-items",E="self",K="inline",W="block",V="size",P="-radius",I="direction",q="outline",M="style",R=b+M,T="end",B=b+T,J="start",L=b+J,G="center",H="word",Z="line",D="break",F=D+b,Q="wrap",U="no"+Q,X="rule",Y="object",tt="top",et=b+tt,st="left",it=b+st,rt="bottom",nt=b+rt,ot="right",lt=b+ot,at="width",ct=b+at,ht="color",ft=b+ht,pt="overflow",mt="align",bt="type",ut="transform",dt="all",gt="height",_t="normal",yt="opacity",vt="visibility",$t="scale",xt="box",wt=b+xt,jt="border",kt="position",St="none",At="auto",Ot="fill",zt="stroke",Nt="reverse",Ct="space",Et="fixed",Kt="origin",Wt="alpha",Vt="luminance",Pt="clip",It="zoom",qt="scroll",Mt="padding",Rt="margin",Tt="both",Bt="mode",Jt="repeat",Lt="light",Gt="linear",Ht="hidden",Zt="shadow",Dt="behavior",Ft="orientation",Qt="name",Ut="after",Xt="before",Yt="image",te="list"+R,ee=te+b+bt,se=te+b+kt,ie=te+b+Yt,re=ht+"-scheme",ne=jt+nt,oe=jt+it,le=jt+lt,ae=jt+et,ce=jt+b+W,he=jt+b+K,fe=ce+L,pe=ce+B,me=he+L,be=he+B,ue=jt+ct,de=ne+ct,ge=oe+ct,_e=le+ct,ye=ae+ct,ve=ce+ct,$e=he+ct,xe=fe+ct,we=pe+ct,je=me+ct,ke=be+ct,Se=jt+P,Ae=ne+it+P,Oe=ne+lt+P,ze=ae+it+P,Ne=ae+lt+P,Ce=jt+L+B+P,Ee=jt+L+L+P,Ke=jt+B+B+P,We=jt+B+L+P,Ve=jt+ft,Pe=oe+ft,Ie=le+ft,qe=ae+ft,Me=ne+ft,Re=ce+ft,Te=he+ft,Be=fe+ft,Je=pe+ft,Le=me+ft,Ge=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Gn=Bn+R,Hn=x+Q,Zn=Hn+b+Bt,Dn=Hn+R,Fn=H+b+D,Qn=j+V,Un=j+"weight",Xn=j+"family",Yn=j+M,to=j+"synthesis",eo=j+"variant",so=eo+b+Yi+"s",io=eo+"-caps",ro=eo+"-numeric",no=eo+b+kt,oo=eo+"-east-asian",lo=eo+"-ligatures",ao=eo+"-settings",co="writing-"+Bt,ho=Z+b+gt,fo=Z+b+D,po=Z+"-through",mo="over"+Z,bo="under"+Z,uo="pre",go=uo+b+Z,_o=uo+b+Q,yo=F+Ct+"s",vo=F+dt,$o=F+H,xo=F+Ut,wo=F+Xt,jo=y+"-tb",ko=v+"-lr",So=v+"-rl",Ao="keep-"+dt,Oo="pointer",zo="pan",No=zo+d,Co=zo+it,Eo=zo+lt,Ko=zo+g,Wo=zo+b+_,Vo="pinch-"+It,Po=v+b+$,Io="grab",qo=Io+"bing",Mo="resize",Ro="col-"+Mo,To="row-"+Mo,Bo="n-"+Mo,Jo="e-"+Mo,Lo="s-"+Mo,Go="w-"+Mo,Ho="ne-"+Mo,Zo="ew-"+Mo,Do="nw-"+Mo,Fo="se-"+Mo,Qo="sw-"+Mo,Uo="ns-"+Mo,Xo="nesw-"+Mo,Yo="nwse-"+Mo,tl=It+b+"in",el=It+b+"out",sl=Oo+"-events",il=qt+b+kt,rl="caret"+ft,nl="accent"+ft,ol="filter",ll="backdrop-"+ol,al="background",cl=al+b,hl=cl+Yt,fl=cl+ht,pl=cl+Pt,ml=cl+Kt,bl=cl+kt,ul=bl+d,dl=bl+g,gl=cl+Jt,_l=cl+V,yl=cl+"blend-"+Bt,vl=cl+"attachment",$l="gradient",xl=Gt+b+$l,wl="radial-"+$l,jl="conic-"+$l,kl=z+b+vt,Sl=zt+ct,Al=zt+b+yt,Ol=Ot+b+X,zl=Ot+b+yt,Nl=ht+"-dodge",Cl=ht+"-burn",El="hard-"+Lt,Kl="soft-"+Lt,Wl=ht+"-mix",Vl="revert",Pl=Vl+"-layer",Il="container",ql=Il+b+bt,Ml=Il+b+Qt,Rl=":first-",Tl=":last-",Bl=":only-",Jl="child",Ll="of-type",Gl=":nth-child",Hl="prefers-",Zl=Hl+re,Dl="@media",Fl=ht+"-gamut",Ql=Hl+"contrast",Ul="scripting",Xl="::"+Ut,Yl="::"+Xt,ta="sideways",ea=ta+lt,sa={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"},ia=[...Array(12).keys()].reduce(((t,e)=>(t[e]=e,t)),{}),ra={u:{ini:"initial",inh:"inherit",u:"unset",r:Vl,rl:Pl},rep:{rx:vs,ry:$s,r:Jt,s:Ct,ro:"round",nr:xs},cnt:{n:_t,s:V,is:Mr},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:_t,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:_t,nw:U,p:uo,pl:go,pw:_o,bs:yo},wb:{n:_t,ba:vo,ka:Ao,bw:$o},wm:{htb:jo,vlr:ko,vrl:So},hyp:{no:St,m:"manual",a:At},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:po,o:mo,u:bo},tor:{m:"mixed",u:"upright",sr:ea,s:ta,ugo:"use-glyph-"+Ft},ta:{l:st,c:G,j:Ws,r:ot,s:J,e:T},fr:sa,coef:ia,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:zr,max:Nr,fit:Or},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:At,f:Ot,sd:fs},box:{c:us,p:ms,b:bs,f:ds,s:gs,v:_s,nc:ys,t:$},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:J,e:T,c:G,st:"stretch",sb:vi,sa:$i,se:xi,b:"baseline",fs:yi,fe:_i,no:St},dis:{g:Cs,ig:wi,f:Vs,if:qs,b:W,i:K},ca:ia,co:ia,ra:ia,ro:ia,fd:{r:Es,rr:ui,c:k,cr:di},fb:sa,fo:ia,fg:ia,fs:ia,fw:{w:Q,nw:U,wr:gi},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:At,any:"anywhere",n:_t,l:"loose",s:"strict"},ls:{no:St,dt:"dotted",i:gr,h:Ht,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Ht,s:qt,a:At,c:Pt,e:"ellipsis"},v:{h:Ht,v:"visible",c:"collapse",a:At},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},ttf:{l:Gt,e:sr,ei:ir,eo:nr,eio:rr,ss:lr,se:ar},tp:{col:p(ht,fl,Ve,Nn),icon:p(Ot,zt),flt:p(ol,ll),ind:p(Mt,Rt),sz:p(at,Er,Kr,gt,Wr,Vr),esz:p(qr,Pr,Ir,Tr,Mr,Rr),o:yt,b:jt,f:Vs,g:Cs,pos:p(kt,st,tt,rt,ot),tf:p(ut,cr,$t,hr,"skew",fr)},tb:{ad:"allow-discrete",n:_t},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:At,sp:il,c:N,tf:ut,o:yt,i:gr,tfi:p(ut,gr)},afm:{no:St,f:"forwards",b:"backwards",both:Tt},adir:{r:Nt,a:Yi,ar:tr},aps:{r:"running",p:"paused"},pe:{a:At,no:St,all:dt,f:Ot,s:zt},cur:{h:"help",a:At,p:Oo,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:$,vt:Po,cp:"copy",m:"move",g:Io,gng:qo,cr:Ro,rr:To,nr:Bo,er:Jo,sr:Lo,wr:Go,ner:Ho,ewr:Zo,nwr:Do,ser:Fo,swr:Qo,nsr:Uo,neswr:Xo,nwser:Yo,zi:tl,zo:el},res:{n:St,v:v,h:y,b:Tt},toa:{a:At,no:St,px:No,pl:Co,pr:Eo,py:Ko,pu:"pan-up",pd:Wo,pz:Vo,m:"manipulation"},us:{n:St,t:$,all:dt,a:At},sb:{a:At,s:"smooth"},sss:{n:_t,a:"always"},sst:{n:St,x:"x",y:"y",b:W,i:K,both:Tt,xm:_n,ym:yn,bm:vn,im:$n,bothm:xn,xp:jn,yp:kn,bp:Sn,ip:An,bothp:On},pos:{r:"relative",a:"absolute",f:Et,s:"static"},posv:{b:rt,t:tt,c:G,l:st,r:ot,lt:mr,rt:br,lb:ur,rb:dr},cf:{a:At,b:"balance"},cs:{no:St,all:dt},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:Wt,l:Vt},mm:{a:Wt,l:Vt,m:"match-source"},bgbm:{n:_t,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Lt+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:ht,lum:"luminosity",cd:Nl,cb:Cl,hl:El,sl:Kl},bga:{s:qt,f:Et,l:"local"}},na={a:Pi,an:qi,adur:Bi,adel:Ji,aps:Li,afm:Gi,adir:Ri,aic:Ti,atf:Mi,tn:Hi,tdur:Ui,tdel:Xi,tb:Di,tp:Fi,ttf:Qi,ba:xo,bb:wo,bor:jt,bw:ue,br:Se,bs:He,bls:Ze,brs:De,bts:Fe,bbs:Qe,bbls:Ue,bis:Xe,bbss:Ye,bbes:ts,biss:es,bies:ss,brw:_e,blw:ge,btw:ye,bbw:de,btlr:ze,btrr:Ne,bbrr:Oe,bblr:Ae,biw:$e,bblw:ve,bbew:we,bbsw:xe,bisw:je,biew:ke,besr:We,beer:Ke,bssr:Ee,bser:Ce,bc:Ve,blc:Pe,brc:Ie,btc:qe,bbc:Me,bblc:Re,bic:Te,bbsc:Be,bbec:Je,bisc:Le,biec:Ge,bg:al,bgi:hl,bgc:fl,c:ht,cmix:Wl,csh:re,acc:nl,ctc:rl,st:zt,stw:Sl,sto:Al,fi:Ot,fir:Ol,fio:zl,flt:ol,bf:ll,dis:"display",g:Cs,jc:Ls,ji:Gs,ai:Hs,pi:Is,ac:Zs,gt:Fs,gtr:Qs,gtc:Us,gp:Ks,rg:Xs,cg:Ys,as:Ds,js:ti,gr:ei,gre:si,grs:ii,gc:ri,gce:ni,gcs:oi,fx:Vs,fxd:Bs,fxw:Js,fxs:Ts,fxg:Rs,fxb:Ms,ord:"order",dir:I,m:Rt,ml:As,mr:zs,mt:Os,mb:Ns,p:Mt,pl:ws,pr:ks,pt:js,pb:Ss,out:q,oc:is,ow:rs,os:ns,oo:os,l:st,r:ot,t:tt,b:rt,ins:gr,ib:xr,ibe:wr,ibs:jr,ii:kr,iie:Sr,iis:Ar,wc:"will-change",app:"appearance",pe:sl,cur:"cursor",toa:"touch-action",us:"user-select",res:Mo,lis:te,lisp:se,lisi:ie,list:ee,sb:Br,ssa:mn,sss:bn,sst:un,sm:Jr,sml:Hr,smr:Zr,smt:Lr,smb:Gr,sp:tn,spl:rn,spr:nn,spt:en,spb:sn,smbl:Dr,smbe:Fr,smbs:Qr,smi:Ur,smie:Xr,smis:Yr,spbl:on,spbe:ln,spbs:an,spi:cn,spie:hn,spis:fn,osb:dn,ar:"aspect-ratio",w:at,maxw:Er,minw:Kr,h:gt,minh:Vr,maxh:Wr,bl:Pr,maxb:Ir,minb:qr,i:Mr,mini:Tr,maxi:Rr,per:fr,pero:pr,rot:hr,sc:$t,tf:ut,tfb:yr,tfo:vr,tfs:$r,tr:cr,z:It,lts:"letter-spacing",lh:ho,lb:fo,f:w,fst:Yn,ff:Xn,fwg:Un,fsz:Qn,fsn:to,fv:eo,fva:so,fvc:io,fvea:oo,fvl:lo,fvn:ro,fvs:ao,fvp:no,tt:Vn,td:zn,tdt:Cn,tds:En,tdl:Kn,ta:Pn,to:qn,trg:Rn,ts:Tn,te:Bn,tep:Ln,tec:Jn,tes:Gn,tw:Hn,twm:Zn,tws:Dn,va:In,ws:Wn,tor:Mn,wb:Fn,wm:co,hyp:"hyphens",bsz:Cr,bsh:ps,pos:kt,cf:ai,crs:fi,crc:hi,crw:pi,cs:mi,cw:bi,cc:li,bgcl:pl,bgp:bl,bgpx:ul,bgpy:dl,bgbm:yl,bgo:ml,bgr:gl,bga:vl,bgsz:_l,mcl:ki,mcm:Si,mm:Ai,mo:Oi,mp:zi,mre:Ni,msz:Ci,mtp:Ei,obf:cs,obp:hs,con:z,ov:pt,ovx:ls,ovy:as,v:vt,cv:kl,o:yt,zi:"z-index",lgr:xl,rgr:wl,cgr:jl,inf:"infinite",cnt:ql,cnn:Ml,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:Rl+Jl,$lc:Tl+Jl,$oc:Bl+Jl,$1:Gl+"(odd)",$2:Gl+"(even)",$ft:Rl+Ll,$lt:Tl+Ll,$ot:Bl+Ll,$bef:Yl,$aft:Xl,$bd:"::backdrop",$ba:`&${Yl},&${Xl}`,$pl:":placeholder",$light:Dl+`(${Zl}: light)`,$dark:Dl+`(${Zl}: dark)`,$red_m:Dl+"(prefers-reduced-motion: reduce)",$ori_l:Dl+`(${Ft}: landscape)`,$ori_p:Dl+`(${Ft}: portrait)`,$gam_srgb:Dl+`(${Fl}: srgb)`,$gam_p3:Dl+`(${Fl}: p3)`,$gam_rec:Dl+`(${Fl}: rec2020)`,$con_no:Dl+`(${Ql}: no-preference)`,$con_m:Dl+`(${Ql}: more)`,$con_l:Dl+`(${Ql}: less)`,$con_c:Dl+`(${Ql}: custom)`,$scr_no:Dl+`(${Ul}: none)`,$scr_ini:Dl+`(${Ul}: initial-only)`,$scr_en:Dl+`(${Ul}: enabled)`},oa={xs:30+m,sm:40+m,md:48+m,lg:64+m,xl:80+m},la={xs:10+m,sm:20+m,md:30+m,lg:40+m,xl:48+m},aa={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},ca={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},ha="{1}rem",fa="{1}deg",pa="span {1}",ma={fb:"calc(100% * {1})",ra:pa,ca:pa,sz:ha,sp:ha,rad:ha,th:ha,bp:ha,cbp:ha,fsz:ha,lsp:ha,tr:ha,pers:ha,sk:fa,rot:fa,time:"{1}ms"},ba="style-provider",ua=t=>"object"==typeof t;class da{constructor(t){this._counter=0,this._keys=new Set,this._configs=new Map,this.use=(t,e)=>{const s=this._configs.get(t);if(s)return s;const i=e||this._prefix+this._counter.toString(36);return this._keys.add(i),this._configs.set(t,i),this._counter++,i},this.mutate=(t,e)=>Object.assign(this.getConfigs()[t],e),this.getKey=t=>this._configs.get(t),this.getKeys=()=>[...this._keys],this.getConfigs=()=>Object.fromEntries(this._configs.entries().map((([t,e])=>[e,t]))),this._prefix=(null==t?void 0:t.prefix)||"eff",t.initContent&&Object.entries(t.initContent).forEach((([t,e])=>this.use(e,t))),t.hydrate&&(this._counter=0)}}const ga=globalThis.document,_a=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));!function(t={}){const{name:e=ba,styles:s={},settings:i={}}=t,r=globalThis.customElements;!(null==r?void 0:r.get(e))&&r.define(e,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get eventName(){return this.getAttribute("eventname")||"effcsschanges"}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||"effcss")}get _initSelector(){return"."+(this.getAttribute("initcls")||"effcss_init")}get settingsContent(){const t=null==ga?void 0:ga.querySelector(this._settingsSelector);let e;return e=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:i,e||{}}get initContent(){const t=ga.querySelectorAll(this._initSelector);let e=s||{};return t.forEach((t=>{let s;s=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):null==t?void 0:t.effcss,e=Object.assign(Object.assign({},e),s||{})})),e}get configs(){return this._collector.getConfigs()}constructor(){super(),this._setState=()=>{const{units:t,keys:s,sets:i,mediaBP:r=oa,containerBP:n=la,rootStyle:o=aa,themes:l=ca}=this.settingsContent,a=Object.assign(Object.assign({},ma),t||{}),c=Object.assign(Object.assign({},na),s||{}),h=Object.assign({},ra);i&&Object.entries(i).forEach((([t,e])=>h[t]=Object.assign({},e)));const f=Object.entries(l);if(a)for(const t in a)h[t]=h[t]&&Object.fromEntries(Object.entries(h[t]).map((([e,s])=>[e,a[t].replace("{1}",""+s)])));r&&Object.entries(r).forEach((([t,e])=>{c[`min_${t}_`]=`@media (min-width:${e})`,c[`max_${t}_`]=`@media (max-width:${e})`})),n&&Object.entries(n).forEach((([t,e])=>{c[`cmin_${t}_`]=`@container (min-width:${e})`,c[`cmax_${t}_`]=`@container (max-width:${e})`}));const p={},m={};l&&h&&f.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{var r;const n=this._resolver.varName(this.prefix,t,e);a[t]?s[n]=a[t].replace("{1}",""+i):s[n]=i,p[n]||(p[n]=(null===(r=h[t])||void 0===r?void 0:r[e])||"unset",h[t]||(h[t]={}),h[t][e]=`var(${n})`)}))})),m[t]=s})),this._dict={sets:h,keys:c},this._mainConfig={c:Object.assign(Object.assign({[e]:{display:"contents"},_theme:m,$$:Object.assign(p,o)},(null==m?void 0:m.dark)?{$$dark:{$$:m.dark}}:{}),(null==m?void 0:m.light)?{$$light:{$$:m.light}}:{})}},this.use=(t,e)=>{let s=this._collector.use(t,e);return this._manager&&!this._manager.has(e)&&this._manager.pack(s,this.css(t,s)),this.resolve(s)},this.alter=(t,e)=>{let s;if(s="string"==typeof t?t:this._collector.getKey(t),s){const t=this._collector.mutate(s,e);this._manager.replace(s,this.css(t,s))}return this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,e)=>{var s;return null===(s=this._processor)||void 0===s?void 0:s.compile(e,t)},this.status=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),!!e&&this._manager.status(e)},this.on=t=>{const e=(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t?t:this._collector.getKey(t)));return this._manager.on(e)},this.off=t=>{const e=(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t?t:this._collector.getKey(t)));return this._manager.off(e)},this.get=(t=this._mainConfig)=>{let e;return e="object"==typeof t?this._collector.getKey(t):t,this._manager.get(e)},this.getMany=(t=this._collector.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._resolver.attr(t||this._collector.getKey(this._mainConfig)),this.subscribe=t=>this._manager.registerNode(t),this.unsubscribe=t=>this._manager.unregisterNode(t)}connectedCallback(){this._resolver=(t=>{const{mode:e}=t,s=t=>Object.entries(t).reduce(((t,[e,s])=>(void 0!==s&&t.push(e+(s?"-"+s:"")),t)),[]).join(" "),i=(t,e)=>Object.defineProperties({[t]:e},{k:{value:t},v:{value:e}}),r=(...t)=>"--"+t.join("-"),n=(...t)=>t.join("-");return"c"===e?{selector:({b:t,e:e,m:s,mv:i})=>`.${t}${(e?"__"+e:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")}`,attr:t=>e=>r=>{let n=r||"";ua(n)&&(n=s(n));const o=t+(e?"__"+e:"");return n=o+(n?" "+(null==n?void 0:n.split(" ").map((t=>o+"_"+t.split("-").join("_"))).join(" ")):""),i("class",n)},varName:r,kfName:n}:{selector:({b:t,e:e,m:s,mv:i})=>`[data-${t}${e?"-"+e:""}${s?'~="'+(s||"")+(i?"-"+i:"")+'"':""}]`,attr:t=>e=>r=>{const n=`data-${t}${e?"-"+e:""}`;let o=r||"";return ua(o)&&(o=s(o)),i(n,o)},varName:r,kfName:n}})({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=(s={hydrate:this.hydrate,prefix:e,initContent:t},new da(s)),this._processor=function(t){return new h(t)}({sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver}),this._manager=new f;const i=t=>this.dispatchEvent(new CustomEvent(this.eventName,{detail:{styles:t},bubbles:!0}));this._notifier={set adoptedStyleSheets(t){i(t)}},this.subscribe(this._notifier),this.use(this._mainConfig),this.usePublic(t),ga&&!this.isolated&&this._manager.registerNode(ga)}})}();
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PREFIX as t,EVENT_NAME as e,SETTINGS_SCRIPT_ID as s,STYLES_SCRIPT_CLS as i,units as r,keys as n,sets as l,PROVIDER_TAG_NAME as o,mediaBP as h,containerBP as a,rootStyle as c,themes as u}from"./constants.js";import{createResolver as _,createCollector as d}from"./utils/common.js";const
|
|
1
|
+
import{PREFIX as t,EVENT_NAME as e,SETTINGS_SCRIPT_ID as s,STYLES_SCRIPT_CLS as i,units as r,keys as n,sets as l,PROVIDER_TAG_NAME as o,mediaBP as h,containerBP as a,rootStyle as c,themes as u}from"./constants.js";import{createResolver as _,createCollector as d}from"./utils/common.js";const y=Object.entries,p=(t,e,s)=>y(t).reduce(e,s),f=t=>"object"==typeof t,g=t=>`{${t}}`,m=Object.assign.bind(Object),v=(t,e)=>`${t}:${e};`,b=(t,e)=>["@property",t,g(v("syntax",e.syn||'"*"')+v("inherits",e.inh||!1)+(e.ini?v("initial-value",e.ini):""))].join(" "),S=t=>`var(${t})`,A=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,$=["l","c","h","a"];class j{constructor(t){this._outerKeys={},this._outerSets={},this._parseSelector=t=>{let e,s,i,r,n;return[e,n]=t.split(":"),e.startsWith("__")?[s,i,r]=e.slice(2).split("_"):[s,i,r]=e.split("_"),{e:s,m:i,mv:r,s:n}},this._prepareVarName=(...t)=>this._resolver.varName(...t),this._prepareKeyframesName=(...t)=>this._resolver.kfName(...t),this.compile=(t,e)=>{const{_:s,kf:i,k:r={},v:n={},c:l}=e,o=this._resolver.selector.bind(this),h=this._parseSelector;let a=m({},l),c=m({},r),u=m({_:{}},n),_="";if(s)for(let e in s){const i=s[e];if("c"===i.typ){const s={};$.forEach((r=>{const n=e+r,l=this._prepareVarName(t,n);s[r]=l,c["_"+n]=s[r],_+=b(l,i)})),u._[e]=A({l:S(s.l),c:S(s.c),h:S(s.h),a:S(s.a)}),i.all&&(a["_"+e+"l"]=`&lig=>${this._prepareVarName(t,e+"l")}:{1}`,a["_"+e+"c"]=`&chr=>${this._prepareVarName(t,e+"c")}:{1}`,a["_"+e+"h"]=`&hue=>${this._prepareVarName(t,e+"h")}:{1}`,a["_"+e+"a"]=`&alp=>${this._prepareVarName(t,e+"a")}:{1}`)}else{const s=this._prepareVarName(t,e);c["_"+e]=s,u._[e]=S(s),_+=b(s,i)}}const d=t=>c[t]||this._outerKeys[t],j=t=>{var e;return u[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},O=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=j(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+(d(s)||"")})),x=t=>{const e=t.split("?");let s;for(let t in e){const i=e[t],[r,n]=i.split("=>"),l=r.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[o,h,a]=l,c=j(h);if(!c)continue;s=c;let u=y(s);const _=null==a?void 0:a.slice(1,-1).split(",");if(_){const t=new Set(_);u=u.filter((([e,s])=>t.has(e)))}if(n){let[t,e]=n.split("|");void 0===e&&(e=t,t=""),u=u.map((([s,i])=>[t.replace("{0}",s)||s,O(e.replaceAll("{1}",""+i))]))}(_||n)&&(s=Object.fromEntries(u));break}return s};function N(e,s,i){var r,n,l,a;let c=""+e;if((null===(r=null==e?void 0:e.startsWith)||void 0===r?void 0:r.call(e,"$"))&&(c=""+d(e.slice(1)),!c))return"";if(Array.isArray(s))return N(c,Object.assign({},...s.map((t=>"string"==typeof t?x(t):t))),i);if(null==s)return"";if(f(s)){const e=!i||(null===(n=i.startsWith)||void 0===n?void 0:n.call(i,"@"))||c.startsWith("&")||c.startsWith("@")?"":"&";if(c.startsWith("_")){const{e:i,m:r,mv:n}=h(c);return r&&"string"!=typeof n?p(s,((s,[n,l])=>{let h;return h=f(l)?p(l,((t,e)=>t+N(...e,c)),""):l+";",s+e+o({b:t,e:i,m:r,mv:n})+g(h)}),""):e+o({b:t,e:i,m:r,mv:n})+g(p(s,((t,e)=>t+N(...e,c)),""))}return e+c+g(p(s,((t,e)=>t+N(...e,c)),""))}{let t=""+s;return(null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"&"))?N(c,x(t.slice(1)),i):(null===(a=null==t?void 0:t.includes)||void 0===a?void 0:a.call(t,"{"))?N(c,O(t),i):v(c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let k="";if(i)for(let e in i){const s=i[e],r=this._prepareKeyframesName(t,e);c["kf_"+e]=r,k+=`@keyframes ${r} `+g(p(s,((t,[e,s])=>t+e+(String(+e)===e?"%":"")+g(p(s,((t,e)=>t+N(...e)),""))),""))}return _+k+p(a,((t,e)=>t+N(...e)),"")};const{sets:e,keys:s,resolver:i}=t;this._resolver=i,s&&(this._outerKeys=s),e&&(this._outerSets=e)}}class O{constructor(){this._stylesheets={},this._rules={},this._styleSheetsArray=[],this._listeners=[],this.get=t=>this._stylesheets[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._stylesheets,this.add=(t,e)=>{if(!this._stylesheets[t])return this._stylesheets[t]=e,this._styleSheetsArray.push(e),this.notify(),!0},this.status=t=>{const e=t&&this._stylesheets[t];return!!e&&-1!==this._styleSheetsArray.findIndex((t=>t===e))},this.on=t=>{const e=(Array.isArray(t)?t:[t]).reduce(((t,e)=>{const s=e&&this._stylesheets[e];return!(!s||this.status(e))&&(this._styleSheetsArray.push(s),t)}),!0);return this.notify(),e},this.off=t=>{const e=(Array.isArray(t)?t:[t]).reduce(((t,e)=>{const s=e&&this._stylesheets[e];if(s&&this.status(e)){const e=this._styleSheetsArray.findIndex((t=>t===s));return this._styleSheetsArray.splice(e,1),t}return!1}),!0);return this.notify(),e},this.remove=t=>{const e=this.get(t);if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[t],delete this._rules[t]),this.notify(),!0},this.pack=(t,e)=>{const s=new CSSStyleSheet;if(s.replaceSync(e),s.cssRules.length)return this.add(t,s);console.log(`StyleSheet '${t}' is empty`)},this.replace=(t,e)=>{const s=this._stylesheets[t];if(s)return s.replaceSync(e),this.notify(),!0},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{this._listeners.findIndex((e=>e.deref()===t))>=0||(this._listeners.push(new WeakRef(t)),this.apply(t))},this.unregisterNode=t=>{const e=this._listeners.findIndex((e=>e.deref()===t));e>=0&&this._listeners.splice(e,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((t,e)=>{const s=e.deref();return s&&(this.apply(s),t.push(e)),t}),[])}}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this.notify(),!0}}const x=globalThis.document,N=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));function k(y={}){const{name:p=o,styles:f={},settings:g={}}=y,m=globalThis.customElements;return!(null==m?void 0:m.get(p))&&(m.define(p,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||t}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get eventName(){return this.getAttribute("eventname")||e}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||s)}get _initSelector(){return"."+(this.getAttribute("initcls")||i)}get settingsContent(){const t=null==x?void 0:x.querySelector(this._settingsSelector);let e;return e=N(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:g,e||{}}get initContent(){const t=x.querySelectorAll(this._initSelector);let e=f||{};return t.forEach((t=>{let s;s=N(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):null==t?void 0:t.effcss,e=Object.assign(Object.assign({},e),s||{})})),e}get configs(){return this._collector.getConfigs()}constructor(){super(),this._setState=()=>{const{units:t,keys:e,sets:s,mediaBP:i=h,containerBP:o=a,rootStyle:_=c,themes:d=u}=this.settingsContent,y=Object.assign(Object.assign({},r),t||{}),f=Object.assign(Object.assign({},n),e||{}),g=Object.assign({},l);s&&Object.entries(s).forEach((([t,e])=>g[t]=Object.assign({},e)));const m=Object.entries(d);if(y)for(const t in y)g[t]=g[t]&&Object.fromEntries(Object.entries(g[t]).map((([e,s])=>[e,y[t].replace("{1}",""+s)])));i&&Object.entries(i).forEach((([t,e])=>{f[`min_${t}_`]=`@media (min-width:${e})`,f[`max_${t}_`]=`@media (max-width:${e})`})),o&&Object.entries(o).forEach((([t,e])=>{f[`cmin_${t}_`]=`@container (min-width:${e})`,f[`cmax_${t}_`]=`@container (max-width:${e})`}));const v={},b={};d&&g&&m.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{var r;const n=this._resolver.varName(this.prefix,t,e);y[t]?s[n]=y[t].replace("{1}",""+i):s[n]=i,v[n]||(v[n]=(null===(r=g[t])||void 0===r?void 0:r[e])||"unset",g[t]||(g[t]={}),g[t][e]=`var(${n})`)}))})),b[t]=s})),this._dict={sets:g,keys:f},this._mainConfig={c:Object.assign(Object.assign({[p]:{display:"contents"},_theme:b,$$:Object.assign(v,_)},(null==b?void 0:b.dark)?{$$dark:{$$:b.dark}}:{}),(null==b?void 0:b.light)?{$$light:{$$:b.light}}:{})}},this.use=(t,e)=>{let s=this._collector.use(t,e);return this._manager&&!this._manager.has(e)&&this._manager.pack(s,this.css(t,s)),this.resolve(s)},this.alter=(t,e)=>{let s;if(s="string"==typeof t?t:this._collector.getKey(t),s){const t=this._collector.mutate(s,e);this._manager.replace(s,this.css(t,s))}return this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,e)=>{var s;return null===(s=this._processor)||void 0===s?void 0:s.compile(e,t)},this.status=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),!!e&&this._manager.status(e)},this.on=t=>{const e=(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t?t:this._collector.getKey(t)));return this._manager.on(e)},this.off=t=>{const e=(Array.isArray(t)?t:[t]).map((t=>"string"==typeof t?t:this._collector.getKey(t)));return this._manager.off(e)},this.get=(t=this._mainConfig)=>{let e;return e="object"==typeof t?this._collector.getKey(t):t,this._manager.get(e)},this.getMany=(t=this._collector.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._resolver.attr(t||this._collector.getKey(this._mainConfig)),this.subscribe=t=>this._manager.registerNode(t),this.unsubscribe=t=>this._manager.unregisterNode(t)}connectedCallback(){this._resolver=_({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=d({hydrate:this.hydrate,prefix:e,initContent:t}),this._processor=(s={sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver},new j(s)),this._manager=new O;const i=t=>this.dispatchEvent(new CustomEvent(this.eventName,{detail:{styles:t},bubbles:!0}));this._notifier={set adoptedStyleSheets(t){i(t)}},this.subscribe(this._notifier),this.use(this._mainConfig),this.usePublic(t),x&&!this.isolated&&this._manager.registerNode(x)}}),!0)}export{k as defineProvider};
|
|
@@ -144,12 +144,12 @@ export interface IStyleManager {
|
|
|
144
144
|
* Switch stylesheet on
|
|
145
145
|
* @param key - stylesheet key
|
|
146
146
|
*/
|
|
147
|
-
on(key?: string): boolean | undefined;
|
|
147
|
+
on(key?: string | (string | undefined)[]): boolean | undefined;
|
|
148
148
|
/**
|
|
149
149
|
* Switch stylesheet off
|
|
150
150
|
* @param key - stylesheet key
|
|
151
151
|
*/
|
|
152
|
-
off(key?: string): boolean | undefined;
|
|
152
|
+
off(key?: string | (string | undefined)[]): boolean | undefined;
|
|
153
153
|
/**
|
|
154
154
|
* Apply stylesheets to style consumer
|
|
155
155
|
* @param consumer - {@link TStyleConsumer | style consumer}
|
|
@@ -366,15 +366,15 @@ export interface IStyleProvider {
|
|
|
366
366
|
*/
|
|
367
367
|
get(target?: TStyleTarget): CSSStyleSheet | undefined;
|
|
368
368
|
/**
|
|
369
|
-
* Switch stylesheet on
|
|
369
|
+
* Switch stylesheet/stylesheets on
|
|
370
370
|
* @param target - target stylesheet config or key
|
|
371
371
|
*/
|
|
372
|
-
on(target?: TStyleTarget): boolean | undefined;
|
|
372
|
+
on(target?: TStyleTarget | TStyleTarget[]): boolean | undefined;
|
|
373
373
|
/**
|
|
374
|
-
* Switch stylesheet off
|
|
374
|
+
* Switch stylesheet/stylesheets off
|
|
375
375
|
* @param target - target stylesheet config or key
|
|
376
376
|
*/
|
|
377
|
-
off(target?: TStyleTarget): boolean | undefined;
|
|
377
|
+
off(target?: TStyleTarget | TStyleTarget[]): boolean | undefined;
|
|
378
378
|
/**
|
|
379
379
|
* Check if stylesheet is on
|
|
380
380
|
* @param target - target stylesheet config or key
|