Socket
Socket
Sign inDemoInstall

jss

Package Overview
Dependencies
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss - npm Package Compare versions

Comparing version 10.0.0-alpha.3 to 10.0.0-alpha.4

132

dist/jss.bundle.js

@@ -27,51 +27,20 @@ function _extends() {

/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var warning = function warning() {};
{
warning = function warning(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
function warning(condition, message) {
{
if (condition) {
return;
}
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
var text = "Warning: " + message;
if (format.length < 10 || /^[s\W]*$/.test(format)) {
throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format);
if (typeof console !== 'undefined') {
console.warn(text);
}
if (!condition) {
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
}
};
try {
throw Error(text);
} catch (x) {}
}
}
var warning_1 = warning;
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};

@@ -171,3 +140,3 @@

if (name[0] === '@') {
warning_1(false, '[JSS] Unknown rule %s', name);
warning(false, "[JSS] Unknown rule " + name);
}

@@ -390,3 +359,3 @@

if (sheet && sheet.attached) {
warning_1(false, '[JSS] Rule is not linked. Missing sheet option "link: true".');
warning(false, '[JSS] Rule is not linked. Missing sheet option "link: true".');
}

@@ -628,3 +597,3 @@

this.name = 'noname';
warning_1(false, '[JSS] Bad keyframes name %s', key);
warning(false, "[JSS] Bad keyframes name " + key);
}

@@ -689,3 +658,3 @@

} else {
warning_1(false, '[JSS] Referenced keyframes rule "%s" is not defined.', ref[1]);
warning(false, "[JSS] Referenced keyframes rule \"" + ref[1] + "\" is not defined.");
}

@@ -1413,3 +1382,5 @@ }

registry[name].push(plugin[name]);
} else warning_1(false, '[JSS] Unknown hook "%s".', name);
} else {
warning(false, "[JSS] Unknown hook \"" + name + "\".");
}
}

@@ -1539,3 +1510,3 @@

if (ruleCounter > maxRules) {
warning_1(false, '[JSS] You might have a memory leak. Rule counter is at %s.', ruleCounter);
warning(false, "[JSS] You might have a memory leak. Rule counter is at " + ruleCounter + ".");
}

@@ -1631,3 +1602,3 @@

} catch (err) {
warning_1(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop);
warning(false, "[JSS] DOMException \"" + err.message + "\" was thrown. Tried to remove property \"" + prop + "\".");
}

@@ -1748,3 +1719,3 @@ }

warning_1(insertionPoint === 'jss', '[JSS] Insertion point "%s" not found.', insertionPoint);
warning(false, "[JSS] Insertion point \"" + insertionPoint + "\" not found.");
}

@@ -1773,3 +1744,3 @@

var parentNode = insertionPointElement.parentNode;
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else warning_1(false, '[JSS] Insertion point is not in the DOM.');
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else warning(false, '[JSS] Insertion point is not in the DOM.');
return;

@@ -1806,3 +1777,3 @@ }

} catch (err) {
warning_1(false, '[JSS] Can not insert an unsupported rule \n\r%s', rule);
warning(false, "[JSS] Can not insert an unsupported rule \n" + rule);
return false;

@@ -2037,3 +2008,3 @@ }

this.id = instanceCounter++;
this.version = "10.0.0-alpha.2";
this.version = "10.0.0-alpha.4";
this.plugins = new PluginsRegistry();

