Gazebo_simulation-Frontend/node_modules/jss/dist/jss.js.map
2020-12-21 10:29:31 -05:00

1 line
114 KiB
Plaintext

{"version":3,"file":"jss.js","sources":["../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/is-in-browser/dist/module.js","../../../node_modules/tiny-warning/dist/tiny-warning.esm.js","../src/utils/cloneStyle.js","../src/utils/createRule.js","../../../node_modules/@babel/runtime/helpers/esm/createClass.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../src/utils/toCssValue.js","../src/utils/toCss.js","../src/utils/escape.js","../src/plugins/styleRule.js","../src/plugins/conditionalRule.js","../src/plugins/keyframesRule.js","../src/plugins/keyframeRule.js","../src/plugins/fontFaceRule.js","../src/plugins/viewportRule.js","../src/plugins/simpleRule.js","../src/plugins/index.js","../src/RuleList.js","../src/StyleSheet.js","../src/PluginsRegistry.js","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../src/SheetsRegistry.js","../src/sheets.js","../src/utils/globalThis.js","../src/utils/moduleId.js","../src/utils/createGenerateId.js","../src/DomRenderer.js","../src/Jss.js","../src/utils/getDynamicStyles.js","../src/SheetsManager.js","../src/index.js"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","var isProduction = process.env.NODE_ENV === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;\n","import type {JssStyle} from '../types'\n\nconst plainObjectConstrurctor = {}.constructor\n\nexport default function cloneStyle(style: JssStyle): JssStyle {\n if (style == null || typeof style !== 'object') return style\n if (Array.isArray(style)) return style.map(cloneStyle)\n if (style.constructor !== plainObjectConstrurctor) return style\n\n const newStyle = {}\n for (const name in style) {\n newStyle[name] = cloneStyle(style[name])\n }\n return newStyle\n}\n","/* @flow */\nimport warning from 'tiny-warning'\nimport type {Rule, RuleOptions, JssStyle} from '../types'\nimport cloneStyle from './cloneStyle'\n\n/**\n * Create a rule instance.\n */\nexport default function createRule(\n name: string = 'unnamed',\n decl: JssStyle,\n options: RuleOptions\n): Rule | null {\n const {jss} = options\n const declCopy = cloneStyle(decl)\n\n const rule = jss.plugins.onCreateRule(name, declCopy, options)\n if (rule) return rule\n\n // It is an at-rule and it has no instance.\n if (name[0] === '@') {\n warning(false, `[JSS] Unknown rule ${name}`)\n }\n\n return null\n}\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","/* @flow */\n\nconst join = (value, by) => {\n let result = ''\n for (let i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break\n if (result) result += by\n result += value[i]\n }\n return result\n}\n\n/**\n * Converts array values to string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\nexport default function toCssValue(value: any, ignoreImportant: boolean = false) {\n if (!Array.isArray(value)) return value\n\n let cssValue = ''\n\n // Support space separated values via `[['5px', '10px']]`.\n if (Array.isArray(value[0])) {\n for (let i = 0; i < value.length; i++) {\n if (value[i] === '!important') break\n if (cssValue) cssValue += ', '\n cssValue += join(value[i], ' ')\n }\n } else cssValue = join(value, ', ')\n\n // Add !important, because it was ignored.\n if (!ignoreImportant && value[value.length - 1] === '!important') {\n cssValue += ' !important'\n }\n\n return cssValue\n}\n","/* @flow */\nimport toCssValue from './toCssValue'\nimport type {ToCssOptions, JssStyle} from '../types'\n\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\nfunction indentStr(str: string, indent: number): string {\n let result = ''\n for (let index = 0; index < indent; index++) result += ' '\n return result + str\n}\n\n/**\n * Converts a Rule to CSS string.\n */\nexport default function toCss(\n selector?: string,\n style: JssStyle,\n options: ToCssOptions = {}\n): string {\n let result = ''\n\n if (!style) return result\n\n let {indent = 0} = options\n const {fallbacks} = style\n\n if (selector) indent++\n\n // Apply fallbacks first.\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (let index = 0; index < fallbacks.length; index++) {\n const fallback = fallbacks[index]\n for (const prop in fallback) {\n const value = fallback[prop]\n if (value != null) {\n if (result) result += '\\n'\n result += `${indentStr(`${prop}: ${toCssValue(value)};`, indent)}`\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (const prop in fallbacks) {\n const value = fallbacks[prop]\n if (value != null) {\n if (result) result += '\\n'\n result += `${indentStr(`${prop}: ${toCssValue(value)};`, indent)}`\n }\n }\n }\n }\n\n for (const prop in style) {\n const value = style[prop]\n if (value != null && prop !== 'fallbacks') {\n if (result) result += '\\n'\n result += `${indentStr(`${prop}: ${toCssValue(value)};`, indent)}`\n }\n }\n\n // Allow empty style in this case, because properties will be added dynamically.\n if (!result && !options.allowEmpty) return result\n\n // When rule is being stringified before selector was defined.\n if (!selector) return result\n\n indent--\n\n if (result) result = `\\n${result}\\n`\n\n return indentStr(`${selector} {${result}`, indent) + indentStr('}', indent)\n}\n","const escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g\nconst nativeEscape = typeof CSS !== 'undefined' && CSS.escape\n\nexport default str => (nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1'))\n","/* @flow */\nimport warning from 'tiny-warning'\nimport toCss from '../utils/toCss'\nimport toCssValue from '../utils/toCssValue'\nimport escape from '../utils/escape'\nimport type {\n CSSStyleRule,\n HTMLElementWithStyleMap,\n ToCssOptions,\n RuleOptions,\n UpdateOptions,\n Renderer as RendererInterface,\n JssStyle,\n JssValue,\n BaseRule\n} from '../types'\n\nexport class BaseStyleRule implements BaseRule {\n type = 'style'\n\n key: string\n\n isProcessed: boolean = false\n\n style: JssStyle\n\n renderer: RendererInterface | null\n\n renderable: ?Object\n\n options: RuleOptions\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n const {sheet, Renderer} = options\n this.key = key\n this.options = options\n this.style = style\n if (sheet) this.renderer = sheet.renderer\n else if (Renderer) this.renderer = new Renderer()\n }\n\n /**\n * Get or set a style property.\n */\n prop(name: string, value?: JssValue, options?: UpdateOptions): this | string {\n // It's a getter.\n if (value === undefined) return this.style[name]\n\n // Don't do anything if the value has not changed.\n const force = options ? options.force : false\n if (!force && this.style[name] === value) return this\n\n let newValue = value\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this)\n }\n\n const isEmpty = newValue == null || newValue === false\n const isDefined = name in this.style\n\n // Value is empty and wasn't defined before.\n if (isEmpty && !isDefined && !force) return this\n\n // We are going to remove this value.\n const remove = isEmpty && isDefined\n\n if (remove) delete this.style[name]\n else this.style[name] = newValue\n\n // Renderable is defined if StyleSheet option `link` is true.\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name)\n else this.renderer.setProperty(this.renderable, name, newValue)\n return this\n }\n\n const {sheet} = this.options\n if (sheet && sheet.attached) {\n warning(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".')\n }\n return this\n }\n}\n\nexport class StyleRule extends BaseStyleRule {\n selectorText: string\n\n id: ?string\n\n renderable: ?CSSStyleRule\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n super(key, style, options)\n const {selector, scoped, sheet, generateId} = options\n if (selector) {\n this.selectorText = selector\n } else if (scoped !== false) {\n this.id = generateId(this, sheet)\n this.selectorText = `.${escape(this.id)}`\n }\n }\n\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n set selector(selector: string): void {\n if (selector === this.selectorText) return\n\n this.selectorText = selector\n\n const {renderer, renderable} = this\n\n if (!renderable || !renderer) return\n\n const hasChanged = renderer.setSelector(renderable, selector)\n\n // If selector setter is not implemented, rerender the rule.\n if (!hasChanged) {\n renderer.replaceRule(renderable, this)\n }\n }\n\n /**\n * Get selector string.\n */\n get selector(): string {\n return this.selectorText\n }\n\n /**\n * Apply rule to an element inline.\n */\n applyTo(renderable: HTMLElementWithStyleMap): this {\n const {renderer} = this\n if (renderer) {\n const json = this.toJSON()\n for (const prop in json) {\n renderer.setProperty(renderable, prop, json[prop])\n }\n }\n return this\n }\n\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n toJSON(): Object {\n const json = {}\n for (const prop in this.style) {\n const value = this.style[prop]\n if (typeof value !== 'object') json[prop] = value\n else if (Array.isArray(value)) json[prop] = toCssValue(value)\n }\n return json\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n const {sheet} = this.options\n const link = sheet ? sheet.options.link : false\n const opts = link ? {...options, allowEmpty: true} : options\n return toCss(this.selectorText, this.style, opts)\n }\n}\n\nexport default {\n onCreateRule(name: string, style: JssStyle, options: RuleOptions): StyleRule | null {\n if (name[0] === '@' || (options.parent && options.parent.type === 'keyframes')) {\n return null\n }\n return new StyleRule(name, style, options)\n }\n}\n","/* @flow */\nimport RuleList from '../RuleList'\nimport type {CSSMediaRule, Rule, RuleOptions, ToCssOptions, JssStyle, ContainerRule} from '../types'\n\nconst defaultToStringOptions = {\n indent: 1,\n children: true\n}\n\nconst atRegExp = /@([\\w-]+)/\n\n/**\n * Conditional rule for @media, @supports\n */\nexport class ConditionalRule implements ContainerRule {\n type = 'conditional'\n\n at: string\n\n key: string\n\n rules: RuleList\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSMediaRule\n\n constructor(key: string, styles: Object, options: RuleOptions) {\n this.key = key\n const atMatch = key.match(atRegExp)\n this.at = atMatch ? atMatch[1] : 'unknown'\n this.options = options\n this.rules = new RuleList({...options, parent: this})\n\n for (const name in styles) {\n this.rules.add(name, styles[name])\n }\n\n this.rules.process()\n }\n\n /**\n * Get a rule.\n */\n getRule(name: string): Rule {\n return this.rules.get(name)\n }\n\n /**\n * Get index of a rule.\n */\n indexOf(rule: Rule): number {\n return this.rules.indexOf(rule)\n }\n\n /**\n * Create and register rule, run plugins.\n */\n addRule(name: string, style: JssStyle, options?: RuleOptions): Rule | null {\n const rule = this.rules.add(name, style, options)\n if (!rule) return null\n this.options.jss.plugins.onProcessRule(rule)\n return rule\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions = defaultToStringOptions): string {\n if (options.indent == null) options.indent = defaultToStringOptions.indent\n if (options.children == null) options.children = defaultToStringOptions.children\n if (options.children === false) {\n return `${this.key} {}`\n }\n const children = this.rules.toString(options)\n return children ? `${this.key} {\\n${children}\\n}` : ''\n }\n}\n\nconst keyRegExp = /@media|@supports\\s+/\n\nexport default {\n onCreateRule(key: string, styles: JssStyle, options: RuleOptions): ConditionalRule | null {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null\n }\n}\n","/* @flow */\nimport warning from 'tiny-warning'\nimport RuleList from '../RuleList'\nimport type {\n CSSKeyframesRule,\n JssStyle,\n RuleOptions,\n ToCssOptions,\n ContainerRule,\n KeyframesMap,\n Plugin\n} from '../types'\nimport escape from '../utils/escape'\n\nconst defaultToStringOptions = {\n indent: 1,\n children: true\n}\n\nconst nameRegExp = /@keyframes\\s+([\\w-]+)/\n\n/**\n * Rule for @keyframes\n */\nexport class KeyframesRule implements ContainerRule {\n type = 'keyframes'\n\n at: string = '@keyframes'\n\n key: string\n\n name: string\n\n id: string\n\n rules: RuleList\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSKeyframesRule\n\n constructor(key: string, frames: Object, options: RuleOptions) {\n const nameMatch = key.match(nameRegExp)\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1]\n } else {\n this.name = 'noname'\n warning(false, `[JSS] Bad keyframes name ${key}`)\n }\n this.key = `${this.type}-${this.name}`\n this.options = options\n const {scoped, sheet, generateId} = options\n this.id = scoped === false ? this.name : escape(generateId(this, sheet))\n this.rules = new RuleList({...options, parent: this})\n\n for (const name in frames) {\n this.rules.add(name, frames[name], {\n ...options,\n parent: this\n })\n }\n\n this.rules.process()\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions = defaultToStringOptions): string {\n if (options.indent == null) options.indent = defaultToStringOptions.indent\n if (options.children == null) options.children = defaultToStringOptions.children\n if (options.children === false) {\n return `${this.at} ${this.id} {}`\n }\n let children = this.rules.toString(options)\n if (children) children = `\\n${children}\\n`\n return `${this.at} ${this.id} {${children}}`\n }\n}\n\nconst keyRegExp = /@keyframes\\s+/\n\nconst refRegExp = /\\$([\\w-]+)/g\n\nconst findReferencedKeyframe = (val, keyframes) => {\n if (typeof val === 'string') {\n return val.replace(refRegExp, (match, name) => {\n if (name in keyframes) {\n return keyframes[name]\n }\n\n warning(false, `[JSS] Referenced keyframes rule \"${name}\" is not defined.`)\n\n return match\n })\n }\n\n return val\n}\n\n/**\n * Replace the reference for a animation name.\n */\nconst replaceRef = (style: JssStyle, prop: string, keyframes: KeyframesMap) => {\n const value = style[prop]\n const refKeyframe = findReferencedKeyframe(value, keyframes)\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe\n }\n}\n\nconst plugin: Plugin = {\n onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp.test(key)\n ? new KeyframesRule(key, frames, options)\n : null\n },\n\n // Animation name ref replacer.\n onProcessStyle: (style, rule, sheet) => {\n if (rule.type !== 'style' || !sheet) return style\n\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes)\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes)\n return style\n },\n\n onChangeValue(val, prop, rule) {\n const {sheet} = rule.options\n\n if (!sheet) {\n return val\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes)\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes)\n default:\n return val\n }\n }\n}\n\nexport default plugin\n","/* @flow */\nimport toCss from '../utils/toCss'\nimport type {JssStyle, RuleOptions, ToCssOptions, CSSKeyframeRule} from '../types'\nimport {BaseStyleRule} from './styleRule'\n\nexport class KeyframeRule extends BaseStyleRule {\n renderable: ?CSSKeyframeRule\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n const {sheet} = this.options\n const link = sheet ? sheet.options.link : false\n const opts = link ? {...options, allowEmpty: true} : options\n return toCss(this.key, this.style, opts)\n }\n}\n\nexport default {\n onCreateRule(key: string, style: JssStyle, options: RuleOptions): KeyframeRule | null {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options)\n }\n return null\n }\n}\n","/* @flow */\nimport toCss from '../utils/toCss'\nimport type {CSSFontFaceRule, RuleOptions, JssStyle, ToCssOptions, BaseRule} from '../types'\n\nexport class FontFaceRule implements BaseRule {\n type = 'font-face'\n\n at: string = '@font-face'\n\n key: string\n\n style: JssStyle\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSFontFaceRule\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n this.key = key\n this.style = style\n this.options = options\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n if (Array.isArray(this.style)) {\n let str = ''\n for (let index = 0; index < this.style.length; index++) {\n str += toCss(this.key, this.style[index])\n if (this.style[index + 1]) str += '\\n'\n }\n return str\n }\n\n return toCss(this.key, this.style, options)\n }\n}\n\nexport default {\n onCreateRule(key: string, style: JssStyle, options: RuleOptions): FontFaceRule | null {\n return key === '@font-face' ? new FontFaceRule(key, style, options) : null\n }\n}\n","/* @flow */\nimport toCss from '../utils/toCss'\nimport type {CSSViewportRule, RuleOptions, JssStyle, ToCssOptions, BaseRule} from '../types'\n\nexport class ViewportRule implements BaseRule {\n type = 'viewport'\n\n at: string = '@viewport'\n\n key: string\n\n style: JssStyle\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSViewportRule\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n this.key = key\n this.style = style\n this.options = options\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n return toCss(this.key, this.style, options)\n }\n}\n\nexport default {\n onCreateRule(key: string, style: JssStyle, options: RuleOptions): ViewportRule | null {\n return key === '@viewport' || key === '@-ms-viewport'\n ? new ViewportRule(key, style, options)\n : null\n }\n}\n","/* @flow */\nimport type {\n CSSCharsetRule,\n CSSImportRule,\n CSSNamespaceRule,\n RuleOptions,\n JssStyle,\n ToCssOptions,\n BaseRule\n} from '../types'\n\nexport class SimpleRule implements BaseRule {\n type = 'simple'\n\n key: string\n\n value: string\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSCharsetRule | CSSImportRule | CSSNamespaceRule\n\n constructor(key: string, value: string, options: RuleOptions) {\n this.key = key\n this.value = value\n this.options = options\n }\n\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n toString(options?: ToCssOptions): string {\n if (Array.isArray(this.value)) {\n let str = ''\n for (let index = 0; index < this.value.length; index++) {\n str += `${this.key} ${this.value[index]};`\n if (this.value[index + 1]) str += '\\n'\n }\n return str\n }\n\n return `${this.key} ${this.value};`\n }\n}\n\nconst keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n}\n\nexport default {\n onCreateRule(key: string, value: JssStyle, options: RuleOptions): SimpleRule | null {\n return key in keysMap ? new SimpleRule(key, ((value: any): string), options) : null\n }\n}\n","import pluginStyleRule, {StyleRule} from './styleRule'\nimport pluginConditionalRule, {ConditionalRule} from './conditionalRule'\nimport pluginKeyframesRule, {KeyframesRule} from './keyframesRule'\nimport pluginKeyframeRule, {KeyframeRule} from './keyframeRule'\nimport pluginFontFaceRule, {FontFaceRule} from './fontFaceRule'\nimport pluginViewportRule, {ViewportRule} from './viewportRule'\nimport pluginSimpleRule, {SimpleRule} from './simpleRule'\n\nexport const plugins = [\n pluginStyleRule,\n pluginConditionalRule,\n pluginKeyframesRule,\n pluginKeyframeRule,\n pluginFontFaceRule,\n pluginViewportRule,\n pluginSimpleRule\n]\n\nexport {\n StyleRule,\n ConditionalRule,\n KeyframesRule,\n KeyframeRule,\n FontFaceRule,\n ViewportRule,\n SimpleRule\n}\n","/* @flow */\nimport createRule from './utils/createRule'\nimport {StyleRule, KeyframesRule} from './plugins/index'\nimport type {\n RuleListOptions,\n ToCssOptions,\n Rule,\n RuleOptions,\n JssStyle,\n Classes,\n KeyframesMap,\n UpdateArguments\n} from './types'\nimport escape from './utils/escape'\n\nconst defaultUpdateOptions = {\n process: true\n}\n\nconst forceUpdateOptions = {\n force: true,\n process: true\n}\n\n/**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\nexport default class RuleList {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n map: {[key: string]: Rule} = {}\n\n // Original styles object.\n raw: {[key: string]: JssStyle} = {}\n\n // Used to ensure correct rules order.\n index: Array<Rule> = []\n\n options: RuleListOptions\n\n classes: Classes\n\n keyframes: KeyframesMap\n\n constructor(options: RuleListOptions) {\n this.options = options\n this.classes = options.classes\n this.keyframes = options.keyframes\n }\n\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n add(key: string, decl: JssStyle, ruleOptions?: RuleOptions): Rule | null {\n const {parent, sheet, jss, Renderer, generateId, scoped} = this.options\n const options = {\n classes: this.classes,\n parent,\n sheet,\n jss,\n Renderer,\n generateId,\n scoped,\n ...ruleOptions\n }\n\n // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n this.raw[key] = decl\n\n if (key in this.classes) {\n // For e.g. rules inside of @media container\n options.selector = `.${escape(this.classes[key])}`\n }\n\n const rule = createRule(key, decl, options)\n\n if (!rule) return null\n\n this.register(rule)\n\n const index = options.index === undefined ? this.index.length : options.index\n this.index.splice(index, 0, rule)\n\n return rule\n }\n\n /**\n * Get a rule.\n */\n get(name: string): Rule {\n return this.map[name]\n }\n\n /**\n * Delete a rule.\n */\n remove(rule: Rule): void {\n this.unregister(rule)\n delete this.raw[rule.key]\n this.index.splice(this.indexOf(rule), 1)\n }\n\n /**\n * Get index of a rule.\n */\n indexOf(rule: Rule): number {\n return this.index.indexOf(rule)\n }\n\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n process(): void {\n const {plugins} = this.options.jss\n // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n this.index.slice(0).forEach(plugins.onProcessRule, plugins)\n }\n\n /**\n * Register a rule in `.map` and `.classes` maps.\n */\n register(rule: Rule): void {\n this.map[rule.key] = rule\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule\n if (rule.id) this.classes[rule.key] = rule.id\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id\n }\n }\n\n /**\n * Unregister a rule.\n */\n unregister(rule: Rule): void {\n delete this.map[rule.key]\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector]\n delete this.classes[rule.key]\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name]\n }\n }\n\n /**\n * Update the function values with a new data.\n */\n update(...args: UpdateArguments): void {\n let name\n let data\n let options\n\n if (typeof args[0] === 'string') {\n name = args[0]\n // $FlowFixMe\n data = args[1]\n // $FlowFixMe\n options = args[2]\n } else {\n data = args[0]\n // $FlowFixMe\n options = args[1]\n name = null\n }\n\n if (name) {\n this.onUpdate(data, this.get(name), options)\n } else {\n for (let index = 0; index < this.index.length; index++) {\n this.onUpdate(data, this.index[index], options)\n }\n }\n }\n\n /**\n * Execute plugins, update rule props.\n */\n onUpdate(data: Object, rule: Rule, options?: Object = defaultUpdateOptions) {\n const {\n jss: {plugins},\n sheet\n } = this.options\n\n // It is a rules container like for e.g. ConditionalRule.\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options)\n return\n }\n\n const styleRule: StyleRule = (rule: any)\n const {style} = styleRule\n\n plugins.onUpdate(data, rule, sheet, options)\n\n // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n if (options.process && style && style !== styleRule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(styleRule.style, styleRule, sheet)\n\n // Update and add props.\n for (const prop in styleRule.style) {\n const nextValue = styleRule.style[prop]\n const prevValue = style[prop]\n // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n if (nextValue !== prevValue) {\n styleRule.prop(prop, nextValue, forceUpdateOptions)\n }\n }\n\n // Remove props.\n for (const prop in style) {\n const nextValue = styleRule.style[prop]\n const prevValue = style[prop]\n // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n if (nextValue == null && nextValue !== prevValue) {\n styleRule.prop(prop, null, forceUpdateOptions)\n }\n }\n }\n }\n\n /**\n * Convert rules to a CSS string.\n */\n toString(options?: ToCssOptions): string {\n let str = ''\n const {sheet} = this.options\n const link = sheet ? sheet.options.link : false\n\n for (let index = 0; index < this.index.length; index++) {\n const rule = this.index[index]\n const css = rule.toString(options)\n\n // No need to render an empty rule.\n if (!css && !link) continue\n\n if (str) str += '\\n'\n str += css\n }\n\n return str\n }\n}\n","/* @flow */\nimport RuleList from './RuleList'\nimport type {\n InternalStyleSheetOptions,\n Rule,\n ToCssOptions,\n RuleOptions,\n StyleSheetOptions,\n UpdateArguments,\n JssStyle,\n Classes,\n KeyframesMap,\n JssStyles,\n Renderer\n} from './types'\n\nexport default class StyleSheet {\n options: InternalStyleSheetOptions\n\n deployed: boolean\n\n attached: boolean\n\n rules: RuleList\n\n renderer: Renderer | null\n\n classes: Classes\n\n keyframes: KeyframesMap\n\n queue: ?Array<Rule>\n\n constructor(styles: JssStyles, options: StyleSheetOptions) {\n this.attached = false\n this.deployed = false\n this.classes = {}\n this.keyframes = {}\n this.options = {\n ...options,\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n }\n if (options.Renderer) {\n this.renderer = new options.Renderer(this)\n }\n this.rules = new RuleList(this.options)\n\n for (const name in styles) {\n this.rules.add(name, styles[name])\n }\n\n this.rules.process()\n }\n\n /**\n * Attach renderable to the render tree.\n */\n attach(): this {\n if (this.attached) return this\n if (this.renderer) this.renderer.attach()\n this.attached = true\n // Order is important, because we can't use insertRule API if style element is not attached.\n if (!this.deployed) this.deploy()\n return this\n }\n\n /**\n * Remove renderable from render tree.\n */\n detach(): this {\n if (!this.attached) return this\n if (this.renderer) this.renderer.detach()\n this.attached = false\n return this\n }\n\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n addRule(name: string, decl: JssStyle, options?: RuleOptions): Rule | null {\n const {queue} = this\n\n // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n if (this.attached && !queue) this.queue = []\n\n const rule = this.rules.add(name, decl, options)\n\n if (!rule) return null\n\n this.options.jss.plugins.onProcessRule(rule)\n\n if (this.attached) {\n if (!this.deployed) return rule\n // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n if (queue) queue.push(rule)\n else {\n this.insertRule(rule)\n if (this.queue) {\n this.queue.forEach(this.insertRule, this)\n this.queue = undefined\n }\n }\n return rule\n }\n\n // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n this.deployed = false\n\n return rule\n }\n\n /**\n * Insert rule into the StyleSheet\n */\n insertRule(rule: Rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule)\n }\n }\n\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n addRules(styles: JssStyles, options?: RuleOptions): Array<Rule> {\n const added = []\n for (const name in styles) {\n const rule = this.addRule(name, styles[name], options)\n if (rule) added.push(rule)\n }\n return added\n }\n\n /**\n * Get a rule by name.\n */\n getRule(name: string): Rule {\n return this.rules.get(name)\n }\n\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n deleteRule(name: string): boolean {\n const rule = this.rules.get(name)\n\n if (!rule) return false\n\n this.rules.remove(rule)\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable)\n }\n\n return true\n }\n\n /**\n * Get index of a rule.\n */\n indexOf(rule: Rule): number {\n return this.rules.indexOf(rule)\n }\n\n /**\n * Deploy pure CSS string to a renderable.\n */\n deploy(): this {\n if (this.renderer) this.renderer.deploy()\n this.deployed = true\n return this\n }\n\n /**\n * Update the function values with a new data.\n */\n update(...args: UpdateArguments): this {\n this.rules.update(...args)\n return this\n }\n\n /**\n * Convert rules to a CSS string.\n */\n toString(options?: ToCssOptions): string {\n return this.rules.toString(options)\n }\n}\n","/* @flow */\nimport warning from 'tiny-warning'\nimport type StyleSheet from './StyleSheet'\nimport type {\n Plugin,\n Rule,\n RuleOptions,\n UpdateOptions,\n JssStyle,\n JssValue,\n OnCreateRule,\n OnProcessRule,\n OnProcessStyle,\n OnProcessSheet,\n OnChangeValue,\n OnUpdate\n} from './types'\nimport type {StyleRule} from './plugins/styleRule'\n\ntype Registry = {\n onCreateRule: Array<OnCreateRule>,\n onProcessRule: Array<OnProcessRule>,\n onProcessStyle: Array<OnProcessStyle>,\n onProcessSheet: Array<OnProcessSheet>,\n onChangeValue: Array<OnChangeValue>,\n onUpdate: Array<OnUpdate>\n}\n\nexport default class PluginsRegistry {\n plugins: {\n internal: Array<Plugin>,\n external: Array<Plugin>\n } = {\n internal: [],\n external: []\n }\n\n registry: Registry\n\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n onCreateRule(name?: string, decl: JssStyle, options: RuleOptions): Rule | null {\n for (let i = 0; i < this.registry.onCreateRule.length; i++) {\n const rule = this.registry.onCreateRule[i](name, decl, options)\n if (rule) return rule\n }\n\n return null\n }\n\n /**\n * Call `onProcessRule` hooks.\n */\n onProcessRule(rule: Rule): void {\n if (rule.isProcessed) return\n const {sheet} = rule.options\n for (let i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet)\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet)\n\n rule.isProcessed = true\n }\n\n /**\n * Call `onProcessStyle` hooks.\n */\n onProcessStyle(style: JssStyle, rule: Rule, sheet?: StyleSheet): void {\n for (let i = 0; i < this.registry.onProcessStyle.length; i++) {\n // $FlowFixMe\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet)\n }\n }\n\n /**\n * Call `onProcessSheet` hooks.\n */\n onProcessSheet(sheet: StyleSheet): void {\n for (let i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet)\n }\n }\n\n /**\n * Call `onUpdate` hooks.\n */\n onUpdate(data: Object, rule: Rule, sheet: StyleSheet, options: UpdateOptions): void {\n for (let i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options)\n }\n }\n\n /**\n * Call `onChangeValue` hooks.\n */\n onChangeValue(value: JssValue, prop: string, rule: StyleRule): JssValue {\n let processedValue = value\n for (let i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule)\n }\n return processedValue\n }\n\n /**\n * Register a plugin.\n */\n use(newPlugin: Plugin, options: {queue: 'internal' | 'external'} = {queue: 'external'}): void {\n const plugins = this.plugins[options.queue]\n\n // Avoids applying same plugin twice, at least based on ref.\n if (plugins.indexOf(newPlugin) !== -1) {\n return\n }\n\n plugins.push(newPlugin)\n\n this.registry = [...this.plugins.external, ...this.plugins.internal].reduce(\n (registry: Registry, plugin: Plugin) => {\n for (const name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name])\n } else {\n warning(false, `[JSS] Unknown hook \"${name}\".`)\n }\n }\n return registry\n },\n {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n }\n )\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/* @flow */\nimport type {ToCssOptions} from './types'\nimport type StyleSheet from './StyleSheet'\n\n/**\n * Sheets registry to access them all at one place.\n */\nexport default class SheetsRegistry {\n registry: Array<StyleSheet> = []\n\n /**\n * Current highest index number.\n */\n get index(): number {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index\n }\n\n /**\n * Register a Style Sheet.\n */\n add(sheet: StyleSheet): void {\n const {registry} = this\n const {index} = sheet.options\n\n if (registry.indexOf(sheet) !== -1) return\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet)\n return\n }\n\n // Find a position.\n for (let i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet)\n return\n }\n }\n }\n\n /**\n * Reset the registry.\n */\n reset(): void {\n this.registry = []\n }\n\n /**\n * Remove a Style Sheet.\n */\n remove(sheet: StyleSheet): void {\n const index = this.registry.indexOf(sheet)\n this.registry.splice(index, 1)\n }\n\n /**\n * Convert all attached sheets to a CSS string.\n */\n toString({attached, ...options}: {attached?: boolean, ...ToCssOptions} = {}): string {\n let css = ''\n for (let i = 0; i < this.registry.length; i++) {\n const sheet = this.registry[i]\n if (attached != null && sheet.attached !== attached) {\n continue\n }\n if (css) css += '\\n'\n css += sheet.toString(options)\n }\n return css\n }\n}\n","/* @flow */\nimport SheetsRegistry from './SheetsRegistry'\n\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\nexport default new SheetsRegistry()\n","/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nexport default (typeof window != 'undefined' && window.Math == Math\n ? window\n : typeof self != 'undefined' && self.Math == Math\n ? self\n : Function('return this')())\n","import globalThis from './globalThis'\n\nconst ns = '2f1acc6c3a606b082e5eef5e54414ffb'\nif (globalThis[ns] == null) globalThis[ns] = 0\n\n// Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\nexport default globalThis[ns]++\n","/* @flow */\nimport warning from 'tiny-warning'\nimport type {Rule} from '../types'\nimport StyleSheet from '../StyleSheet'\nimport moduleId from './moduleId'\n\nconst maxRules = 1e10\n\nexport type CreateGenerateIdOptions = {|\n minify: boolean\n|}\nexport type GenerateId = (rule: Rule, sheet?: StyleSheet) => string\n\nexport type CreateGenerateId = (options: CreateGenerateIdOptions) => GenerateId\n\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\nconst createGenerateId: CreateGenerateId = (options = {}) => {\n let ruleCounter = 0\n\n return (rule: Rule, sheet?: StyleSheet): string => {\n ruleCounter += 1\n\n if (ruleCounter > maxRules) {\n warning(false, `[JSS] You might have a memory leak. Rule counter is at ${ruleCounter}.`)\n }\n\n let jssId = ''\n let prefix = ''\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix\n }\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id)\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return `${prefix || 'c'}${moduleId}${jssId}${ruleCounter}`\n }\n\n return `${prefix + rule.key}-${moduleId}${jssId ? `-${jssId}` : ''}-${ruleCounter}`\n }\n}\n\nexport default createGenerateId\n","/* @flow */\nimport warning from 'tiny-warning'\nimport sheets from './sheets'\nimport toCssValue from './utils/toCssValue'\nimport type {\n CSSStyleRule,\n CSSMediaRule,\n CSSKeyframesRule,\n CSSKeyframeRule,\n HTMLElementWithStyleMap,\n AnyCSSRule,\n Rule,\n RuleList,\n ContainerRule,\n JssValue,\n InsertionPoint,\n StyleSheet\n} from './types'\n\ntype PriorityOptions = {\n index: number,\n insertionPoint?: InsertionPoint\n}\n\n/**\n * Cache the value from the first time a function is called.\n */\nconst memoize = <Value>(fn: () => Value): (() => Value) => {\n let value\n return () => {\n if (!value) value = fn()\n return value\n }\n}\n\n/**\n * Get a style property value.\n */\nfunction getPropertyValue(\n cssRule: HTMLElementWithStyleMap | CSSStyleRule | CSSKeyframeRule,\n prop: string\n): string {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop)\n }\n return cssRule.style.getPropertyValue(prop)\n } catch (err) {\n // IE may throw if property is unknown.\n return ''\n }\n}\n\n/**\n * Set a style property.\n */\nfunction setProperty(\n cssRule: HTMLElementWithStyleMap | CSSStyleRule | CSSKeyframeRule,\n prop: string,\n value: JssValue\n): boolean {\n try {\n let cssValue = ((value: any): string)\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value, true)\n\n if (value[value.length - 1] === '!important') {\n cssRule.style.setProperty(prop, cssValue, 'important')\n return true\n }\n }\n\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue)\n } else {\n cssRule.style.setProperty(prop, cssValue)\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false\n }\n return true\n}\n\n/**\n * Remove a style property.\n */\nfunction removeProperty(\n cssRule: HTMLElementWithStyleMap | CSSStyleRule | CSSKeyframeRule,\n prop: string\n) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop)\n } else {\n cssRule.style.removeProperty(prop)\n }\n } catch (err) {\n warning(\n false,\n `[JSS] DOMException \"${err.message}\" was thrown. Tried to remove property \"${prop}\".`\n )\n }\n}\n\n/**\n * Set the selector.\n */\nfunction setSelector(cssRule: CSSStyleRule, selectorText: string): boolean {\n cssRule.selectorText = selectorText\n\n // Return false if setter was not successful.\n // Currently works in chrome only.\n return cssRule.selectorText === selectorText\n}\n\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\nconst getHead = memoize((): HTMLElement => (document.querySelector('head'): any))\n\n/**\n * Find attached sheet with an index higher than the passed one.\n */\nfunction findHigherSheet(registry: Array<StyleSheet>, options: PriorityOptions): StyleSheet | null {\n for (let i = 0; i < registry.length; i++) {\n const sheet = registry[i]\n if (\n sheet.attached &&\n sheet.options.index > options.index &&\n sheet.options.insertionPoint === options.insertionPoint\n ) {\n return sheet\n }\n }\n return null\n}\n\n/**\n * Find attached sheet with the highest index.\n */\nfunction findHighestSheet(\n registry: Array<StyleSheet>,\n options: PriorityOptions\n): StyleSheet | null {\n for (let i = registry.length - 1; i >= 0; i--) {\n const sheet = registry[i]\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet\n }\n }\n return null\n}\n\n/**\n * Find a comment with \"jss\" inside.\n */\nfunction findCommentNode(text: string): Node | null {\n const head = getHead()\n for (let i = 0; i < head.childNodes.length; i++) {\n const node = head.childNodes[i]\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node\n }\n }\n return null\n}\n\ntype PrevNode = {\n parent: ?Node,\n node: ?Node\n}\n\n/**\n * Find a node before which we can insert the sheet.\n */\nfunction findPrevNode(options: PriorityOptions): PrevNode | false {\n const {registry} = sheets\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n let sheet = findHigherSheet(registry, options)\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n }\n }\n\n // Otherwise insert after the last attached.\n sheet = findHighestSheet(registry, options)\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n }\n }\n }\n\n // Try to find a comment placeholder if registry is empty.\n const {insertionPoint} = options\n if (insertionPoint && typeof insertionPoint === 'string') {\n const comment = findCommentNode(insertionPoint)\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n }\n }\n\n // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n warning(false, `[JSS] Insertion point \"${insertionPoint}\" not found.`)\n }\n\n return false\n}\n\n/**\n * Insert style element into the DOM.\n */\nfunction insertStyle(style: HTMLElement, options: PriorityOptions) {\n const {insertionPoint} = options\n const nextNode = findPrevNode(options)\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node)\n\n return\n }\n\n // Works with iframes and any node types.\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n // https://stackoverflow.com/questions/41328728/force-casting-in-flow\n const insertionPointElement: HTMLElement = (insertionPoint: any)\n const {parentNode} = insertionPointElement\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling)\n else warning(false, '[JSS] Insertion point is not in the DOM.')\n return\n }\n\n getHead().appendChild(style)\n}\n\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\nconst getNonce = memoize(\n (): ?string => {\n const node = document.querySelector('meta[property=\"csp-nonce\"]')\n return node ? node.getAttribute('content') : null\n }\n)\n\nconst insertRule = (\n container: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule,\n rule: string,\n index?: number\n): false | any => {\n const maxIndex = container.cssRules.length\n // In case previous insertion fails, passed index might be wrong\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n index = maxIndex\n }\n\n try {\n if ('insertRule' in container) {\n const c = ((container: any): CSSStyleSheet)\n c.insertRule(rule, index)\n }\n // Keyframes rule.\n else if ('appendRule' in container) {\n const c = ((container: any): CSSKeyframesRule)\n c.appendRule(rule)\n }\n } catch (err) {\n warning(false, `[JSS] ${err.message}`)\n return false\n }\n return container.cssRules[index]\n}\n\nconst createStyle = (): HTMLElement => {\n const el = document.createElement('style')\n // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n el.textContent = '\\n'\n return el\n}\n\nexport default class DomRenderer {\n getPropertyValue = getPropertyValue\n\n setProperty = setProperty\n\n removeProperty = removeProperty\n\n setSelector = setSelector\n\n // HTMLStyleElement needs fixing https://github.com/facebook/flow/issues/2696\n element: any\n\n sheet: StyleSheet | void\n\n hasInsertedRules: boolean = false\n\n constructor(sheet?: StyleSheet) {\n // There is no sheet when the renderer is used from a standalone StyleRule.\n if (sheet) sheets.add(sheet)\n\n this.sheet = sheet\n const {media, meta, element} = this.sheet ? this.sheet.options : {}\n this.element = element || createStyle()\n this.element.setAttribute('data-jss', '')\n if (media) this.element.setAttribute('media', media)\n if (meta) this.element.setAttribute('data-meta', meta)\n const nonce = getNonce()\n if (nonce) this.element.setAttribute('nonce', nonce)\n }\n\n /**\n * Insert style element into render tree.\n */\n attach(): void {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return\n\n insertStyle(this.element, this.sheet.options)\n\n // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n const deployed = Boolean(this.sheet && this.sheet.deployed)\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false\n this.deploy()\n }\n }\n\n /**\n * Remove style element from render tree.\n */\n detach(): void {\n const {parentNode} = this.element\n if (parentNode) parentNode.removeChild(this.element)\n }\n\n /**\n * Inject CSS string into element.\n */\n deploy(): void {\n const {sheet} = this\n if (!sheet) return\n if (sheet.options.link) {\n this.insertRules(sheet.rules)\n return\n }\n this.element.textContent = `\\n${sheet.toString()}\\n`\n }\n\n /**\n * Insert RuleList into an element.\n */\n\n insertRules(rules: RuleList, nativeParent?: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule) {\n for (let i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent)\n }\n }\n\n /**\n * Insert a rule into element.\n */\n insertRule(\n rule: Rule,\n index?: number,\n nativeParent?: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule = this.element.sheet\n ): false | CSSStyleSheet | AnyCSSRule {\n if (rule.rules) {\n const parent: ContainerRule = (rule: any)\n let latestNativeParent = nativeParent\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n // We need to render the container without children first.\n latestNativeParent = insertRule(nativeParent, parent.toString({children: false}), index)\n if (latestNativeParent === false) {\n return false\n }\n }\n this.insertRules(parent.rules, latestNativeParent)\n return latestNativeParent\n }\n\n // IE keeps the CSSStyleSheet after style node has been reattached,\n // so we need to check if the `renderable` reference the right style sheet and not\n // rerender those rules.\n if (rule.renderable && rule.renderable.parentStyleSheet === this.element.sheet) {\n return rule.renderable\n }\n\n const ruleStr = rule.toString()\n\n if (!ruleStr) return false\n\n const nativeRule = insertRule(nativeParent, ruleStr, index)\n if (nativeRule === false) {\n return false\n }\n\n this.hasInsertedRules = true\n rule.renderable = nativeRule\n return nativeRule\n }\n\n /**\n * Delete a rule.\n */\n deleteRule(cssRule: AnyCSSRule): boolean {\n const {sheet} = this.element\n const index = this.indexOf(cssRule)\n if (index === -1) return false\n sheet.deleteRule(index)\n return true\n }\n\n /**\n * Get index of a CSS Rule.\n */\n indexOf(cssRule: AnyCSSRule): number {\n const {cssRules} = this.element.sheet\n for (let index = 0; index < cssRules.length; index++) {\n if (cssRule === cssRules[index]) return index\n }\n return -1\n }\n\n /**\n * Generate a new CSS rule and replace the existing one.\n *\n * Only used for some old browsers because they can't set a selector.\n */\n replaceRule(cssRule: AnyCSSRule, rule: Rule): false | CSSStyleSheet | AnyCSSRule {\n const index = this.indexOf(cssRule)\n if (index === -1) return false\n this.element.sheet.deleteRule(index)\n return this.insertRule(rule, index)\n }\n\n /**\n * Get all rules elements.\n */\n getRules(): CSSRuleList {\n return this.element.sheet.cssRules\n }\n}\n","/* @flow */\nimport isInBrowser from 'is-in-browser'\nimport StyleSheet from './StyleSheet'\nimport PluginsRegistry from './PluginsRegistry'\nimport sheets from './sheets'\nimport {plugins as internalPlugins} from './plugins/index'\nimport createGenerateIdDefault from './utils/createGenerateId'\nimport createRule from './utils/createRule'\nimport DomRenderer from './DomRenderer'\nimport type {\n Rule,\n RuleFactoryOptions,\n RuleOptions,\n StyleSheetFactoryOptions,\n Plugin,\n JssOptions,\n InternalJssOptions,\n JssStyle\n} from './types'\nimport type {GenerateId} from './utils/createGenerateId'\n\nlet instanceCounter = 0\n\nexport default class Jss {\n id = instanceCounter++\n\n version = process.env.VERSION\n\n plugins = new PluginsRegistry()\n\n options: InternalJssOptions = {\n id: {minify: false},\n createGenerateId: createGenerateIdDefault,\n Renderer: isInBrowser ? DomRenderer : null,\n plugins: []\n }\n\n generateId: GenerateId = createGenerateIdDefault({minify: false})\n\n constructor(options?: JssOptions) {\n for (let i = 0; i < internalPlugins.length; i++) {\n this.plugins.use(internalPlugins[i], {queue: 'internal'})\n }\n this.setup(options)\n }\n\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n setup(options?: JssOptions = {}): this {\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId\n }\n\n if (options.id) {\n this.options.id = {\n ...this.options.id,\n ...options.id\n }\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id)\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer\n }\n\n // eslint-disable-next-line prefer-spread\n if (options.plugins) this.use.apply(this, options.plugins)\n\n return this\n }\n\n /**\n * Create a Style Sheet.\n */\n createStyleSheet(styles: Object, options: StyleSheetFactoryOptions = {}): StyleSheet {\n let {index} = options\n if (typeof index !== 'number') {\n index = sheets.index === 0 ? 0 : sheets.index + 1\n }\n const sheet = new StyleSheet(styles, {\n ...options,\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index\n })\n this.plugins.onProcessSheet(sheet)\n\n return sheet\n }\n\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n removeStyleSheet(sheet: StyleSheet): this {\n sheet.detach()\n sheets.remove(sheet)\n return this\n }\n\n /**\n * Create a rule without a Style Sheet.\n */\n createRule(name?: string, style?: JssStyle = {}, options?: RuleFactoryOptions = {}): Rule | null {\n // Enable rule without name for inline styles.\n if (typeof name === 'object') {\n return this.createRule(undefined, name, style)\n }\n\n const ruleOptions: RuleOptions = {...options, jss: this, Renderer: this.options.Renderer}\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId\n if (!ruleOptions.classes) ruleOptions.classes = {}\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {}\n\n const rule = createRule(name, style, ruleOptions)\n\n if (rule) this.plugins.onProcessRule(rule)\n\n return rule\n }\n\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n use(...plugins: Array<Plugin>): this {\n plugins.forEach(plugin => {\n this.plugins.use(plugin)\n })\n\n return this\n }\n}\n","/**\n * Extracts a styles object with only props that contain function values.\n */\nexport default function getDynamicStyles(styles: Object): Object | null {\n let to = null\n\n for (const key in styles) {\n const value = styles[key]\n const type = typeof value\n\n if (type === 'function') {\n if (!to) to = {}\n to[key] = value\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n const extracted = getDynamicStyles(value)\n if (extracted) {\n if (!to) to = {}\n to[key] = extracted\n }\n }\n }\n\n return to\n}\n","/* @flow */\nimport warn from 'tiny-warning'\nimport type StyleSheet from './StyleSheet'\n\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n */\nexport default class SheetsManager {\n length = 0\n\n sheets = new WeakMap<\n Object,\n {\n refs: number,\n sheet: StyleSheet\n }\n >()\n\n get size(): number {\n return this.length\n }\n\n get(key: Object): ?StyleSheet {\n const entry = this.sheets.get(key)\n return entry && entry.sheet\n }\n\n add(key: Object, sheet: StyleSheet) {\n if (this.sheets.has(key)) return\n\n this.length++\n\n this.sheets.set(key, {\n sheet,\n refs: 0\n })\n }\n\n manage(key: Object): ?StyleSheet {\n const entry = this.sheets.get(key)\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach()\n }\n\n entry.refs++\n\n return entry.sheet\n }\n\n warn(false, \"[JSS] SheetsManager: can't find sheet to manage\")\n\n return undefined\n }\n\n unmanage(key: Object) {\n const entry = this.sheets.get(key)\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--\n\n if (entry.refs === 0) entry.sheet.detach()\n }\n } else {\n warn(false, \"SheetsManager: can't find sheet to unmanage\")\n }\n }\n}\n","/* @flow */\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\nimport Jss from './Jss'\nimport type StyleSheet from './StyleSheet'\nimport type {\n ConditionalRule,\n KeyframesRule,\n StyleRule,\n ViewportRule,\n SimpleRule,\n FontFaceRule\n} from './plugins'\nimport type {JssOptions} from './types'\n\n/**\n * Export types for better typing inside plugins and integrations.\n */\nexport type {\n StyleSheetFactoryOptions,\n JssValue,\n JssOptions,\n JssStyle,\n Plugin,\n RuleListOptions,\n Rule,\n Renderer,\n RuleOptions,\n UpdateOptions,\n Classes,\n BaseRule,\n ContainerRule\n} from './types'\nexport type {GenerateId, CreateGenerateId, CreateGenerateIdOptions} from './utils/createGenerateId'\n\nexport type {\n Jss,\n StyleSheet,\n ConditionalRule,\n KeyframesRule,\n StyleRule,\n ViewportRule,\n SimpleRule,\n FontFaceRule\n}\n\n/**\n * Export a constant indicating if this browser has CSSTOM support.\n * https://developers.google.com/web/updates/2018/03/cssom\n */\nexport const hasCSSTOMSupport = typeof CSS !== 'undefined' && CSS && 'number' in CSS\n\n/**\n * Extracts a styles object with only rules that contain function values.\n */\nexport {default as getDynamicStyles} from './utils/getDynamicStyles'\n\n/**\n * Converts JSS array value to a CSS string.\n */\nexport {default as toCssValue} from './utils/toCssValue'\n\n/**\n * Create a rule instance.\n */\nexport {default as createRule} from './utils/createRule'\n\n/**\n * SheetsRegistry for SSR.\n */\nexport {default as SheetsRegistry} from './SheetsRegistry'\n\n/**\n * SheetsManager for react-jss and co.\n */\nexport {default as SheetsManager} from './SheetsManager'\n\n/**\n * RuleList for plugins.\n */\nexport {default as RuleList} from './RuleList'\n\n/**\n * Default global SheetsRegistry instance.\n */\nexport {default as sheets} from './sheets'\n\n/**\n * Class name generator creator.\n */\nexport {default as createGenerateId} from './utils/createGenerateId'\n\n/**\n * Creates a new instance of Jss.\n */\nexport const create = (options?: JssOptions): Jss => new Jss(options)\n\n/**\n * A global Jss instance.\n */\nexport default create()\n"],"names":["plainObjectConstrurctor","constructor","cloneStyle","style","Array","isArray","map","newStyle","name","createRule","decl","options","jss","declCopy","rule","plugins","onCreateRule","warning","join","value","by","result","i","length","toCssValue","ignoreImportant","cssValue","indentStr","str","indent","index","toCss","selector","fallbacks","fallback","prop","allowEmpty","escapeRegex","nativeEscape","CSS","escape","replace","BaseStyleRule","key","type","isProcessed","renderer","renderable","sheet","Renderer","undefined","force","newValue","process","onChangeValue","isEmpty","isDefined","remove","removeProperty","setProperty","attached","StyleRule","selectorText","id","scoped","generateId","applyTo","json","toJSON","toString","link","opts","hasChanged","setSelector","replaceRule","parent","defaultToStringOptions","children","atRegExp","ConditionalRule","styles","at","rules","atMatch","match","RuleList","add","getRule","get","indexOf","addRule","onProcessRule","keyRegExp","test","nameRegExp","KeyframesRule","frames","nameMatch","refRegExp","findReferencedKeyframe","val","keyframes","replaceRef","refKeyframe","plugin","onProcessStyle","KeyframeRule","FontFaceRule","ViewportRule","SimpleRule","keysMap","pluginStyleRule","pluginConditionalRule","pluginKeyframesRule","pluginKeyframeRule","pluginFontFaceRule","pluginViewportRule","pluginSimpleRule","defaultUpdateOptions","forceUpdateOptions","raw","classes","ruleOptions","register","splice","unregister","slice","forEach","update","data","onUpdate","styleRule","nextValue","prevValue","css","StyleSheet","deployed","queue","attach","deploy","detach","push","insertRule","addRules","added","deleteRule","PluginsRegistry","internal","external","registry","onProcessSheet","processedValue","use","newPlugin","reduce","SheetsRegistry","reset","window","Math","self","Function","ns","globalThis","maxRules","createGenerateId","ruleCounter","jssId","prefix","classNamePrefix","String","minify","moduleId","memoize","fn","getPropertyValue","cssRule","attributeStyleMap","err","set","delete","message","getHead","document","querySelector","findHigherSheet","insertionPoint","findHighestSheet","findCommentNode","text","head","childNodes","node","nodeType","nodeValue","trim","findPrevNode","sheets","element","parentNode","nextSibling","comment","insertStyle","nextNode","insertBefore","insertionPointElement","appendChild","getNonce","getAttribute","container","maxIndex","cssRules","c","appendRule","createStyle","el","createElement","textContent","DomRenderer","hasInsertedRules","media","meta","setAttribute","nonce","Boolean","removeChild","insertRules","nativeParent","latestNativeParent","parentStyleSheet","ruleStr","nativeRule","getRules","instanceCounter","Jss","version","createGenerateIdDefault","isInBrowser","internalPlugins","setup","apply","createStyleSheet","removeStyleSheet","getDynamicStyles","to","extracted","SheetsManager","WeakMap","entry","has","refs","manage","warn","unmanage","hasCSSTOMSupport","create"],"mappings":";;;;;;EAAe,SAAS,QAAQ,GAAG;EACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,UAAU,MAAM,EAAE;EAChD,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;EAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;;EAEhC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;EAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;EAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;EACpC,SAAS;EACT,OAAO;EACP,KAAK;;EAEL,IAAI,OAAO,MAAM,CAAC;EAClB,GAAG,CAAC;;EAEJ,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;EACzC;;EChBA,IAAI,OAAO,GAAG,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,GAAG,UAAU,GAAG,EAAE,EAAE,OAAO,OAAO,GAAG,CAAC,EAAE,GAAG,UAAU,GAAG,EAAE,EAAE,OAAO,GAAG,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,GAAG,CAAC,WAAW,KAAK,MAAM,IAAI,GAAG,KAAK,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG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