var e=`comm`,t=`rule`,n=`decl`,r=`@import`,i=`@namespace`,a=`@keyframes`,o=`@layer`,s=Math.abs,c=String.fromCharCode;function l(e){return e.trim()}function u(e,t,n){return e.replace(t,n)}function d(e,t,n){return e.indexOf(t,n)}function f(e,t){return e.charCodeAt(t)|0}function p(e,t,n){return e.slice(t,n)}function m(e){return e.length}function h(e){return e.length}function g(e,t){return t.push(e),e}var _=1,v=1,y=0,b=0,x=0,S=``;function C(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:_,column:v,length:o,return:``,siblings:s}}function w(){return x}function T(){return x=b>0?f(S,--b):0,v--,x===10&&(v=1,_--),x}function E(){return x=b<y?f(S,b++):0,v++,x===10&&(v=1,_++),x}function D(){return f(S,b)}function O(){return b}function k(e,t){return p(S,e,t)}function A(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function j(e){return _=v=1,y=m(S=e),b=0,[]}function M(e){return S=``,e}function N(e){return l(k(b-1,I(e===91?e+2:e===40?e+1:e)))}function P(e){for(;(x=D())&&x<33;)E();return A(e)>2||A(x)>3?``:` `}function F(e,t){for(;--t&&E()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return k(e,O()+(t<6&&D()==32&&E()==32))}function I(e){for(;E();)switch(x){case e:return b;case 34:case 39:e!==34&&e!==39&&I(x);break;case 40:e===41&&I(e);break;case 92:E();break}return b}function L(e,t){for(;E()&&e+x!==57&&!(e+x===84&&D()===47););return`/*`+k(t,b-1)+`*`+c(e===47?e:E())}function R(e){for(;!A(D());)E();return k(e,b)}function z(e){return M(B(``,null,null,null,[``],e=j(e),0,[0],e))}function B(e,t,n,r,i,a,o,l,h){for(var _=0,v=0,y=o,b=0,x=0,S=0,C=1,w=1,k=1,j=0,M=``,I=i,z=a,W=r,G=M;w;)switch(S=j,j=E()){case 40:if(S!=108&&f(G,y-1)==58){d(G+=u(N(j),`&`,`&\f`),`&\f`,s(_?l[_-1]:0))!=-1&&(k=-1);break}case 34:case 39:case 91:G+=N(j);break;case 9:case 10:case 13:case 32:G+=P(S);break;case 92:G+=F(O()-1,7);continue;case 47:switch(D()){case 42:case 47:g(H(L(E(),O()),t,n,h),h),(A(S||1)==5||A(D()||1)==5)&&m(G)&&p(G,-1,void 0)!==` `&&(G+=` `);break;default:G+=`/`}break;case 123*C:l[_++]=m(G)*k;case 125*C:case 59:case 0:switch(j){case 0:case 125:w=0;case 59+v:k==-1&&(G=u(G,/\f/g,``)),x>0&&(m(G)-y||C===0&&S===47)&&g(x>32?U(G+`;`,r,n,y-1,h):U(u(G,` `,``)+`;`,r,n,y-2,h),h);break;case 59:G+=`;`;default:if(g(W=V(G,t,n,_,v,i,l,M,I=[],z=[],y,a),a),j===123)if(v===0)B(G,t,W,W,I,a,y,l,z);else{switch(b){case 99:if(f(G,3)===110)break;case 108:if(f(G,2)===97)break;default:v=0;case 100:case 109:case 115:}v?B(e,W,W,r&&g(V(e,W,W,0,0,i,l,M,i,I=[],y,z),z),i,z,y,l,r?I:z):B(G,W,W,W,[``],z,0,l,z)}}_=v=x=0,C=k=1,M=G=``,y=o;break;case 58:y=1+m(G),x=S;default:if(C<1){if(j==123)--C;else if(j==125&&C++==0&&T()==125)continue}switch(G+=c(j),j*C){case 38:k=v>0?1:(G+=`\f`,-1);break;case 44:l[_++]=(m(G)-1)*k,k=1;break;case 64:D()===45&&(G+=N(E())),b=D(),v=y=m(M=G+=R(O())),j++;break;case 45:S===45&&m(G)==2&&(C=0)}}return a}function V(e,n,r,i,a,o,c,d,f,m,g,_){for(var v=a-1,y=a===0?o:[``],b=h(y),x=0,S=0,w=0;x<i;++x)for(var T=0,E=p(e,v+1,v=s(S=c[x])),D=e;T<b;++T)(D=l(S>0?y[T]+` `+E:u(E,/&\f/g,y[T])))&&(f[w++]=D);return C(e,n,r,a===0?t:d,f,m,g,_)}function H(t,n,r,i){return C(t,n,r,e,c(w()),p(t,2,-2),0,i)}function U(e,t,r,i,a){return C(e,t,r,n,p(e,0,i),p(e,i+1,-1),i,a)}function W(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function G(s,c,l,u){switch(s.type){case o:if(s.children.length)break;case r:case i:case n:return s.return=s.return||s.value;case e:return``;case a:return s.return=s.value+`{`+W(s.children,u)+`}`;case t:if(!m(s.value=s.props.join(`,`)))return``}return m(l=W(s.children,u))?s.return=s.value+`{`+l+`}`:``}export{G as n,z as r,W as t};