@@ -2203,2 +2174,57 @@ this.options = {

/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var warning$1 = function warning() {};
{
var printWarning = function printWarning(format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning$1 = function warning(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (!condition) {
printWarning.apply(null, [format].concat(args));
}
};
}
var warning_1 = warning$1;
/**
* SheetsManager is like a WeakMap which is designed to count StyleSheet

@@ -2205,0 +2231,0 @@ * instances and attach/detach automatically.

@@ -8,3 +8,3 @@ 'use strict';

var $$observable = _interopDefault(require('symbol-observable'));
var warning = _interopDefault(require('warning'));
var warning = _interopDefault(require('tiny-warning'));
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));

@@ -15,2 +15,3 @@ var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass'));

var isInBrowser = _interopDefault(require('is-in-browser'));
var warn = _interopDefault(require('warning'));

@@ -77,3 +78,3 @@ var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};

if (name[0] === '@') {
warning(false, '[JSS] Unknown rule %s', name);
warning(false, "[JSS] Unknown rule " + name);
}

@@ -207,3 +208,2 @@

var env = process.env.NODE_ENV;
var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;

@@ -213,3 +213,3 @@ var escape = (function (str) {

// input for selectors, we are generating a valid selector.
if (env === 'production') return str;
if (process.env.NODE_ENV === 'production') return str;
var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;

@@ -509,3 +509,3 @@ return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');

this.name = 'noname';
warning(false, '[JSS] Bad keyframes name %s', key);
warning(false, "[JSS] Bad keyframes name " + key);
}

@@ -570,3 +570,3 @@

} else {
warning(false, '[JSS] Referenced keyframes rule "%s" is not defined.', ref[1]);
warning(false, "[JSS] Referenced keyframes rule \"" + ref[1] + "\" is not defined.");
}

@@ -1294,3 +1294,5 @@ }

registry[name].push(plugin[name]);
} else warning(false, '[JSS] Unknown hook "%s".', name);
} else {
warning(false, "[JSS] Unknown hook \"" + name + "\".");
}
}

@@ -1407,3 +1409,2 @@

var maxRules = 1e10;
var env$1 = process.env.NODE_ENV;
/**

@@ -1417,3 +1418,4 @@ * Returns a function which generates unique class names based on counters.

var ruleCounter = 0;
var defaultPrefix = env$1 === 'production' ? 'c' : '';
var env = process.env.NODE_ENV;
var defaultPrefix = env === 'production' ? 'c' : '';
return function (rule, sheet) {

@@ -1423,3 +1425,3 @@ ruleCounter += 1;

if (ruleCounter > maxRules) {
warning(false, '[JSS] You might have a memory leak. Rule counter is at %s.', ruleCounter);
warning(false, "[JSS] You might have a memory leak. Rule counter is at " + ruleCounter + ".");
}

@@ -1435,3 +1437,3 @@

if (env$1 === 'production') {
if (env === 'production') {
return "" + prefix + moduleId + jssId + ruleCounter;

@@ -1520,3 +1522,3 @@ }

} catch (err) {
warning(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop);
warning(false, "[JSS] DOMException \"" + err.message + "\" was thrown. Tried to remove property \"" + prop + "\".");
}

@@ -1637,3 +1639,3 @@ }

warning(insertionPoint === 'jss', '[JSS] Insertion point "%s" not found.', insertionPoint);
warning(false, "[JSS] Insertion point \"" + insertionPoint + "\" not found.");
}

@@ -1694,3 +1696,3 @@

} catch (err) {
warning(false, '[JSS] Can not insert an unsupported rule \n\r%s', rule);
warning(false, "[JSS] Can not insert an unsupported rule \n" + rule);
return false;

@@ -1925,3 +1927,3 @@ }

this.id = instanceCounter++;
this.version = "10.0.0-alpha.2";
this.version = "10.0.0-alpha.4";
this.plugins = new PluginsRegistry();

@@ -2136,3 +2138,3 @@ this.options = {

// eslint-ignore-next-line no-console
warning(false, "SheetsManager: can't find sheet to unmanage");
warn(false, "SheetsManager: can't find sheet to unmanage");
return;

@@ -2139,0 +2141,0 @@ }

import $$observable from 'symbol-observable';
import warning from 'warning';
import warning from 'tiny-warning';
import _extends from '@babel/runtime/helpers/esm/extends';

@@ -8,2 +8,3 @@ import _createClass from '@babel/runtime/helpers/esm/createClass';

import isInBrowser from 'is-in-browser';
import warn from 'warning';

@@ -70,3 +71,3 @@ var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};

if (name[0] === '@') {
warning(false, '[JSS] Unknown rule %s', name);
warning(false, "[JSS] Unknown rule " + name);
}

@@ -200,3 +201,2 @@

var env = process.env.NODE_ENV;
var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;

@@ -206,3 +206,3 @@ var escape = (function (str) {

// input for selectors, we are generating a valid selector.
if (env === 'production') return str;
if (process.env.NODE_ENV === 'production') return str;
var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;

@@ -502,3 +502,3 @@ return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');

this.name = 'noname';
warning(false, '[JSS] Bad keyframes name %s', key);
warning(false, "[JSS] Bad keyframes name " + key);
}

@@ -563,3 +563,3 @@

} else {
warning(false, '[JSS] Referenced keyframes rule "%s" is not defined.', ref[1]);
warning(false, "[JSS] Referenced keyframes rule \"" + ref[1] + "\" is not defined.");
}

@@ -1287,3 +1287,5 @@ }

registry[name].push(plugin[name]);
} else warning(false, '[JSS] Unknown hook "%s".', name);
} else {
warning(false, "[JSS] Unknown hook \"" + name + "\".");
}
}

@@ -1400,3 +1402,2 @@

var maxRules = 1e10;
var env$1 = process.env.NODE_ENV;
/**

@@ -1410,3 +1411,4 @@ * Returns a function which generates unique class names based on counters.

var ruleCounter = 0;
var defaultPrefix = env$1 === 'production' ? 'c' : '';
var env = process.env.NODE_ENV;
var defaultPrefix = env === 'production' ? 'c' : '';
return function (rule, sheet) {

@@ -1416,3 +1418,3 @@ ruleCounter += 1;

if (ruleCounter > maxRules) {
warning(false, '[JSS] You might have a memory leak. Rule counter is at %s.', ruleCounter);
warning(false, "[JSS] You might have a memory leak. Rule counter is at " + ruleCounter + ".");
}

@@ -1428,3 +1430,3 @@

if (env$1 === 'production') {
if (env === 'production') {
return "" + prefix + moduleId + jssId + ruleCounter;

@@ -1513,3 +1515,3 @@ }

} catch (err) {
warning(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop);
warning(false, "[JSS] DOMException \"" + err.message + "\" was thrown. Tried to remove property \"" + prop + "\".");
}

@@ -1630,3 +1632,3 @@ }

warning(insertionPoint === 'jss', '[JSS] Insertion point "%s" not found.', insertionPoint);
warning(false, "[JSS] Insertion point \"" + insertionPoint + "\" not found.");
}

@@ -1687,3 +1689,3 @@

} catch (err) {
warning(false, '[JSS] Can not insert an unsupported rule \n\r%s', rule);
warning(false, "[JSS] Can not insert an unsupported rule \n" + rule);
return false;

@@ -1918,3 +1920,3 @@ }

this.id = instanceCounter++;
this.version = "10.0.0-alpha.2";
this.version = "10.0.0-alpha.4";
this.plugins = new PluginsRegistry();

@@ -2129,3 +2131,3 @@ this.options = {

// eslint-ignore-next-line no-console
warning(false, "SheetsManager: can't find sheet to unmanage");
warn(false, "SheetsManager: can't find sheet to unmanage");
return;

@@ -2132,0 +2134,0 @@ }

@@ -33,51 +33,20 @@ (function (global, factory) {

/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var warning = function warning() {};
{
warning = function warning(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
function warning(condition, message) {
{
if (condition) {
return;
}
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
var text = "Warning: " + message;
if (format.length < 10 || /^[s\W]*$/.test(format)) {
throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format);
if (typeof console !== 'undefined') {
console.warn(text);
}
if (!condition) {
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
}
};
try {
throw Error(text);
} catch (x) {}
}
}
var warning_1 = warning;
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};

@@ -177,3 +146,3 @@

if (name[0] === '@') {
warning_1(false, '[JSS] Unknown rule %s', name);
warning(false, "[JSS] Unknown rule " + name);
}

@@ -396,3 +365,3 @@

if (sheet && sheet.attached) {
warning_1(false, '[JSS] Rule is not linked. Missing sheet option "link: true".');
warning(false, '[JSS] Rule is not linked. Missing sheet option "link: true".');
}

@@ -634,3 +603,3 @@

this.name = 'noname';
warning_1(false, '[JSS] Bad keyframes name %s', key);
warning(false, "[JSS] Bad keyframes name " + key);
}

@@ -695,3 +664,3 @@

} else {
warning_1(false, '[JSS] Referenced keyframes rule "%s" is not defined.', ref[1]);
warning(false, "[JSS] Referenced keyframes rule \"" + ref[1] + "\" is not defined.");
}

@@ -1419,3 +1388,5 @@ }

registry[name].push(plugin[name]);
} else warning_1(false, '[JSS] Unknown hook "%s".', name);
} else {
warning(false, "[JSS] Unknown hook \"" + name + "\".");
}
}

@@ -1545,3 +1516,3 @@

if (ruleCounter > maxRules) {
warning_1(false, '[JSS] You might have a memory leak. Rule counter is at %s.', ruleCounter);
warning(false, "[JSS] You might have a memory leak. Rule counter is at " + ruleCounter + ".");
}

@@ -1637,3 +1608,3 @@

} catch (err) {
warning_1(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop);
warning(false, "[JSS] DOMException \"" + err.message + "\" was thrown. Tried to remove property \"" + prop + "\".");
}

@@ -1754,3 +1725,3 @@ }

warning_1(insertionPoint === 'jss', '[JSS] Insertion point "%s" not found.', insertionPoint);
warning(false, "[JSS] Insertion point \"" + insertionPoint + "\" not found.");
}

@@ -1779,3 +1750,3 @@

var parentNode = insertionPointElement.parentNode;
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else warning_1(false, '[JSS] Insertion point is not in the DOM.');
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else warning(false, '[JSS] Insertion point is not in the DOM.');
return;

@@ -1812,3 +1783,3 @@ }

} catch (err) {
warning_1(false, '[JSS] Can not insert an unsupported rule \n\r%s', rule);
warning(false, "[JSS] Can not insert an unsupported rule \n" + rule);
return false;

@@ -2043,3 +2014,3 @@ }

this.id = instanceCounter++;
this.version = "10.0.0-alpha.2";
this.version = "10.0.0-alpha.4";
this.plugins = new PluginsRegistry();

@@ -2209,2 +2180,57 @@ this.options = {

/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var warning$1 = function warning() {};
{
var printWarning = function printWarning(format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning$1 = function warning(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (!condition) {
printWarning.apply(null, [format].concat(args));
}
};
}
var warning_1 = warning$1;
/**
* SheetsManager is like a WeakMap which is designed to count StyleSheet

@@ -2211,0 +2237,0 @@ * instances and attach/detach automatically.

@@ -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.jss={})}(this,function(e){"use strict";function c(){return(c=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 t,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,a=function(){},s="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==s?s:"undefined"!=typeof module?module:Function("return this")();var i,o,u=("function"==typeof(o=t.Symbol)?o.observable?i=o.observable:(i=o("observable"),o.observable=i):i="@@observable",i),h=Array.isArray,l=function(e){return e&&e[u]&&e===e[u]()};function d(e){if(null==e)return e;var t=typeof e;if("string"===t||"number"===t||"function"===t)return e;if(s.CSSStyleValue&&e instanceof s.CSSStyleValue)return e;if(h(e))return e.map(d);if(l(e))return e;var n={};for(var r in e){var i=e[r];"object"!=typeof i?n[r]=i:n[r]=d(i)}return n}function p(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=d(t),s=r.plugins.onCreateRule(e,i,n);return s||("@"===e[0]&&a(!1,"[JSS] Unknown rule %s",e),null)}function f(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 y(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function v(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var m=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function S(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+=m(e[r]," ");else n=m(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function b(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function R(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 u=0;u<o.length;u++){var a=o[u];for(var h in a){var l=a[h];null!=l&&(r&&(r+="\n"),r+=""+b(h+": "+S(l)+";",s))}}else for(var d in o){var f=o[d];null!=f&&(r&&(r+="\n"),r+=""+b(d+": "+S(f)+";",s))}for(var c in t){var p=t[c];null!=p&&"fallbacks"!==c&&(r&&(r+="\n"),r+=""+b(c+": "+S(p)+";",s))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),b(e+" {"+r,--s)+b("}",s)):r}var k=function(e){return e},x=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,this.renderer=r?r.renderer:new i}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];if(!(!!n&&n.force)&&this.style[e]===t)return this;var r=t;n&&!1===n.process||(r=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==r||!1===r,s=e in this.style;if(i&&!s)return this;var o=i&&s;if(o?delete this.style[e]:this.style[e]=r,this.renderable)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,r),this;var u=this.options.sheet;return u&&u.attached&&a(!1,'[JSS] Rule is not linked. Missing sheet option "link: true".'),this},e}(),P=function(a){function e(e,t,n){var r;(r=a.call(this,e,t,n)||this).selectorText=void 0,r.id=void 0,r.renderable=void 0;var i=n.selector,s=n.scoped,o=n.sheet,u=n.generateId;return i?r.selectorText=i:!1!==s&&(r.id=u(g(g(r)),o),r.selectorText="."+k(r.id)),r}v(e,a);var t=e.prototype;return t.applyTo=function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this},t.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]=S(n))}return e},t.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return R(this.selectorText,this.style,n)},y(e,[{key:"selector",set:function(e){e!==this.selectorText&&(this.selectorText=e,this.renderable&&(this.renderer.setSelector(this.renderable,e)||this.renderer.replaceRule(this.renderable,this)))},get:function(){return this.selectorText}}]),e}(x),w={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new P(e,t,n)}},O={indent:1,children:!0},j=/@([\w-]+)/,C=function(){function e(e,t,n){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;var r=(this.key=e).match(j);for(var i in this.at=r?r[1]:"unknown",this.options=n,this.rules=new K(c({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=O),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),A=/@media|@supports\s+/,I={onCreateRule:function(e,t,n){return A.test(e)?new C(e,t,n):null}},T={indent:1,children:!0},M=/@keyframes\s+([\w-]+)/,J=function(){function e(e,t,n){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 r=e.match(M);r&&r[1]?this.name=r[1]:(this.name="noname",a(!1,"[JSS] Bad keyframes name %s",e)),this.key=this.type+"-"+this.name;var i=(this.options=n).scoped,s=n.sheet,o=n.generateId;for(var u in this.id=!1===i?this.name:o(this,s),this.rules=new K(c({},n,{parent:this})),t)this.rules.add(u,t[u],c({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=T),!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}(),V=/@keyframes\s+/,q=/\$([\w-]+)/,E=function(e,t,n){var r=e[t];if("string"==typeof r){var i=q.exec(r);if(!i)return;i[1]in n?e[t]=r.replace(i[0],n[i[1]]):a(!1,'[JSS] Referenced keyframes rule "%s" is not defined.',i[1])}},N={onCreateRule:function(e,t,n){return V.test(e)?new J(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n&&("animation-name"in e&&E(e,"animation-name",n.keyframes),"animation"in e&&E(e,"animation",n.keyframes)),e}},U=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))||this).renderable=void 0,e}return v(e,i),e.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return R(this.key,this.style,n)},e}(x),G={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new U(e,t,n):null}},_=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+=R(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return R(this.key,this.style,e)},e}(),B={onCreateRule:function(e,t,n){return"@font-face"===e?new _(e,t,n):null}},D=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 R(this.key,this.style,e)},e}(),z={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new D(e,t,n):null}},F=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}(),L={"@charset":!0,"@import":!0,"@namespace":!0},Y=[w,I,N,G,B,z,{onCreateRule:function(e,t,n){return e in L?new F(e,t,n):null}}],$={process:!0},H={force:!0,process:!0},K=function(){function l(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 e=l.prototype;return e.add=function(e,t,n){var r=this.options,i=r.parent,s=r.sheet,o=r.jss,u=r.Renderer,a=r.generateId,h=r.scoped,l=c({classes:this.classes,parent:i,sheet:s,jss:o,Renderer:u,generateId:a,scoped:h},n);this.raw[e]=t,e in this.classes&&(l.selector="."+k(this.classes[e]));var d=p(e,t,l);if(!d)return null;this.register(d);var f=void 0===l.index?this.index.length:l.index;return this.index.splice(f,0,d),d},e.get=function(e){return this.map[e]},e.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},e.indexOf=function(e){return this.index.indexOf(e)},e.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},e.register=function(e){(this.map[e.key]=e)instanceof P?(this.map[e.selector]=e).id&&(this.classes[e.key]=e.id):e instanceof J&&this.keyframes&&(this.keyframes[e.name]=e.id)},e.unregister=function(e){delete this.map[e.key],e instanceof P?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof J&&delete this.keyframes[e.name]},e.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)},e.onUpdate=function(e,t,n){void 0===n&&(n=$);var r=this.options,i=r.jss.plugins,s=r.sheet;if(t.rules instanceof l)t.rules.update(e,n);else{var o=t,u=o.style;if(i.onUpdate(e,t,s,n),n.process&&u&&u!==o.style)for(var a in i.onProcessStyle(o.style,o,s),o.style){var h=o.style[a];h!==u[a]&&o.prop(a,h,H)}}},e.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},l}(),Q=function(){function e(e,t){for(var n 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=c({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),this.renderer=new t.Renderer(this),this.rules=new K(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached&&(this.renderer.detach(),this.attached=!1),this},t.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))):this.deployed=!1,i):null},t.insertRule=function(e){this.renderer.insertRule(e)},t.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},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.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=this.plugins.external.concat(this.plugins.internal).reduce(function(e,t){for(var n in t)n in e?e[n].push(t[n]):a(!1,'[JSS] Unknown hook "%s".',n);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),X=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(t){return this.registry.filter(function(e){return e.attached}).map(function(e){return e.toString(t)}).join("\n")},y(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Z=new X,ee="2f1acc6c3a606b082e5eef5e54414ffb";null==s[ee]&&(s[ee]=0);var te=s[ee]++,ne=function(){var i=0;return function(e,t){1e10<(i+=1)&&a(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",i);var n="c",r="";return t&&(n=t.options.classNamePrefix||"c",null!=t.options.jss.id&&(r+=t.options.jss.id)),""+n+te+r+i}},re=function(e){var t;return function(){return t||(t=e()),t}};function ie(e,t){try{return"attributeStyleMap"in e?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function se(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=S(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;"attributeStyleMap"in e?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function oe(e,t){try{"attributeStyleMap"in e?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){a(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}function ue(e,t){return e.selectorText=t,e.selectorText===t}var ae=re(function(){return document.querySelector("head")});function he(e){var t=Z.registry;if(0<t.length){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)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;0<=n;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))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=ae(),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};a("jss"===r,'[JSS] Insertion point "%s" not found.',r)}return!1}var le=re(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),de=function(e,t,n){void 0===n&&(n=e.cssRules.length);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return a(!1,"[JSS] Can not insert an unsupported rule \n\r%s",t),!1}return e.cssRules[n]},fe=function(){function e(e){this.getPropertyValue=ie,this.setProperty=se,this.removeProperty=oe,this.setSelector=ue,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Z.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||document.createElement("style"),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var s=le();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){!this.element.parentNode&&this.sheet&&(!function(e,t){var n=t.insertionPoint,r=he(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):a(!1,"[JSS] Insertion point is not in the DOM.")}else ae().appendChild(e)}(this.element,this.sheet.options),this.hasInsertedRules&&(this.hasInsertedRules=!1,this.deploy()))},t.detach=function(){this.element.parentNode.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?e.rules.index.forEach(this.insertRule,this):this.element.textContent="\n"+e.toString()+"\n")},t.insertRule=function(e,t){var n=this.element.sheet;if("conditional"===e.type||"keyframes"===e.type){var r=e,i=de(n,r.toString({children:!1}),t);return!1!==i&&(r.rules.index.forEach(function(e,t){var n=de(i,e.toString(),t);!1!==n&&(e.renderable=n)}),i)}var s=e.toString();if(!s)return!1;var o=de(n,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=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}(),ce=function(){function e(){}var t=e.prototype;return t.setProperty=function(){return!0},t.getPropertyValue=function(){return""},t.removeProperty=function(){},t.setSelector=function(){return!0},t.attach=function(){},t.detach=function(){},t.deploy=function(){},t.insertRule=function(){return!1},t.deleteRule=function(){return!0},t.replaceRule=function(){return!1},t.getRules=function(){},t.indexOf=function(){return-1},e}(),pe=0,ye=function(){function e(e){this.id=pe++,this.version="10.0.0-alpha.2",this.plugins=new W,this.options={createGenerateId:ne,Renderer:r?fe:ce,plugins:[]},this.generateId=ne();for(var t=0;t<Y.length;t++)this.plugins.use(Y[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId,this.generateId=e.createGenerateId()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?ce:fe)),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Z.index?0:Z.index+1);var r=new Q(e,c({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Z.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=c({},n,{jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=p(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){t.plugins.use(e)}),this},e}();var ve=function(){function e(){this.sheets=[],this.refs=[],this.keys=[]}var t=e.prototype;return t.get=function(e){var t=this.keys.indexOf(e);return this.sheets[t]},t.add=function(e,t){var n=this.sheets,r=this.refs,i=this.keys,s=n.indexOf(t);return-1!==s?s:(n.push(t),r.push(0),i.push(e),n.length-1)},t.manage=function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n},t.unmanage=function(e){var t=this.keys.indexOf(e);-1!==t?0<this.refs[t]&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):a(!1,"SheetsManager: can't find sheet to unmanage")},y(e,[{key:"size",get:function(){return this.keys.length}}]),e}(),ge="undefined"!=typeof CSS&&CSS&&"number"in CSS,me=function(e){return new ye(e)},Se=me();e.hasCSSTOMSupport=ge,e.create=me,e.default=Se,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=S,e.createRule=p,e.SheetsRegistry=X,e.SheetsManager=ve,e.RuleList=K,e.sheets=Z,e.createGenerateId=ne,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.jss={})}(this,function(e){"use strict";function c(){return(c=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 t="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},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;var r,s="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==s?s:"undefined"!=typeof module?module:Function("return this")();var i,o,u=("function"==typeof(o=r.Symbol)?o.observable?i=o.observable:(i=o("observable"),o.observable=i):i="@@observable",i),a=Array.isArray,h=function(e){return e&&e[u]&&e===e[u]()};function l(e){if(null==e)return e;var t=typeof e;if("string"===t||"number"===t||"function"===t)return e;if(s.CSSStyleValue&&e instanceof s.CSSStyleValue)return e;if(a(e))return e.map(l);if(h(e))return e;var n={};for(var r in e){var i=e[r];"object"!=typeof i?n[r]=i:n[r]=l(i)}return n}function p(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=l(t),s=r.plugins.onCreateRule(e,i,n);return s||(e[0],null)}function d(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 f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function y(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function m(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+=g(e[r]," ");else n=g(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function b(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function S(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 u=0;u<o.length;u++){var a=o[u];for(var h in a){var l=a[h];null!=l&&(r&&(r+="\n"),r+=""+b(h+": "+m(l)+";",s))}}else for(var d in o){var f=o[d];null!=f&&(r&&(r+="\n"),r+=""+b(d+": "+m(f)+";",s))}for(var c in t){var p=t[c];null!=p&&"fallbacks"!==c&&(r&&(r+="\n"),r+=""+b(c+": "+m(p)+";",s))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),b(e+" {"+r,--s)+b("}",s)):r}var R=function(e){return e},k=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,this.renderer=r?r.renderer:new i}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];if(!(!!n&&n.force)&&this.style[e]===t)return this;var r=t;n&&!1===n.process||(r=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==r||!1===r,s=e in this.style;if(i&&!s)return this;var o=i&&s;if(o?delete this.style[e]:this.style[e]=r,this.renderable)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,r),this;var u=this.options.sheet;return u&&u.attached,this},e}(),x=function(a){function e(e,t,n){var r;(r=a.call(this,e,t,n)||this).selectorText=void 0,r.id=void 0,r.renderable=void 0;var i=n.selector,s=n.scoped,o=n.sheet,u=n.generateId;return i?r.selectorText=i:!1!==s&&(r.id=u(v(v(r)),o),r.selectorText="."+R(r.id)),r}y(e,a);var t=e.prototype;return t.applyTo=function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this},t.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]=m(n))}return e},t.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return S(this.selectorText,this.style,n)},f(e,[{key:"selector",set:function(e){e!==this.selectorText&&(this.selectorText=e,this.renderable&&(this.renderer.setSelector(this.renderable,e)||this.renderer.replaceRule(this.renderable,this)))},get:function(){return this.selectorText}}]),e}(k),P={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new x(e,t,n)}},w={indent:1,children:!0},j=/@([\w-]+)/,C=function(){function e(e,t,n){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;var r=(this.key=e).match(j);for(var i in this.at=r?r[1]:"unknown",this.options=n,this.rules=new K(c({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=w),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),O=/@media|@supports\s+/,A={onCreateRule:function(e,t,n){return O.test(e)?new C(e,t,n):null}},I={indent:1,children:!0},T=/@keyframes\s+([\w-]+)/,V=function(){function e(e,t,n){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 r=e.match(T);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name;var i=(this.options=n).scoped,s=n.sheet,o=n.generateId;for(var u in this.id=!1===i?this.name:o(this,s),this.rules=new K(c({},n,{parent:this})),t)this.rules.add(u,t[u],c({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=I),!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}(),q=/@keyframes\s+/,N=/\$([\w-]+)/,E=function(e,t,n){var r=e[t];if("string"==typeof r){var i=N.exec(r);if(!i)return;i[1]in n?e[t]=r.replace(i[0],n[i[1]]):i[1]}},M={onCreateRule:function(e,t,n){return q.test(e)?new V(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n&&("animation-name"in e&&E(e,"animation-name",n.keyframes),"animation"in e&&E(e,"animation",n.keyframes)),e}},U=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))||this).renderable=void 0,e}return y(e,i),e.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return S(this.key,this.style,n)},e}(k),G={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new U(e,t,n):null}},_=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+=S(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return S(this.key,this.style,e)},e}(),B={onCreateRule:function(e,t,n){return"@font-face"===e?new _(e,t,n):null}},J=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 S(this.key,this.style,e)},e}(),z={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new J(e,t,n):null}},D=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}(),F={"@charset":!0,"@import":!0,"@namespace":!0},L=[P,A,M,G,B,z,{onCreateRule:function(e,t,n){return e in F?new D(e,t,n):null}}],$={process:!0},H={force:!0,process:!0},K=function(){function l(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 e=l.prototype;return e.add=function(e,t,n){var r=this.options,i=r.parent,s=r.sheet,o=r.jss,u=r.Renderer,a=r.generateId,h=r.scoped,l=c({classes:this.classes,parent:i,sheet:s,jss:o,Renderer:u,generateId:a,scoped:h},n);this.raw[e]=t,e in this.classes&&(l.selector="."+R(this.classes[e]));var d=p(e,t,l);if(!d)return null;this.register(d);var f=void 0===l.index?this.index.length:l.index;return this.index.splice(f,0,d),d},e.get=function(e){return this.map[e]},e.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},e.indexOf=function(e){return this.index.indexOf(e)},e.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},e.register=function(e){(this.map[e.key]=e)instanceof x?(this.map[e.selector]=e).id&&(this.classes[e.key]=e.id):e instanceof V&&this.keyframes&&(this.keyframes[e.name]=e.id)},e.unregister=function(e){delete this.map[e.key],e instanceof x?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof V&&delete this.keyframes[e.name]},e.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)},e.onUpdate=function(e,t,n){void 0===n&&(n=$);var r=this.options,i=r.jss.plugins,s=r.sheet;if(t.rules instanceof l)t.rules.update(e,n);else{var o=t,u=o.style;if(i.onUpdate(e,t,s,n),n.process&&u&&u!==o.style)for(var a in i.onProcessStyle(o.style,o,s),o.style){var h=o.style[a];h!==u[a]&&o.prop(a,h,H)}}},e.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},l}(),Q=function(){function e(e,t){for(var n 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=c({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),this.renderer=new t.Renderer(this),this.rules=new K(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached&&(this.renderer.detach(),this.attached=!1),this},t.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))):this.deployed=!1,i):null},t.insertRule=function(e){this.renderer.insertRule(e)},t.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},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.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=this.plugins.external.concat(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}(),X=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(t){return this.registry.filter(function(e){return e.attached}).map(function(e){return e.toString(t)}).join("\n")},f(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Y=new X,Z="2f1acc6c3a606b082e5eef5e54414ffb";null==s[Z]&&(s[Z]=0);var ee=s[Z]++,te=function(){var i=0;return function(e,t){i+=1;var n="c",r="";return t&&(n=t.options.classNamePrefix||"c",null!=t.options.jss.id&&(r+=t.options.jss.id)),""+n+ee+r+i}},ne=function(e){var t;return function(){return t||(t=e()),t}};function re(e,t){try{return"attributeStyleMap"in e?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function ie(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=m(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;"attributeStyleMap"in e?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function se(e,t){try{"attributeStyleMap"in e?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){e.message}}function oe(e,t){return e.selectorText=t,e.selectorText===t}var ue=ne(function(){return document.querySelector("head")});function ae(e){var t=Y.registry;if(0<t.length){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)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;0<=n;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))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=ue(),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 he=ne(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),le=function(e,t,n){void 0===n&&(n=e.cssRules.length);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]},de=function(){function e(e){this.getPropertyValue=re,this.setProperty=ie,this.removeProperty=se,this.setSelector=oe,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Y.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||document.createElement("style"),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var s=he();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){!this.element.parentNode&&this.sheet&&(!function(e,t){var n=t.insertionPoint,r=ae(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 ue().appendChild(e)}(this.element,this.sheet.options),this.hasInsertedRules&&(this.hasInsertedRules=!1,this.deploy()))},t.detach=function(){this.element.parentNode.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?e.rules.index.forEach(this.insertRule,this):this.element.textContent="\n"+e.toString()+"\n")},t.insertRule=function(e,t){var n=this.element.sheet;if("conditional"===e.type||"keyframes"===e.type){var r=e,i=le(n,r.toString({children:!1}),t);return!1!==i&&(r.rules.index.forEach(function(e,t){var n=le(i,e.toString(),t);!1!==n&&(e.renderable=n)}),i)}var s=e.toString();if(!s)return!1;var o=le(n,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=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}(),fe=function(){function e(){}var t=e.prototype;return t.setProperty=function(){return!0},t.getPropertyValue=function(){return""},t.removeProperty=function(){},t.setSelector=function(){return!0},t.attach=function(){},t.detach=function(){},t.deploy=function(){},t.insertRule=function(){return!1},t.deleteRule=function(){return!0},t.replaceRule=function(){return!1},t.getRules=function(){},t.indexOf=function(){return-1},e}(),ce=0,pe=function(){function e(e){this.id=ce++,this.version="10.0.0-alpha.4",this.plugins=new W,this.options={createGenerateId:te,Renderer:n?de:fe,plugins:[]},this.generateId=te();for(var t=0;t<L.length;t++)this.plugins.use(L[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId,this.generateId=e.createGenerateId()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?fe:de)),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Y.index?0:Y.index+1);var r=new Q(e,c({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Y.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=c({},n,{jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=p(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){t.plugins.use(e)}),this},e}();var ye=function(){},ve=function(){function e(){this.sheets=[],this.refs=[],this.keys=[]}var t=e.prototype;return t.get=function(e){var t=this.keys.indexOf(e);return this.sheets[t]},t.add=function(e,t){var n=this.sheets,r=this.refs,i=this.keys,s=n.indexOf(t);return-1!==s?s:(n.push(t),r.push(0),i.push(e),n.length-1)},t.manage=function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n},t.unmanage=function(e){var t=this.keys.indexOf(e);-1!==t?0<this.refs[t]&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):ye(!1,"SheetsManager: can't find sheet to unmanage")},f(e,[{key:"size",get:function(){return this.keys.length}}]),e}(),ge="undefined"!=typeof CSS&&CSS&&"number"in CSS,me=function(e){return new pe(e)},be=me();e.hasCSSTOMSupport=ge,e.create=me,e.default=be,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=m,e.createRule=p,e.SheetsRegistry=X,e.SheetsManager=ve,e.RuleList=K,e.sheets=Y,e.createGenerateId=te,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "jss",
"description": "A lib for generating Style Sheets with JavaScript.",
"version": "10.0.0-alpha.3",
"version": "10.0.0-alpha.4",
"license": "MIT",

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

"scripts": {
"build": "node ../../scripts/build.js",
"prepare": "node ../../scripts/build.js",
"check-snapshot": "node ../../scripts/match-snapshot.js"

@@ -47,4 +47,5 @@ },

"symbol-observable": "^1.2.0",
"warning": "^3.0.0"
}
"tiny-warning": "^1.0.2"
},
"gitHead": "4efd47a4af45de9c8784d68f3a239f9a1d29c942"
}
/* @flow */
import warning from 'warning'
import warning from 'tiny-warning'
import RuleList from '../RuleList'

@@ -50,3 +50,3 @@ import type StyleSheet from '../StyleSheet'

this.name = 'noname'
warning(false, '[JSS] Bad keyframes name %s', key)
warning(false, `[JSS] Bad keyframes name ${key}`)
}

@@ -100,3 +100,3 @@ this.key = `${this.type}-${this.name}`

} else {
warning(false, '[JSS] Referenced keyframes rule "%s" is not defined.', ref[1])
warning(false, `[JSS] Referenced keyframes rule "${ref[1]}" is not defined.`)
}

