Socket
Socket
Sign inDemoInstall

jss

Package Overview
Dependencies
5
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.0.0 to 10.0.1

60

dist/jss.bundle.js

@@ -429,2 +429,3 @@ function _extends() {

this.key = void 0;
this.query = void 0;
this.rules = void 0;

@@ -434,3 +435,5 @@ this.options = void 0;

this.renderable = void 0;
this.key = key;
this.key = key; // Key might contain a unique suffix in case the `name` passed by user was duplicate.
this.query = options.name;
var atMatch = key.match(atRegExp);

@@ -492,7 +495,7 @@ this.at = atMatch ? atMatch[1] : 'unknown';

if (options.children === false) {
return this.key + " {}";
return this.query + " {}";
}
var children = this.rules.toString(options);
return children ? this.key + " {\n" + children + "\n}" : '';
return children ? this.query + " {\n" + children + "\n}" : '';
};

@@ -844,2 +847,3 @@

this.index = [];
this.counter = 0;
this.options = void 0;

@@ -861,3 +865,3 @@ this.classes = void 0;

_proto.add = function add(key, decl, ruleOptions) {
_proto.add = function add(name, decl, ruleOptions) {
var _this$options = this.options,

@@ -878,4 +882,14 @@ parent = _this$options.parent,

generateId: generateId,
scoped: scoped
}, ruleOptions); // We need to save the original decl before creating the rule
scoped: scoped,
name: name
}, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but
// `sheet.addRule()` opens the door for any duplicate rule name. When this happens
// we need to make the key unique within this RuleList instance scope.
var key = name;
if (name in this.raw) {
key = name + "-d" + this.counter++;
} // We need to save the original decl before creating the rule
// because cache plugin needs to use it as a key to return a cached rule.

@@ -887,3 +901,3 @@

if (key in this.classes) {
// For e.g. rules inside of @media container
// E.g. rules inside of @media container
options.selector = "." + escape(this.classes[key]);

@@ -915,3 +929,3 @@ }

delete this.raw[rule.key];
this.index.splice(this.indexOf(rule), 1);
this.index.splice(this.index.indexOf(rule), 1);
}

@@ -938,3 +952,3 @@ /**

/**
* Register a rule in `.map` and `.classes` maps.
* Register a rule in `.map`, `.classes` and `.keyframes` maps.
*/

@@ -992,6 +1006,6 @@ ;

if (name) {
this.onUpdate(data, this.get(name), options);
this.updateOne(this.map[name], data, options);
} else {
for (var index = 0; index < this.index.length; index++) {
this.onUpdate(data, this.index[index], options);
this.updateOne(this.index[index], data, options);
}

@@ -1005,3 +1019,3 @@ }

