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