@@ -103,0 +103,0 @@ }

/* @flow */
import warning from 'warning'
import warning from 'tiny-warning'
import toCss from '../utils/toCss'

@@ -4,0 +4,0 @@ import toCssValue from '../utils/toCssValue'

/* @flow */
import warning from 'warning'
import warning from 'tiny-warning'
import type StyleSheet from './StyleSheet'

@@ -125,3 +125,5 @@ import type {

registry[name].push(plugin[name])
} else warning(false, '[JSS] Unknown hook "%s".', name)
} else {
warning(false, `[JSS] Unknown hook "${name}".`)
}
}

@@ -128,0 +130,0 @@ return registry

/* @flow */
import warning from 'warning'
import warning from 'tiny-warning'
import sheets from '../sheets'

@@ -102,5 +102,3 @@ import type StyleSheet from '../StyleSheet'

false,
'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',
err.message,
prop
`[JSS] DOMException "${err.message}" was thrown. Tried to remove property "${prop}".`
)

@@ -218,3 +216,3 @@ }

// bad specificity issues may appear.
warning(insertionPoint === 'jss', '[JSS] Insertion point "%s" not found.', insertionPoint)
warning(false, `[JSS] Insertion point "${insertionPoint}" not found.`)
}

@@ -277,3 +275,3 @@

} catch (err) {
warning(false, '[JSS] Can not insert an unsupported rule \n\r%s', rule)
warning(false, `[JSS] Can not insert an unsupported rule \n${rule}`)
return false

@@ -280,0 +278,0 @@ }

