var e,t;function r(){if(t)return e;t=1;const r="'".charCodeAt(0),a='"'.charCodeAt(0),c="\\".charCodeAt(0),n="/".charCodeAt(0),o="\n".charCodeAt(0),s=" ".charCodeAt(0),d="\f".charCodeAt(0),i="\t".charCodeAt(0),h="\r".charCodeAt(0),l="[".charCodeAt(0),f="]".charCodeAt(0),A="(".charCodeAt(0),C=")".charCodeAt(0),u="{".charCodeAt(0),g="}".charCodeAt(0),k=";".charCodeAt(0),x="*".charCodeAt(0),b=":".charCodeAt(0),p="@".charCodeAt(0),w="$".charCodeAt(0),O=/[\t\n\f\r "#'()/;[\\\]{}]/g,I=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,m=/.[\n"'(/\\]/,v=/[\da-f]/i;return e=function(e,t={}){let U,_,q,E,F,S,T,$,j,y,z=e.css.valueOf(),B=t.ignoreErrors,D=t.interpolations||[],G=z.length,H=0,J=[],K=[];function L(t){throw e.error("Unclosed "+t,H)}return{back:function(e){K.push(e)},nextToken:function(e){if(K.length)return K.pop();if(H>=G)return;let t=!!e&&e.ignoreUnclosed;switch(U=z.charCodeAt(H),U){case o:case s:case i:case h:case d:_=H;do{_+=1,U=z.charCodeAt(_)}while(U===s||U===o||U===i||U===h||U===d);y=["space",z.slice(H,_)],H=_-1;break;case l:case f:case u:case g:case b:case k:case C:{let e=String.fromCharCode(U);y=[e,e,H];break}case A:if($=J.length>0?J.pop()[1]:"",j=z.charCodeAt(H+1),"url"===$&&j!==r&&j!==a&&j!==s&&j!==o&&j!==i&&j!==d&&j!==h){_=H;do{S=!1,_=z.indexOf(")",_+1);let e=D.find(e=>e.start<_&&_<e.end);if(e&&(_=z.indexOf(")",e.end)),-1===_){if(B||t){_=H;break}L("bracket")}for(T=_;z.charCodeAt(T-1)===c;)T-=1,S=!S}while(S);y=["brackets",z.slice(H,_+1),H,_],H=_}else _=z.indexOf(")",H+1),E=z.slice(H,_+1),-1===_||m.test(E)?y=["(","(",H]:(y=["brackets",E,H,_],H=_);break;case r:case a:q=U===r?"'":'"',_=H;do{if(S=!1,_=z.indexOf(q,_+1),-1===_){if(B||t){_=H+1;break}L("string")}for(T=_;z.charCodeAt(T-1)===c;)T-=1,S=!S}while(S);y=["string",z.slice(H,_+1),H,_],H=_;break;case p:O.lastIndex=H+1,O.test(z),_=0===O.lastIndex?z.length-1:O.lastIndex-2,y=["at-word",z.slice(H,_+1),H,_],H=_;break;case c:for(_=H,F=!0;z.charCodeAt(_+1)===c;)_+=1,F=!F;if(U=z.charCodeAt(_+1),F&&U!==n&&U!==s&&U!==o&&U!==i&&U!==h&&U!==d&&(_+=1,v.test(z.charAt(_)))){for(;v.test(z.charAt(_+1));)_+=1;z.charCodeAt(_+1)===s&&(_+=1)}y=["word",z.slice(H,_+1),H,_],H=_;break;default:if(U===w){let e=D.find(e=>e.start===H);e&&(_=e.end,y=["word",z.slice(H,_+1),H,_],J.push(y),H=_)}else if(U===n&&z.charCodeAt(H+1)===x)_=z.indexOf("*/",H+2)+1,0===_&&(B||t?_=z.length:L("comment")),y=["comment",z.slice(H,_+1),H,_],H=_;else{I.lastIndex=H+1,I.test(z),_=0===I.lastIndex?z.length-1:I.lastIndex-2;let e=D.find(e=>H<=e.start&&e.start<=_+1);e&&(_=e.end),y=["word",z.slice(H,_+1),H,_],J.push(y),H=_}}return H++,y},endOfFile:function(){return 0===K.length&&H>=G},position:function(){return H}}}}export{r as __require};