pretty-lights
Advanced tools
Comparing version 0.0.12-alpha.6 to 0.0.12-alpha.7
@@ -6,10 +6,10 @@ "use strict"; | ||
}); | ||
exports.getStyles = getStyles; | ||
exports.createSerializer = createSerializer; | ||
Object.defineProperty(exports, "createMatchers", { | ||
Object.defineProperty(exports, "matchers", { | ||
enumerable: true, | ||
get: function get() { | ||
return _matchers.createMatchers; | ||
return _matchers.matchers; | ||
} | ||
}); | ||
exports["default"] = exports.test = exports.print = void 0; | ||
@@ -33,3 +33,3 @@ var css = _interopRequireWildcard(require("css")); | ||
if (node.children) { | ||
if (Array.isArray(node)) { | ||
// eslint-disable-next-line no-restricted-syntax | ||
@@ -41,3 +41,3 @@ var _iteratorNormalCompletion = true; | ||
try { | ||
for (var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
for (var _iterator = node[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var child = _step.value; | ||
@@ -60,4 +60,33 @@ getNodes(child, nodes); | ||
} | ||
return nodes; | ||
} | ||
if (node.children) { | ||
// eslint-disable-next-line no-restricted-syntax | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
try { | ||
for (var _iterator2 = node.children[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var _child = _step2.value; | ||
getNodes(_child, nodes); | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { | ||
_iterator2["return"](); | ||
} | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
} | ||
} | ||
} | ||
} | ||
if (_typeof(node) === 'object') { | ||
@@ -70,14 +99,19 @@ nodes.push(node); | ||
function getStyles(lights) { | ||
return Object.keys(lights.cache.inserted).reduce(function (style, current) { | ||
if (lights.cache.inserted[current] === true) { | ||
return style; | ||
} | ||
function getPrettyStylesFromClassNames(classNames, elements) { | ||
var styles = (0, _utils.getStylesFromClassNames)(classNames, elements); | ||
var prettyStyles; | ||
return style + lights.cache.inserted[current]; | ||
}, ''); | ||
try { | ||
prettyStyles = css.stringify(css.parse(styles)); | ||
} catch (e) { | ||
console.error(e); | ||
throw new Error("There was an error parsing the following css: \"".concat(styles, "\"")); | ||
} | ||
return prettyStyles; | ||
} | ||
function createSerializer(lights) { | ||
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
// $FORK$ remove css prop checks, remove filter function | ||
function createSerializer() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | ||
classNameReplacer = _ref.classNameReplacer, | ||
@@ -87,44 +121,20 @@ _ref$DOMElements = _ref.DOMElements, | ||
function markNodes(nodes) { | ||
nodes.forEach(function (node) { | ||
node.withPrettyLightsStyles = true; | ||
}); | ||
} | ||
var cache = new WeakSet(); | ||
function getStylesFromClassNames(classNames) { | ||
var styles = ''; // This could be done in a more efficient way | ||
// but it would be a breaking change to do so | ||
// because it would change the ordering of styles | ||
Object.keys(lights.cache.registered).forEach(function (className) { | ||
var indexOfClassName = classNames.indexOf(className); | ||
if (indexOfClassName !== -1) { | ||
var nameWithoutKey = classNames[indexOfClassName].substring(lights.cache.key.length + 1); | ||
styles += lights.cache.inserted[nameWithoutKey]; | ||
} | ||
}); | ||
var prettyStyles; | ||
try { | ||
prettyStyles = css.stringify(css.parse(styles)); | ||
} catch (e) { | ||
console.error(e); | ||
throw new Error("There was an error parsing css in pretty-lights/jest: \"".concat(styles, "\"")); | ||
} | ||
return prettyStyles; | ||
} | ||
function print(val, printer) { | ||
// $FORK$ remove css prop checks | ||
var nodes = getNodes(val); | ||
markNodes(nodes); | ||
var classNames = (0, _utils.getClassNamesFromNodes)(nodes); | ||
var styles = getStylesFromClassNames(classNames); | ||
var elements = (0, _utils.getStyleElements)(); | ||
var styles = getPrettyStylesFromClassNames(classNames, elements); | ||
nodes.forEach(cache.add, cache); | ||
var printedVal = printer(val); | ||
return (0, _replaceClassNames.replaceClassNames)(classNames, styles, printedVal, lights.cache.key, classNameReplacer); | ||
nodes.forEach(cache["delete"], cache); | ||
var keys = (0, _utils.getKeys)(elements); | ||
return (0, _replaceClassNames.replaceClassNames)(classNames, styles, printedVal, keys, classNameReplacer); | ||
} | ||
function test(val) { | ||
return val && !val.withPrettyLightsStyles && (DOMElements ? (0, _utils.isReactElement)(val) || (0, _utils.isDOMElement)(val) : (0, _utils.isReactElement)(val)); | ||
// $FORK$ remove css prop checks | ||
return val && !cache.has(val) && ((0, _utils.isReactElement)(val) || DOMElements && (0, _utils.isDOMElement)(val)); | ||
} | ||
@@ -136,2 +146,14 @@ | ||
}; | ||
} | ||
} | ||
var _createSerializer = createSerializer(), | ||
print = _createSerializer.print, | ||
test = _createSerializer.test; | ||
exports.test = test; | ||
exports.print = print; | ||
var _default = { | ||
print: print, | ||
test: test | ||
}; | ||
exports["default"] = _default; |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.createMatchers = createMatchers; | ||
exports.matchers = void 0; | ||
@@ -52,51 +52,48 @@ var _chalk = _interopRequireDefault(require("chalk")); | ||
function getStylesFromClassNames(classNames, lights) { | ||
return Object.keys(lights.cache.registered).reduce(function (styles, className) { | ||
var indexOfClassName = classNames.indexOf(className); | ||
function toHaveStyleRule(received, property, value) { | ||
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | ||
var target = options.target, | ||
media = options.media; | ||
var classNames = (0, _utils.getClassNamesFromNodes)([received]); | ||
var cssString = (0, _utils.getStylesFromClassNames)(classNames, (0, _utils.getStyleElements)()); | ||
var styles = css.parse(cssString); | ||
var preparedRules = styles.stylesheet.rules; | ||
if (indexOfClassName !== -1) { | ||
var nameWithoutKey = classNames[indexOfClassName].substring(lights.cache.key.length + 1); | ||
styles += lights.cache.inserted[nameWithoutKey]; | ||
} | ||
if (media) { | ||
preparedRules = (0, _utils.getMediaRules)(preparedRules, media); | ||
} | ||
return styles; | ||
}, ''); | ||
} // eslint-disable-next-line import/prefer-default-export | ||
var declaration = preparedRules.filter(function (rule) { | ||
return rule.type === _utils.RULE_TYPES.rule && (0, _utils.hasClassNames)(classNames, rule.selectors, target); | ||
}).reduce(function (decs, rule) { | ||
return decs.concat(rule.declarations); | ||
}, []).filter(function (dec) { | ||
return dec.type === 'declaration' && dec.property === property; | ||
}).pop(); | ||
function createMatchers(lights) { | ||
function toHaveStyleRule(received, property, value) { | ||
var selectors = (0, _utils.getClassNamesFromNodes)([received]); | ||
var cssString = getStylesFromClassNames(selectors, lights); | ||
var styles = css.parse(cssString); | ||
var declaration = styles.stylesheet.rules.reduce(function (decs, rule) { | ||
return Object.assign([], decs, rule.declarations); | ||
}, []).filter(function (dec) { | ||
return dec.type === 'declaration' && dec.property === property; | ||
}).pop(); | ||
if (!declaration) { | ||
return { | ||
pass: false, | ||
message: function message() { | ||
return "Property not found: ".concat(property); | ||
} | ||
}; | ||
} | ||
var pass = valueMatches(declaration, value); | ||
var message = function message() { | ||
return "Expected ".concat(property).concat(pass ? ' not ' : ' ', "to match:\n") + " ".concat(_chalk["default"].green(value), "\n") + 'Received:\n' + " ".concat(_chalk["default"].red(declaration.value)); | ||
}; | ||
if (!declaration) { | ||
return { | ||
pass: pass, | ||
message: message | ||
pass: false, | ||
message: function message() { | ||
return "Property not found: ".concat(property); | ||
} | ||
}; | ||
} | ||
var pass = valueMatches(declaration, value); | ||
var message = function message() { | ||
return "Expected ".concat(property).concat(pass ? ' not ' : ' ', "to match:\n") + " ".concat(_chalk["default"].green(value), "\n") + 'Received:\n' + " ".concat(_chalk["default"].red(declaration.value)); | ||
}; | ||
return { | ||
toHaveStyleRule: toHaveStyleRule | ||
pass: pass, | ||
message: message | ||
}; | ||
} | ||
} // eslint-disable-next-line import/prefer-default-export | ||
var matchers = { | ||
toHaveStyleRule: toHaveStyleRule | ||
}; | ||
exports.matchers = matchers; |
@@ -14,17 +14,20 @@ "use strict"; | ||
var replaceClassNames = function replaceClassNames(classNames, styles, code, key) { | ||
var replacer = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultClassNameReplacer; | ||
var index = 0; | ||
return classNames.reduce(function (acc, className) { | ||
if (className.indexOf("".concat(key, "-")) === 0 || componentSelectorClassNamePattern.test(className)) { | ||
var escapedRegex = new RegExp(className.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'g'); | ||
var returnVal = acc.replace(escapedRegex, replacer(className, index)); | ||
index += 1; | ||
return returnVal; | ||
} | ||
var replaceClassNames = function replaceClassNames(classNames, styles, code, keys) { | ||
var classNameReplacer = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultClassNameReplacer; | ||
return function () { | ||
var index = 0; | ||
var keyPattern = new RegExp("^(".concat(keys.join('|'), ")-")); | ||
return classNames.reduce(function (acc, className) { | ||
if (keyPattern.test(className) || componentSelectorClassNamePattern.test(className)) { | ||
var escapedRegex = new RegExp(className.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'g'); | ||
var returnVal = acc.replace(escapedRegex, classNameReplacer(className, index)); | ||
index += 1; | ||
return returnVal; | ||
} | ||
return acc; | ||
}, "".concat(styles).concat(styles ? '\n\n' : '').concat(code)); | ||
return acc; | ||
}, "".concat(styles).concat(styles ? '\n\n' : '').concat(code)); | ||
}(); | ||
}; | ||
exports.replaceClassNames = replaceClassNames; |
@@ -9,3 +9,29 @@ "use strict"; | ||
exports.getClassNamesFromNodes = getClassNamesFromNodes; | ||
exports.getStylesFromClassNames = getStylesFromClassNames; | ||
exports.getStyleElements = getStyleElements; | ||
exports.getKeys = getKeys; | ||
exports.hasClassNames = hasClassNames; | ||
exports.getMediaRules = getMediaRules; | ||
exports.RULE_TYPES = void 0; | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function flatMap(arr, iteratee) { | ||
var _ref; | ||
return (_ref = []).concat.apply(_ref, _toConsumableArray(arr.map(iteratee))); | ||
} | ||
var RULE_TYPES = { | ||
media: 'media', | ||
rule: 'rule' | ||
}; | ||
exports.RULE_TYPES = RULE_TYPES; | ||
function getClassNames(selectors, classes) { | ||
@@ -15,5 +41,5 @@ return classes ? selectors.concat(classes.split(' ')) : selectors; | ||
function getClassNamesFromTestRenderer(selectors, _ref) { | ||
var _ref$props = _ref.props, | ||
props = _ref$props === void 0 ? {} : _ref$props; | ||
function getClassNamesFromTestRenderer(selectors, _ref2) { | ||
var _ref2$props = _ref2.props, | ||
props = _ref2$props === void 0 ? {} : _ref2$props; | ||
return getClassNames(selectors, props.className || props["class"]); | ||
@@ -23,3 +49,3 @@ } | ||
function shouldDive(node) { | ||
return node.length > 0 && typeof node.dive === 'function' && typeof node.type() !== 'string'; | ||
return typeof node.dive === 'function' && typeof node.type() !== 'string'; | ||
} | ||
@@ -51,4 +77,5 @@ | ||
return val.$$typeof === Symbol["for"]('react.test.json'); | ||
} | ||
} // $FORK$ remove css prop checks | ||
var domElementPattern = /^((HTML|SVG)\w*)?Element$/; | ||
@@ -84,2 +111,130 @@ | ||
}, []); | ||
} | ||
var keyframesPattern = /^@keyframes\s+(animation-[^{\s]+)+/; | ||
var removeCommentPattern = /\/\*[\s\S]*?\*\//g; | ||
var getElementRules = function getElementRules(element) { | ||
var nonSpeedyRule = element.textContent; | ||
if (nonSpeedyRule) { | ||
return [nonSpeedyRule]; | ||
} | ||
if (!element.sheet) { | ||
return []; | ||
} // $FlowFixMe - flow doesn't know about `cssRules` property | ||
return [].slice.call(element.sheet.cssRules).map(function (cssRule) { | ||
return cssRule.cssText; | ||
}); | ||
}; | ||
function getStylesFromClassNames(classNames, elements) { | ||
if (!classNames.length) { | ||
return ''; | ||
} // eslint-disable-next-line no-use-before-define | ||
var keys = getKeys(elements); | ||
if (!keys.length) { | ||
return ''; | ||
} | ||
var keyPatten = new RegExp("^(".concat(keys.join('|'), ")-")); | ||
var filteredClassNames = classNames.filter(function (className) { | ||
return keyPatten.test(className); | ||
}); | ||
if (!filteredClassNames.length) { | ||
return ''; | ||
} | ||
var selectorPattern = new RegExp("\\.(".concat(filteredClassNames.join('|'), ")")); | ||
var keyframes = {}; | ||
var styles = ''; | ||
flatMap(elements, getElementRules).forEach(function (rule) { | ||
if (selectorPattern.test(rule)) { | ||
styles += rule; | ||
} | ||
var match = rule.match(keyframesPattern); | ||
if (match !== null) { | ||
var name = match[1]; | ||
if (keyframes[name] === undefined) { | ||
keyframes[name] = ''; | ||
} | ||
keyframes[name] += rule; | ||
} | ||
}); | ||
var keyframeNameKeys = Object.keys(keyframes); | ||
var keyframesStyles = ''; | ||
if (keyframeNameKeys.length) { | ||
var keyframesNamePattern = new RegExp(keyframeNameKeys.join('|'), 'g'); | ||
var keyframesNameCache = {}; | ||
var index = 0; | ||
styles = styles.replace(keyframesNamePattern, function (name) { | ||
if (keyframesNameCache[name] === undefined) { | ||
keyframesNameCache[name] = "animation-".concat(index); | ||
index += 1; | ||
keyframesStyles += keyframes[name]; | ||
} | ||
return keyframesNameCache[name]; | ||
}); | ||
keyframesStyles = keyframesStyles.replace(keyframesNamePattern, function (value) { | ||
return keyframesNameCache[value]; | ||
}); | ||
} | ||
return (keyframesStyles + styles).replace(removeCommentPattern, ''); | ||
} | ||
function getStyleElements() { | ||
var elements = Array.from(document.querySelectorAll('style[data-lights]')); // $FlowFixMe | ||
return elements; | ||
} | ||
var unique = function unique(arr) { | ||
return Array.from(new Set(arr)); | ||
}; | ||
function getKeys(elements) { | ||
var keys = unique(elements.map(function (element) { | ||
return (// $FlowFixMe we know it exists since we query for elements with this attribute | ||
element.getAttribute('data-lights') | ||
); | ||
})).filter(Boolean); | ||
return keys; | ||
} | ||
function hasClassNames(classNames, selectors, target) { | ||
// selectors is the classNames of specific css rule | ||
return selectors.some(function (selector) { | ||
// if no target, use className of the specific css rule and try to find it | ||
// in the list of received node classNames to make sure this css rule | ||
// applied for root element | ||
if (!target) { | ||
return classNames.includes(selector.slice(1)); | ||
} // check if selector (className) of specific css rule match target | ||
return target instanceof RegExp ? target.test(selector) : selector.includes(target); | ||
}); | ||
} | ||
function getMediaRules(rules, media) { | ||
return rules.filter(function (rule) { | ||
var isMediaMatch = rule.media ? rule.media.replace(/\s/g, '').includes(media.replace(/\s/g, '')) : false; | ||
return rule.type === RULE_TYPES.media && isMediaMatch; | ||
}).reduce(function (mediaRules, mediaRule) { | ||
return mediaRules.concat(mediaRule.rules); | ||
}, []); | ||
} |
@@ -1,2 +0,2 @@ | ||
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("@emotion/unitless")),o=e(require("@emotion/memoize")),i=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),s=e(require("hoist-non-react-statics")),c=require("react"),u=e(c);function l(e){return(l="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})(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var v=function(){function e(t){!function(t,r){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var t;return(t=[{key:"insert",value:function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(t,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(t)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);n.insertRule(e,o?0:n.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else r.appendChild(document.createTextNode(e));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}(),y="".concat("/*|*/","}"),m={current:null};function g(e){e&&m.current.insert("".concat(e,"}"))}var b=function(e,t,r,n,o,i,a,s,c,u){switch(e){default:break;case 1:switch(t.charCodeAt(0)){default:break;case 64:return m.current.insert("".concat(t,";")),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+"/*|*/";break;case 3:switch(s){case 102:case 112:return m.current.insert(r[0]+t),"";default:return t+(0===u?"/*|*/":"")}case-2:t.split(y).forEach(g)}},E=function(e,t){if(1===e&&108===t.charCodeAt(0)&&98===t.charCodeAt(2))return""},_="undefined"!=typeof document,w=/\/\*\|\*\//g,N={},O=_?void 0:a(function(){var e=a(function(){return{}}),t={},r={};return function(n){return void 0===n||!0===n?t:!1===n?r:e(n)}}),S="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",x="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",A=/[A-Z]|^ms/g,C=function(e){return 45===e.charCodeAt(1)},j=function(e){return null!=e&&"boolean"!=typeof e},k=o(function(e){return C(e)?e:e.replace(A,"-$&").toLowerCase()}),P=function(e,t){return 1===n[e]||C(e)||"number"!=typeof t||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var D=/(attr|calc|counters?|url)\(/,T=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],V=P,q=/^-ms-/,R=/-(.)/g,I={};P=function(e,t){"content"===e&&("string"!=typeof t||-1===T.indexOf(t)&&!D.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`"));var r=V(e,t);return""===r||C(e)||-1===e.indexOf("-")||void 0!==I[e]||(I[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean ".concat(e.replace(q,"ms-").replace(R,function(e,t){return t.toUpperCase()}),"?"))),r}}function L(e,t,r,n){if(null==r)return"";switch(l(r)){case"boolean":return"";case"function":if(void 0!==r.__lights_styles){var o=r.toString();if("NO_COMPONENT_SELECTOR"===o&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return o}return void 0===e&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),L(e,t,void 0===e?r():r(e),n);case"object":if(void 0!==r.styles){var i="".concat(r.styles,";");return"production"!==process.env.NODE_ENV&&void 0!==r.map&&(i+=r.map),i}return function(e,t,r){if(G.has(r))return G.get(r);var n="";if(Array.isArray(r))for(var o=0;o<r.length;o+=1)n+=L(e,t,r[o],!1);else Object.keys(r).forEach(function(o){var i=r[o];if("object"!==l(i))null!=t&&void 0!==t[i]?n+="".concat(o,"{").concat(t[i],"}"):j(i)&&(n+="".concat(k(o),":").concat(P(o,i),";"));else{if("NO_COMPONENT_SELECTOR"===o&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var a=L(e,t,i,!1);switch(o){case"animation":case"animationName":n+="".concat(k(o),":").concat(a,";");break;default:"production"!==process.env.NODE_ENV&&"undefined"===o&&console.error(x),n+="".concat(o,"{").concat(a,"}")}}else for(var s=0;s<i.length;s+=1)j(i[s])&&(n+="".concat(k(o),":").concat(P(o,i[s]),";"))}});return G.set(r,n),n}(e,t,r)}if(null==t)return r;var a=t[r];return!1===n&&void 0!==a?a:r}var Y,G=new WeakMap,M=/label:\s*([^\s;\n{]+)\s*;/g;function W(e,t,n){if(1===e.length&&"object"===l(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o,i=!0,a="",s=e[0];null==s||void 0===s.raw?(i=!1,a+=L(n,t,s,!1)):("production"!==process.env.NODE_ENV&&void 0===s[0]&&console.error(S),a+=s[0]);for(var c=1;c<e.length;c+=1)a+=L(n,t,e[c],46===a.charCodeAt(a.length-1)),i&&("production"!==process.env.NODE_ENV&&void 0===s[c]&&console.error(S),a+=s[c]);"production"!==process.env.NODE_ENV&&(a=a.replace(Y,function(e){return o=e,""})),M.lastIndex=0;var u="",f=a;return a=a.replace(M,function(e,t){return u+="-".concat(t),""}),{name:r(a+u)+u,styles:a,stylesWithLabel:f,map:o}}function z(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(r):n+="".concat(r," ")}),n}"production"!==process.env.NODE_ENV&&(Y=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//);var F=function(e,t){var r="".concat(e.key,"-").concat(t.name);void 0===e.registered[r]&&(e.registered[r]=t.stylesWithLabel||""),void 0===e.inserted[t.name]&&e.insert(".".concat(r),t,e.sheet,!0)};function U(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function H(e,t,r){var n=[],o=z(e,n,r);return n.length<2?r:o+t(n)}var $=u.createContext({}),B=i,J=function(e){return"theme"!==e&&"innerRef"!==e},Z=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?B:J},K=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return h({},e,{},t)}(e,t)})});function Q(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function X(e,t){return function(r){return Q(e,r,t)}}X.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&Q(e,n,o)}};var ee=function(e,r){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;var n=function(e){void 0===e&&(e={});var r,n,o=e.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(o))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(o,'" was passed'));void 0!==e.prefix&&(n={prefix:e.prefix});var i,a,s=new t(n),c={};if(_){i=e.container||document.head;var u="data-lights-".concat(o),l=document.querySelectorAll("style[".concat(u,"]"));Array.prototype.forEach.call(l,function(e){(e.getAttribute(u)||"").split(" ").forEach(function(e){c[e]=!0}),e.parentNode!==i&&i.appendChild(e)})}if(_)s.use(e.stylisPlugins)(b),a=function(e,t,n,o){if(m.current=n,"production"!==process.env.NODE_ENV&&void 0!==t.map){var i=t.map;m.current={insert:function(e){n.insert(e+i)}}}if(void 0===r.inserted[t.name]){var a=s(e,t.styles);o&&(r.inserted[t.name]=a.replace(w,""))}};else{s.use(E);var f=N;(e.stylisPlugins||void 0!==e.prefix)&&(s.use(e.stylisPlugins),f=O(e.stylisPlugins||N)(e.prefix)),a=function(e,t,n,o){if(void 0===r.inserted[t.name]){var i=function(e,t){var r=t.name;return void 0===f[r]&&(f[r]=s(e,t.styles)),f[r]}(e,t);if(!o)return i;r.inserted[t.name]=i}}}if("production"!==process.env.NODE_ENV){var p=/\/\*/g,d=/\*\//g;s.use(function(e,t){switch(e){default:break;case-1:for(;p.test(t);){if(d.lastIndex=p.lastIndex,!d.test(t))throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');p.lastIndex=d.lastIndex}p.lastIndex=0}})}return r={key:o,sheet:new v({key:o,container:i,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:c,registered:{},insert:a}}(void 0);n.sheet.speedy=function(e){if("production"!==process.env.NODE_ENV&&0!==this.ctr)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=e},n.compat=!0;var o=function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=W(r,n.registered),a="".concat(n.key,"-").concat(i.name);return F(n,i),a},i={css:o,cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=e[i];return H(n.registered,o,function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},injectGlobal:function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=W(r,n.registered);U(n,i)},keyframes:function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=W(r,n.registered),a="animation-".concat(i.name);return U(n,{name:i.name,styles:"@keyframes ".concat(a,"{").concat(i.styles,"}")}),a},hydrate:function(e){e.forEach(function(e){n.inserted[e]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:z,merge:H.bind(null,n.registered,o)};return e.__SECRET_LIGHTS__=i,i}("undefined"!=typeof global?global:{}),te=function(e){return function t(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,a;void 0!==n&&(o=n.label,a=n.target,i=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var s=r.__lights_real===r,u=s&&r.__lights_base||r;"function"!=typeof i&&s&&(i=r.__lights_forwardProp);var l=i||Z(u),f=!l("as");return function(){var p=arguments,d=s&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];void 0!==o&&d.push("label:".concat(o,";"));for(var v=arguments.length,y=new Array(v),m=0;m<v;m++)y[m]=p[m];if(null==y[0]||void 0===y[0].raw)d.push.apply(d,y);else{"production"!==process.env.NODE_ENV&&void 0===y[0][0]&&console.error(S),d.push(y[0][0]);for(var g=y.length,b=1;b<g;b+=1)"production"!==process.env.NODE_ENV&&void 0===y[0][b]&&console.error(S),d.push(y[b],y[0][b])}var E=function(t){return c.createElement($.Consumer,null,function(r){var n=f&&t.as||u,o="",s=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=r}"string"==typeof t.className?o=z(e.cache.registered,s,t.className):null!=t.className&&(o="".concat(t.className," "));var v=W(d.concat(s),e.cache.registered,p);F(e.cache,v),o+="".concat(e.cache.key,"-").concat(v.name),void 0!==a&&(o+=" ".concat(a));var y=f&&void 0===i?Z(n):l,m={};for(var g in t)f&&"as"===g||y(g)&&(m[g]=t[g]);return m.className=o,m.ref=t.innerRef,c.createElement(n,m)})};return E.displayName=void 0!==o?o:"Styled(".concat("string"==typeof u?u:u.displayName||u.name||"Component",")"),void 0!==r.defaultProps&&(E.defaultProps=r.defaultProps),E.__lights_styles=d,E.__lights_base=u,E.__lights_real=E,E.__lights_forwardProp=i,Object.defineProperty(E,"toString",{value:function(){return void 0===a&&"production"!==process.env.NODE_ENV?"NO_COMPONENT_SELECTOR":".".concat(a)}}),E.withComponent=function(e,r){return t(e,void 0!==r?h({},n||{},{},r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},E}}}(ee),re=ee.hydrate,ne=ee.cx,oe=ee.merge,ie=ee.getRegisteredStyles,ae=ee.injectGlobal,se=ee.keyframes,ce=ee.css,ue=ee.sheet,le=ee.cache;exports.flush=ee.flush,exports.hydrate=re,exports.cx=ne,exports.merge=oe,exports.getRegisteredStyles=ie,exports.injectGlobal=ae,exports.keyframes=se,exports.css=ce,exports.sheet=ue,exports.cache=le,exports.ThemeContext=$,exports.ThemeProvider=function(e){return c.createElement($.Consumer,null,function(t){return e.theme!==t&&(t=K(t)(e.theme)),c.createElement($.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext($)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=c.forwardRef(function(t,r){return c.createElement($.Consumer,null,function(n){return c.createElement(e,p({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),s(r,e)},exports.themeFn=X,exports.styled=te; | ||
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("@emotion/unitless")),o=e(require("@emotion/memoize")),a=e(require("@emotion/is-prop-valid")),i=e(require("@emotion/weak-memoize")),s=e(require("hoist-non-react-statics")),c=require("react"),u=e(c);function l(e){return(l="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})(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var v=function(){function e(t){!function(t,r){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var t;return(t=[{key:"insert",value:function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(t,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(t)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);n.insertRule(e,o?0:n.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else r.appendChild(document.createTextNode(e));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}(),y="".concat("/*|*/","}"),m={current:null};function g(e){e&&m.current.insert("".concat(e,"}"))}var b,E=function(e,t,r,n,o,a,i,s,c,u){switch(e){default:break;case 1:switch(t.charCodeAt(0)){default:break;case 64:return m.current.insert("".concat(t,";")),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+"/*|*/";break;case 3:switch(s){case 102:case 112:return m.current.insert(r[0]+t),"";default:return t+(0===u?"/*|*/":"")}case-2:t.split(y).forEach(g)}},w=function(e,t){if(1===e&&108===t.charCodeAt(0)&&98===t.charCodeAt(2))return""},_="undefined"!=typeof document,N=/\/\*\|\*\//g,O={},x=_?void 0:i(function(){var e=i(function(){return{}}),t={},r={};return function(n){return void 0===n||!0===n?t:!1===n?r:e(n)}}),k="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",j="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",A=/[A-Z]|^ms/g,P=/_EMO_([^_]+?)_([^]*?)_EMO_/g,S=function(e){return 45===e.charCodeAt(1)},C=function(e){return null!=e&&"boolean"!=typeof e},D=o(function(e){return S(e)?e:e.replace(A,"-$&").toLowerCase()}),V=function(e,t){switch(e){default:break;case"animation":case"animationName":if("string"==typeof t)return t.replace(P,function(e,t,r){return b={name:t,styles:r,next:b},t})}return 1===n[e]||S(e)||"number"!=typeof t||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var q=/(attr|calc|counters?|url)\(/,T=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],R=V,I=/^-ms-/,Y=/-(.)/g,L={};V=function(e,t){"content"===e&&("string"!=typeof t||-1===T.indexOf(t)&&!q.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`"));var r=R(e,t);return""===r||S(e)||-1===e.indexOf("-")||void 0!==L[e]||(L[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean ".concat(e.replace(I,"ms-").replace(Y,function(e,t){return t.toUpperCase()}),"?"))),r}}function M(e,t,r,n){if(null==r)return"";if(void 0!==r.__lights_styles){var o=r.toString();if("NO_COMPONENT_SELECTOR"===o&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return o}switch(l(r)){case"boolean":return"";case"object":if(1===r.anim)return b={name:r.name,styles:r.styles,next:b},r.name;if(void 0!==r.styles){var a=r.next;if(void 0!==a)for(;void 0!==a;)b={name:a.name,styles:a.styles,next:b},a=a.next;var i="".concat(r.styles,";");return"production"!==process.env.NODE_ENV&&void 0!==r.map&&(i+=r.map),i}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o+=1)n+=M(e,t,r[o],!1);else for(var a in r){var i=r[a];if("object"!==l(i))null!=t&&void 0!==t[i]?n+="".concat(a,"{").concat(t[i],"}"):C(i)&&(n+="".concat(D(a),":").concat(V(a,i),";"));else{if("NO_COMPONENT_SELECTOR"===a&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=M(e,t,i,!1);switch(a){case"animation":case"animationName":n+="".concat(D(a),":").concat(s,";");break;default:"production"!==process.env.NODE_ENV&&"undefined"===a&&console.error(j),n+="".concat(a,"{").concat(s,"}")}}else for(var c=0;c<i.length;c+=1)C(i[c])&&(n+="".concat(D(a),":").concat(V(a,i[c]),";"))}}return n}(e,t,r);case"function":if(void 0!==e){var s=b,c=r(e);return b=s,M(e,t,c,n)}"production"!==process.env.NODE_ENV&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":if("production"!==process.env.NODE_ENV){var u=[],f=r.replace(P,function(e,t,r){var n="animation".concat(u.length);return u.push("const ".concat(n," = keyframes`").concat(r.replace(/^@keyframes animation-\w+/,""),"`")),"${".concat(n,"}")});u.length&&console.error("".concat("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n").concat([].concat(u,["`".concat(f,"`")]).join("\n"),"\n\nYou should wrap it with `css` like this:\n\ncss`").concat(f,"`"))}}if(null==t)return r;var p=t[r];return!1===n&&void 0!==p?p:r}var F,G=/label:\s*([^\s;\n{]+)\s*;/g;function z(e,t,n){if(1===e.length&&"object"===l(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,a="";b=void 0;var i,s=e[0];null==s||void 0===s.raw?(o=!1,a+=M(n,t,s,!1)):("production"!==process.env.NODE_ENV&&void 0===s[0]&&console.error(k),a+=s[0]);for(var c=1;c<e.length;c+=1)a+=M(n,t,e[c],46===a.charCodeAt(a.length-1)),o&&("production"!==process.env.NODE_ENV&&void 0===s[c]&&console.error(k),a+=s[c]);"production"!==process.env.NODE_ENV&&(a=a.replace(F,function(e){return i=e,""})),G.lastIndex=0;for(var u,f="";null!==(u=G.exec(a));)f+="-".concat(u[1]);return{name:r(a)+f,styles:a,map:i,next:b}}"production"!==process.env.NODE_ENV&&(F=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//);var U="undefined"!=typeof document;function $(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]):n+="".concat(r," ")}),n}var B=function(e,t){var r="".concat(e.key,"-").concat(t.name);if(void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var n="",o=t;do{var a=e.insert(".".concat(r),o,e.sheet,!0);U||void 0===a||(n+=a),o=o.next}while(void 0!==o);if(!U&&0!==n.length)return n}};function J(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function W(e,t,r){var n=[],o=$(e,n,r);return n.length<2?r:o+t(n)}var Z=u.createContext({}),H=a,K=function(e){return"theme"!==e&&"innerRef"!==e},Q=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?H:K},X=i(function(e){return i(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return h({},e,{},t)}(e,t)})});function ee(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function te(e,t){return function(r){return ee(e,r,t)}}te.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&ee(e,n,o)}};var re=function(e){var r=function(e){void 0===e&&(e={});var r,n,o=e.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(o))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(o,'" was passed'));void 0!==e.prefix&&(n={prefix:e.prefix});var a,i,s=new t(n),c={};if(_){a=e.container||document.head;var u="data-lights-".concat(o),l=document.querySelectorAll("style[".concat(u,"]"));Array.prototype.forEach.call(l,function(e){(e.getAttribute(u)||"").split(" ").forEach(function(e){c[e]=!0}),e.parentNode!==a&&a.appendChild(e)})}if(_)s.use(e.stylisPlugins)(E),i=function(e,t,n,o){if(m.current=n,"production"!==process.env.NODE_ENV&&void 0!==t.map){var a=t.map;m.current={insert:function(e){n.insert(e+a)}}}if(void 0===r.inserted[t.name]){var i=s(e,t.styles);o&&(r.inserted[t.name]=i.replace(N,""))}};else{s.use(w);var f=O;(e.stylisPlugins||void 0!==e.prefix)&&(s.use(e.stylisPlugins),f=x(e.stylisPlugins||O)(e.prefix)),i=function(e,t,n,o){if(void 0===r.inserted[t.name]){var a=function(e,t){var r=t.name;return void 0===f[r]&&(f[r]=s(e,t.styles)),f[r]}(e,t);if(!o)return a;r.inserted[t.name]=a}}}if("production"!==process.env.NODE_ENV){var p=/\/\*/g,d=/\*\//g;s.use(function(e,t){switch(e){default:break;case-1:for(;p.test(t);){if(d.lastIndex=p.lastIndex,!d.test(t))throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');p.lastIndex=d.lastIndex}p.lastIndex=0}})}return r={key:o,sheet:new v({key:o,container:a,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:c,registered:{},insert:i}}(void 0);r.sheet.speedy=function(e){if("production"!==process.env.NODE_ENV&&0!==this.ctr)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=e},r.compat=!0;var n=function(){for(var e=arguments,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=e[o];var a=z(n,r.registered),i="".concat(r.key,"-").concat(a.name);return B(r,a),i};return{css:n,cx:function(){for(var e=arguments,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=e[a];return W(r.registered,n,function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var a=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var i in a="",o)o[i]&&i&&(a&&(a+=" "),a+=i);break;default:a=o}a&&(r&&(r+=" "),r+=a)}}return r}(o))},injectGlobal:function(){for(var e=arguments,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=e[o];var a=z(n,r.registered);J(r,a)},keyframes:function(){for(var e=arguments,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=e[o];var a=z(n,r.registered),i="animation-".concat(a.name);return J(r,{name:a.name,styles:"@keyframes ".concat(i,"{").concat(a.styles,"}")}),i},hydrate:function(e){e.forEach(function(e){r.inserted[e]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:$,merge:W.bind(null,r.registered,n)}}(),ne=function(e){return function t(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,a,i;void 0!==n&&(o=n.label,i=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var s=r.__lights_real===r,u=s&&r.__lights_base||r;"function"!=typeof a&&s&&(a=r.__lights_forwardProp);var l=a||Q(u),f=!l("as");return function(){var p=arguments,d=s&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];void 0!==o&&d.push("label:".concat(o,";"));for(var v=arguments.length,y=new Array(v),m=0;m<v;m++)y[m]=p[m];if(null==y[0]||void 0===y[0].raw)d.push.apply(d,y);else{"production"!==process.env.NODE_ENV&&void 0===y[0][0]&&console.error(k),d.push(y[0][0]);for(var g=y.length,b=1;b<g;b+=1)"production"!==process.env.NODE_ENV&&void 0===y[0][b]&&console.error(k),d.push(y[b],y[0][b])}var E=function(t){return c.createElement(Z.Consumer,null,function(r){var n=f&&t.as||u,o="",s=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=r}"string"==typeof t.className?o=$(e.cache.registered,s,t.className):null!=t.className&&(o="".concat(t.className," "));var v=z(d.concat(s),e.cache.registered,p);B(e.cache,v),o+="".concat(e.cache.key,"-").concat(v.name),void 0!==i&&(o+=" ".concat(i));var y=f&&void 0===a?Q(n):l,m={};for(var g in t)f&&"as"===g||y(g)&&(m[g]=t[g]);return m.className=o,m.ref=t.innerRef,c.createElement(n,m)})};return E.displayName=void 0!==o?o:"Styled(".concat("string"==typeof u?u:u.displayName||u.name||"Component",")"),void 0!==r.defaultProps&&(E.defaultProps=r.defaultProps),E.__lights_styles=d,E.__lights_base=u,E.__lights_real=E,E.__lights_forwardProp=a,Object.defineProperty(E,"toString",{value:function(){return void 0===i&&"production"!==process.env.NODE_ENV?"NO_COMPONENT_SELECTOR":".".concat(i)}}),E.withComponent=function(e,r){return t(e,void 0!==r?h({},n||{},{},r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},E}}}(re).bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){ne[e]=ne(e)});var oe=re.hydrate,ae=re.cx,ie=re.merge,se=re.getRegisteredStyles,ce=re.injectGlobal,ue=re.keyframes,le=re.css,fe=re.sheet,pe=re.cache;exports.flush=re.flush,exports.hydrate=oe,exports.cx=ae,exports.merge=ie,exports.getRegisteredStyles=se,exports.injectGlobal=ce,exports.keyframes=ue,exports.css=le,exports.sheet=fe,exports.cache=pe,exports.ThemeContext=Z,exports.ThemeProvider=function(e){return c.createElement(Z.Consumer,null,function(t){return e.theme!==t&&(t=X(t)(e.theme)),c.createElement(Z.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(Z)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=c.forwardRef(function(t,r){return c.createElement(Z.Consumer,null,function(n){return c.createElement(e,p({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),s(r,e)},exports.themeFn=te,exports.styled=ne; | ||
//# sourceMappingURL=pretty-lights.js.map |
@@ -1,2 +0,2 @@ | ||
import e from"@emotion/stylis";import t from"@emotion/hash";import r from"@emotion/unitless";import n from"@emotion/memoize";import o from"@emotion/is-prop-valid";import i from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import c,{createElement as s,forwardRef as u}from"react";function l(e){return(l="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})(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var v=function(){function e(t){!function(t,r){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var t;return(t=[{key:"insert",value:function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(t,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(t)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);n.insertRule(e,o?0:n.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else r.appendChild(document.createTextNode(e));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}(),y="".concat("/*|*/","}"),m={current:null};function g(e){e&&m.current.insert("".concat(e,"}"))}var b=function(e,t,r,n,o,i,a,c,s,u){switch(e){default:break;case 1:switch(t.charCodeAt(0)){default:break;case 64:return m.current.insert("".concat(t,";")),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===c)return t+"/*|*/";break;case 3:switch(c){case 102:case 112:return m.current.insert(r[0]+t),"";default:return t+(0===u?"/*|*/":"")}case-2:t.split(y).forEach(g)}},_=function(e,t){if(1===e&&108===t.charCodeAt(0)&&98===t.charCodeAt(2))return""},E="undefined"!=typeof document,w=/\/\*\|\*\//g,N={},O=E?void 0:i(function(){var e=i(function(){return{}}),t={},r={};return function(n){return void 0===n||!0===n?t:!1===n?r:e(n)}}),S="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",A="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",C=/[A-Z]|^ms/g,j=function(e){return 45===e.charCodeAt(1)},k=function(e){return null!=e&&"boolean"!=typeof e},P=n(function(e){return j(e)?e:e.replace(C,"-$&").toLowerCase()}),D=function(e,t){return 1===r[e]||j(e)||"number"!=typeof t||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var x=/(attr|calc|counters?|url)\(/,V=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],T=D,R=/^-ms-/,I=/-(.)/g,L={};D=function(e,t){"content"===e&&("string"!=typeof t||-1===V.indexOf(t)&&!x.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`"));var r=T(e,t);return""===r||j(e)||-1===e.indexOf("-")||void 0!==L[e]||(L[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean ".concat(e.replace(R,"ms-").replace(I,function(e,t){return t.toUpperCase()}),"?"))),r}}function q(e,t,r,n){if(null==r)return"";switch(l(r)){case"boolean":return"";case"function":if(void 0!==r.__lights_styles){var o=r.toString();if("NO_COMPONENT_SELECTOR"===o&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return o}return void 0===e&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),q(e,t,void 0===e?r():r(e),n);case"object":if(void 0!==r.styles){var i="".concat(r.styles,";");return"production"!==process.env.NODE_ENV&&void 0!==r.map&&(i+=r.map),i}return function(e,t,r){if(G.has(r))return G.get(r);var n="";if(Array.isArray(r))for(var o=0;o<r.length;o+=1)n+=q(e,t,r[o],!1);else Object.keys(r).forEach(function(o){var i=r[o];if("object"!==l(i))null!=t&&void 0!==t[i]?n+="".concat(o,"{").concat(t[i],"}"):k(i)&&(n+="".concat(P(o),":").concat(D(o,i),";"));else{if("NO_COMPONENT_SELECTOR"===o&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var a=q(e,t,i,!1);switch(o){case"animation":case"animationName":n+="".concat(P(o),":").concat(a,";");break;default:"production"!==process.env.NODE_ENV&&"undefined"===o&&console.error(A),n+="".concat(o,"{").concat(a,"}")}}else for(var c=0;c<i.length;c+=1)k(i[c])&&(n+="".concat(P(o),":").concat(D(o,i[c]),";"))}});return G.set(r,n),n}(e,t,r)}if(null==t)return r;var a=t[r];return!1===n&&void 0!==a?a:r}var Y,G=new WeakMap,M=/label:\s*([^\s;\n{]+)\s*;/g;function W(e,r,n){if(1===e.length&&"object"===l(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o,i=!0,a="",c=e[0];null==c||void 0===c.raw?(i=!1,a+=q(n,r,c,!1)):("production"!==process.env.NODE_ENV&&void 0===c[0]&&console.error(S),a+=c[0]);for(var s=1;s<e.length;s+=1)a+=q(n,r,e[s],46===a.charCodeAt(a.length-1)),i&&("production"!==process.env.NODE_ENV&&void 0===c[s]&&console.error(S),a+=c[s]);"production"!==process.env.NODE_ENV&&(a=a.replace(Y,function(e){return o=e,""})),M.lastIndex=0;var u="",f=a;return a=a.replace(M,function(e,t){return u+="-".concat(t),""}),{name:t(a+u)+u,styles:a,stylesWithLabel:f,map:o}}function z(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(r):n+="".concat(r," ")}),n}"production"!==process.env.NODE_ENV&&(Y=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//);var F=function(e,t){var r="".concat(e.key,"-").concat(t.name);void 0===e.registered[r]&&(e.registered[r]=t.stylesWithLabel||""),void 0===e.inserted[t.name]&&e.insert(".".concat(r),t,e.sheet,!0)};function U(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function H(e,t,r){var n=[],o=z(e,n,r);return n.length<2?r:o+t(n)}var $=c.createContext({}),B=o,J=function(e){return"theme"!==e&&"innerRef"!==e},Z=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?B:J},K=i(function(e){return i(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return h({},e,{},t)}(e,t)})}),Q=function(e){return s($.Consumer,null,function(t){return e.theme!==t&&(t=K(t)(e.theme)),s($.Provider,{value:t},e.children)})};function X(e){var t=e.displayName||e.name||"Component",r=u(function(t,r){return s($.Consumer,null,function(n){return s(e,p({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),a(r,e)}function ee(){return c.useContext($)}function te(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function re(e,t){return function(r){return te(e,r,t)}}re.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&te(e,n,o)}};var ne=function(t,r){if(void 0!==t.__SECRET_LIGHTS__)return t.__SECRET_LIGHTS__;var n=function(t){void 0===t&&(t={});var r,n,o=t.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(o))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(o,'" was passed'));void 0!==t.prefix&&(n={prefix:t.prefix});var i,a,c=new e(n),s={};if(E){i=t.container||document.head;var u="data-lights-".concat(o),l=document.querySelectorAll("style[".concat(u,"]"));Array.prototype.forEach.call(l,function(e){(e.getAttribute(u)||"").split(" ").forEach(function(e){s[e]=!0}),e.parentNode!==i&&i.appendChild(e)})}if(E)c.use(t.stylisPlugins)(b),a=function(e,t,n,o){if(m.current=n,"production"!==process.env.NODE_ENV&&void 0!==t.map){var i=t.map;m.current={insert:function(e){n.insert(e+i)}}}if(void 0===r.inserted[t.name]){var a=c(e,t.styles);o&&(r.inserted[t.name]=a.replace(w,""))}};else{c.use(_);var f=N;(t.stylisPlugins||void 0!==t.prefix)&&(c.use(t.stylisPlugins),f=O(t.stylisPlugins||N)(t.prefix)),a=function(e,t,n,o){if(void 0===r.inserted[t.name]){var i=function(e,t){var r=t.name;return void 0===f[r]&&(f[r]=c(e,t.styles)),f[r]}(e,t);if(!o)return i;r.inserted[t.name]=i}}}if("production"!==process.env.NODE_ENV){var p=/\/\*/g,d=/\*\//g;c.use(function(e,t){switch(e){default:break;case-1:for(;p.test(t);){if(d.lastIndex=p.lastIndex,!d.test(t))throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');p.lastIndex=d.lastIndex}p.lastIndex=0}})}return r={key:o,sheet:new v({key:o,container:i,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:s,registered:{},insert:a}}(void 0);n.sheet.speedy=function(e){if("production"!==process.env.NODE_ENV&&0!==this.ctr)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=e},n.compat=!0;var o=function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=W(r,n.registered),a="".concat(n.key,"-").concat(i.name);return F(n,i),a},i={css:o,cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=e[i];return H(n.registered,o,function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},injectGlobal:function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=W(r,n.registered);U(n,i)},keyframes:function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=W(r,n.registered),a="animation-".concat(i.name);return U(n,{name:i.name,styles:"@keyframes ".concat(a,"{").concat(i.styles,"}")}),a},hydrate:function(e){e.forEach(function(e){n.inserted[e]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:z,merge:H.bind(null,n.registered,o)};return t.__SECRET_LIGHTS__=i,i}("undefined"!=typeof global?global:{}),oe=function(e){return function t(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,a;void 0!==n&&(o=n.label,a=n.target,i=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__lights_real===r,u=c&&r.__lights_base||r;"function"!=typeof i&&c&&(i=r.__lights_forwardProp);var l=i||Z(u),f=!l("as");return function(){var p=arguments,d=c&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];void 0!==o&&d.push("label:".concat(o,";"));for(var v=arguments.length,y=new Array(v),m=0;m<v;m++)y[m]=p[m];if(null==y[0]||void 0===y[0].raw)d.push.apply(d,y);else{"production"!==process.env.NODE_ENV&&void 0===y[0][0]&&console.error(S),d.push(y[0][0]);for(var g=y.length,b=1;b<g;b+=1)"production"!==process.env.NODE_ENV&&void 0===y[0][b]&&console.error(S),d.push(y[b],y[0][b])}var _=function(t){return s($.Consumer,null,function(r){var n=f&&t.as||u,o="",c=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=r}"string"==typeof t.className?o=z(e.cache.registered,c,t.className):null!=t.className&&(o="".concat(t.className," "));var v=W(d.concat(c),e.cache.registered,p);F(e.cache,v),o+="".concat(e.cache.key,"-").concat(v.name),void 0!==a&&(o+=" ".concat(a));var y=f&&void 0===i?Z(n):l,m={};for(var g in t)f&&"as"===g||y(g)&&(m[g]=t[g]);return m.className=o,m.ref=t.innerRef,s(n,m)})};return _.displayName=void 0!==o?o:"Styled(".concat("string"==typeof u?u:u.displayName||u.name||"Component",")"),void 0!==r.defaultProps&&(_.defaultProps=r.defaultProps),_.__lights_styles=d,_.__lights_base=u,_.__lights_real=_,_.__lights_forwardProp=i,Object.defineProperty(_,"toString",{value:function(){return void 0===a&&"production"!==process.env.NODE_ENV?"NO_COMPONENT_SELECTOR":".".concat(a)}}),_.withComponent=function(e,r){return t(e,void 0!==r?h({},n||{},{},r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},_}}}(ne),ie=ne.flush,ae=ne.hydrate,ce=ne.cx,se=ne.merge,ue=ne.getRegisteredStyles,le=ne.injectGlobal,fe=ne.keyframes,pe=ne.css,de=ne.sheet,he=ne.cache;export{ie as flush,ae as hydrate,ce as cx,se as merge,ue as getRegisteredStyles,le as injectGlobal,fe as keyframes,pe as css,de as sheet,he as cache,$ as ThemeContext,Q as ThemeProvider,ee as useTheme,X as withTheme,re as themeFn,oe as styled}; | ||
import e from"@emotion/stylis";import t from"@emotion/hash";import n from"@emotion/unitless";import r from"@emotion/memoize";import o from"@emotion/is-prop-valid";import i from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import s,{createElement as c,forwardRef as u}from"react";function l(e){return(l="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})(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return(p=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)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var v=function(){function e(t){!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}var t;return(t=[{key:"insert",value:function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(t,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(t)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);r.insertRule(e,o?0:r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else n.appendChild(document.createTextNode(e));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}])&&function(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)}}(e.prototype,t),e}(),m="".concat("/*|*/","}"),y={current:null};function g(e){e&&y.current.insert("".concat(e,"}"))}var b,w=function(e,t,n,r,o,i,a,s,c,u){switch(e){default:break;case 1:switch(t.charCodeAt(0)){default:break;case 64:return y.current.insert("".concat(t,";")),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+"/*|*/";break;case 3:switch(s){case 102:case 112:return y.current.insert(n[0]+t),"";default:return t+(0===u?"/*|*/":"")}case-2:t.split(m).forEach(g)}},E=function(e,t){if(1===e&&108===t.charCodeAt(0)&&98===t.charCodeAt(2))return""},_="undefined"!=typeof document,N=/\/\*\|\*\//g,O={},k=_?void 0:i(function(){var e=i(function(){return{}}),t={},n={};return function(r){return void 0===r||!0===r?t:!1===r?n:e(r)}}),A="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",j="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",S=/[A-Z]|^ms/g,P=/_EMO_([^_]+?)_([^]*?)_EMO_/g,x=function(e){return 45===e.charCodeAt(1)},C=function(e){return null!=e&&"boolean"!=typeof e},D=r(function(e){return x(e)?e:e.replace(S,"-$&").toLowerCase()}),V=function(e,t){switch(e){default:break;case"animation":case"animationName":if("string"==typeof t)return t.replace(P,function(e,t,n){return b={name:t,styles:n,next:b},t})}return 1===n[e]||x(e)||"number"!=typeof t||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var T=/(attr|calc|counters?|url)\(/,R=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],q=V,I=/^-ms-/,Y=/-(.)/g,L={};V=function(e,t){"content"===e&&("string"!=typeof t||-1===R.indexOf(t)&&!T.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`"));var n=q(e,t);return""===n||x(e)||-1===e.indexOf("-")||void 0!==L[e]||(L[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean ".concat(e.replace(I,"ms-").replace(Y,function(e,t){return t.toUpperCase()}),"?"))),n}}function M(e,t,n,r){if(null==n)return"";if(void 0!==n.__lights_styles){var o=n.toString();if("NO_COMPONENT_SELECTOR"===o&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return o}switch(l(n)){case"boolean":return"";case"object":if(1===n.anim)return b={name:n.name,styles:n.styles,next:b},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)b={name:i.name,styles:i.styles,next:b},i=i.next;var a="".concat(n.styles,";");return"production"!==process.env.NODE_ENV&&void 0!==n.map&&(a+=n.map),a}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o+=1)r+=M(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!==l(a))null!=t&&void 0!==t[a]?r+="".concat(i,"{").concat(t[a],"}"):C(a)&&(r+="".concat(D(i),":").concat(V(i,a),";"));else{if("NO_COMPONENT_SELECTOR"===i&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=M(e,t,a,!1);switch(i){case"animation":case"animationName":r+="".concat(D(i),":").concat(s,";");break;default:"production"!==process.env.NODE_ENV&&"undefined"===i&&console.error(j),r+="".concat(i,"{").concat(s,"}")}}else for(var c=0;c<a.length;c+=1)C(a[c])&&(r+="".concat(D(i),":").concat(V(i,a[c]),";"))}}return r}(e,t,n);case"function":if(void 0!==e){var s=b,c=n(e);return b=s,M(e,t,c,r)}"production"!==process.env.NODE_ENV&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":if("production"!==process.env.NODE_ENV){var u=[],f=n.replace(P,function(e,t,n){var r="animation".concat(u.length);return u.push("const ".concat(r," = keyframes`").concat(n.replace(/^@keyframes animation-\w+/,""),"`")),"${".concat(r,"}")});u.length&&console.error("".concat("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n").concat([].concat(u,["`".concat(f,"`")]).join("\n"),"\n\nYou should wrap it with `css` like this:\n\ncss`").concat(f,"`"))}}if(null==t)return n;var p=t[n];return!1===r&&void 0!==p?p:n}var F,z=/label:\s*([^\s;\n{]+)\s*;/g;function G(e,n,r){if(1===e.length&&"object"===l(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,i="";b=void 0;var a,s=e[0];null==s||void 0===s.raw?(o=!1,i+=M(r,n,s,!1)):("production"!==process.env.NODE_ENV&&void 0===s[0]&&console.error(A),i+=s[0]);for(var c=1;c<e.length;c+=1)i+=M(r,n,e[c],46===i.charCodeAt(i.length-1)),o&&("production"!==process.env.NODE_ENV&&void 0===s[c]&&console.error(A),i+=s[c]);"production"!==process.env.NODE_ENV&&(i=i.replace(F,function(e){return a=e,""})),z.lastIndex=0;for(var u,f="";null!==(u=z.exec(i));)f+="-".concat(u[1]);return{name:t(i)+f,styles:i,map:a,next:b}}"production"!==process.env.NODE_ENV&&(F=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//);var U="undefined"!=typeof document;function $(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]):r+="".concat(n," ")}),r}var B=function(e,t){var n="".concat(e.key,"-").concat(t.name);if(void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var r="",o=t;do{var i=e.insert(".".concat(n),o,e.sheet,!0);U||void 0===i||(r+=i),o=o.next}while(void 0!==o);if(!U&&0!==r.length)return r}};function J(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function W(e,t,n){var r=[],o=$(e,r,n);return r.length<2?n:o+t(r)}var Z=s.createContext({}),H=o,K=function(e){return"theme"!==e&&"innerRef"!==e},Q=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?H:K},X=i(function(e){return i(function(t){return function(e,t){if("function"==typeof t){var n=t(e);if("production"!==process.env.NODE_ENV&&(null==n||"object"!==l(n)||Array.isArray(n)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return n}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return h({},e,{},t)}(e,t)})}),ee=function(e){return c(Z.Consumer,null,function(t){return e.theme!==t&&(t=X(t)(e.theme)),c(Z.Provider,{value:t},e.children)})};function te(e){var t=e.displayName||e.name||"Component",n=u(function(t,n){return c(Z.Consumer,null,function(r){return c(e,p({theme:r,ref:n},t))})});return n.displayName="WithTheme(".concat(t,")"),a(n,e)}function ne(){return s.useContext(Z)}function re(e,t,n){var r,o=t.theme&&t.theme[e];return"function"==typeof(r="function"==typeof o?o(n):n[o]?n[o]:n.none)?r(t):r}function oe(e,t){return function(n){return re(e,n,t)}}oe.variants=function(e,t,n){return function(r){var o=r[t]&&n[r[t]];return o&&re(e,r,o)}};var ie=function(t){var n=function(t){void 0===t&&(t={});var n,r,o=t.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(o))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(o,'" was passed'));void 0!==t.prefix&&(r={prefix:t.prefix});var i,a,s=new e(r),c={};if(_){i=t.container||document.head;var u="data-lights-".concat(o),l=document.querySelectorAll("style[".concat(u,"]"));Array.prototype.forEach.call(l,function(e){(e.getAttribute(u)||"").split(" ").forEach(function(e){c[e]=!0}),e.parentNode!==i&&i.appendChild(e)})}if(_)s.use(t.stylisPlugins)(w),a=function(e,t,r,o){if(y.current=r,"production"!==process.env.NODE_ENV&&void 0!==t.map){var i=t.map;y.current={insert:function(e){r.insert(e+i)}}}if(void 0===n.inserted[t.name]){var a=s(e,t.styles);o&&(n.inserted[t.name]=a.replace(N,""))}};else{s.use(E);var f=O;(t.stylisPlugins||void 0!==t.prefix)&&(s.use(t.stylisPlugins),f=k(t.stylisPlugins||O)(t.prefix)),a=function(e,t,r,o){if(void 0===n.inserted[t.name]){var i=function(e,t){var n=t.name;return void 0===f[n]&&(f[n]=s(e,t.styles)),f[n]}(e,t);if(!o)return i;n.inserted[t.name]=i}}}if("production"!==process.env.NODE_ENV){var p=/\/\*/g,d=/\*\//g;s.use(function(e,t){switch(e){default:break;case-1:for(;p.test(t);){if(d.lastIndex=p.lastIndex,!d.test(t))throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');p.lastIndex=d.lastIndex}p.lastIndex=0}})}return n={key:o,sheet:new v({key:o,container:i,nonce:t.nonce,speedy:t.speedy}),nonce:t.nonce,inserted:c,registered:{},insert:a}}(void 0);n.sheet.speedy=function(e){if("production"!==process.env.NODE_ENV&&0!==this.ctr)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=e},n.compat=!0;var r=function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=G(r,n.registered),a="".concat(n.key,"-").concat(i.name);return B(n,i),a};return{css:r,cx:function(){for(var e=arguments,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=e[i];return W(n.registered,r,function e(t){for(var n="",r=0;r<t.length;r+=1){var o=t[r];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var a in i="",o)o[a]&&a&&(i&&(i+=" "),i+=a);break;default:i=o}i&&(n&&(n+=" "),n+=i)}}return n}(o))},injectGlobal:function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=G(r,n.registered);J(n,i)},keyframes:function(){for(var e=arguments,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=e[o];var i=G(r,n.registered),a="animation-".concat(i.name);return J(n,{name:i.name,styles:"@keyframes ".concat(a,"{").concat(i.styles,"}")}),a},hydrate:function(e){e.forEach(function(e){n.inserted[e]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:$,merge:W.bind(null,n.registered,r)}}(),ae=function(e){return function t(n,r){if("production"!==process.env.NODE_ENV&&void 0===n)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,a;void 0!==r&&(o=r.label,a=r.target,i=n.__lights_forwardProp&&r.shouldForwardProp?function(e){return n.__lights_forwardProp(e)&&r.shouldForwardProp(e)}:r.shouldForwardProp);var s=n.__lights_real===n,u=s&&n.__lights_base||n;"function"!=typeof i&&s&&(i=n.__lights_forwardProp);var l=i||Q(u),f=!l("as");return function(){var p=arguments,d=s&&void 0!==n.__lights_styles?n.__lights_styles.slice(0):[];void 0!==o&&d.push("label:".concat(o,";"));for(var v=arguments.length,m=new Array(v),y=0;y<v;y++)m[y]=p[y];if(null==m[0]||void 0===m[0].raw)d.push.apply(d,m);else{"production"!==process.env.NODE_ENV&&void 0===m[0][0]&&console.error(A),d.push(m[0][0]);for(var g=m.length,b=1;b<g;b+=1)"production"!==process.env.NODE_ENV&&void 0===m[0][b]&&console.error(A),d.push(m[b],m[0][b])}var w=function(t){return c(Z.Consumer,null,function(n){var r=f&&t.as||u,o="",s=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=n}"string"==typeof t.className?o=$(e.cache.registered,s,t.className):null!=t.className&&(o="".concat(t.className," "));var v=G(d.concat(s),e.cache.registered,p);B(e.cache,v),o+="".concat(e.cache.key,"-").concat(v.name),void 0!==a&&(o+=" ".concat(a));var m=f&&void 0===i?Q(r):l,y={};for(var g in t)f&&"as"===g||m(g)&&(y[g]=t[g]);return y.className=o,y.ref=t.innerRef,c(r,y)})};return w.displayName=void 0!==o?o:"Styled(".concat("string"==typeof u?u:u.displayName||u.name||"Component",")"),void 0!==n.defaultProps&&(w.defaultProps=n.defaultProps),w.__lights_styles=d,w.__lights_base=u,w.__lights_real=w,w.__lights_forwardProp=i,Object.defineProperty(w,"toString",{value:function(){return void 0===a&&"production"!==process.env.NODE_ENV?"NO_COMPONENT_SELECTOR":".".concat(a)}}),w.withComponent=function(e,n){return t(e,void 0!==n?h({},r||{},{},n):r).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},w}}}(ie).bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){ae[e]=ae(e)});var se=ie.flush,ce=ie.hydrate,ue=ie.cx,le=ie.merge,fe=ie.getRegisteredStyles,pe=ie.injectGlobal,de=ie.keyframes,he=ie.css,ve=ie.sheet,me=ie.cache;export{se as flush,ce as hydrate,ue as cx,le as merge,fe as getRegisteredStyles,pe as injectGlobal,de as keyframes,he as css,ve as sheet,me as cache,Z as ThemeContext,ee as ThemeProvider,ne as useTheme,te as withTheme,oe as themeFn,ae as styled}; | ||
//# sourceMappingURL=pretty-lights.modern.js.map |
{ | ||
"name": "pretty-lights", | ||
"version": "0.0.12-alpha.6", | ||
"version": "0.0.12-alpha.7", | ||
"description": "CSS-in-JS with a reliable API", | ||
@@ -59,2 +59,3 @@ "main": "lib/pretty-lights.js", | ||
"@babel/preset-react": "7.7.4", | ||
"@testing-library/react": "^9.4.0", | ||
"babel-check-duplicated-nodes": "1.0.0", | ||
@@ -102,4 +103,4 @@ "babel-eslint": "10.0.1", | ||
"prepare": "npm run build", | ||
"test": "npm run build:dev && PRETTY_LIGHTS_TEST=1 jest", | ||
"test-update": "npm run build:dev && PRETTY_LIGHTS_TEST=1 jest -u", | ||
"test": "npm run build:dev && jest", | ||
"test-update": "npm run build:dev && jest -u", | ||
"lint": "eslint .", | ||
@@ -106,0 +107,0 @@ "lint-fix": "eslint . --fix", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
100738
1113
41
17
47