/* @flow */
import warning from 'warning'
import warning from 'tiny-warning'
import type {Rule, GenerateId} from '../types'

@@ -9,4 +9,2 @@ import StyleSheet from '../StyleSheet'

const env = process.env.NODE_ENV
/**

@@ -19,2 +17,3 @@ * Returns a function which generates unique class names based on counters.

let ruleCounter = 0
const env = process.env.NODE_ENV
const defaultPrefix = env === 'production' ? 'c' : ''

@@ -26,3 +25,3 @@

if (ruleCounter > maxRules) {
warning(false, '[JSS] You might have a memory leak. Rule counter is at %s.', ruleCounter)
warning(false, `[JSS] You might have a memory leak. Rule counter is at ${ruleCounter}.`)
}

@@ -29,0 +28,0 @@

/* @flow */
import warning from 'warning'
import warning from 'tiny-warning'
import type {Rule, RuleOptions, JssStyle} from '../types'

@@ -22,3 +22,3 @@ import cloneStyle from './cloneStyle'

if (name[0] === '@') {
warning(false, '[JSS] Unknown rule %s', name)
warning(false, `[JSS] Unknown rule ${name}`)
}

@@ -25,0 +25,0 @@

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

const env = process.env.NODE_ENV
const escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g

@@ -7,3 +6,3 @@

// input for selectors, we are generating a valid selector.
if (env === 'production') return str
if (process.env.NODE_ENV === 'production') return str

@@ -10,0 +9,0 @@ const nativeEscape = typeof CSS !== 'undefined' && CSS.escape

Sorry, the diff of this file is not supported yet

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