_proto.onUpdate = function onUpdate(data, rule, options) {
_proto.updateOne = function updateOne(rule, data, options) {
if (options === void 0) {

@@ -1087,2 +1101,4 @@ options = defaultUpdateOptions;

this.queue = void 0;
this.update = void 0;
this.updateOne = void 0;
this.attached = false;

@@ -1104,2 +1120,4 @@ this.deployed = false;

this.rules = new RuleList(this.options);
this.update = this.rules.update.bind(this.rules);
this.updateOne = this.rules.updateOne.bind(this.rules);

@@ -1215,3 +1233,3 @@ for (var name in styles) {

_proto.deleteRule = function deleteRule(name) {
var rule = this.rules.get(name);
var rule = typeof name === 'object' ? name : this.rules.get(name);
if (!rule) return false;

@@ -1245,14 +1263,2 @@ this.rules.remove(rule);

/**
* Update the function values with a new data.
*/
;
_proto.update = function update() {
var _this$rules;
(_this$rules = this.rules).update.apply(_this$rules, arguments);
return this;
}
/**
* Convert rules to a CSS string.

@@ -2018,3 +2024,3 @@ */

this.id = instanceCounter++;
this.version = "10.0.0";
this.version = "10.0.1";
this.plugins = new PluginsRegistry();

@@ -2116,2 +2122,3 @@ this.options = {

* Create a rule without a Style Sheet.
* [Deprecated] will be removed in the next major version.
*/

@@ -2135,2 +2142,3 @@ ;

var ruleOptions = _extends({}, options, {
name: name,
jss: this,

@@ -2137,0 +2145,0 @@ Renderer: this.options.Renderer

@@ -373,2 +373,3 @@ 'use strict';

this.key = void 0;
this.query = void 0;
this.rules = void 0;

@@ -378,3 +379,5 @@ this.options = void 0;

this.renderable = void 0;
this.key = key;
this.key = key; // Key might contain a unique suffix in case the `name` passed by user was duplicate.
this.query = options.name;
var atMatch = key.match(atRegExp);

@@ -436,7 +439,7 @@ this.at = atMatch ? atMatch[1] : 'unknown';

if (options.children === false) {
return this.key + " {}";
return this.query + " {}";
}
var children = this.rules.toString(options);
return children ? this.key + " {\n" + children + "\n}" : '';
return children ? this.query + " {\n" + children + "\n}" : '';
};

@@ -788,2 +791,3 @@

this.index = [];
this.counter = 0;
this.options = void 0;

@@ -805,3 +809,3 @@ this.classes = void 0;

_proto.add = function add(key, decl, ruleOptions) {
_proto.add = function add(name, decl, ruleOptions) {
var _this$options = this.options,

@@ -822,4 +826,14 @@ parent = _this$options.parent,

generateId: generateId,
scoped: scoped
}, ruleOptions); // We need to save the original decl before creating the rule
scoped: scoped,
name: name
}, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but
// `sheet.addRule()` opens the door for any duplicate rule name. When this happens
// we need to make the key unique within this RuleList instance scope.
var key = name;
if (name in this.raw) {
key = name + "-d" + this.counter++;
} // We need to save the original decl before creating the rule
// because cache plugin needs to use it as a key to return a cached rule.

@@ -831,3 +845,3 @@

if (key in this.classes) {
// For e.g. rules inside of @media container
// E.g. rules inside of @media container
options.selector = "." + escape(this.classes[key]);

@@ -859,3 +873,3 @@ }

delete this.raw[rule.key];
this.index.splice(this.indexOf(rule), 1);
this.index.splice(this.index.indexOf(rule), 1);
}

@@ -882,3 +896,3 @@ /**

/**
* Register a rule in `.map` and `.classes` maps.
* Register a rule in `.map`, `.classes` and `.keyframes` maps.
*/

@@ -936,6 +950,6 @@ ;

if (name) {
this.onUpdate(data, this.get(name), options);
this.updateOne(this.map[name], data, options);
} else {
for (var index = 0; index < this.index.length; index++) {
this.onUpdate(data, this.index[index], options);
this.updateOne(this.index[index], data, options);
}

@@ -949,3 +963,3 @@ }

_proto.onUpdate = function onUpdate(data, rule, options) {
_proto.updateOne = function updateOne(rule, data, options) {
if (options === void 0) {

@@ -1031,2 +1045,4 @@ options = defaultUpdateOptions;

this.queue = void 0;
this.update = void 0;
this.updateOne = void 0;
this.attached = false;

@@ -1048,2 +1064,4 @@ this.deployed = false;

this.rules = new RuleList(this.options);
this.update = this.rules.update.bind(this.rules);
this.updateOne = this.rules.updateOne.bind(this.rules);

@@ -1159,3 +1177,3 @@ for (var name in styles) {

_proto.deleteRule = function deleteRule(name) {
var rule = this.rules.get(name);
var rule = typeof name === 'object' ? name : this.rules.get(name);
if (!rule) return false;

@@ -1189,14 +1207,2 @@ this.rules.remove(rule);

/**
* Update the function values with a new data.
*/
;
_proto.update = function update() {
var _this$rules;
(_this$rules = this.rules).update.apply(_this$rules, arguments);
return this;
}
/**
* Convert rules to a CSS string.

@@ -1947,3 +1953,3 @@ */

this.id = instanceCounter++;
this.version = "10.0.0";
this.version = "10.0.1";
this.plugins = new PluginsRegistry();

@@ -2045,2 +2051,3 @@ this.options = {

* Create a rule without a Style Sheet.
* [Deprecated] will be removed in the next major version.
*/

@@ -2064,2 +2071,3 @@ ;

var ruleOptions = _extends({}, options, {
name: name,
jss: this,

@@ -2066,0 +2074,0 @@ Renderer: this.options.Renderer

@@ -367,2 +367,3 @@ import _extends from '@babel/runtime/helpers/esm/extends';

this.key = void 0;
this.query = void 0;
this.rules = void 0;

@@ -372,3 +373,5 @@ this.options = void 0;

this.renderable = void 0;
this.key = key;
this.key = key; // Key might contain a unique suffix in case the `name` passed by user was duplicate.
this.query = options.name;
var atMatch = key.match(atRegExp);

@@ -430,7 +433,7 @@ this.at = atMatch ? atMatch[1] : 'unknown';

if (options.children === false) {
return this.key + " {}";
return this.query + " {}";
}
var children = this.rules.toString(options);
return children ? this.key + " {\n" + children + "\n}" : '';
return children ? this.query + " {\n" + children + "\n}" : '';
};

@@ -782,2 +785,3 @@

this.index = [];
this.counter = 0;
this.options = void 0;

@@ -799,3 +803,3 @@ this.classes = void 0;

_proto.add = function add(key, decl, ruleOptions) {
_proto.add = function add(name, decl, ruleOptions) {
var _this$options = this.options,

@@ -816,4 +820,14 @@ parent = _this$options.parent,

generateId: generateId,
scoped: scoped
}, ruleOptions); // We need to save the original decl before creating the rule
scoped: scoped,
name: name
}, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but
// `sheet.addRule()` opens the door for any duplicate rule name. When this happens
// we need to make the key unique within this RuleList instance scope.
var key = name;
if (name in this.raw) {
key = name + "-d" + this.counter++;
} // We need to save the original decl before creating the rule
// because cache plugin needs to use it as a key to return a cached rule.

@@ -825,3 +839,3 @@

if (key in this.classes) {
// For e.g. rules inside of @media container
// E.g. rules inside of @media container
options.selector = "." + escape(this.classes[key]);

@@ -853,3 +867,3 @@ }

delete this.raw[rule.key];
this.index.splice(this.indexOf(rule), 1);
this.index.splice(this.index.indexOf(rule), 1);
}

@@ -876,3 +890,3 @@ /**

/**
* Register a rule in `.map` and `.classes` maps.
* Register a rule in `.map`, `.classes` and `.keyframes` maps.
*/

@@ -930,6 +944,6 @@ ;

if (name) {
this.onUpdate(data, this.get(name), options);
this.updateOne(this.map[name], data, options);
} else {
for (var index = 0; index < this.index.length; index++) {
this.onUpdate(data, this.index[index], options);
this.updateOne(this.index[index], data, options);
}

@@ -943,3 +957,3 @@ }

_proto.onUpdate = function onUpdate(data, rule, options) {
_proto.updateOne = function updateOne(rule, data, options) {
if (options === void 0) {

@@ -1025,2 +1039,4 @@ options = defaultUpdateOptions;

this.queue = void 0;
this.update = void 0;
this.updateOne = void 0;
this.attached = false;

@@ -1042,2 +1058,4 @@ this.deployed = false;

this.rules = new RuleList(this.options);
this.update = this.rules.update.bind(this.rules);
this.updateOne = this.rules.updateOne.bind(this.rules);

@@ -1153,3 +1171,3 @@ for (var name in styles) {

_proto.deleteRule = function deleteRule(name) {
var rule = this.rules.get(name);
var rule = typeof name === 'object' ? name : this.rules.get(name);
if (!rule) return false;

@@ -1183,14 +1201,2 @@ this.rules.remove(rule);

/**
* Update the function values with a new data.
*/
;
_proto.update = function update() {
var _this$rules;
(_this$rules = this.rules).update.apply(_this$rules, arguments);
return this;
}
/**
* Convert rules to a CSS string.

@@ -1941,3 +1947,3 @@ */

this.id = instanceCounter++;
this.version = "10.0.0";
this.version = "10.0.1";
this.plugins = new PluginsRegistry();

@@ -2039,2 +2045,3 @@ this.options = {

* Create a rule without a Style Sheet.
* [Deprecated] will be removed in the next major version.
*/

@@ -2058,2 +2065,3 @@ ;

var ruleOptions = _extends({}, options, {
name: name,
jss: this,

@@ -2060,0 +2068,0 @@ Renderer: this.options.Renderer

@@ -435,2 +435,3 @@ (function (global, factory) {

this.key = void 0;
this.query = void 0;
this.rules = void 0;

@@ -440,3 +441,5 @@ this.options = void 0;

this.renderable = void 0;
this.key = key;
this.key = key; // Key might contain a unique suffix in case the `name` passed by user was duplicate.
this.query = options.name;
var atMatch = key.match(atRegExp);

@@ -498,7 +501,7 @@ this.at = atMatch ? atMatch[1] : 'unknown';

if (options.children === false) {
return this.key + " {}";
return this.query + " {}";
}
var children = this.rules.toString(options);
return children ? this.key + " {\n" + children + "\n}" : '';
return children ? this.query + " {\n" + children + "\n}" : '';
};

@@ -850,2 +853,3 @@

this.index = [];
this.counter = 0;
this.options = void 0;

@@ -867,3 +871,3 @@ this.classes = void 0;

_proto.add = function add(key, decl, ruleOptions) {
_proto.add = function add(name, decl, ruleOptions) {
var _this$options = this.options,

@@ -884,4 +888,14 @@ parent = _this$options.parent,

generateId: generateId,
scoped: scoped
}, ruleOptions); // We need to save the original decl before creating the rule
scoped: scoped,
name: name
}, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but
// `sheet.addRule()` opens the door for any duplicate rule name. When this happens
// we need to make the key unique within this RuleList instance scope.
var key = name;
if (name in this.raw) {
key = name + "-d" + this.counter++;
} // We need to save the original decl before creating the rule
// because cache plugin needs to use it as a key to return a cached rule.

@@ -893,3 +907,3 @@

if (key in this.classes) {
// For e.g. rules inside of @media container
// E.g. rules inside of @media container
options.selector = "." + escape(this.classes[key]);

@@ -921,3 +935,3 @@ }

delete this.raw[rule.key];
this.index.splice(this.indexOf(rule), 1);
this.index.splice(this.index.indexOf(rule), 1);
}

@@ -944,3 +958,3 @@ /**

/**
* Register a rule in `.map` and `.classes` maps.
* Register a rule in `.map`, `.classes` and `.keyframes` maps.
*/

@@ -998,6 +1012,6 @@ ;

if (name) {
this.onUpdate(data, this.get(name), options);
this.updateOne(this.map[name], data, options);
} else {
for (var index = 0; index < this.index.length; index++) {
this.onUpdate(data, this.index[index], options);
this.updateOne(this.index[index], data, options);
}

@@ -1011,3 +1025,3 @@ }

_proto.onUpdate = function onUpdate(data, rule, options) {
_proto.updateOne = function updateOne(rule, data, options) {
if (options === void 0) {

@@ -1093,2 +1107,4 @@ options = defaultUpdateOptions;

this.queue = void 0;
this.update = void 0;
this.updateOne = void 0;
this.attached = false;

@@ -1110,2 +1126,4 @@ this.deployed = false;

this.rules = new RuleList(this.options);
this.update = this.rules.update.bind(this.rules);
this.updateOne = this.rules.updateOne.bind(this.rules);

@@ -1221,3 +1239,3 @@ for (var name in styles) {

_proto.deleteRule = function deleteRule(name) {
var rule = this.rules.get(name);
var rule = typeof name === 'object' ? name : this.rules.get(name);
if (!rule) return false;

@@ -1251,14 +1269,2 @@ this.rules.remove(rule);

/**
* Update the function values with a new data.
*/
;
_proto.update = function update() {
var _this$rules;
(_this$rules = this.rules).update.apply(_this$rules, arguments);
return this;
}
/**
* Convert rules to a CSS string.

@@ -2024,3 +2030,3 @@ */

this.id = instanceCounter++;
this.version = "10.0.0";
this.version = "10.0.1";
this.plugins = new PluginsRegistry();

@@ -2122,2 +2128,3 @@ this.options = {

* Create a rule without a Style Sheet.
* [Deprecated] will be removed in the next major version.
*/

@@ -2141,2 +2148,3 @@ ;

var ruleOptions = _extends({}, options, {
name: name,
jss: this,

@@ -2143,0 +2151,0 @@ Renderer: this.options.Renderer

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).jss={})}(this,function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType,i={}.constructor;function s(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(s);if(e.constructor!==i)return e;var t={};for(var n in e)t[n]=s(e[n]);return t}function o(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=s(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function c(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=d(e[r]," ");else n=d(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function f(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function p(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,s=void 0===i?0:i,o=t.fallbacks;if(e&&s++,o)if(Array.isArray(o))for(var a=0;a<o.length;a++){var u=o[a];for(var h in u){var l=u[h];null!=l&&(r&&(r+="\n"),r+=""+f(h+": "+c(l)+";",s))}}else for(var d in o){var p=o[d];null!=p&&(r&&(r+="\n"),r+=""+f(d+": "+c(p)+";",s))}for(var y in t){var v=t[y];null!=v&&"fallbacks"!==y&&(r&&(r+="\n"),r+=""+f(y+": "+c(v)+";",s))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),f(e+" {"+r,--s)+f("}",s)):r}var y=/([[\].#*$><+~=|^:(),"'`\s])/g,v="undefined"!=typeof CSS&&CSS.escape,g=function(e){return v?v(e):e.replace(y,"\\$1")},m=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var s=null==i||!1===i,o=e in this.style;if(s&&!o&&!r)return this;var a=s&&o;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),R=function(e){function n(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var s=r.selector,o=r.scoped,a=r.sheet,u=r.generateId;return s?i.selectorText=s:!1!==o&&(i.id=u(l(l(i)),a),i.selectorText="."+g(i.id)),i}h(n,e);var r=n.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},r.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=c(n))}return e},r.toString=function(e){var n=this.options.sheet,r=!!n&&n.options.link?t({},e,{allowEmpty:!0}):e;return p(this.selectorText,this.style,r)},u(n,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),n}(m),S={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new R(e,t,n)}},b={indent:1,children:!0},k=/@([\w-]+)/,x=function(){function e(e,n,r){this.type="conditional",this.at=void 0,this.key=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var i=e.match(k);for(var s in this.at=i?i[1]:"unknown",this.options=r,this.rules=new F(t({},r,{parent:this})),n)this.rules.add(s,n[s]);this.rules.process()}var n=e.prototype;return n.getRule=function(e){return this.rules.get(e)},n.indexOf=function(e){return this.rules.indexOf(e)},n.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},n.toString=function(e){if(void 0===e&&(e=b),null==e.indent&&(e.indent=b.indent),null==e.children&&(e.children=b.children),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),P=/@media|@supports\s+/,w={onCreateRule:function(e,t,n){return P.test(e)?new x(e,t,n):null}},C={indent:1,children:!0},j=/@keyframes\s+([\w-]+)/,A=function(){function e(e,n,r){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(j);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var s=r.scoped,o=r.sheet,a=r.generateId;for(var u in this.id=!1===s?this.name:g(a(this,o)),this.rules=new F(t({},r,{parent:this})),n)this.rules.add(u,n[u],t({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=C),null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),O=/@keyframes\s+/,I=/\$([\w-]+)/g,M=function(e,t){return"string"==typeof e?e.replace(I,function(e,n){return n in t?t[n]:e}):e},T=function(e,t,n){var r=e[t],i=M(r,n);i!==r&&(e[t]=i)},N={onCreateRule:function(e,t,n){return"string"==typeof e&&O.test(e)?new A(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&T(e,"animation-name",n.keyframes),"animation"in e&&T(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return M(e,r.keyframes);default:return e}}},q=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return h(n,e),n.prototype.toString=function(e){var n=this.options.sheet,r=!!n&&n.options.link?t({},e,{allowEmpty:!0}):e;return p(this.key,this.style,r)},n}(m),V={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new q(e,t,n):null}},E=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=p(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return p(this.key,this.style,e)},e}(),U={onCreateRule:function(e,t,n){return"@font-face"===e?new E(e,t,n):null}},G=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return p(this.key,this.style,e)},e}(),_={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new G(e,t,n):null}},B=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),$={"@charset":!0,"@import":!0,"@namespace":!0},J=[S,w,N,V,U,_,{onCreateRule:function(e,t,n){return e in $?new B(e,t,n):null}}],z={process:!0},D={force:!0,process:!0},F=function(){function e(e){this.map={},this.raw={},this.index=[],this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var n=e.prototype;return n.add=function(e,n,r){var i=this.options,s=i.parent,a=i.sheet,u=i.jss,h=i.Renderer,l=i.generateId,d=i.scoped,c=t({classes:this.classes,parent:s,sheet:a,jss:u,Renderer:h,generateId:l,scoped:d},r);this.raw[e]=n,e in this.classes&&(c.selector="."+g(this.classes[e]));var f=o(e,n,c);if(!f)return null;this.register(f);var p=void 0===c.index?this.index.length:c.index;return this.index.splice(p,0,f),f},n.get=function(e){return this.map[e]},n.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},n.indexOf=function(e){return this.index.indexOf(e)},n.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},n.register=function(e){this.map[e.key]=e,e instanceof R?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof A&&this.keyframes&&(this.keyframes[e.name]=e.id)},n.unregister=function(e){delete this.map[e.key],e instanceof R?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof A&&delete this.keyframes[e.name]},n.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.onUpdate(t,this.get(e),n);else for(var r=0;r<this.index.length;r++)this.onUpdate(t,this.index[r],n)},n.onUpdate=function(t,n,r){void 0===r&&(r=z);var i=this.options,s=i.jss.plugins,o=i.sheet;if(n.rules instanceof e)n.rules.update(t,r);else{var a=n,u=a.style;if(s.onUpdate(t,n,o,r),r.process&&u&&u!==a.style){for(var h in s.onProcessStyle(a.style,a,o),a.style){var l=a.style[h];l!==u[h]&&a.prop(h,l,D)}for(var d in u){var c=a.style[d],f=u[d];null==c&&c!==f&&a.prop(d,null,D)}}}},n.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var s=this.index[i].toString(e);(s||r)&&(t&&(t+="\n"),t+=s)}return t},e}(),L=function(){function e(e,n){for(var r in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=t({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new F(this.options),e)this.rules.add(r,e[r]);this.rules.process()}var n=e.prototype;return n.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},n.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},n.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},n.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},n.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},n.getRule=function(e){return this.rules.get(e)},n.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},n.indexOf=function(e){return this.rules.indexOf(e)},n.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},n.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},n.toString=function(e){return this.rules.toString(e)},e}(),W=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}();var H=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["attached"]),i="",s=0;s<this.registry.length;s++){var o=this.registry[s];null!=n&&o.attached!==n||(i&&(i+="\n"),i+=o.toString(r))}return i},u(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),K=new H,Q="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),X="2f1acc6c3a606b082e5eef5e54414ffb";null==Q[X]&&(Q[X]=0);var Y=Q[X]++,Z=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",s="";return r&&(r.options.classNamePrefix&&(s=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(s||"c")+Y+i+t:s+n.key+"-"+Y+(i?"-"+i:"")+"-"+t}},ee=function(e){var t;return function(){return t||(t=e()),t}};function te(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function ne(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=c(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function re(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}}function ie(e,t){return e.selectorText=t,e.selectorText===t}var se=ee(function(){return document.querySelector("head")});function oe(e){var t=K.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=se(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var ae=ee(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),ue=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},he=function(){var e=document.createElement("style");return e.textContent="\n",e},le=function(){function e(e){this.getPropertyValue=te,this.setProperty=ne,this.removeProperty=re,this.setSelector=ie,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&K.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||he(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var s=ae();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=oe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,s=i.parentNode;s&&s.insertBefore(e,i.nextSibling)}else se().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=ue(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var s=e.toString();if(!s)return!1;var o=ue(n,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=o,o)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),de=0,ce=function(){function e(e){this.id=de++,this.version="10.0.0",this.plugins=new W,this.options={id:{minify:!1},createGenerateId:Z,Renderer:r?le:null,plugins:[]},this.generateId=Z({minify:!1});for(var t=0;t<J.length;t++)this.plugins.use(J[t],{queue:"internal"});this.setup(e)}var n=e.prototype;return n.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=t({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},n.createStyleSheet=function(e,n){void 0===n&&(n={});var r=n.index;"number"!=typeof r&&(r=0===K.index?0:K.index+1);var i=new L(e,t({},n,{jss:this,generateId:n.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:r}));return this.plugins.onProcessSheet(i),i},n.removeStyleSheet=function(e){return e.detach(),K.remove(e),this},n.createRule=function(e,n,r){if(void 0===n&&(n={}),void 0===r&&(r={}),"object"==typeof e)return this.createRule(void 0,e,n);var i=t({},r,{jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var s=o(e,n,i);return s&&this.plugins.onProcessRule(s),s},n.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.plugins.use(t)}),this},e}();var fe=function(){function e(){this.length=0,this.sheets=new WeakMap}var t=e.prototype;return t.get=function(e){var t=this.sheets.get(e);return t&&t.sheet},t.add=function(e,t){this.sheets.has(e)||(this.length++,this.sheets.set(e,{sheet:t,refs:0}))},t.manage=function(e){var t=this.sheets.get(e);if(t)return 0===t.refs&&t.sheet.attach(),t.refs++,t.sheet},t.unmanage=function(e){var t=this.sheets.get(e);t&&t.refs>0&&(t.refs--,0===t.refs&&t.sheet.detach())},u(e,[{key:"size",get:function(){return this.length}}]),e}(),pe="undefined"!=typeof CSS&&CSS&&"number"in CSS,ye=function(e){return new ce(e)},ve=ye();e.hasCSSTOMSupport=pe,e.create=ye,e.default=ve,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],s=typeof i;if("function"===s)n||(n={}),n[r]=i;else if("object"===s&&null!==i&&!Array.isArray(i)){var o=e(i);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=c,e.createRule=o,e.SheetsRegistry=H,e.SheetsManager=fe,e.RuleList=F,e.sheets=K,e.createGenerateId=Z,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).jss={})}(this,function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType,i={}.constructor;function s(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(s);if(e.constructor!==i)return e;var t={};for(var n in e)t[n]=s(e[n]);return t}function o(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=s(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function c(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=d(e[r]," ");else n=d(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function f(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function p(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,s=void 0===i?0:i,o=t.fallbacks;if(e&&s++,o)if(Array.isArray(o))for(var a=0;a<o.length;a++){var u=o[a];for(var h in u){var l=u[h];null!=l&&(r&&(r+="\n"),r+=""+f(h+": "+c(l)+";",s))}}else for(var d in o){var p=o[d];null!=p&&(r&&(r+="\n"),r+=""+f(d+": "+c(p)+";",s))}for(var y in t){var v=t[y];null!=v&&"fallbacks"!==y&&(r&&(r+="\n"),r+=""+f(y+": "+c(v)+";",s))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),f(e+" {"+r,--s)+f("}",s)):r}var y=/([[\].#*$><+~=|^:(),"'`\s])/g,v="undefined"!=typeof CSS&&CSS.escape,g=function(e){return v?v(e):e.replace(y,"\\$1")},m=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var s=null==i||!1===i,o=e in this.style;if(s&&!o&&!r)return this;var a=s&&o;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),R=function(e){function n(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var s=r.selector,o=r.scoped,a=r.sheet,u=r.generateId;return s?i.selectorText=s:!1!==o&&(i.id=u(l(l(i)),a),i.selectorText="."+g(i.id)),i}h(n,e);var r=n.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},r.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=c(n))}return e},r.toString=function(e){var n=this.options.sheet,r=!!n&&n.options.link?t({},e,{allowEmpty:!0}):e;return p(this.selectorText,this.style,r)},u(n,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),n}(m),S={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new R(e,t,n)}},b={indent:1,children:!0},x=/@([\w-]+)/,k=function(){function e(e,n,r){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.query=r.name;var i=e.match(x);for(var s in this.at=i?i[1]:"unknown",this.options=r,this.rules=new F(t({},r,{parent:this})),n)this.rules.add(s,n[s]);this.rules.process()}var n=e.prototype;return n.getRule=function(e){return this.rules.get(e)},n.indexOf=function(e){return this.rules.indexOf(e)},n.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},n.toString=function(e){if(void 0===e&&(e=b),null==e.indent&&(e.indent=b.indent),null==e.children&&(e.children=b.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),P=/@media|@supports\s+/,w={onCreateRule:function(e,t,n){return P.test(e)?new k(e,t,n):null}},O={indent:1,children:!0},C=/@keyframes\s+([\w-]+)/,j=function(){function e(e,n,r){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(C);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var s=r.scoped,o=r.sheet,a=r.generateId;for(var u in this.id=!1===s?this.name:g(a(this,o)),this.rules=new F(t({},r,{parent:this})),n)this.rules.add(u,n[u],t({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=O),null==e.indent&&(e.indent=O.indent),null==e.children&&(e.children=O.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),A=/@keyframes\s+/,I=/\$([\w-]+)/g,q=function(e,t){return"string"==typeof e?e.replace(I,function(e,n){return n in t?t[n]:e}):e},M=function(e,t,n){var r=e[t],i=q(r,n);i!==r&&(e[t]=i)},T={onCreateRule:function(e,t,n){return"string"==typeof e&&A.test(e)?new j(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&M(e,"animation-name",n.keyframes),"animation"in e&&M(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return q(e,r.keyframes);default:return e}}},N=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return h(n,e),n.prototype.toString=function(e){var n=this.options.sheet,r=!!n&&n.options.link?t({},e,{allowEmpty:!0}):e;return p(this.key,this.style,r)},n}(m),V={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new N(e,t,n):null}},E=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=p(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return p(this.key,this.style,e)},e}(),G={onCreateRule:function(e,t,n){return"@font-face"===e?new E(e,t,n):null}},_=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return p(this.key,this.style,e)},e}(),U={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new _(e,t,n):null}},B=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),$={"@charset":!0,"@import":!0,"@namespace":!0},J=[S,w,T,V,G,U,{onCreateRule:function(e,t,n){return e in $?new B(e,t,n):null}}],z={process:!0},D={force:!0,process:!0},F=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var n=e.prototype;return n.add=function(e,n,r){var i=this.options,s=i.parent,a=i.sheet,u=i.jss,h=i.Renderer,l=i.generateId,d=i.scoped,c=t({classes:this.classes,parent:s,sheet:a,jss:u,Renderer:h,generateId:l,scoped:d,name:e},r),f=e;e in this.raw&&(f=e+"-d"+this.counter++),this.raw[f]=n,f in this.classes&&(c.selector="."+g(this.classes[f]));var p=o(f,n,c);if(!p)return null;this.register(p);var y=void 0===c.index?this.index.length:c.index;return this.index.splice(y,0,p),p},n.get=function(e){return this.map[e]},n.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},n.indexOf=function(e){return this.index.indexOf(e)},n.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},n.register=function(e){this.map[e.key]=e,e instanceof R?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof j&&this.keyframes&&(this.keyframes[e.name]=e.id)},n.unregister=function(e){delete this.map[e.key],e instanceof R?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof j&&delete this.keyframes[e.name]},n.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},n.updateOne=function(t,n,r){void 0===r&&(r=z);var i=this.options,s=i.jss.plugins,o=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var a=t,u=a.style;if(s.onUpdate(n,t,o,r),r.process&&u&&u!==a.style){for(var h in s.onProcessStyle(a.style,a,o),a.style){var l=a.style[h];l!==u[h]&&a.prop(h,l,D)}for(var d in u){var c=a.style[d],f=u[d];null==c&&c!==f&&a.prop(d,null,D)}}}},n.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var s=this.index[i].toString(e);(s||r)&&(t&&(t+="\n"),t+=s)}return t},e}(),L=function(){function e(e,n){for(var r in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.update=void 0,this.updateOne=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=t({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new F(this.options),this.update=this.rules.update.bind(this.rules),this.updateOne=this.rules.updateOne.bind(this.rules),e)this.rules.add(r,e[r]);this.rules.process()}var n=e.prototype;return n.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},n.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},n.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},n.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},n.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},n.getRule=function(e){return this.rules.get(e)},n.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},n.indexOf=function(e){return this.rules.indexOf(e)},n.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},n.toString=function(e){return this.rules.toString(e)},e}(),W=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}();var H=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["attached"]),i="",s=0;s<this.registry.length;s++){var o=this.registry[s];null!=n&&o.attached!==n||(i&&(i+="\n"),i+=o.toString(r))}return i},u(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),K=new H,Q="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),X="2f1acc6c3a606b082e5eef5e54414ffb";null==Q[X]&&(Q[X]=0);var Y=Q[X]++,Z=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",s="";return r&&(r.options.classNamePrefix&&(s=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(s||"c")+Y+i+t:s+n.key+"-"+Y+(i?"-"+i:"")+"-"+t}},ee=function(e){var t;return function(){return t||(t=e()),t}};function te(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function ne(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=c(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function re(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}}function ie(e,t){return e.selectorText=t,e.selectorText===t}var se=ee(function(){return document.querySelector("head")});function oe(e){var t=K.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=se(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var ae=ee(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),ue=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},he=function(){var e=document.createElement("style");return e.textContent="\n",e},le=function(){function e(e){this.getPropertyValue=te,this.setProperty=ne,this.removeProperty=re,this.setSelector=ie,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&K.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||he(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var s=ae();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=oe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,s=i.parentNode;s&&s.insertBefore(e,i.nextSibling)}else se().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=ue(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var s=e.toString();if(!s)return!1;var o=ue(n,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=o,o)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),de=0,ce=function(){function e(e){this.id=de++,this.version="10.0.1",this.plugins=new W,this.options={id:{minify:!1},createGenerateId:Z,Renderer:r?le:null,plugins:[]},this.generateId=Z({minify:!1});for(var t=0;t<J.length;t++)this.plugins.use(J[t],{queue:"internal"});this.setup(e)}var n=e.prototype;return n.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=t({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},n.createStyleSheet=function(e,n){void 0===n&&(n={});var r=n.index;"number"!=typeof r&&(r=0===K.index?0:K.index+1);var i=new L(e,t({},n,{jss:this,generateId:n.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:r}));return this.plugins.onProcessSheet(i),i},n.removeStyleSheet=function(e){return e.detach(),K.remove(e),this},n.createRule=function(e,n,r){if(void 0===n&&(n={}),void 0===r&&(r={}),"object"==typeof e)return this.createRule(void 0,e,n);var i=t({},r,{name:e,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var s=o(e,n,i);return s&&this.plugins.onProcessRule(s),s},n.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.plugins.use(t)}),this},e}();var fe=function(){function e(){this.length=0,this.sheets=new WeakMap}var t=e.prototype;return t.get=function(e){var t=this.sheets.get(e);return t&&t.sheet},t.add=function(e,t){this.sheets.has(e)||(this.length++,this.sheets.set(e,{sheet:t,refs:0}))},t.manage=function(e){var t=this.sheets.get(e);if(t)return 0===t.refs&&t.sheet.attach(),t.refs++,t.sheet},t.unmanage=function(e){var t=this.sheets.get(e);t&&t.refs>0&&(t.refs--,0===t.refs&&t.sheet.detach())},u(e,[{key:"size",get:function(){return this.length}}]),e}(),pe="undefined"!=typeof CSS&&CSS&&"number"in CSS,ye=function(e){return new ce(e)},ve=ye();e.hasCSSTOMSupport=pe,e.create=ye,e.default=ve,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],s=typeof i;if("function"===s)n||(n={}),n[r]=i;else if("object"===s&&null!==i&&!Array.isArray(i)){var o=e(i);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=c,e.createRule=o,e.SheetsRegistry=H,e.SheetsManager=fe,e.RuleList=F,e.sheets=K,e.createGenerateId=Z,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "jss",
"description": "A lib for generating Style Sheets with JavaScript.",
"version": "10.0.0",
"version": "10.0.1",
"license": "MIT",

@@ -45,3 +45,7 @@ "homepage": "https://cssinjs.org/",

},
"gitHead": "9562e1d1ba2a137fbc459ed83cd3a61cb894cdb2"
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/jss"
},
"gitHead": "caaa314acc24deda0c8a6b11afe9c15787598741"
}

@@ -12,3 +12,3 @@ # jss

See our website [jss](https://cssinjs.org/setup?v=v10.0.0) for more information.
See our website [jss](https://cssinjs.org/setup?v=v10.0.1) for more information.

@@ -15,0 +15,0 @@ ## Install

@@ -111,2 +111,3 @@ /* @flow */

* Create a rule without a Style Sheet.
* [Deprecated] will be removed in the next major version.
*/

@@ -119,3 +120,3 @@ createRule(name?: string, style?: JssStyle = {}, options?: RuleFactoryOptions = {}): Rule | null {

const ruleOptions: RuleOptions = {...options, jss: this, Renderer: this.options.Renderer}
const ruleOptions: RuleOptions = {...options, name, jss: this, Renderer: this.options.Renderer}

@@ -122,0 +123,0 @@ if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId

@@ -22,2 +22,4 @@ /* @flow */

query: string
rules: RuleList

@@ -33,2 +35,4 @@

this.key = key
// Key might contain a unique suffix in case the `name` passed by user was duplicate.
this.query = options.name
const atMatch = key.match(atRegExp)

@@ -77,6 +81,6 @@ this.at = atMatch ? atMatch[1] : 'unknown'

if (options.children === false) {
return `${this.key} {}`
return `${this.query} {}`
}
const children = this.rules.toString(options)
return children ? `${this.key} {\n${children}\n}` : ''
return children ? `${this.query} {\n${children}\n}` : ''
}

@@ -83,0 +87,0 @@ }

@@ -40,2 +40,4 @@ /* @flow */

counter: number = 0
options: RuleListOptions

@@ -58,3 +60,3 @@

*/
add(key: string, decl: JssStyle, ruleOptions?: RuleOptions): Rule | null {
add(name: string, decl: JssStyle, ruleOptions?: RuleOptions): Rule | null {
const {parent, sheet, jss, Renderer, generateId, scoped} = this.options

@@ -69,5 +71,14 @@ const options = {

scoped,
name,
...ruleOptions
}
// When user uses .createStyleSheet(), duplicate names are not possible, but
// `sheet.addRule()` opens the door for any duplicate rule name. When this happens
// we need to make the key unique within this RuleList instance scope.
let key = name
if (name in this.raw) {
key = `${name}-d${this.counter++}`
}
// We need to save the original decl before creating the rule

@@ -78,3 +89,3 @@ // because cache plugin needs to use it as a key to return a cached rule.

if (key in this.classes) {
// For e.g. rules inside of @media container
// E.g. rules inside of @media container
options.selector = `.${escape(this.classes[key])}`

@@ -108,3 +119,3 @@ }

delete this.raw[rule.key]
this.index.splice(this.indexOf(rule), 1)
this.index.splice(this.index.indexOf(rule), 1)
}

@@ -130,3 +141,3 @@

/**
* Register a rule in `.map` and `.classes` maps.
* Register a rule in `.map`, `.classes` and `.keyframes` maps.
*/

@@ -178,6 +189,6 @@ register(rule: Rule): void {

if (name) {
this.onUpdate(data, this.get(name), options)
this.updateOne(this.map[name], data, options)
} else {
for (let index = 0; index < this.index.length; index++) {
this.onUpdate(data, this.index[index], options)
this.updateOne(this.index[index], data, options)
}

@@ -190,3 +201,3 @@ }

*/
onUpdate(data: Object, rule: Rule, options?: Object = defaultUpdateOptions) {
updateOne(rule: Rule, data: Object, options?: Object = defaultUpdateOptions) {
const {

@@ -193,0 +204,0 @@ jss: {plugins},

@@ -9,3 +9,2 @@ /* @flow */

StyleSheetOptions,
UpdateArguments,
JssStyle,

@@ -35,2 +34,6 @@ Classes,

update: typeof RuleList.prototype.update
updateOne: typeof RuleList.prototype.updateOne
constructor(styles: JssStyles, options: StyleSheetOptions) {

@@ -52,2 +55,4 @@ this.attached = false

this.rules = new RuleList(this.options)
this.update = this.rules.update.bind(this.rules)
this.updateOne = this.rules.updateOne.bind(this.rules)

@@ -156,4 +161,4 @@ for (const name in styles) {

*/
deleteRule(name: string): boolean {
const rule = this.rules.get(name)
deleteRule(name: string | Rule): boolean {
const rule = typeof name === 'object' ? name : this.rules.get(name)

@@ -188,10 +193,2 @@ if (!rule) return false

/**
* Update the function values with a new data.
*/
update(...args: UpdateArguments): this {
this.rules.update(...args)
return this
}
/**
* Convert rules to a CSS string.

@@ -198,0 +195,0 @@ */

@@ -121,3 +121,4 @@ /* @flow */

generateId: GenerateId,
Renderer?: Class<Renderer> | null
Renderer?: Class<Renderer> | null,
name: string
}

@@ -124,0 +125,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc