New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stylis

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylis - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## 1.1.6 (February 16, 2016)
- patch `@media {}` in nested block
- patch column and line number in nested block
## 1.1.5 (February 16, 2016)

@@ -2,0 +7,0 @@

2

package.json

@@ -5,3 +5,3 @@ {

"description": "stylis is a feature-rich css preprocessor",
"version": "1.1.5",
"version": "1.1.6",
"homepage": "https://github.com/thysultan/stylis.js",

@@ -8,0 +8,0 @@ "license": "MIT",

@@ -34,3 +34,3 @@ # STYLIS

```html
<script src=https://unpkg.com/stylis@1.1.5/stylis.min.js></script>
<script src=https://unpkg.com/stylis@1.1.6/stylis.min.js></script>
```

@@ -37,0 +37,0 @@

@@ -52,2 +52,3 @@ /*

var char;
var chars;
var attr;

@@ -61,3 +62,3 @@ var animns;

// `[data-id=namespace]` -> ['data-id', 'namespace']
attr = selector.substring(1, selector.length-1).split('=');
attr = selector.substring(1, selector.length - 1).split('=');
char = (namespace = attr[1]).charCodeAt(0);

@@ -68,3 +69,3 @@

if (char === 34 || char === 39) {
namespace = namespace.substring(1, namespace.length-1);
namespace = namespace.substring(1, namespace.length - 1);
}

@@ -141,2 +142,4 @@

var sel;
var blob;
var nest;

@@ -158,5 +161,3 @@ // variables

var buff = '';
var blob = '';
var blck = '';
var nest = '';
var flat = '';

@@ -171,6 +172,7 @@

var closed = 0;
var strings = 0;
var nested = 0;
var func = 0;
var glob = 0;
var medias = 0;
var strings = 0;

@@ -304,4 +306,9 @@ // context(flat) signatures

caret++;
column++;
media = '';
if (media === void 0) {
media = '';
}
temp = '';
inner = '';

@@ -332,2 +339,5 @@ selectors = prev.split(',');

inner += styles.charAt(caret++);
// move column and line position
column = (char === 13 || char === 10) ? (line++, 0) : column + 1;
}

@@ -339,3 +349,3 @@

// build media block
media += stylis(
temp += stylis(
// remove { on last selector

@@ -350,4 +360,5 @@ (i === length - 1 ? selector.substring(0, selector.length - 1) : selector).trim(),

media = buff + media + '}';
media += buff + temp + '}';
buff = '';
medias = 1;
type = 4;

@@ -383,3 +394,3 @@ }

// args passed to the mixin
var argsPassed = buff.substring(name.length+1, buff.length - 1).split(',');
var argsPassed = buff.substring(name.length + 1, buff.length - 1).split(',');

@@ -710,2 +721,3 @@ // args the mixin expects

caret++;
column++;

@@ -715,4 +727,4 @@ // inner content of block

var nestSelector = buff.substring(0, buff.length-1).split(',');
var prevSelector = prev.substring(0, prev.length-1).split(',');
var nestSelector = buff.substring(0, buff.length - 1).split(',');
var prevSelector = prev.substring(0, prev.length - 1).split(',');

@@ -742,2 +754,5 @@ // keep track of opening `{` and `}` occurrences

inner += styles.charAt(caret++);
// move column and line position
column = (char === 13 || char === 10) ? (line++, 0) : column + 1;
}

@@ -768,2 +783,6 @@

if (nest === void 0) {
nest = '';
}
// append nest, `\n` to avoid conflicts when the last line is a // line comment

@@ -882,3 +901,3 @@ nest += '\n' + prevSelector.join(',') + ' {'+inner+'}';

1.5,
j === length - 1 ? selector.substring(0, selector.length-1).trim() : selector,
j === length - 1 ? selector.substring(0, selector.length - 1).trim() : selector,
line,

@@ -1007,34 +1026,28 @@ column,

// add blck buffer to output
if (code === 125 && (type === 0 || type === 4)) {
// append if the block is not empty {}
if (blck.charCodeAt(blck.length - 2) !== 123) {
// middleware, block context
if (use && blck.length !== 0) {
temp = middleware(3, blck, line, column, prefix);
if (code === 125 && (type === 0 || type === 4)) {
chars = blck.charCodeAt(blck.length - 2);
if (temp != null) {
blck = temp;
}
}
if (type === 4) {
type = 0;
}
// append blck buffer
output += blck.trim();
if (media !== void 0 && media.length !== 0) {
blck = chars === 123 ? media : blck + media;
media = '';
chars = 0;
}
// nested @media
if (type === 4) {
// {, @
if (chars !== 123) {
// middleware, block context
if (use) {
temp = middleware(3, media, line, column, prefix);
temp = middleware(3, blck, line, column, prefix);
if (temp != null) {
media = temp;
blck = temp;
}
}
// reset
type = 0;
// concat nested @media block
output += media;
// append blck buffer
output += blck;
}

@@ -1044,3 +1057,3 @@

blck = '';
}
}
}

@@ -1047,0 +1060,0 @@ // build line by line

@@ -1,1 +0,1 @@

!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(global):"function"==typeof define&&define.amd?define(e(window)):window.stylis=e(window)}(function(e){"use strict";function r(e,t,i,l,n){e+="";var s,a,o,f,g,c="",u="",d=e.charCodeAt(0)||0;91===d?(a=e.substring(1,e.length-1).split("="),s=(u=a[1]).charCodeAt(0),34!==s&&39!==s||(u=u.substring(1,u.length-1)),c="["+a[0]+'="'+u+'"]'):u=35===d||46===d||62===d?(c=e).substring(1):c=e,d=0,void 0==i||i===!0?(i=!0,o=u):(o="",i=!1);var h=null!=n;h&&(g=(typeof n).charCodeAt(0),111===g?r.use(n,null):102!==g&&(h=!1)),0!==(f=r.plugins).length&&(n=1===f.length?f[0]:function(e,r,t,i){for(var l=r,n=0,s=f.length;n<s;n++)l=f[n](e,l,t,i,c)||l;return l!==r?l:void 0},h=!0);var b,p,v,A,x,m,C,y,O,k,w,j,E,R,z,N,F="-moz-",q="-ms-",B="-webkit-",D="",G="",H="",I="",J="",K=0,L=0,M=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0;h&&(m=n(0,t,re,ee,c),null!=m&&(t=m));for(var $=0,_=0,ee=0,re=1,te=t.length,ie="";$<te;){if(K=t.charCodeAt($),0!==Q||0!==T||0!==X||123!==K&&125!==K&&59!==K)if(13===K||10===K)1===Z&&(X=Z=0,D=D.substring(0,D.indexOf("//"))),ee=0,re++;else{if(9!==K)switch(D+=t.charAt($),K){case 34:Q=34===Q?0:39===Q?39:34;break;case 39:Q=39===Q?0:34===Q?34:39;break;case 40:0===Q&&(T=1);break;case 41:0===Q&&(T=0);break;case 47:0===Q&&0===T&&(0===Y&&47===t.charCodeAt($-1)?X=Z=1:42===t.charCodeAt($-1)&&(X=Y=0,D=D.substring(0,D.indexOf("/*"))));break;case 42:0===Q&&0===T&&0===Z&&0===Y&&47===t.charCodeAt($-1)&&(X=Y=1)}ee++}else{if(D+=t.charAt($),O=D.charCodeAt(0),32===O&&(O=(D=D.trim()).charCodeAt(0)),k=D.charCodeAt(1)||0,w=D.charCodeAt(2)||0,h&&125!==K&&(m=123===K?n(1,D.substring(0,D.length-1).trim(),re,ee,c):n(2,D,re,ee,c),null!=m&&(D=123===K?m+" {":m)),64===O){if(1===V&&0!==J.length&&(V=0,J=c+" {"+J+"}",h&&(m=n(4,J,re,ee,c),null!=m&&(J=m)),ie+=J,J=""),59!==K)if(107===k||103===k)107===k?(G=D.substring(1,11)+(0===U?o:"")+D.substring(11),D="@"+B+G,d=1):(U=1,D="");else if(109===k)if(l===!0&&105===w)void 0===z&&(z={}),G=(N=D.substring(7,D.indexOf("{"))+" ").trim(),N=N.substring(0,N.indexOf(" ")).trim(),z[N]={key:G.trim(),body:""},d=3,D="",G="";else if(101===w)if(0!==_){for($++,x="",p="",v=C.split(","),P=1;$<te&&(s=t.charCodeAt($),123===s?P++:125===s&&P--,0!==P);)p+=t.charAt($++);for(var le=0,ne=v.length;le<ne;le++)e=v[le],x+=r((le===ne-1?e.substring(0,e.length-1):e).trim(),p,i,l,n);x=D+x+"}",D="",d=4}else d=2;else d=6;if(105===k){if(l===!0&&110===w)if(D=D.substring(9,D.length-1),y=D.indexOf("("),y!==-1){var se=D.substring(0,y),ae=z[se],oe=D.substring(se.length+1,D.length-1).split(","),fe=ae.key.replace(se,"").replace(/\(|\)/g,"").trim().split(",");D=ae.body;for(var le=0,ne=oe.length;le<ne;le++){var ge=fe[le].trim();void 0!==ge&&(D=D.replace(new RegExp("var\\(~~"+ge+"\\)","g"),oe[le].trim()))}t+=D,te+=D.length,D=""}else D=z[D].body,0===_&&(t+=D,te+=D.length,D="");else if(109===w&&h){var ce=/@import.*?(["'`][^\.\n\r]*?["'`];|["'`][^:\r\n]*?\.[^c].*?["'`])/g.exec(D);null!==ce&&(D=n(5,ce[1].replace(/['"; ]/g,""),re,ee,c)||"",D&&(t=t.substring(0,$+1)+D+t.substring($+1),te+=D.length),D="")}}else 4!==d&&59!==K&&(107!==k&&103!==k&&109!==k&&(d=5),M=-1,L++)}else if(l===!0&&126===O&&126===k&&59===K&&(b=D.indexOf(":"))!==-1)void 0===R&&(E=[],R=0),E[R++]=[D.substring(0,b),D.substring(b+1,D.length-1).trim()],D="";else{if(97===O&&110===k&&105===w){if(D=D.substring(0,D.length-1),b=D.indexOf(":")+1,A=D.substring(0,b),i===!0&&45!==(D.charCodeAt(9)||0))for(var ue=D.substring(b).trim().split(","),de=0,ne=ue.length;de<ne;de++){for(var he=ue[de],be=he.split(" "),pe=0,ve=be.length;pe<ve;pe++){var Ae=be[pe].trim(),xe=Ae.charCodeAt(0),me=Ae.charCodeAt(2),Ce=Ae.length,ye=Ae.charCodeAt(Ce-1);41===ye||0===Ce||105===xe&&102===me&&101===ye&&8===Ce||108===xe&&110===me&&114===ye&&6===Ce||97===xe&&116===me&&101===ye&&(9===Ce||17===Ce)||110===xe&&114===me&&108===ye&&6===Ce||98===xe&&99===me&&115===ye&&9===Ce||102===xe&&114===me&&115===ye&&8===Ce||98===xe&&116===me&&104===ye&&4===Ce||110===xe&&110===me&&101===ye&&4===Ce||114===xe&&110===me&&103===ye&&7===Ce||112===xe&&117===me&&100===ye&&6===Ce||114===xe&&118===me&&100===ye&&8===Ce||115===xe&&101===me&&(116===ye&&10===Ce||100===ye&&8===Ce)||101===xe&&115===me&&(101===ye&&4===Ce||(11===Ce||7===Ce||8===Ce)&&45===Ae.charCodeAt(4))||!isNaN(parseFloat(Ae))||Ae.indexOf("(")!==-1||(be[pe]=o+Ae)}A+=(0===de?"":",")+be.join(" ").trim()}else A+=(110!==(D.charCodeAt(10)||0)?"":o)+D.substring(b).trim().trim();D=B+A+";"+A+";"}else if(97===O&&112===k&&112===w)D=B+D+F+D+D;else if(100===O&&105===k&&115===w)(y=D.indexOf("flex"))!==-1&&(m=101===D.charCodeAt(y-2)?"inline-":"",D="display: "+B+m+"box;display: "+B+m+"flex;display: "+q+"flexbox;display: "+m+"flex;");else if(116===O&&114===k&&97===w)D=B+D+(102===D.charCodeAt(5)?q+D:"")+D;else if(104===O&&121===k&&112===w||117===O&&115===k&&101===w)D=B+D+F+D+q+D+D;else if(102===O&&108===k&&101===w)D=B+D+q+D+D;else if(111===O&&114===k&&100===w)D=B+D+q+"flex-"+D+D;else if(97===O&&108===k&&105===w&&45===(D.charCodeAt(5)||0))switch(D.charCodeAt(6)||0){case 105:m=D.replace("-items",""),D=B+"box-"+m+q+"flex-"+m+D;break;case 115:D=q+"flex-item-"+D.replace("-self","")+D;break;default:D=q+"flex-line-pack"+D.replace("align-content","")+D}else if(99===O&&117===k&&114===w&&null!==/zoo|gra/.exec(D))D=D.replace(/: +/g,": "+B)+D.replace(/: +/g,": "+F)+D;else if(123===K)if(_++,1===V&&0!==J.length&&(V=0,J=c+" {"+J+"}",h&&(m=n(4,J,re,ee,c),null!=m&&(J=m)),ie+=J,J=""),2===_){$++,p="";var Oe=D.substring(0,D.length-1).split(","),ke=C.substring(0,C.length-1).split(",");for(P=1;$<te&&(s=t.charCodeAt($),123===s?P++:125===s&&P--,0!==P);)p+=t.charAt($++);for(var de=0,ne=ke.length;de<ne;de++){m=ke[de],ke[de]="";for(var pe=0,ve=Oe.length;pe<ve;pe++)e=m.replace(c,"&").trim(),j=Oe[pe].trim(),e=j.indexOf(" &")>0?j.replace("&","").trim()+" "+e:e+" "+j,ke[de]+=e.replace(/ +&/,"").trim()+(pe===ve-1?"":",")}I+="\n"+ke.join(",")+" {"+p+"}",S=1,D="",_--}else if(0!==U||0!==L&&2!==d)C=D;else{v=D.split(","),A="";for(var de=0,ne=v.length;de<ne;de++){var we=(e=v[de]).charCodeAt(0);if(32===we&&(we=(e=e.trim()).charCodeAt(0)),91===we&&e.indexOf("]")===-1)for(var pe=de+1,ve=ne;pe<ve;pe++){var je=(e+=","+v[pe]).trim();if(je.indexOf("]")!==-1){ne-=pe,v.splice(de,pe);break}}if(38===we)e=38===e.charCodeAt(1)?e.replace(/&/g,c):c+e.substring(1);else if((y=e.indexOf(" &"))>0&&(we=58,e=":global("+e.substring(0,y)+")"+e.substring(y)),58===we){var Ee=e.charCodeAt(1);if(104===Ee&&116===e.charCodeAt(4)){var Re=(e=e.substring(5)).charCodeAt(0);40===Re?e=c+e.substring(1).replace(")",""):45===Re?(y=e.indexOf(")"),e=e.substring(9,y)+" "+c+e.substring(y+1)):e=c+e}else e=103===Ee?e.substring(8).replace(")","").replace("&",c):c+e}else e=c+" "+e;h&&(m=n(1.5,de===ne-1?e.substring(0,e.length-1).trim():e,re,ee,c),null!=m&&(e=de===ne-1?m+" {":m)),A+=0===de?e:","+e}C=D=A}else 125===K&&(0!==_&&_--,0===_&&1===S&&(t=t.substring(0,$+1)+I+t.substring($+1),te+=I.length,I="",S=0,M++));0!==L?(125===K?M++:123===K&&0!==M&&M--,1!==W||123!==K&&0!==M||0===J.length||(W=0,D=c+" {"+J+"}"+D,J=""),0===M?(0===d?(U=0,D=""):1===d?(D="}@"+G+"}",G=""):3===d&&(z[N].body=G,N="",D="",G=""),d=0,M--,L--):1===d||3===d?(G+=D,3===d&&(D="")):2===d&&0===_&&(125!==K&&(0===W&&(J=""),J+=D,D=""),W=1)):0===_&&125!==K&&(V=1,J=void 0===J?D:J+D,D="")}H+=D,D="",125!==K||0!==d&&4!==d||(123!==H.charCodeAt(H.length-2)&&(h&&0!==H.length&&(m=n(3,H,re,ee,c),null!=m&&(H=m)),ie+=H.trim()),4===d&&(h&&(m=n(3,x,re,ee,c),null!=m&&(x=m)),d=0,ie+=x),H="")}$++}if(void 0!==J&&0!==J.length&&(J=c+" {"+J+"}",h&&(m=n(4,J,re,ee,c),null!=m&&(J=m)),ie+=J),l&&void 0!==E)for(var le=0;le<R;le++)ie=ie.replace(new RegExp("var\\("+E[le][0]+"\\)","g"),E[le][1]);return h&&(m=n(6,ie,re,ee,c),null!=m&&(ie=m)),ie}return r.use=function(e,t){var i=r.plugins,l=i.length;if(null==t&&(t=e,e=void 0),null!=t)if(t.constructor===Object)for(var n in t)r.use(n,t[n]);else if(t.constructor===Array)for(var s=0,a=t.length;s<a;s++)i[l++]=t[s];else if(null==e)i[l]=t;else{var o=e instanceof RegExp?e:new RegExp(e+"\\([ \\t\\r\\n]*([^\\0]*?)[ \\t\\r\\n]*\\)","g"),f=/[ \t\r\n]*,[ \t\r\n]*/g;i[l]=function(e,r,i,l){if(6===e)return r=r.replace(o,function(e,r){var i=r.replace(f,",").split(","),l=t.apply(null,i);return null!=l?l:e})}}return r},r.plugins=[],r});
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(global):"function"==typeof define&&define.amd?define(e(window)):window.stylis=e(window)}(function(e){"use strict";function r(e,t,i,l,n){e+="";var s,a,o,f,g,c,u="",d="",h=e.charCodeAt(0)||0;91===h?(o=e.substring(1,e.length-1).split("="),s=(d=o[1]).charCodeAt(0),34!==s&&39!==s||(d=d.substring(1,d.length-1)),u="["+o[0]+'="'+d+'"]'):d=35===h||46===h||62===h?(u=e).substring(1):u=e,h=0,void 0==i||i===!0?(i=!0,f=d):(f="",i=!1);var b=null!=n;b&&(c=(typeof n).charCodeAt(0),111===c?r.use(n,null):102!==c&&(b=!1)),0!==(g=r.plugins).length&&(n=1===g.length?g[0]:function(e,r,t,i){for(var l=r,n=0,s=g.length;n<s;n++)l=g[n](e,l,t,i,u)||l;return l!==r?l:void 0},b=!0);var p,v,A,x,m,C,y,O,k,w,j,E,R,z,N,F,q,B,D="-moz-",G="-ms-",H="-webkit-",I="",J="",K="",L=0,M=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0;b&&(C=n(0,t,ie,te,u),null!=C&&(t=C));for(var ee=0,re=0,te=0,ie=1,le=t.length,ne="";ee<le;){if(L=t.charCodeAt(ee),0!==W||0!==T||0!==Z||123!==L&&125!==L&&59!==L)if(13===L||10===L)1===_&&(Z=_=0,I=I.substring(0,I.indexOf("//"))),te=0,ie++;else{if(9!==L)switch(I+=t.charAt(ee),L){case 34:W=34===W?0:39===W?39:34;break;case 39:W=39===W?0:34===W?34:39;break;case 40:0===W&&(T=1);break;case 41:0===W&&(T=0);break;case 47:0===W&&0===T&&(0===$&&47===t.charCodeAt(ee-1)?Z=_=1:42===t.charCodeAt(ee-1)&&(Z=$=0,I=I.substring(0,I.indexOf("/*"))));break;case 42:0===W&&0===T&&0===_&&0===$&&47===t.charCodeAt(ee-1)&&(Z=$=1)}te++}else{if(I+=t.charAt(ee),k=I.charCodeAt(0),32===k&&(k=(I=I.trim()).charCodeAt(0)),w=I.charCodeAt(1)||0,j=I.charCodeAt(2)||0,b&&125!==L&&(C=123===L?n(1,I.substring(0,I.length-1).trim(),ie,te,u):n(2,I,ie,te,u),null!=C&&(I=123===L?C+" {":C)),64===k){if(1===X&&0!==K.length&&(X=0,K=u+" {"+K+"}",b&&(C=n(4,K,ie,te,u),null!=C&&(K=C)),ne+=K,K=""),59!==L)if(107===w||103===w)107===w?(R=I.substring(1,11)+(0===U?f:"")+I.substring(11),I="@"+H+R,h=1):(U=1,I="");else if(109===w)if(l===!0&&105===j)void 0===q&&(q={}),R=(B=I.substring(7,I.indexOf("{"))+" ").trim(),B=B.substring(0,B.indexOf(" ")).trim(),q[B]={key:R.trim(),body:""},h=3,I="",R="";else if(101===j)if(0!==re){for(ee++,te++,void 0===m&&(m=""),C="",v="",A=y.split(","),Q=1;ee<le&&(s=t.charCodeAt(ee),123===s?Q++:125===s&&Q--,0!==Q);)v+=t.charAt(ee++),te=13===s||10===s?(ie++,0):te+1;for(var se=0,ae=A.length;se<ae;se++)e=A[se],C+=r((se===ae-1?e.substring(0,e.length-1):e).trim(),v,i,l,n);m+=I+C+"}",I="",V=1,h=4}else h=2;else h=6;if(105===w){if(l===!0&&110===j)if(I=I.substring(9,I.length-1),O=I.indexOf("("),O!==-1){var oe=I.substring(0,O),fe=q[oe],ge=I.substring(oe.length+1,I.length-1).split(","),ce=fe.key.replace(oe,"").replace(/\(|\)/g,"").trim().split(",");I=fe.body;for(var se=0,ae=ge.length;se<ae;se++){var ue=ce[se].trim();void 0!==ue&&(I=I.replace(new RegExp("var\\(~~"+ue+"\\)","g"),ge[se].trim()))}t+=I,le+=I.length,I=""}else I=q[I].body,0===re&&(t+=I,le+=I.length,I="");else if(109===j&&b){var de=/@import.*?(["'`][^\.\n\r]*?["'`];|["'`][^:\r\n]*?\.[^c].*?["'`])/g.exec(I);null!==de&&(I=n(5,de[1].replace(/['"; ]/g,""),ie,te,u)||"",I&&(t=t.substring(0,ee+1)+I+t.substring(ee+1),le+=I.length),I="")}}else 4!==h&&59!==L&&(107!==w&&103!==w&&109!==w&&(h=5),P=-1,M++)}else if(l===!0&&126===k&&126===w&&59===L&&(p=I.indexOf(":"))!==-1)void 0===F&&(N=[],F=0),N[F++]=[I.substring(0,p),I.substring(p+1,I.length-1).trim()],I="";else{if(97===k&&110===w&&105===j){if(I=I.substring(0,I.length-1),p=I.indexOf(":")+1,x=I.substring(0,p),i===!0&&45!==(I.charCodeAt(9)||0))for(var he=I.substring(p).trim().split(","),be=0,ae=he.length;be<ae;be++){for(var pe=he[be],ve=pe.split(" "),Ae=0,xe=ve.length;Ae<xe;Ae++){var me=ve[Ae].trim(),Ce=me.charCodeAt(0),ye=me.charCodeAt(2),Oe=me.length,ke=me.charCodeAt(Oe-1);41===ke||0===Oe||105===Ce&&102===ye&&101===ke&&8===Oe||108===Ce&&110===ye&&114===ke&&6===Oe||97===Ce&&116===ye&&101===ke&&(9===Oe||17===Oe)||110===Ce&&114===ye&&108===ke&&6===Oe||98===Ce&&99===ye&&115===ke&&9===Oe||102===Ce&&114===ye&&115===ke&&8===Oe||98===Ce&&116===ye&&104===ke&&4===Oe||110===Ce&&110===ye&&101===ke&&4===Oe||114===Ce&&110===ye&&103===ke&&7===Oe||112===Ce&&117===ye&&100===ke&&6===Oe||114===Ce&&118===ye&&100===ke&&8===Oe||115===Ce&&101===ye&&(116===ke&&10===Oe||100===ke&&8===Oe)||101===Ce&&115===ye&&(101===ke&&4===Oe||(11===Oe||7===Oe||8===Oe)&&45===me.charCodeAt(4))||!isNaN(parseFloat(me))||me.indexOf("(")!==-1||(ve[Ae]=f+me)}x+=(0===be?"":",")+ve.join(" ").trim()}else x+=(110!==(I.charCodeAt(10)||0)?"":f)+I.substring(p).trim().trim();I=H+x+";"+x+";"}else if(97===k&&112===w&&112===j)I=H+I+D+I+I;else if(100===k&&105===w&&115===j)(O=I.indexOf("flex"))!==-1&&(C=101===I.charCodeAt(O-2)?"inline-":"",I="display: "+H+C+"box;display: "+H+C+"flex;display: "+G+"flexbox;display: "+C+"flex;");else if(116===k&&114===w&&97===j)I=H+I+(102===I.charCodeAt(5)?G+I:"")+I;else if(104===k&&121===w&&112===j||117===k&&115===w&&101===j)I=H+I+D+I+G+I+I;else if(102===k&&108===w&&101===j)I=H+I+G+I+I;else if(111===k&&114===w&&100===j)I=H+I+G+"flex-"+I+I;else if(97===k&&108===w&&105===j&&45===(I.charCodeAt(5)||0))switch(I.charCodeAt(6)||0){case 105:C=I.replace("-items",""),I=H+"box-"+C+G+"flex-"+C+I;break;case 115:I=G+"flex-item-"+I.replace("-self","")+I;break;default:I=G+"flex-line-pack"+I.replace("align-content","")+I}else if(99===k&&117===w&&114===j&&null!==/zoo|gra/.exec(I))I=I.replace(/: +/g,": "+H)+I.replace(/: +/g,": "+D)+I;else if(123===L)if(re++,1===X&&0!==K.length&&(X=0,K=u+" {"+K+"}",b&&(C=n(4,K,ie,te,u),null!=C&&(K=C)),ne+=K,K=""),2===re){ee++,te++,v="";var we=I.substring(0,I.length-1).split(","),je=y.substring(0,y.length-1).split(",");for(Q=1;ee<le&&(s=t.charCodeAt(ee),123===s?Q++:125===s&&Q--,0!==Q);)v+=t.charAt(ee++),te=13===s||10===s?(ie++,0):te+1;for(var be=0,ae=je.length;be<ae;be++){C=je[be],je[be]="";for(var Ae=0,xe=we.length;Ae<xe;Ae++)e=C.replace(u,"&").trim(),E=we[Ae].trim(),e=E.indexOf(" &")>0?E.replace("&","").trim()+" "+e:e+" "+E,je[be]+=e.replace(/ +&/,"").trim()+(Ae===xe-1?"":",")}void 0===z&&(z=""),z+="\n"+je.join(",")+" {"+v+"}",S=1,I="",re--}else if(0!==U||0!==M&&2!==h)y=I;else{A=I.split(","),x="";for(var be=0,ae=A.length;be<ae;be++){var Ee=(e=A[be]).charCodeAt(0);if(32===Ee&&(Ee=(e=e.trim()).charCodeAt(0)),91===Ee&&e.indexOf("]")===-1)for(var Ae=be+1,xe=ae;Ae<xe;Ae++){var Re=(e+=","+A[Ae]).trim();if(Re.indexOf("]")!==-1){ae-=Ae,A.splice(be,Ae);break}}if(38===Ee)e=38===e.charCodeAt(1)?e.replace(/&/g,u):u+e.substring(1);else if((O=e.indexOf(" &"))>0&&(Ee=58,e=":global("+e.substring(0,O)+")"+e.substring(O)),58===Ee){var ze=e.charCodeAt(1);if(104===ze&&116===e.charCodeAt(4)){var Ne=(e=e.substring(5)).charCodeAt(0);40===Ne?e=u+e.substring(1).replace(")",""):45===Ne?(O=e.indexOf(")"),e=e.substring(9,O)+" "+u+e.substring(O+1)):e=u+e}else e=103===ze?e.substring(8).replace(")","").replace("&",u):u+e}else e=u+" "+e;b&&(C=n(1.5,be===ae-1?e.substring(0,e.length-1).trim():e,ie,te,u),null!=C&&(e=be===ae-1?C+" {":C)),x+=0===be?e:","+e}y=I=x}else 125===L&&(0!==re&&re--,0===re&&1===S&&(t=t.substring(0,ee+1)+z+t.substring(ee+1),le+=z.length,z="",S=0,P++));0!==M?(125===L?P++:123===L&&0!==P&&P--,1!==Y||123!==L&&0!==P||0===K.length||(Y=0,I=u+" {"+K+"}"+I,K=""),0===P?(0===h?(U=0,I=""):1===h?(I="}@"+R+"}",R=""):3===h&&(q[B].body=R,B="",I="",R=""),h=0,P--,M--):1===h||3===h?(R+=I,3===h&&(I="")):2===h&&0===re&&(125!==L&&(0===Y&&(K=""),K+=I,I=""),Y=1)):0===re&&125!==L&&(X=1,K=void 0===K?I:K+I,I="")}J+=I,I="",125!==L||0!==h&&4!==h||(a=J.charCodeAt(J.length-2),4===h&&(h=0),void 0!==m&&0!==m.length&&(J=123===a?m:J+m,m="",a=0),123!==a&&(b&&(C=n(3,J,ie,te,u),null!=C&&(J=C)),ne+=J),J="")}ee++}if(void 0!==K&&0!==K.length&&(K=u+" {"+K+"}",b&&(C=n(4,K,ie,te,u),null!=C&&(K=C)),ne+=K),l&&void 0!==N)for(var se=0;se<F;se++)ne=ne.replace(new RegExp("var\\("+N[se][0]+"\\)","g"),N[se][1]);return b&&(C=n(6,ne,ie,te,u),null!=C&&(ne=C)),ne}return r.use=function(e,t){var i=r.plugins,l=i.length;if(null==t&&(t=e,e=void 0),null!=t)if(t.constructor===Object)for(var n in t)r.use(n,t[n]);else if(t.constructor===Array)for(var s=0,a=t.length;s<a;s++)i[l++]=t[s];else if(null==e)i[l]=t;else{var o=e instanceof RegExp?e:new RegExp(e+"\\([ \\t\\r\\n]*([^\\0]*?)[ \\t\\r\\n]*\\)","g"),f=/[ \t\r\n]*,[ \t\r\n]*/g;i[l]=function(e,r,i,l){if(6===e)return r=r.replace(o,function(e,r){var i=r.replace(f,",").split(","),l=t.apply(null,i);return null!=l?l:e})}}return r},r.plugins=[],r});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc