styled-components 3.4.6 → 3.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/dist/styled-components-no-parser.browser.cjs.js +3 -4
  3. package/dist/styled-components-no-parser.browser.cjs.js.map +1 -1
  4. package/dist/styled-components-no-parser.browser.esm.js +3 -4
  5. package/dist/styled-components-no-parser.browser.esm.js.map +1 -1
  6. package/dist/styled-components-no-parser.cjs.js +3 -4
  7. package/dist/styled-components-no-parser.cjs.js.map +1 -1
  8. package/dist/styled-components-no-parser.esm.js +3 -4
  9. package/dist/styled-components-no-parser.esm.js.map +1 -1
  10. package/dist/styled-components-primitives.cjs.js +1 -1
  11. package/dist/styled-components-primitives.esm.js +1 -1
  12. package/dist/styled-components.browser.cjs.js +3 -4
  13. package/dist/styled-components.browser.cjs.js.map +1 -1
  14. package/dist/styled-components.browser.cjs.min.js +1 -1
  15. package/dist/styled-components.browser.cjs.min.js.map +1 -1
  16. package/dist/styled-components.browser.esm.js +3 -4
  17. package/dist/styled-components.browser.esm.js.map +1 -1
  18. package/dist/styled-components.browser.esm.min.js +1 -1
  19. package/dist/styled-components.browser.esm.min.js.map +1 -1
  20. package/dist/styled-components.cjs.js +3 -4
  21. package/dist/styled-components.cjs.js.map +1 -1
  22. package/dist/styled-components.cjs.min.js +1 -1
  23. package/dist/styled-components.cjs.min.js.map +1 -1
  24. package/dist/styled-components.esm.js +3 -4
  25. package/dist/styled-components.esm.js.map +1 -1
  26. package/dist/styled-components.esm.min.js +1 -1
  27. package/dist/styled-components.esm.min.js.map +1 -1
  28. package/dist/styled-components.js +3 -4
  29. package/dist/styled-components.js.map +1 -1
  30. package/dist/styled-components.min.js +1 -1
  31. package/dist/styled-components.min.js.map +1 -1
  32. package/dist/styled-components.native.cjs.js +1 -1
  33. package/native/dist/styled-components.native.cjs.js +3581 -3450
  34. package/native/dist/styled-components.native.cjs.js.map +1 -1
  35. package/native/dist/styled-components.native.esm.js +3582 -3451
  36. package/native/dist/styled-components.native.esm.js.map +1 -1
  37. package/package.json +1 -1
  38. package/primitives/dist/styled-components-primitives.cjs.js +3581 -3450
  39. package/primitives/dist/styled-components-primitives.cjs.js.map +1 -1
  40. package/primitives/dist/styled-components-primitives.esm.js +3582 -3451
  41. package/primitives/dist/styled-components-primitives.esm.js.map +1 -1
  42. package/src/utils/errors.md +1 -1
  43. package/src/utils/validAttr.js +2 -3
@@ -160,7 +160,7 @@
160
160
  "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
161
161
  "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
162
162
  "9": "Missing document `<head>`\n\n",
163
- "10": "Cannot find sheet for given tag\n\n",
163
+ "10": "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",
164
164
  "11": "A plain React class (%s) has been interpolated into styles, probably as a component selector (https://www.styled-components.com/docs/advanced#referring-to-other-components). Only styled-component classes can be targeted in this fashion."
165
165
  };
166
166
 
@@ -3933,12 +3933,11 @@
3933
3933
  * and no false positives from partials
3934
3934
  * */
3935
3935
  /*
3936
- children dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onInvalid onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controlsList controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan onPointerDown onPointerMove onPointerUp onPointerCancel onGotPointerCapture onLostPointerCapture onPointerEnter onPointerLeave onPointerOver onPointerOut class for autofocus
3936
+ children dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onInvalid onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controlsList controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan onPointerDown onPointerMove onPointerUp onPointerCancel onGotPointerCapture onLostPointerCapture onPointerEnter onPointerLeave onPointerOver onPointerOut class for autofocus allow allowUserMedia allowPaymentRequest
3937
3937
  */
3938
3938
  /* eslint-enable max-len */
3939
3939
 
3940
- var ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveA(?:spectRatio|lpha)|ointsAt[X-Z]|anose1)|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:strokeMiterlimi|(?:specularConsta|repeatCou|fontVaria)n|(?:(?:specularE|e)xpon|renderingInt|asc)en|d(?:iffuseConsta|esce)n|(?:fontSizeAdju|lengthAdju|manife)s|baselineShif|onPointerOu|vectorEffec|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|k(?:ernel(?:UnitLength|Matrix)|[1-4])|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|(?:pointerEve|keyPoi)nts|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|unicodeRange|mathematical|vAlphabetic|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|a(?:rabicForm|l(?:phabetic|t)|sync)|pathLength|innerHTML|xlinkShow|(?:xlinkHr|glyphR)ef|(?:tabInde|(?:sand|b)bo|viewBo)x|(?:(?:href|xml|src)La|kerni)ng|autoPlay|o(?:verflow|pen)|f(?:o(?:ntSize|rm?)|il(?:ter|l))|r(?:e(?:quired|sult|f))?|divisor|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|i(?:temRef|n2|s)|t(?:arget[XY]|o)|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|(?:width|size)s|prefix|typeof|itemID|s(?:t(?:roke|art)|hape|cope|rc)|t(?:arget|ype)|(?:stri|la)ng|a(?:ccept|s)|m(?:edia|a(?:sk|x)|in)|x(?:mlns)?|width|value|size|href|k(?:ey)?|end|low|by|i[dn]|y[12]|g[12]|x[12]|f[xy]|[yz])$/;
3941
-
3940
+ var ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveAspectRatio|ointsAt[X-Z]|anose1)|(?:(?:allowPaymentReque|(?:fontSize|length)Adju|manife)s|strokeMiterlimi|(?:(?:specularE|e)xpon|renderingInt|asc)en|(?:specularConsta|repeatCou|fontVaria)n|d(?:iffuseConsta|esce)n|baselineShif|vectorEffec|onPointerOu|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|a(?:l(?:lowUserMedia|phabetic|t)|rabicForm|sync)|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|(?:pointerEve|keyPoi)nts|preserveAlpha|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|unicodeRange|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|mathematical|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|vAlphabetic|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|pathLength|(?:xlinkHr|glyphR)ef|innerHTML|xlinkShow|f(?:o(?:ntSize|rm?)|il(?:ter|l))|(?:tabInde|(?:sand|b)bo|viewBo)x|autoPlay|r(?:e(?:quired|sult|f))?|(?:(?:href|xml|src)La|kerni)ng|o(?:verflow|pen)|i(?:temRef|n2|s)|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|divisor|t(?:arget[XY]|o)|(?:stri|la)ng|(?:width|size)s|prefix|typeof|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|llow|s)|itemID|t(?:arget|ype)|m(?:edia|a(?:sk|x)|in)|value|width|x(?:mlns)?|size|href|k(?:ey)?|end|low|by|x[12]|y[12]|g[12]|i[dn]|f[xy]|[yz])$/;
3942
3941
  /* From DOMProperty */
3943
3942
  var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
3944
3943
  var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
@@ -1 +1 @@
1
- {"version":3,"file":"styled-components.js","sources":["../src/models/StyleTags.js","../src/models/StyleSheet.js","../src/models/StyleSheetManager.js","../src/models/ServerStyleSheet.js","../src/models/ThemeProvider.js","../src/models/StyledComponent.js","../src/models/ComponentStyle.js","../src/constructors/styled.js","../src/constructors/keyframes.js","../src/constructors/injectGlobal.js"],"sourcesContent":["// @flow\n/* eslint-disable flowtype/object-type-delimiter */\n/* eslint-disable react/prop-types */\n\nimport React, { type Element } from 'react'\nimport { IS_BROWSER, DISABLE_SPEEDY, SC_ATTR } from '../constants'\nimport StyledError from '../utils/error'\nimport { type ExtractedComp } from '../utils/extractCompsFromCSS'\nimport { splitByRules } from '../utils/stringifyRules'\nimport getNonce from '../utils/nonce'\nimport once from '../utils/once'\n\nimport {\n type Names,\n addNameForId,\n resetIdNames,\n hasNameForId,\n stringifyNames,\n cloneNames,\n} from '../utils/styleNames'\n\nimport {\n sheetForTag,\n safeInsertRule,\n deleteRules,\n} from '../utils/insertRuleHelpers'\n\nexport interface Tag<T> {\n // $FlowFixMe: Doesn't seem to accept any combination w/ HTMLStyleElement for some reason\n styleTag: HTMLStyleElement | null;\n /* lists all ids of the tag */\n getIds(): string[];\n /* checks whether `name` is already injected for `id` */\n hasNameForId(id: string, name: string): boolean;\n /* inserts a marker to ensure the id's correct position in the sheet */\n insertMarker(id: string): T;\n /* inserts rules according to the ids markers */\n insertRules(id: string, cssRules: string[], name: ?string): void;\n /* removes all rules belonging to the id, keeping the marker around */\n removeRules(id: string): void;\n css(): string;\n toHTML(additionalAttrs: ?string): string;\n toElement(): Element<*>;\n clone(): Tag<T>;\n /* used in server side rendering to indicate that the rules in the tag have been flushed to HTML */\n sealed: boolean;\n}\n\n/* this marker separates component styles and is important for rehydration */\nconst makeTextMarker = id => `\\n/* sc-component-id: ${id} */\\n`\n\n/* add up all numbers in array up until and including the index */\nconst addUpUntilIndex = (sizes: number[], index: number): number => {\n let totalUpToIndex = 0\n for (let i = 0; i <= index; i += 1) {\n totalUpToIndex += sizes[i]\n }\n\n return totalUpToIndex\n}\n\n/* create a new style tag after lastEl */\nconst makeStyleTag = (\n target: ?HTMLElement,\n tagEl: ?Node,\n insertBefore: ?boolean\n) => {\n const el = document.createElement('style')\n el.setAttribute(SC_ATTR, '')\n\n const nonce = getNonce()\n if (nonce) {\n el.setAttribute('nonce', nonce)\n }\n\n /* Work around insertRule quirk in EdgeHTML */\n el.appendChild(document.createTextNode(''))\n\n if (target && !tagEl) {\n /* Append to target when no previous element was passed */\n target.appendChild(el)\n } else {\n if (!tagEl || !target || !tagEl.parentNode) {\n throw new StyledError(6)\n }\n\n /* Insert new style tag after the previous one */\n tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling)\n }\n\n return el\n}\n\n/* takes a css factory function and outputs an html styled tag factory */\nconst wrapAsHtmlTag = (css: () => string, names: Names) => (\n additionalAttrs: ?string\n): string => {\n const nonce = getNonce()\n const attrs = [\n nonce && `nonce=\"${nonce}\"`,\n `${SC_ATTR}=\"${stringifyNames(names)}\"`,\n additionalAttrs,\n ]\n\n const htmlAttr = attrs.filter(Boolean).join(' ')\n return `<style ${htmlAttr}>${css()}</style>`\n}\n\n/* takes a css factory function and outputs an element factory */\nconst wrapAsElement = (css: () => string, names: Names) => () => {\n const props = {\n [SC_ATTR]: stringifyNames(names),\n }\n\n const nonce = getNonce()\n if (nonce) {\n // $FlowFixMe\n props.nonce = nonce\n }\n\n // eslint-disable-next-line react/no-danger\n return <style {...props} dangerouslySetInnerHTML={{ __html: css() }} />\n}\n\nconst getIdsFromMarkersFactory = (markers: Object) => (): string[] =>\n Object.keys(markers)\n\n/* speedy tags utilise insertRule */\nconst makeSpeedyTag = (\n el: HTMLStyleElement,\n getImportRuleTag: ?() => Tag<any>\n): Tag<number> => {\n const names: Names = (Object.create(null): Object)\n const markers = Object.create(null)\n const sizes: number[] = []\n\n const extractImport = getImportRuleTag !== undefined\n /* indicates whther getImportRuleTag was called */\n let usedImportRuleTag = false\n\n const insertMarker = id => {\n const prev = markers[id]\n if (prev !== undefined) {\n return prev\n }\n\n markers[id] = sizes.length\n sizes.push(0)\n resetIdNames(names, id)\n\n return markers[id]\n }\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id)\n const sheet = sheetForTag(el)\n const insertIndex = addUpUntilIndex(sizes, marker)\n\n let injectedRules = 0\n const importRules = []\n const cssRulesSize = cssRules.length\n\n for (let i = 0; i < cssRulesSize; i += 1) {\n const cssRule = cssRules[i]\n let mayHaveImport = extractImport /* @import rules are reordered to appear first */\n if (mayHaveImport && cssRule.indexOf('@import') !== -1) {\n importRules.push(cssRule)\n } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {\n mayHaveImport = false\n injectedRules += 1\n }\n }\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true\n // $FlowFixMe\n getImportRuleTag().insertRules(`${id}-import`, importRules)\n }\n\n sizes[marker] += injectedRules /* add up no of injected rules */\n addNameForId(names, id, name)\n }\n\n const removeRules = id => {\n const marker = markers[id]\n if (marker === undefined) return\n\n const size = sizes[marker]\n const sheet = sheetForTag(el)\n const removalIndex = addUpUntilIndex(sizes, marker)\n deleteRules(sheet, removalIndex, size)\n sizes[marker] = 0\n resetIdNames(names, id)\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(`${id}-import`)\n }\n }\n\n const css = () => {\n const { cssRules } = sheetForTag(el)\n let str = ''\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n str += makeTextMarker(id)\n const marker = markers[id]\n const end = addUpUntilIndex(sizes, marker)\n const size = sizes[marker]\n for (let i = end - size; i < end; i += 1) {\n const rule = cssRules[i]\n if (rule !== undefined) {\n str += rule.cssText\n }\n }\n }\n\n return str\n }\n\n return {\n clone() {\n throw new StyledError(5)\n },\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n }\n}\n\nconst makeTextNode = id => document.createTextNode(makeTextMarker(id))\n\nconst makeBrowserTag = (\n el: HTMLStyleElement,\n getImportRuleTag: ?() => Tag<any>\n): Tag<Text> => {\n const names = (Object.create(null): Object)\n const markers = Object.create(null)\n\n const extractImport = getImportRuleTag !== undefined\n\n /* indicates whther getImportRuleTag was called */\n let usedImportRuleTag = false\n\n const insertMarker = id => {\n const prev = markers[id]\n if (prev !== undefined) {\n return prev\n }\n\n markers[id] = makeTextNode(id)\n el.appendChild(markers[id])\n names[id] = Object.create(null)\n\n return markers[id]\n }\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id)\n const importRules = []\n const cssRulesSize = cssRules.length\n\n for (let i = 0; i < cssRulesSize; i += 1) {\n const rule = cssRules[i]\n let mayHaveImport = extractImport\n if (mayHaveImport && rule.indexOf('@import') !== -1) {\n importRules.push(rule)\n } else {\n mayHaveImport = false\n const separator = i === cssRulesSize - 1 ? '' : ' '\n marker.appendData(`${rule}${separator}`)\n }\n }\n\n addNameForId(names, id, name)\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true\n // $FlowFixMe\n getImportRuleTag().insertRules(`${id}-import`, importRules)\n }\n }\n\n const removeRules = id => {\n const marker = markers[id]\n if (marker === undefined) return\n\n /* create new empty text node and replace the current one */\n const newMarker = makeTextNode(id)\n el.replaceChild(newMarker, marker)\n markers[id] = newMarker\n resetIdNames(names, id)\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(`${id}-import`)\n }\n }\n\n const css = () => {\n let str = ''\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n str += markers[id].data\n }\n return str\n }\n\n return {\n clone() {\n throw new StyledError(5)\n },\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n }\n}\n\nconst makeServerTagInternal = (namesArg, markersArg): Tag<[string]> => {\n const names =\n namesArg === undefined ? (Object.create(null): Object) : namesArg\n const markers = markersArg === undefined ? Object.create(null) : markersArg\n\n const insertMarker = id => {\n const prev = markers[id]\n if (prev !== undefined) {\n return prev\n }\n\n return (markers[id] = [''])\n }\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id)\n marker[0] += cssRules.join(' ')\n addNameForId(names, id, name)\n }\n\n const removeRules = id => {\n const marker = markers[id]\n if (marker === undefined) return\n marker[0] = ''\n resetIdNames(names, id)\n }\n\n const css = () => {\n let str = ''\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n const cssForId = markers[id][0]\n if (cssForId) {\n str += makeTextMarker(id) + cssForId\n }\n }\n return str\n }\n\n const clone = () => {\n const namesClone = cloneNames(names)\n const markersClone = Object.create(null)\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n markersClone[id] = [markers[id][0]]\n }\n\n return makeServerTagInternal(namesClone, markersClone)\n }\n\n const tag = {\n clone,\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: null,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n }\n\n return tag\n}\n\nconst makeServerTag = (): Tag<[string]> => makeServerTagInternal()\n\nexport const makeTag = (\n target: ?HTMLElement,\n tagEl: ?HTMLStyleElement,\n forceServer?: boolean,\n insertBefore?: boolean,\n getImportRuleTag?: () => Tag<any>\n): Tag<any> => {\n if (IS_BROWSER && !forceServer) {\n const el = makeStyleTag(target, tagEl, insertBefore)\n\n if (DISABLE_SPEEDY) {\n return makeBrowserTag(el, getImportRuleTag)\n } else {\n return makeSpeedyTag(el, getImportRuleTag)\n }\n }\n\n return makeServerTag()\n}\n\n/* wraps a given tag so that rehydration is performed once when necessary */\nexport const makeRehydrationTag = (\n tag: Tag<any>,\n els: HTMLStyleElement[],\n extracted: ExtractedComp[],\n immediateRehydration: boolean\n): Tag<any> => {\n /* rehydration function that adds all rules to the new tag */\n const rehydrate = once(() => {\n /* add all extracted components to the new tag */\n for (let i = 0, len = extracted.length; i < len; i += 1) {\n const { componentId, cssFromDOM } = extracted[i]\n const cssRules = splitByRules(cssFromDOM)\n tag.insertRules(componentId, cssRules)\n }\n\n /* remove old HTMLStyleElements, since they have been rehydrated */\n for (let i = 0, len = els.length; i < len; i += 1) {\n const el = els[i]\n if (el.parentNode) {\n el.parentNode.removeChild(el)\n }\n }\n })\n\n if (immediateRehydration) rehydrate()\n\n return {\n ...tag,\n /* add rehydration hook to insertion methods */\n insertMarker: id => {\n rehydrate()\n return tag.insertMarker(id)\n },\n insertRules: (id, cssRules, name) => {\n rehydrate()\n return tag.insertRules(id, cssRules, name)\n },\n }\n}\n","// @flow\nimport { cloneElement } from 'react'\nimport {\n IS_BROWSER,\n DISABLE_SPEEDY,\n SC_ATTR,\n SC_STREAM_ATTR,\n} from '../constants'\nimport { makeTag, makeRehydrationTag, type Tag } from './StyleTags'\nimport extractComps from '../utils/extractCompsFromCSS'\n\nconst SPLIT_REGEX = /\\s+/\n\n/* determine the maximum number of components before tags are sharded */\nlet MAX_SIZE\nif (IS_BROWSER) {\n /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */\n MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000\n} else {\n /* for servers we do not need to shard at all */\n MAX_SIZE = -1\n}\n\nlet sheetRunningId = 0\nlet master\n\nexport default class StyleSheet {\n id: number\n forceServer: boolean\n target: ?HTMLElement\n /* a map from ids to tags */\n tagMap: { [string]: Tag<any> }\n /* deferred rules for a given id */\n deferred: { [string]: string[] | void }\n /* this is used for not reinjecting rules via hasNameForId() */\n rehydratedNames: { [string]: boolean }\n /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */\n ignoreRehydratedNames: { [string]: boolean }\n /* a list of tags belonging to this StyleSheet */\n tags: Tag<any>[]\n /* a tag for import rules */\n importRuleTag: Tag<any>\n /* current capacity until a new tag must be created */\n capacity: number\n /* children (aka clones) of this StyleSheet inheriting all and future injections */\n clones: StyleSheet[]\n\n constructor(\n target: ?HTMLElement = IS_BROWSER ? document.head : null,\n forceServer?: boolean = false\n ) {\n sheetRunningId += 1\n this.id = sheetRunningId\n this.forceServer = forceServer\n this.target = forceServer ? null : target\n this.tagMap = {}\n this.deferred = {}\n this.rehydratedNames = {}\n this.ignoreRehydratedNames = {}\n this.tags = []\n this.capacity = 1\n this.clones = []\n }\n\n /* rehydrate all SSR'd style tags */\n rehydrate() {\n if (!IS_BROWSER || this.forceServer) {\n return this\n }\n\n const els = []\n const names = []\n const extracted = []\n let isStreamed = false\n\n /* retrieve all of our SSR style elements from the DOM */\n const nodes = document.querySelectorAll(`style[${SC_ATTR}]`)\n const nodesSize = nodes.length\n\n /* abort rehydration if no previous style tags were found */\n if (nodesSize === 0) {\n return this\n }\n\n for (let i = 0; i < nodesSize; i += 1) {\n // $FlowFixMe: We can trust that all elements in this query are style elements\n const el = (nodes[i]: HTMLStyleElement)\n\n /* check if style tag is a streamed tag */\n if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR)\n\n /* retrieve all component names */\n const elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX)\n const elNamesSize = elNames.length\n for (let j = 0; j < elNamesSize; j += 1) {\n const name = elNames[j]\n /* add rehydrated name to sheet to avoid readding styles */\n this.rehydratedNames[name] = true\n names.push(name)\n }\n\n /* extract all components and their CSS */\n extracted.push(...extractComps(el.textContent))\n\n /* store original HTMLStyleElement */\n els.push(el)\n }\n\n /* abort rehydration if nothing was extracted */\n const extractedSize = extracted.length\n if (extractedSize === 0) {\n return this\n }\n\n /* create a tag to be used for rehydration */\n const tag = this.makeTag(null)\n const rehydrationTag = makeRehydrationTag(tag, els, extracted, isStreamed)\n\n /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */\n this.capacity = Math.max(1, MAX_SIZE - extractedSize)\n this.tags.push(rehydrationTag)\n\n /* retrieve all component ids */\n for (let j = 0; j < extractedSize; j += 1) {\n this.tagMap[extracted[j].componentId] = rehydrationTag\n }\n\n return this\n }\n\n /* retrieve a \"master\" instance of StyleSheet which is typically used when no other is available\n * The master StyleSheet is targeted by injectGlobal, keyframes, and components outside of any\n * StyleSheetManager's context */\n static get master(): StyleSheet {\n return master || (master = new StyleSheet().rehydrate())\n }\n\n /* NOTE: This is just for backwards-compatibility with jest-styled-components */\n static get instance(): StyleSheet {\n return StyleSheet.master\n }\n\n /* reset the internal \"master\" instance */\n static reset(forceServer?: boolean = false) {\n master = new StyleSheet(undefined, forceServer).rehydrate()\n }\n\n /* adds \"children\" to the StyleSheet that inherit all of the parents' rules\n * while their own rules do not affect the parent */\n clone() {\n const sheet = new StyleSheet(this.target, this.forceServer)\n\n /* add to clone array */\n this.clones.push(sheet)\n\n /* clone all tags */\n sheet.tags = this.tags.map(tag => {\n const ids = tag.getIds()\n const newTag = tag.clone()\n\n /* reconstruct tagMap */\n for (let i = 0; i < ids.length; i += 1) {\n sheet.tagMap[ids[i]] = newTag\n }\n\n return newTag\n })\n\n /* clone other maps */\n sheet.rehydratedNames = { ...this.rehydratedNames }\n sheet.deferred = { ...this.deferred }\n\n return sheet\n }\n\n /* force StyleSheet to create a new tag on the next injection */\n sealAllTags() {\n this.capacity = 1\n\n this.tags.forEach(tag => {\n // eslint-disable-next-line no-param-reassign\n tag.sealed = true\n })\n }\n\n makeTag(tag: ?Tag<any>): Tag<any> {\n const lastEl = tag ? tag.styleTag : null\n const insertBefore = false\n\n return makeTag(\n this.target,\n lastEl,\n this.forceServer,\n insertBefore,\n this.getImportRuleTag\n )\n }\n\n getImportRuleTag = (): Tag<any> => {\n const { importRuleTag } = this\n if (importRuleTag !== undefined) {\n return importRuleTag\n }\n\n const firstTag = this.tags[0]\n const insertBefore = true\n\n return (this.importRuleTag = makeTag(\n this.target,\n firstTag ? firstTag.styleTag : null,\n this.forceServer,\n insertBefore\n ))\n }\n\n /* get a tag for a given componentId, assign the componentId to one, or shard */\n getTagForId(id: string): Tag<any> {\n /* simply return a tag, when the componentId was already assigned one */\n const prev = this.tagMap[id]\n if (prev !== undefined && !prev.sealed) {\n return prev\n }\n\n let tag = this.tags[this.tags.length - 1]\n\n /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */\n this.capacity -= 1\n\n if (this.capacity === 0) {\n this.capacity = MAX_SIZE\n tag = this.makeTag(tag)\n this.tags.push(tag)\n }\n\n return (this.tagMap[id] = tag)\n }\n\n /* mainly for injectGlobal to check for its id */\n hasId(id: string) {\n return this.tagMap[id] !== undefined\n }\n\n /* caching layer checking id+name to already have a corresponding tag and injected rules */\n hasNameForId(id: string, name: string) {\n /* exception for rehydrated names which are checked separately */\n if (\n this.ignoreRehydratedNames[id] === undefined &&\n this.rehydratedNames[name]\n ) {\n return true\n }\n\n const tag = this.tagMap[id]\n return tag !== undefined && tag.hasNameForId(id, name)\n }\n\n /* registers a componentId and registers it on its tag */\n deferredInject(id: string, cssRules: string[]) {\n /* don't inject when the id is already registered */\n if (this.tagMap[id] !== undefined) return\n\n const { clones } = this\n for (let i = 0; i < clones.length; i += 1) {\n clones[i].deferredInject(id, cssRules)\n }\n\n this.getTagForId(id).insertMarker(id)\n this.deferred[id] = cssRules\n }\n\n /* injects rules for a given id with a name that will need to be cached */\n inject(id: string, cssRules: string[], name?: string) {\n const { clones } = this\n\n for (let i = 0; i < clones.length; i += 1) {\n clones[i].inject(id, cssRules, name)\n }\n\n const tag = this.getTagForId(id)\n\n /* add deferred rules for component */\n if (this.deferred[id] !== undefined) {\n // Combine passed cssRules with previously deferred CSS rules\n // NOTE: We cannot mutate the deferred array itself as all clones\n // do the same (see clones[i].inject)\n const rules = this.deferred[id].concat(cssRules)\n tag.insertRules(id, rules, name)\n\n this.deferred[id] = undefined\n } else {\n tag.insertRules(id, cssRules, name)\n }\n }\n\n /* removes all rules for a given id, which doesn't remove its marker but resets it */\n remove(id: string) {\n const tag = this.tagMap[id]\n if (tag === undefined) return\n\n const { clones } = this\n for (let i = 0; i < clones.length; i += 1) {\n clones[i].remove(id)\n }\n\n /* remove all rules from the tag */\n tag.removeRules(id)\n /* ignore possible rehydrated names */\n this.ignoreRehydratedNames[id] = true\n /* delete possible deferred rules */\n this.deferred[id] = undefined\n }\n\n toHTML() {\n return this.tags.map(tag => tag.toHTML()).join('')\n }\n\n toReactElements(): Array<*> {\n const { id } = this\n\n return this.tags.map((tag, i) => {\n const key = `sc-${id}-${i}`\n return cloneElement(tag.toElement(), { key })\n })\n }\n}\n","// @flow\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport StyleSheet from './StyleSheet'\nimport ServerStyleSheet from './ServerStyleSheet'\nimport { CONTEXT_KEY } from '../constants'\nimport StyledError from '../utils/error'\n\ntype Props = {\n sheet?: StyleSheet | null,\n target?: HTMLElement | null,\n}\n\nexport default class StyleSheetManager extends Component<Props, void> {\n static childContextTypes = {\n [CONTEXT_KEY]: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]).isRequired,\n }\n\n static propTypes = {\n sheet: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]),\n target: PropTypes.shape({\n appendChild: PropTypes.func.isRequired,\n }),\n }\n\n sheetInstance: StyleSheet\n\n getChildContext() {\n return { [CONTEXT_KEY]: this.sheetInstance }\n }\n\n componentWillMount() {\n if (this.props.sheet) {\n this.sheetInstance = this.props.sheet\n } else if (this.props.target) {\n this.sheetInstance = new StyleSheet(this.props.target)\n } else {\n throw new StyledError(4)\n }\n }\n\n render() {\n /* eslint-disable react/prop-types */\n // Flow v0.43.1 will report an error accessing the `children` property,\n // but v0.47.0 will not. It is necessary to use a type cast instead of\n // a \"fixme\" comment to satisfy both Flow versions.\n return React.Children.only((this.props: any).children)\n }\n}\n","// @flow\n/* eslint-disable no-underscore-dangle */\nimport React from 'react'\nimport stream from 'stream'\n\nimport { IS_BROWSER, SC_STREAM_ATTR } from '../constants'\nimport StyledError from '../utils/error'\nimport StyleSheet from './StyleSheet'\nimport StyleSheetManager from './StyleSheetManager'\n\ndeclare var __SERVER__: boolean\n\nexport default class ServerStyleSheet {\n instance: StyleSheet\n masterSheet: StyleSheet\n closed: boolean\n\n constructor() {\n /* The master sheet might be reset, so keep a reference here */\n this.masterSheet = StyleSheet.master\n this.instance = this.masterSheet.clone()\n this.closed = false\n }\n\n complete() {\n if (!this.closed) {\n /* Remove closed StyleSheets from the master sheet */\n const index = this.masterSheet.clones.indexOf(this.instance)\n this.masterSheet.clones.splice(index, 1)\n this.closed = true\n }\n }\n\n collectStyles(children: any) {\n if (this.closed) {\n throw new StyledError(2)\n }\n\n return (\n <StyleSheetManager sheet={this.instance}>{children}</StyleSheetManager>\n )\n }\n\n getStyleTags(): string {\n this.complete()\n return this.instance.toHTML()\n }\n\n getStyleElement() {\n this.complete()\n return this.instance.toReactElements()\n }\n\n interleaveWithNodeStream(readableStream: stream.Readable) {\n if (!__SERVER__ || IS_BROWSER) {\n throw new StyledError(3)\n }\n\n /* the tag index keeps track of which tags have already been emitted */\n const { instance } = this\n let instanceTagIndex = 0\n\n const streamAttr = `${SC_STREAM_ATTR}=\"true\"`\n\n const transformer = new stream.Transform({\n transform: function appendStyleChunks(chunk, /* encoding */ _, callback) {\n const { tags } = instance\n let html = ''\n\n /* retrieve html for each new style tag */\n for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {\n const tag = tags[instanceTagIndex]\n html += tag.toHTML(streamAttr)\n }\n\n /* force our StyleSheets to emit entirely new tags */\n instance.sealAllTags()\n\n /* prepend style html to chunk */\n this.push(html + chunk)\n callback()\n },\n })\n\n readableStream.on('end', () => this.complete())\n readableStream.on('error', err => {\n this.complete()\n\n // forward the error to the transform stream\n transformer.emit('error', err)\n })\n\n return readableStream.pipe(transformer)\n }\n}\n","// @flow\nimport React, { Component, type Element } from 'react'\nimport PropTypes from 'prop-types'\nimport createBroadcast from '../utils/create-broadcast'\nimport type { Broadcast } from '../utils/create-broadcast'\nimport StyledError from '../utils/error'\nimport once from '../utils/once'\n\n// NOTE: DO NOT CHANGE, changing this is a semver major change!\nexport const CHANNEL = '__styled-components__'\nexport const CHANNEL_NEXT = `${CHANNEL}next__`\n\nexport const CONTEXT_CHANNEL_SHAPE = PropTypes.shape({\n getTheme: PropTypes.func,\n subscribe: PropTypes.func,\n unsubscribe: PropTypes.func,\n})\n\nexport const contextShape = {\n [CHANNEL]: PropTypes.func, // legacy\n [CHANNEL_NEXT]: CONTEXT_CHANNEL_SHAPE,\n}\n\nexport type Theme = { [key: string]: mixed }\ntype ThemeProviderProps = {|\n children?: Element<any>,\n theme: Theme | ((outerTheme: Theme) => void),\n|}\n\nlet warnChannelDeprecated\nif (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated = once(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `Warning: Usage of \\`context.${CHANNEL}\\` as a function is deprecated. It will be replaced with the object on \\`.context.${CHANNEL_NEXT}\\` in a future version.`\n )\n })\n}\n\nconst isFunction = test => typeof test === 'function'\n\n/**\n * Provide a theme to an entire react component tree via context and event listeners (have to do\n * both context and event emitter as pure components block context updates)\n */\nexport default class ThemeProvider extends Component<ThemeProviderProps, void> {\n broadcast: Broadcast\n getTheme: (theme?: Theme | ((outerTheme: Theme) => void)) => Theme\n outerTheme: Theme\n props: ThemeProviderProps\n unsubscribeToOuterId: number = -1\n unsubscribeToOuterId: string\n\n static childContextTypes = contextShape\n static contextTypes = {\n [CHANNEL_NEXT]: CONTEXT_CHANNEL_SHAPE,\n }\n\n constructor() {\n super()\n this.getTheme = this.getTheme.bind(this)\n }\n\n componentWillMount() {\n // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme\n // with the outer theme\n const outerContext = this.context[CHANNEL_NEXT]\n if (outerContext !== undefined) {\n this.unsubscribeToOuterId = outerContext.subscribe(theme => {\n this.outerTheme = theme\n\n if (this.broadcast !== undefined) {\n this.publish(this.props.theme)\n }\n })\n }\n\n this.broadcast = createBroadcast(this.getTheme())\n }\n\n getChildContext() {\n return {\n ...this.context,\n [CHANNEL_NEXT]: {\n getTheme: this.getTheme,\n subscribe: this.broadcast.subscribe,\n unsubscribe: this.broadcast.unsubscribe,\n },\n [CHANNEL]: subscriber => {\n if (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated()\n }\n\n // Patch the old `subscribe` provide via `CHANNEL` for older clients.\n const unsubscribeId = this.broadcast.subscribe(subscriber)\n return () => this.broadcast.unsubscribe(unsubscribeId)\n },\n }\n }\n\n componentWillReceiveProps(nextProps: ThemeProviderProps) {\n if (this.props.theme !== nextProps.theme) {\n this.publish(nextProps.theme)\n }\n }\n\n componentWillUnmount() {\n if (this.unsubscribeToOuterId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId)\n }\n }\n\n // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation\n getTheme(passedTheme: (outerTheme: Theme) => void | Theme) {\n const theme = passedTheme || this.props.theme\n\n if (isFunction(theme)) {\n const mergedTheme = theme(this.outerTheme)\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (mergedTheme === null ||\n Array.isArray(mergedTheme) ||\n typeof mergedTheme !== 'object')\n ) {\n throw new StyledError(7)\n }\n\n return mergedTheme\n }\n\n if (theme === null || Array.isArray(theme) || typeof theme !== 'object') {\n throw new StyledError(8)\n }\n\n return { ...this.outerTheme, ...(theme: Object) }\n }\n\n publish(theme: Theme | ((outerTheme: Theme) => void)) {\n this.broadcast.publish(this.getTheme(theme))\n }\n\n render() {\n if (!this.props.children) {\n return null\n }\n\n return React.Children.only(this.props.children)\n }\n}\n","// @flow\n\nimport hoist from 'hoist-non-react-statics'\nimport PropTypes from 'prop-types'\nimport { Component, createElement } from 'react'\nimport { CONTEXT_KEY } from '../constants'\nimport createWarnTooManyClasses from '../utils/createWarnTooManyClasses'\nimport determineTheme from '../utils/determineTheme'\nimport { EMPTY_OBJECT } from '../utils/empties'\nimport escape from '../utils/escape'\nimport generateDisplayName from '../utils/generateDisplayName'\nimport getComponentName from '../utils/getComponentName'\nimport isStyledComponent from '../utils/isStyledComponent'\nimport isTag from '../utils/isTag'\nimport validAttr from '../utils/validAttr'\nimport hasInInheritanceChain from '../utils/hasInInheritanceChain'\nimport once from '../utils/once'\nimport ServerStyleSheet from './ServerStyleSheet'\nimport StyleSheet from './StyleSheet'\nimport { CHANNEL_NEXT, contextShape } from './ThemeProvider'\n\nimport type { Theme } from './ThemeProvider'\nimport type { RuleSet, Target } from '../types'\n\n// HACK for generating all static styles without needing to allocate\n// an empty execution context every single time...\nconst STATIC_EXECUTION_CONTEXT = {}\n\ntype BaseState = {\n theme?: ?Theme,\n generatedClassName?: string,\n}\n\nconst modifiedContextShape = {\n ...contextShape,\n [CONTEXT_KEY]: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]),\n}\n\nconst identifiers = {}\n\n/* We depend on components having unique IDs */\nconst generateId = (\n ComponentStyle: Function,\n _displayName: string,\n parentComponentId: string\n) => {\n const displayName =\n typeof _displayName !== 'string' ? 'sc' : escape(_displayName)\n\n /**\n * This ensures uniqueness if two components happen to share\n * the same displayName.\n */\n const nr = (identifiers[displayName] || 0) + 1\n identifiers[displayName] = nr\n\n const componentId = `${displayName}-${ComponentStyle.generateName(\n displayName + nr\n )}`\n\n return parentComponentId !== undefined\n ? `${parentComponentId}-${componentId}`\n : componentId\n}\n\nlet warnExtendDeprecated = () => {}\nif (process.env.NODE_ENV !== 'production') {\n warnExtendDeprecated = once(() => {\n // eslint-disable-next-line no-console\n console.warn(\n 'Warning: The \"extend\" API will be removed in the upcoming v4.0 release. Use styled(StyledComponent) instead. You can find more information here: https://github.com/styled-components/styled-components/issues/1546'\n )\n })\n}\n\n// $FlowFixMe\nclass BaseStyledComponent extends Component<*, BaseState> {\n static target: Target\n static styledComponentId: string\n static attrs: Object\n static componentStyle: Object\n static defaultProps: Object\n static warnTooManyClasses: Function\n\n attrs = {}\n state = {\n theme: null,\n generatedClassName: '',\n }\n unsubscribeId: number = -1\n\n unsubscribeFromContext() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId)\n }\n }\n\n buildExecutionContext(theme: any, props: any) {\n const { attrs } = this.constructor\n const context = { ...props, theme }\n if (attrs === undefined) {\n return context\n }\n\n this.attrs = Object.keys(attrs).reduce((acc, key) => {\n const attr = attrs[key]\n\n // eslint-disable-next-line no-param-reassign\n acc[key] =\n typeof attr === 'function' && !hasInInheritanceChain(attr, Component)\n ? attr(context)\n : attr\n return acc\n }, {})\n\n return { ...context, ...this.attrs }\n }\n\n generateAndInjectStyles(theme: any, props: any) {\n const { attrs, componentStyle, warnTooManyClasses } = this.constructor\n const styleSheet = this.context[CONTEXT_KEY] || StyleSheet.master\n\n // statically styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n if (componentStyle.isStatic && attrs === undefined) {\n return componentStyle.generateAndInjectStyles(\n STATIC_EXECUTION_CONTEXT,\n styleSheet\n )\n } else {\n const executionContext = this.buildExecutionContext(theme, props)\n const className = componentStyle.generateAndInjectStyles(\n executionContext,\n styleSheet\n )\n\n if (\n process.env.NODE_ENV !== 'production' &&\n warnTooManyClasses !== undefined\n ) {\n warnTooManyClasses(className)\n }\n\n return className\n }\n }\n\n componentWillMount() {\n const { componentStyle } = this.constructor\n const styledContext = this.context[CHANNEL_NEXT]\n\n // If this is a statically-styled component, we don't need to the theme\n // to generate or build styles.\n if (componentStyle.isStatic) {\n const generatedClassName = this.generateAndInjectStyles(\n STATIC_EXECUTION_CONTEXT,\n this.props\n )\n this.setState({ generatedClassName })\n // If there is a theme in the context, subscribe to the event emitter. This\n // is necessary due to pure components blocking context updates, this circumvents\n // that by updating when an event is emitted\n } else if (styledContext !== undefined) {\n const { subscribe } = styledContext\n this.unsubscribeId = subscribe(nextTheme => {\n // This will be called once immediately\n const theme = determineTheme(\n this.props,\n nextTheme,\n this.constructor.defaultProps\n )\n\n const generatedClassName = this.generateAndInjectStyles(\n theme,\n this.props\n )\n\n this.setState({ theme, generatedClassName })\n })\n } else {\n // eslint-disable-next-line react/prop-types\n const theme = this.props.theme || EMPTY_OBJECT\n const generatedClassName = this.generateAndInjectStyles(theme, this.props)\n this.setState({ theme, generatedClassName })\n }\n }\n\n componentWillReceiveProps(nextProps: { theme?: Theme, [key: string]: any }) {\n // If this is a statically-styled component, we don't need to listen to\n // props changes to update styles\n const { componentStyle } = this.constructor\n if (componentStyle.isStatic) {\n return\n }\n\n this.setState(prevState => {\n const theme = determineTheme(\n nextProps,\n prevState.theme,\n this.constructor.defaultProps\n )\n const generatedClassName = this.generateAndInjectStyles(theme, nextProps)\n\n return { theme, generatedClassName }\n })\n }\n\n componentWillUnmount() {\n this.unsubscribeFromContext()\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { innerRef } = this.props\n const { generatedClassName } = this.state\n const { styledComponentId, target } = this.constructor\n\n const isTargetTag = isTag(target)\n\n const className = [\n // eslint-disable-next-line react/prop-types\n this.props.className,\n styledComponentId,\n this.attrs.className,\n generatedClassName,\n ]\n .filter(Boolean)\n .join(' ')\n\n const baseProps: Object = {\n ...this.attrs,\n className,\n }\n\n if (isStyledComponent(target)) {\n baseProps.innerRef = innerRef\n } else {\n baseProps.ref = innerRef\n }\n\n const propsForElement = baseProps\n let key\n\n for (key in this.props) {\n // Don't pass through non HTML tags through to HTML elements\n // always omit innerRef\n if (\n key !== 'innerRef' &&\n key !== 'className' &&\n (!isTargetTag || validAttr(key))\n ) {\n propsForElement[key] =\n key === 'style' && key in this.attrs\n ? { ...this.attrs[key], ...this.props[key] }\n : this.props[key]\n }\n }\n\n return createElement(target, propsForElement)\n }\n}\n\nexport default (ComponentStyle: Function, constructWithOptions: Function) => {\n const createStyledComponent = (\n target: Target,\n options: Object,\n rules: RuleSet\n ) => {\n const {\n isClass = !isTag(target),\n displayName = generateDisplayName(target),\n componentId = generateId(\n ComponentStyle,\n options.displayName,\n options.parentComponentId\n ),\n ParentComponent = BaseStyledComponent,\n rules: extendingRules,\n attrs,\n } = options\n\n const styledComponentId =\n options.displayName && options.componentId\n ? `${escape(options.displayName)}-${options.componentId}`\n : options.componentId || componentId\n\n const componentStyle = new ComponentStyle(\n extendingRules === undefined ? rules : extendingRules.concat(rules),\n attrs,\n styledComponentId\n )\n\n class StyledComponent extends ParentComponent {\n static attrs = attrs\n static componentStyle = componentStyle\n static contextTypes = modifiedContextShape\n static displayName = displayName\n static styledComponentId = styledComponentId\n static target = target\n\n static withComponent(tag: Target) {\n const { componentId: previousComponentId, ...optionsToCopy } = options\n\n const newComponentId =\n previousComponentId &&\n `${previousComponentId}-${\n isTag(tag) ? tag : escape(getComponentName(tag))\n }`\n\n const newOptions = {\n ...optionsToCopy,\n componentId: newComponentId,\n ParentComponent: StyledComponent,\n }\n\n return createStyledComponent(tag, newOptions, rules)\n }\n\n static get extend() {\n const {\n rules: rulesFromOptions,\n componentId: parentComponentId,\n ...optionsToCopy\n } = options\n\n const newRules =\n rulesFromOptions === undefined\n ? rules\n : rulesFromOptions.concat(rules)\n\n const newOptions = {\n ...optionsToCopy,\n rules: newRules,\n parentComponentId,\n ParentComponent: StyledComponent,\n }\n\n warnExtendDeprecated()\n\n return constructWithOptions(createStyledComponent, target, newOptions)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName)\n }\n\n if (isClass) {\n hoist(StyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n componentStyle: true,\n displayName: true,\n extend: true,\n styledComponentId: true,\n target: true,\n warnTooManyClasses: true,\n withComponent: true,\n })\n }\n\n return StyledComponent\n }\n\n return createStyledComponent\n}\n","// @flow\nimport hashStr from '../vendor/glamor/hash'\n\nimport type { RuleSet, NameGenerator, Flattener, Stringifier } from '../types'\nimport StyleSheet from './StyleSheet'\nimport { IS_BROWSER } from '../constants'\nimport isStyledComponent from '../utils/isStyledComponent'\n\nconst areStylesCacheable = IS_BROWSER\n\nconst isStaticRules = (rules: RuleSet, attrs?: Object): boolean => {\n for (let i = 0, len = rules.length; i < len; i += 1) {\n const rule = rules[i]\n\n // recursive case\n if (Array.isArray(rule) && !isStaticRules(rule)) {\n return false\n } else if (typeof rule === 'function' && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled component\n return false\n }\n }\n\n if (attrs !== undefined) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (const key in attrs) {\n if (typeof attrs[key] === 'function') {\n return false\n }\n }\n }\n\n return true\n}\n\nconst isHMREnabled =\n typeof module !== 'undefined' &&\n module.hot &&\n process.env.NODE_ENV !== 'production'\n\n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\nexport default (\n nameGenerator: NameGenerator,\n flatten: Flattener,\n stringifyRules: Stringifier\n) => {\n /* combines hashStr (murmurhash) and nameGenerator for convenience */\n const generateRuleHash = (str: string) => nameGenerator(hashStr(str))\n\n class ComponentStyle {\n rules: RuleSet\n componentId: string\n isStatic: boolean\n lastClassName: ?string\n\n constructor(rules: RuleSet, attrs?: Object, componentId: string) {\n this.rules = rules\n this.isStatic = !isHMREnabled && isStaticRules(rules, attrs)\n this.componentId = componentId\n\n if (!StyleSheet.master.hasId(componentId)) {\n const placeholder =\n process.env.NODE_ENV !== 'production' ? [`.${componentId} {}`] : []\n\n StyleSheet.master.deferredInject(componentId, placeholder)\n }\n }\n\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n generateAndInjectStyles(executionContext: Object, styleSheet: StyleSheet) {\n const { isStatic, componentId, lastClassName } = this\n if (\n areStylesCacheable &&\n isStatic &&\n lastClassName !== undefined &&\n styleSheet.hasNameForId(componentId, ((lastClassName: any): string))\n ) {\n return lastClassName\n }\n\n const flatCSS = flatten(this.rules, executionContext)\n const name = generateRuleHash(this.componentId + flatCSS.join(''))\n\n if (!styleSheet.hasNameForId(componentId, name)) {\n styleSheet.inject(\n this.componentId,\n stringifyRules(flatCSS, `.${name}`),\n name\n )\n }\n\n this.lastClassName = name\n return name\n }\n\n static generateName(str: string): string {\n return generateRuleHash(str)\n }\n }\n\n return ComponentStyle\n}\n","// @flow\nimport type { Target } from '../types'\nimport domElements from '../utils/domElements'\n\nexport default (styledComponent: Function, constructWithOptions: Function) => {\n const styled = (tag: Target) => constructWithOptions(styledComponent, tag)\n\n // Shorthands for all valid HTML Elements\n domElements.forEach(domElement => {\n styled[domElement] = styled(domElement)\n })\n\n return styled\n}\n","// @flow\nimport hashStr from '../vendor/glamor/hash'\nimport type { Interpolation, NameGenerator, Stringifier } from '../types'\nimport StyleSheet from '../models/StyleSheet'\n\nconst replaceWhitespace = (str: string): string => str.replace(/\\s|\\\\n/g, '')\n\ntype KeyframesFn = (\n strings: Array<string>,\n ...interpolations: Array<Interpolation>\n) => string\n\nexport default (\n nameGenerator: NameGenerator,\n stringifyRules: Stringifier,\n css: Function\n): KeyframesFn => (...arr): string => {\n const styleSheet = StyleSheet.master\n const rules = css(...arr)\n const name = nameGenerator(hashStr(replaceWhitespace(JSON.stringify(rules))))\n const id = `sc-keyframes-${name}`\n\n if (!styleSheet.hasNameForId(id, name)) {\n styleSheet.inject(id, stringifyRules(rules, name, '@keyframes'), name)\n }\n\n return name\n}\n","// @flow\nimport hashStr from '../vendor/glamor/hash'\nimport StyleSheet from '../models/StyleSheet'\nimport type { Interpolation, Stringifier } from '../types'\n\ntype InjectGlobalFn = (\n strings: Array<string>,\n ...interpolations: Array<Interpolation>\n) => void\n\nexport default (stringifyRules: Stringifier, css: Function) => {\n const injectGlobal: InjectGlobalFn = (...args) => {\n const styleSheet = StyleSheet.master\n const rules = css(...args)\n const hash = hashStr(JSON.stringify(rules))\n const id = `sc-global-${hash}`\n\n if (!styleSheet.hasId(id)) {\n styleSheet.inject(id, stringifyRules(rules))\n }\n }\n\n return injectGlobal\n}\n"],"names":["getChildContext","unsubscribeId","unsubscribeFromContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECnBC;EACA;EACA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCCFAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EClBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECU0C,kCAAA;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECL6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6D7CC;;;kCAEAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EC/BE,iCAAA,OAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrDkC;;;;;;;;;;;;;;;;;;;;ACS3B;;;;;;;;;;;;;GAAA;;;;ACFF;;;;;;;;;;;;;GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"styled-components.js","sources":["../src/models/StyleTags.js","../src/models/StyleSheet.js","../src/models/StyleSheetManager.js","../src/models/ServerStyleSheet.js","../src/models/ThemeProvider.js","../src/models/StyledComponent.js","../src/models/ComponentStyle.js","../src/constructors/styled.js","../src/constructors/keyframes.js","../src/constructors/injectGlobal.js"],"sourcesContent":["// @flow\n/* eslint-disable flowtype/object-type-delimiter */\n/* eslint-disable react/prop-types */\n\nimport React, { type Element } from 'react'\nimport { IS_BROWSER, DISABLE_SPEEDY, SC_ATTR } from '../constants'\nimport StyledError from '../utils/error'\nimport { type ExtractedComp } from '../utils/extractCompsFromCSS'\nimport { splitByRules } from '../utils/stringifyRules'\nimport getNonce from '../utils/nonce'\nimport once from '../utils/once'\n\nimport {\n type Names,\n addNameForId,\n resetIdNames,\n hasNameForId,\n stringifyNames,\n cloneNames,\n} from '../utils/styleNames'\n\nimport {\n sheetForTag,\n safeInsertRule,\n deleteRules,\n} from '../utils/insertRuleHelpers'\n\nexport interface Tag<T> {\n // $FlowFixMe: Doesn't seem to accept any combination w/ HTMLStyleElement for some reason\n styleTag: HTMLStyleElement | null;\n /* lists all ids of the tag */\n getIds(): string[];\n /* checks whether `name` is already injected for `id` */\n hasNameForId(id: string, name: string): boolean;\n /* inserts a marker to ensure the id's correct position in the sheet */\n insertMarker(id: string): T;\n /* inserts rules according to the ids markers */\n insertRules(id: string, cssRules: string[], name: ?string): void;\n /* removes all rules belonging to the id, keeping the marker around */\n removeRules(id: string): void;\n css(): string;\n toHTML(additionalAttrs: ?string): string;\n toElement(): Element<*>;\n clone(): Tag<T>;\n /* used in server side rendering to indicate that the rules in the tag have been flushed to HTML */\n sealed: boolean;\n}\n\n/* this marker separates component styles and is important for rehydration */\nconst makeTextMarker = id => `\\n/* sc-component-id: ${id} */\\n`\n\n/* add up all numbers in array up until and including the index */\nconst addUpUntilIndex = (sizes: number[], index: number): number => {\n let totalUpToIndex = 0\n for (let i = 0; i <= index; i += 1) {\n totalUpToIndex += sizes[i]\n }\n\n return totalUpToIndex\n}\n\n/* create a new style tag after lastEl */\nconst makeStyleTag = (\n target: ?HTMLElement,\n tagEl: ?Node,\n insertBefore: ?boolean\n) => {\n const el = document.createElement('style')\n el.setAttribute(SC_ATTR, '')\n\n const nonce = getNonce()\n if (nonce) {\n el.setAttribute('nonce', nonce)\n }\n\n /* Work around insertRule quirk in EdgeHTML */\n el.appendChild(document.createTextNode(''))\n\n if (target && !tagEl) {\n /* Append to target when no previous element was passed */\n target.appendChild(el)\n } else {\n if (!tagEl || !target || !tagEl.parentNode) {\n throw new StyledError(6)\n }\n\n /* Insert new style tag after the previous one */\n tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling)\n }\n\n return el\n}\n\n/* takes a css factory function and outputs an html styled tag factory */\nconst wrapAsHtmlTag = (css: () => string, names: Names) => (\n additionalAttrs: ?string\n): string => {\n const nonce = getNonce()\n const attrs = [\n nonce && `nonce=\"${nonce}\"`,\n `${SC_ATTR}=\"${stringifyNames(names)}\"`,\n additionalAttrs,\n ]\n\n const htmlAttr = attrs.filter(Boolean).join(' ')\n return `<style ${htmlAttr}>${css()}</style>`\n}\n\n/* takes a css factory function and outputs an element factory */\nconst wrapAsElement = (css: () => string, names: Names) => () => {\n const props = {\n [SC_ATTR]: stringifyNames(names),\n }\n\n const nonce = getNonce()\n if (nonce) {\n // $FlowFixMe\n props.nonce = nonce\n }\n\n // eslint-disable-next-line react/no-danger\n return <style {...props} dangerouslySetInnerHTML={{ __html: css() }} />\n}\n\nconst getIdsFromMarkersFactory = (markers: Object) => (): string[] =>\n Object.keys(markers)\n\n/* speedy tags utilise insertRule */\nconst makeSpeedyTag = (\n el: HTMLStyleElement,\n getImportRuleTag: ?() => Tag<any>\n): Tag<number> => {\n const names: Names = (Object.create(null): Object)\n const markers = Object.create(null)\n const sizes: number[] = []\n\n const extractImport = getImportRuleTag !== undefined\n /* indicates whther getImportRuleTag was called */\n let usedImportRuleTag = false\n\n const insertMarker = id => {\n const prev = markers[id]\n if (prev !== undefined) {\n return prev\n }\n\n markers[id] = sizes.length\n sizes.push(0)\n resetIdNames(names, id)\n\n return markers[id]\n }\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id)\n const sheet = sheetForTag(el)\n const insertIndex = addUpUntilIndex(sizes, marker)\n\n let injectedRules = 0\n const importRules = []\n const cssRulesSize = cssRules.length\n\n for (let i = 0; i < cssRulesSize; i += 1) {\n const cssRule = cssRules[i]\n let mayHaveImport = extractImport /* @import rules are reordered to appear first */\n if (mayHaveImport && cssRule.indexOf('@import') !== -1) {\n importRules.push(cssRule)\n } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {\n mayHaveImport = false\n injectedRules += 1\n }\n }\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true\n // $FlowFixMe\n getImportRuleTag().insertRules(`${id}-import`, importRules)\n }\n\n sizes[marker] += injectedRules /* add up no of injected rules */\n addNameForId(names, id, name)\n }\n\n const removeRules = id => {\n const marker = markers[id]\n if (marker === undefined) return\n\n const size = sizes[marker]\n const sheet = sheetForTag(el)\n const removalIndex = addUpUntilIndex(sizes, marker)\n deleteRules(sheet, removalIndex, size)\n sizes[marker] = 0\n resetIdNames(names, id)\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(`${id}-import`)\n }\n }\n\n const css = () => {\n const { cssRules } = sheetForTag(el)\n let str = ''\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n str += makeTextMarker(id)\n const marker = markers[id]\n const end = addUpUntilIndex(sizes, marker)\n const size = sizes[marker]\n for (let i = end - size; i < end; i += 1) {\n const rule = cssRules[i]\n if (rule !== undefined) {\n str += rule.cssText\n }\n }\n }\n\n return str\n }\n\n return {\n clone() {\n throw new StyledError(5)\n },\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n }\n}\n\nconst makeTextNode = id => document.createTextNode(makeTextMarker(id))\n\nconst makeBrowserTag = (\n el: HTMLStyleElement,\n getImportRuleTag: ?() => Tag<any>\n): Tag<Text> => {\n const names = (Object.create(null): Object)\n const markers = Object.create(null)\n\n const extractImport = getImportRuleTag !== undefined\n\n /* indicates whther getImportRuleTag was called */\n let usedImportRuleTag = false\n\n const insertMarker = id => {\n const prev = markers[id]\n if (prev !== undefined) {\n return prev\n }\n\n markers[id] = makeTextNode(id)\n el.appendChild(markers[id])\n names[id] = Object.create(null)\n\n return markers[id]\n }\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id)\n const importRules = []\n const cssRulesSize = cssRules.length\n\n for (let i = 0; i < cssRulesSize; i += 1) {\n const rule = cssRules[i]\n let mayHaveImport = extractImport\n if (mayHaveImport && rule.indexOf('@import') !== -1) {\n importRules.push(rule)\n } else {\n mayHaveImport = false\n const separator = i === cssRulesSize - 1 ? '' : ' '\n marker.appendData(`${rule}${separator}`)\n }\n }\n\n addNameForId(names, id, name)\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true\n // $FlowFixMe\n getImportRuleTag().insertRules(`${id}-import`, importRules)\n }\n }\n\n const removeRules = id => {\n const marker = markers[id]\n if (marker === undefined) return\n\n /* create new empty text node and replace the current one */\n const newMarker = makeTextNode(id)\n el.replaceChild(newMarker, marker)\n markers[id] = newMarker\n resetIdNames(names, id)\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(`${id}-import`)\n }\n }\n\n const css = () => {\n let str = ''\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n str += markers[id].data\n }\n return str\n }\n\n return {\n clone() {\n throw new StyledError(5)\n },\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n }\n}\n\nconst makeServerTagInternal = (namesArg, markersArg): Tag<[string]> => {\n const names =\n namesArg === undefined ? (Object.create(null): Object) : namesArg\n const markers = markersArg === undefined ? Object.create(null) : markersArg\n\n const insertMarker = id => {\n const prev = markers[id]\n if (prev !== undefined) {\n return prev\n }\n\n return (markers[id] = [''])\n }\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id)\n marker[0] += cssRules.join(' ')\n addNameForId(names, id, name)\n }\n\n const removeRules = id => {\n const marker = markers[id]\n if (marker === undefined) return\n marker[0] = ''\n resetIdNames(names, id)\n }\n\n const css = () => {\n let str = ''\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n const cssForId = markers[id][0]\n if (cssForId) {\n str += makeTextMarker(id) + cssForId\n }\n }\n return str\n }\n\n const clone = () => {\n const namesClone = cloneNames(names)\n const markersClone = Object.create(null)\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n markersClone[id] = [markers[id][0]]\n }\n\n return makeServerTagInternal(namesClone, markersClone)\n }\n\n const tag = {\n clone,\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: null,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n }\n\n return tag\n}\n\nconst makeServerTag = (): Tag<[string]> => makeServerTagInternal()\n\nexport const makeTag = (\n target: ?HTMLElement,\n tagEl: ?HTMLStyleElement,\n forceServer?: boolean,\n insertBefore?: boolean,\n getImportRuleTag?: () => Tag<any>\n): Tag<any> => {\n if (IS_BROWSER && !forceServer) {\n const el = makeStyleTag(target, tagEl, insertBefore)\n\n if (DISABLE_SPEEDY) {\n return makeBrowserTag(el, getImportRuleTag)\n } else {\n return makeSpeedyTag(el, getImportRuleTag)\n }\n }\n\n return makeServerTag()\n}\n\n/* wraps a given tag so that rehydration is performed once when necessary */\nexport const makeRehydrationTag = (\n tag: Tag<any>,\n els: HTMLStyleElement[],\n extracted: ExtractedComp[],\n immediateRehydration: boolean\n): Tag<any> => {\n /* rehydration function that adds all rules to the new tag */\n const rehydrate = once(() => {\n /* add all extracted components to the new tag */\n for (let i = 0, len = extracted.length; i < len; i += 1) {\n const { componentId, cssFromDOM } = extracted[i]\n const cssRules = splitByRules(cssFromDOM)\n tag.insertRules(componentId, cssRules)\n }\n\n /* remove old HTMLStyleElements, since they have been rehydrated */\n for (let i = 0, len = els.length; i < len; i += 1) {\n const el = els[i]\n if (el.parentNode) {\n el.parentNode.removeChild(el)\n }\n }\n })\n\n if (immediateRehydration) rehydrate()\n\n return {\n ...tag,\n /* add rehydration hook to insertion methods */\n insertMarker: id => {\n rehydrate()\n return tag.insertMarker(id)\n },\n insertRules: (id, cssRules, name) => {\n rehydrate()\n return tag.insertRules(id, cssRules, name)\n },\n }\n}\n","// @flow\nimport { cloneElement } from 'react'\nimport {\n IS_BROWSER,\n DISABLE_SPEEDY,\n SC_ATTR,\n SC_STREAM_ATTR,\n} from '../constants'\nimport { makeTag, makeRehydrationTag, type Tag } from './StyleTags'\nimport extractComps from '../utils/extractCompsFromCSS'\n\nconst SPLIT_REGEX = /\\s+/\n\n/* determine the maximum number of components before tags are sharded */\nlet MAX_SIZE\nif (IS_BROWSER) {\n /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */\n MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000\n} else {\n /* for servers we do not need to shard at all */\n MAX_SIZE = -1\n}\n\nlet sheetRunningId = 0\nlet master\n\nexport default class StyleSheet {\n id: number\n forceServer: boolean\n target: ?HTMLElement\n /* a map from ids to tags */\n tagMap: { [string]: Tag<any> }\n /* deferred rules for a given id */\n deferred: { [string]: string[] | void }\n /* this is used for not reinjecting rules via hasNameForId() */\n rehydratedNames: { [string]: boolean }\n /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */\n ignoreRehydratedNames: { [string]: boolean }\n /* a list of tags belonging to this StyleSheet */\n tags: Tag<any>[]\n /* a tag for import rules */\n importRuleTag: Tag<any>\n /* current capacity until a new tag must be created */\n capacity: number\n /* children (aka clones) of this StyleSheet inheriting all and future injections */\n clones: StyleSheet[]\n\n constructor(\n target: ?HTMLElement = IS_BROWSER ? document.head : null,\n forceServer?: boolean = false\n ) {\n sheetRunningId += 1\n this.id = sheetRunningId\n this.forceServer = forceServer\n this.target = forceServer ? null : target\n this.tagMap = {}\n this.deferred = {}\n this.rehydratedNames = {}\n this.ignoreRehydratedNames = {}\n this.tags = []\n this.capacity = 1\n this.clones = []\n }\n\n /* rehydrate all SSR'd style tags */\n rehydrate() {\n if (!IS_BROWSER || this.forceServer) {\n return this\n }\n\n const els = []\n const names = []\n const extracted = []\n let isStreamed = false\n\n /* retrieve all of our SSR style elements from the DOM */\n const nodes = document.querySelectorAll(`style[${SC_ATTR}]`)\n const nodesSize = nodes.length\n\n /* abort rehydration if no previous style tags were found */\n if (nodesSize === 0) {\n return this\n }\n\n for (let i = 0; i < nodesSize; i += 1) {\n // $FlowFixMe: We can trust that all elements in this query are style elements\n const el = (nodes[i]: HTMLStyleElement)\n\n /* check if style tag is a streamed tag */\n if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR)\n\n /* retrieve all component names */\n const elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX)\n const elNamesSize = elNames.length\n for (let j = 0; j < elNamesSize; j += 1) {\n const name = elNames[j]\n /* add rehydrated name to sheet to avoid readding styles */\n this.rehydratedNames[name] = true\n names.push(name)\n }\n\n /* extract all components and their CSS */\n extracted.push(...extractComps(el.textContent))\n\n /* store original HTMLStyleElement */\n els.push(el)\n }\n\n /* abort rehydration if nothing was extracted */\n const extractedSize = extracted.length\n if (extractedSize === 0) {\n return this\n }\n\n /* create a tag to be used for rehydration */\n const tag = this.makeTag(null)\n const rehydrationTag = makeRehydrationTag(tag, els, extracted, isStreamed)\n\n /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */\n this.capacity = Math.max(1, MAX_SIZE - extractedSize)\n this.tags.push(rehydrationTag)\n\n /* retrieve all component ids */\n for (let j = 0; j < extractedSize; j += 1) {\n this.tagMap[extracted[j].componentId] = rehydrationTag\n }\n\n return this\n }\n\n /* retrieve a \"master\" instance of StyleSheet which is typically used when no other is available\n * The master StyleSheet is targeted by injectGlobal, keyframes, and components outside of any\n * StyleSheetManager's context */\n static get master(): StyleSheet {\n return master || (master = new StyleSheet().rehydrate())\n }\n\n /* NOTE: This is just for backwards-compatibility with jest-styled-components */\n static get instance(): StyleSheet {\n return StyleSheet.master\n }\n\n /* reset the internal \"master\" instance */\n static reset(forceServer?: boolean = false) {\n master = new StyleSheet(undefined, forceServer).rehydrate()\n }\n\n /* adds \"children\" to the StyleSheet that inherit all of the parents' rules\n * while their own rules do not affect the parent */\n clone() {\n const sheet = new StyleSheet(this.target, this.forceServer)\n\n /* add to clone array */\n this.clones.push(sheet)\n\n /* clone all tags */\n sheet.tags = this.tags.map(tag => {\n const ids = tag.getIds()\n const newTag = tag.clone()\n\n /* reconstruct tagMap */\n for (let i = 0; i < ids.length; i += 1) {\n sheet.tagMap[ids[i]] = newTag\n }\n\n return newTag\n })\n\n /* clone other maps */\n sheet.rehydratedNames = { ...this.rehydratedNames }\n sheet.deferred = { ...this.deferred }\n\n return sheet\n }\n\n /* force StyleSheet to create a new tag on the next injection */\n sealAllTags() {\n this.capacity = 1\n\n this.tags.forEach(tag => {\n // eslint-disable-next-line no-param-reassign\n tag.sealed = true\n })\n }\n\n makeTag(tag: ?Tag<any>): Tag<any> {\n const lastEl = tag ? tag.styleTag : null\n const insertBefore = false\n\n return makeTag(\n this.target,\n lastEl,\n this.forceServer,\n insertBefore,\n this.getImportRuleTag\n )\n }\n\n getImportRuleTag = (): Tag<any> => {\n const { importRuleTag } = this\n if (importRuleTag !== undefined) {\n return importRuleTag\n }\n\n const firstTag = this.tags[0]\n const insertBefore = true\n\n return (this.importRuleTag = makeTag(\n this.target,\n firstTag ? firstTag.styleTag : null,\n this.forceServer,\n insertBefore\n ))\n }\n\n /* get a tag for a given componentId, assign the componentId to one, or shard */\n getTagForId(id: string): Tag<any> {\n /* simply return a tag, when the componentId was already assigned one */\n const prev = this.tagMap[id]\n if (prev !== undefined && !prev.sealed) {\n return prev\n }\n\n let tag = this.tags[this.tags.length - 1]\n\n /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */\n this.capacity -= 1\n\n if (this.capacity === 0) {\n this.capacity = MAX_SIZE\n tag = this.makeTag(tag)\n this.tags.push(tag)\n }\n\n return (this.tagMap[id] = tag)\n }\n\n /* mainly for injectGlobal to check for its id */\n hasId(id: string) {\n return this.tagMap[id] !== undefined\n }\n\n /* caching layer checking id+name to already have a corresponding tag and injected rules */\n hasNameForId(id: string, name: string) {\n /* exception for rehydrated names which are checked separately */\n if (\n this.ignoreRehydratedNames[id] === undefined &&\n this.rehydratedNames[name]\n ) {\n return true\n }\n\n const tag = this.tagMap[id]\n return tag !== undefined && tag.hasNameForId(id, name)\n }\n\n /* registers a componentId and registers it on its tag */\n deferredInject(id: string, cssRules: string[]) {\n /* don't inject when the id is already registered */\n if (this.tagMap[id] !== undefined) return\n\n const { clones } = this\n for (let i = 0; i < clones.length; i += 1) {\n clones[i].deferredInject(id, cssRules)\n }\n\n this.getTagForId(id).insertMarker(id)\n this.deferred[id] = cssRules\n }\n\n /* injects rules for a given id with a name that will need to be cached */\n inject(id: string, cssRules: string[], name?: string) {\n const { clones } = this\n\n for (let i = 0; i < clones.length; i += 1) {\n clones[i].inject(id, cssRules, name)\n }\n\n const tag = this.getTagForId(id)\n\n /* add deferred rules for component */\n if (this.deferred[id] !== undefined) {\n // Combine passed cssRules with previously deferred CSS rules\n // NOTE: We cannot mutate the deferred array itself as all clones\n // do the same (see clones[i].inject)\n const rules = this.deferred[id].concat(cssRules)\n tag.insertRules(id, rules, name)\n\n this.deferred[id] = undefined\n } else {\n tag.insertRules(id, cssRules, name)\n }\n }\n\n /* removes all rules for a given id, which doesn't remove its marker but resets it */\n remove(id: string) {\n const tag = this.tagMap[id]\n if (tag === undefined) return\n\n const { clones } = this\n for (let i = 0; i < clones.length; i += 1) {\n clones[i].remove(id)\n }\n\n /* remove all rules from the tag */\n tag.removeRules(id)\n /* ignore possible rehydrated names */\n this.ignoreRehydratedNames[id] = true\n /* delete possible deferred rules */\n this.deferred[id] = undefined\n }\n\n toHTML() {\n return this.tags.map(tag => tag.toHTML()).join('')\n }\n\n toReactElements(): Array<*> {\n const { id } = this\n\n return this.tags.map((tag, i) => {\n const key = `sc-${id}-${i}`\n return cloneElement(tag.toElement(), { key })\n })\n }\n}\n","// @flow\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport StyleSheet from './StyleSheet'\nimport ServerStyleSheet from './ServerStyleSheet'\nimport { CONTEXT_KEY } from '../constants'\nimport StyledError from '../utils/error'\n\ntype Props = {\n sheet?: StyleSheet | null,\n target?: HTMLElement | null,\n}\n\nexport default class StyleSheetManager extends Component<Props, void> {\n static childContextTypes = {\n [CONTEXT_KEY]: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]).isRequired,\n }\n\n static propTypes = {\n sheet: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]),\n target: PropTypes.shape({\n appendChild: PropTypes.func.isRequired,\n }),\n }\n\n sheetInstance: StyleSheet\n\n getChildContext() {\n return { [CONTEXT_KEY]: this.sheetInstance }\n }\n\n componentWillMount() {\n if (this.props.sheet) {\n this.sheetInstance = this.props.sheet\n } else if (this.props.target) {\n this.sheetInstance = new StyleSheet(this.props.target)\n } else {\n throw new StyledError(4)\n }\n }\n\n render() {\n /* eslint-disable react/prop-types */\n // Flow v0.43.1 will report an error accessing the `children` property,\n // but v0.47.0 will not. It is necessary to use a type cast instead of\n // a \"fixme\" comment to satisfy both Flow versions.\n return React.Children.only((this.props: any).children)\n }\n}\n","// @flow\n/* eslint-disable no-underscore-dangle */\nimport React from 'react'\nimport stream from 'stream'\n\nimport { IS_BROWSER, SC_STREAM_ATTR } from '../constants'\nimport StyledError from '../utils/error'\nimport StyleSheet from './StyleSheet'\nimport StyleSheetManager from './StyleSheetManager'\n\ndeclare var __SERVER__: boolean\n\nexport default class ServerStyleSheet {\n instance: StyleSheet\n masterSheet: StyleSheet\n closed: boolean\n\n constructor() {\n /* The master sheet might be reset, so keep a reference here */\n this.masterSheet = StyleSheet.master\n this.instance = this.masterSheet.clone()\n this.closed = false\n }\n\n complete() {\n if (!this.closed) {\n /* Remove closed StyleSheets from the master sheet */\n const index = this.masterSheet.clones.indexOf(this.instance)\n this.masterSheet.clones.splice(index, 1)\n this.closed = true\n }\n }\n\n collectStyles(children: any) {\n if (this.closed) {\n throw new StyledError(2)\n }\n\n return (\n <StyleSheetManager sheet={this.instance}>{children}</StyleSheetManager>\n )\n }\n\n getStyleTags(): string {\n this.complete()\n return this.instance.toHTML()\n }\n\n getStyleElement() {\n this.complete()\n return this.instance.toReactElements()\n }\n\n interleaveWithNodeStream(readableStream: stream.Readable) {\n if (!__SERVER__ || IS_BROWSER) {\n throw new StyledError(3)\n }\n\n /* the tag index keeps track of which tags have already been emitted */\n const { instance } = this\n let instanceTagIndex = 0\n\n const streamAttr = `${SC_STREAM_ATTR}=\"true\"`\n\n const transformer = new stream.Transform({\n transform: function appendStyleChunks(chunk, /* encoding */ _, callback) {\n const { tags } = instance\n let html = ''\n\n /* retrieve html for each new style tag */\n for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {\n const tag = tags[instanceTagIndex]\n html += tag.toHTML(streamAttr)\n }\n\n /* force our StyleSheets to emit entirely new tags */\n instance.sealAllTags()\n\n /* prepend style html to chunk */\n this.push(html + chunk)\n callback()\n },\n })\n\n readableStream.on('end', () => this.complete())\n readableStream.on('error', err => {\n this.complete()\n\n // forward the error to the transform stream\n transformer.emit('error', err)\n })\n\n return readableStream.pipe(transformer)\n }\n}\n","// @flow\nimport React, { Component, type Element } from 'react'\nimport PropTypes from 'prop-types'\nimport createBroadcast from '../utils/create-broadcast'\nimport type { Broadcast } from '../utils/create-broadcast'\nimport StyledError from '../utils/error'\nimport once from '../utils/once'\n\n// NOTE: DO NOT CHANGE, changing this is a semver major change!\nexport const CHANNEL = '__styled-components__'\nexport const CHANNEL_NEXT = `${CHANNEL}next__`\n\nexport const CONTEXT_CHANNEL_SHAPE = PropTypes.shape({\n getTheme: PropTypes.func,\n subscribe: PropTypes.func,\n unsubscribe: PropTypes.func,\n})\n\nexport const contextShape = {\n [CHANNEL]: PropTypes.func, // legacy\n [CHANNEL_NEXT]: CONTEXT_CHANNEL_SHAPE,\n}\n\nexport type Theme = { [key: string]: mixed }\ntype ThemeProviderProps = {|\n children?: Element<any>,\n theme: Theme | ((outerTheme: Theme) => void),\n|}\n\nlet warnChannelDeprecated\nif (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated = once(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `Warning: Usage of \\`context.${CHANNEL}\\` as a function is deprecated. It will be replaced with the object on \\`.context.${CHANNEL_NEXT}\\` in a future version.`\n )\n })\n}\n\nconst isFunction = test => typeof test === 'function'\n\n/**\n * Provide a theme to an entire react component tree via context and event listeners (have to do\n * both context and event emitter as pure components block context updates)\n */\nexport default class ThemeProvider extends Component<ThemeProviderProps, void> {\n broadcast: Broadcast\n getTheme: (theme?: Theme | ((outerTheme: Theme) => void)) => Theme\n outerTheme: Theme\n props: ThemeProviderProps\n unsubscribeToOuterId: number = -1\n unsubscribeToOuterId: string\n\n static childContextTypes = contextShape\n static contextTypes = {\n [CHANNEL_NEXT]: CONTEXT_CHANNEL_SHAPE,\n }\n\n constructor() {\n super()\n this.getTheme = this.getTheme.bind(this)\n }\n\n componentWillMount() {\n // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme\n // with the outer theme\n const outerContext = this.context[CHANNEL_NEXT]\n if (outerContext !== undefined) {\n this.unsubscribeToOuterId = outerContext.subscribe(theme => {\n this.outerTheme = theme\n\n if (this.broadcast !== undefined) {\n this.publish(this.props.theme)\n }\n })\n }\n\n this.broadcast = createBroadcast(this.getTheme())\n }\n\n getChildContext() {\n return {\n ...this.context,\n [CHANNEL_NEXT]: {\n getTheme: this.getTheme,\n subscribe: this.broadcast.subscribe,\n unsubscribe: this.broadcast.unsubscribe,\n },\n [CHANNEL]: subscriber => {\n if (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated()\n }\n\n // Patch the old `subscribe` provide via `CHANNEL` for older clients.\n const unsubscribeId = this.broadcast.subscribe(subscriber)\n return () => this.broadcast.unsubscribe(unsubscribeId)\n },\n }\n }\n\n componentWillReceiveProps(nextProps: ThemeProviderProps) {\n if (this.props.theme !== nextProps.theme) {\n this.publish(nextProps.theme)\n }\n }\n\n componentWillUnmount() {\n if (this.unsubscribeToOuterId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId)\n }\n }\n\n // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation\n getTheme(passedTheme: (outerTheme: Theme) => void | Theme) {\n const theme = passedTheme || this.props.theme\n\n if (isFunction(theme)) {\n const mergedTheme = theme(this.outerTheme)\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (mergedTheme === null ||\n Array.isArray(mergedTheme) ||\n typeof mergedTheme !== 'object')\n ) {\n throw new StyledError(7)\n }\n\n return mergedTheme\n }\n\n if (theme === null || Array.isArray(theme) || typeof theme !== 'object') {\n throw new StyledError(8)\n }\n\n return { ...this.outerTheme, ...(theme: Object) }\n }\n\n publish(theme: Theme | ((outerTheme: Theme) => void)) {\n this.broadcast.publish(this.getTheme(theme))\n }\n\n render() {\n if (!this.props.children) {\n return null\n }\n\n return React.Children.only(this.props.children)\n }\n}\n","// @flow\n\nimport hoist from 'hoist-non-react-statics'\nimport PropTypes from 'prop-types'\nimport { Component, createElement } from 'react'\nimport { CONTEXT_KEY } from '../constants'\nimport createWarnTooManyClasses from '../utils/createWarnTooManyClasses'\nimport determineTheme from '../utils/determineTheme'\nimport { EMPTY_OBJECT } from '../utils/empties'\nimport escape from '../utils/escape'\nimport generateDisplayName from '../utils/generateDisplayName'\nimport getComponentName from '../utils/getComponentName'\nimport isStyledComponent from '../utils/isStyledComponent'\nimport isTag from '../utils/isTag'\nimport validAttr from '../utils/validAttr'\nimport hasInInheritanceChain from '../utils/hasInInheritanceChain'\nimport once from '../utils/once'\nimport ServerStyleSheet from './ServerStyleSheet'\nimport StyleSheet from './StyleSheet'\nimport { CHANNEL_NEXT, contextShape } from './ThemeProvider'\n\nimport type { Theme } from './ThemeProvider'\nimport type { RuleSet, Target } from '../types'\n\n// HACK for generating all static styles without needing to allocate\n// an empty execution context every single time...\nconst STATIC_EXECUTION_CONTEXT = {}\n\ntype BaseState = {\n theme?: ?Theme,\n generatedClassName?: string,\n}\n\nconst modifiedContextShape = {\n ...contextShape,\n [CONTEXT_KEY]: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]),\n}\n\nconst identifiers = {}\n\n/* We depend on components having unique IDs */\nconst generateId = (\n ComponentStyle: Function,\n _displayName: string,\n parentComponentId: string\n) => {\n const displayName =\n typeof _displayName !== 'string' ? 'sc' : escape(_displayName)\n\n /**\n * This ensures uniqueness if two components happen to share\n * the same displayName.\n */\n const nr = (identifiers[displayName] || 0) + 1\n identifiers[displayName] = nr\n\n const componentId = `${displayName}-${ComponentStyle.generateName(\n displayName + nr\n )}`\n\n return parentComponentId !== undefined\n ? `${parentComponentId}-${componentId}`\n : componentId\n}\n\nlet warnExtendDeprecated = () => {}\nif (process.env.NODE_ENV !== 'production') {\n warnExtendDeprecated = once(() => {\n // eslint-disable-next-line no-console\n console.warn(\n 'Warning: The \"extend\" API will be removed in the upcoming v4.0 release. Use styled(StyledComponent) instead. You can find more information here: https://github.com/styled-components/styled-components/issues/1546'\n )\n })\n}\n\n// $FlowFixMe\nclass BaseStyledComponent extends Component<*, BaseState> {\n static target: Target\n static styledComponentId: string\n static attrs: Object\n static componentStyle: Object\n static defaultProps: Object\n static warnTooManyClasses: Function\n\n attrs = {}\n state = {\n theme: null,\n generatedClassName: '',\n }\n unsubscribeId: number = -1\n\n unsubscribeFromContext() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId)\n }\n }\n\n buildExecutionContext(theme: any, props: any) {\n const { attrs } = this.constructor\n const context = { ...props, theme }\n if (attrs === undefined) {\n return context\n }\n\n this.attrs = Object.keys(attrs).reduce((acc, key) => {\n const attr = attrs[key]\n\n // eslint-disable-next-line no-param-reassign\n acc[key] =\n typeof attr === 'function' && !hasInInheritanceChain(attr, Component)\n ? attr(context)\n : attr\n return acc\n }, {})\n\n return { ...context, ...this.attrs }\n }\n\n generateAndInjectStyles(theme: any, props: any) {\n const { attrs, componentStyle, warnTooManyClasses } = this.constructor\n const styleSheet = this.context[CONTEXT_KEY] || StyleSheet.master\n\n // statically styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n if (componentStyle.isStatic && attrs === undefined) {\n return componentStyle.generateAndInjectStyles(\n STATIC_EXECUTION_CONTEXT,\n styleSheet\n )\n } else {\n const executionContext = this.buildExecutionContext(theme, props)\n const className = componentStyle.generateAndInjectStyles(\n executionContext,\n styleSheet\n )\n\n if (\n process.env.NODE_ENV !== 'production' &&\n warnTooManyClasses !== undefined\n ) {\n warnTooManyClasses(className)\n }\n\n return className\n }\n }\n\n componentWillMount() {\n const { componentStyle } = this.constructor\n const styledContext = this.context[CHANNEL_NEXT]\n\n // If this is a statically-styled component, we don't need to the theme\n // to generate or build styles.\n if (componentStyle.isStatic) {\n const generatedClassName = this.generateAndInjectStyles(\n STATIC_EXECUTION_CONTEXT,\n this.props\n )\n this.setState({ generatedClassName })\n // If there is a theme in the context, subscribe to the event emitter. This\n // is necessary due to pure components blocking context updates, this circumvents\n // that by updating when an event is emitted\n } else if (styledContext !== undefined) {\n const { subscribe } = styledContext\n this.unsubscribeId = subscribe(nextTheme => {\n // This will be called once immediately\n const theme = determineTheme(\n this.props,\n nextTheme,\n this.constructor.defaultProps\n )\n\n const generatedClassName = this.generateAndInjectStyles(\n theme,\n this.props\n )\n\n this.setState({ theme, generatedClassName })\n })\n } else {\n // eslint-disable-next-line react/prop-types\n const theme = this.props.theme || EMPTY_OBJECT\n const generatedClassName = this.generateAndInjectStyles(theme, this.props)\n this.setState({ theme, generatedClassName })\n }\n }\n\n componentWillReceiveProps(nextProps: { theme?: Theme, [key: string]: any }) {\n // If this is a statically-styled component, we don't need to listen to\n // props changes to update styles\n const { componentStyle } = this.constructor\n if (componentStyle.isStatic) {\n return\n }\n\n this.setState(prevState => {\n const theme = determineTheme(\n nextProps,\n prevState.theme,\n this.constructor.defaultProps\n )\n const generatedClassName = this.generateAndInjectStyles(theme, nextProps)\n\n return { theme, generatedClassName }\n })\n }\n\n componentWillUnmount() {\n this.unsubscribeFromContext()\n }\n\n render() {\n // eslint-disable-next-line react/prop-types\n const { innerRef } = this.props\n const { generatedClassName } = this.state\n const { styledComponentId, target } = this.constructor\n\n const isTargetTag = isTag(target)\n\n const className = [\n // eslint-disable-next-line react/prop-types\n this.props.className,\n styledComponentId,\n this.attrs.className,\n generatedClassName,\n ]\n .filter(Boolean)\n .join(' ')\n\n const baseProps: Object = {\n ...this.attrs,\n className,\n }\n\n if (isStyledComponent(target)) {\n baseProps.innerRef = innerRef\n } else {\n baseProps.ref = innerRef\n }\n\n const propsForElement = baseProps\n let key\n\n for (key in this.props) {\n // Don't pass through non HTML tags through to HTML elements\n // always omit innerRef\n if (\n key !== 'innerRef' &&\n key !== 'className' &&\n (!isTargetTag || validAttr(key))\n ) {\n propsForElement[key] =\n key === 'style' && key in this.attrs\n ? { ...this.attrs[key], ...this.props[key] }\n : this.props[key]\n }\n }\n\n return createElement(target, propsForElement)\n }\n}\n\nexport default (ComponentStyle: Function, constructWithOptions: Function) => {\n const createStyledComponent = (\n target: Target,\n options: Object,\n rules: RuleSet\n ) => {\n const {\n isClass = !isTag(target),\n displayName = generateDisplayName(target),\n componentId = generateId(\n ComponentStyle,\n options.displayName,\n options.parentComponentId\n ),\n ParentComponent = BaseStyledComponent,\n rules: extendingRules,\n attrs,\n } = options\n\n const styledComponentId =\n options.displayName && options.componentId\n ? `${escape(options.displayName)}-${options.componentId}`\n : options.componentId || componentId\n\n const componentStyle = new ComponentStyle(\n extendingRules === undefined ? rules : extendingRules.concat(rules),\n attrs,\n styledComponentId\n )\n\n class StyledComponent extends ParentComponent {\n static attrs = attrs\n static componentStyle = componentStyle\n static contextTypes = modifiedContextShape\n static displayName = displayName\n static styledComponentId = styledComponentId\n static target = target\n\n static withComponent(tag: Target) {\n const { componentId: previousComponentId, ...optionsToCopy } = options\n\n const newComponentId =\n previousComponentId &&\n `${previousComponentId}-${\n isTag(tag) ? tag : escape(getComponentName(tag))\n }`\n\n const newOptions = {\n ...optionsToCopy,\n componentId: newComponentId,\n ParentComponent: StyledComponent,\n }\n\n return createStyledComponent(tag, newOptions, rules)\n }\n\n static get extend() {\n const {\n rules: rulesFromOptions,\n componentId: parentComponentId,\n ...optionsToCopy\n } = options\n\n const newRules =\n rulesFromOptions === undefined\n ? rules\n : rulesFromOptions.concat(rules)\n\n const newOptions = {\n ...optionsToCopy,\n rules: newRules,\n parentComponentId,\n ParentComponent: StyledComponent,\n }\n\n warnExtendDeprecated()\n\n return constructWithOptions(createStyledComponent, target, newOptions)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName)\n }\n\n if (isClass) {\n hoist(StyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n componentStyle: true,\n displayName: true,\n extend: true,\n styledComponentId: true,\n target: true,\n warnTooManyClasses: true,\n withComponent: true,\n })\n }\n\n return StyledComponent\n }\n\n return createStyledComponent\n}\n","// @flow\nimport hashStr from '../vendor/glamor/hash'\n\nimport type { RuleSet, NameGenerator, Flattener, Stringifier } from '../types'\nimport StyleSheet from './StyleSheet'\nimport { IS_BROWSER } from '../constants'\nimport isStyledComponent from '../utils/isStyledComponent'\n\nconst areStylesCacheable = IS_BROWSER\n\nconst isStaticRules = (rules: RuleSet, attrs?: Object): boolean => {\n for (let i = 0, len = rules.length; i < len; i += 1) {\n const rule = rules[i]\n\n // recursive case\n if (Array.isArray(rule) && !isStaticRules(rule)) {\n return false\n } else if (typeof rule === 'function' && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled component\n return false\n }\n }\n\n if (attrs !== undefined) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (const key in attrs) {\n if (typeof attrs[key] === 'function') {\n return false\n }\n }\n }\n\n return true\n}\n\nconst isHMREnabled =\n typeof module !== 'undefined' &&\n module.hot &&\n process.env.NODE_ENV !== 'production'\n\n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\nexport default (\n nameGenerator: NameGenerator,\n flatten: Flattener,\n stringifyRules: Stringifier\n) => {\n /* combines hashStr (murmurhash) and nameGenerator for convenience */\n const generateRuleHash = (str: string) => nameGenerator(hashStr(str))\n\n class ComponentStyle {\n rules: RuleSet\n componentId: string\n isStatic: boolean\n lastClassName: ?string\n\n constructor(rules: RuleSet, attrs?: Object, componentId: string) {\n this.rules = rules\n this.isStatic = !isHMREnabled && isStaticRules(rules, attrs)\n this.componentId = componentId\n\n if (!StyleSheet.master.hasId(componentId)) {\n const placeholder =\n process.env.NODE_ENV !== 'production' ? [`.${componentId} {}`] : []\n\n StyleSheet.master.deferredInject(componentId, placeholder)\n }\n }\n\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n generateAndInjectStyles(executionContext: Object, styleSheet: StyleSheet) {\n const { isStatic, componentId, lastClassName } = this\n if (\n areStylesCacheable &&\n isStatic &&\n lastClassName !== undefined &&\n styleSheet.hasNameForId(componentId, ((lastClassName: any): string))\n ) {\n return lastClassName\n }\n\n const flatCSS = flatten(this.rules, executionContext)\n const name = generateRuleHash(this.componentId + flatCSS.join(''))\n\n if (!styleSheet.hasNameForId(componentId, name)) {\n styleSheet.inject(\n this.componentId,\n stringifyRules(flatCSS, `.${name}`),\n name\n )\n }\n\n this.lastClassName = name\n return name\n }\n\n static generateName(str: string): string {\n return generateRuleHash(str)\n }\n }\n\n return ComponentStyle\n}\n","// @flow\nimport type { Target } from '../types'\nimport domElements from '../utils/domElements'\n\nexport default (styledComponent: Function, constructWithOptions: Function) => {\n const styled = (tag: Target) => constructWithOptions(styledComponent, tag)\n\n // Shorthands for all valid HTML Elements\n domElements.forEach(domElement => {\n styled[domElement] = styled(domElement)\n })\n\n return styled\n}\n","// @flow\nimport hashStr from '../vendor/glamor/hash'\nimport type { Interpolation, NameGenerator, Stringifier } from '../types'\nimport StyleSheet from '../models/StyleSheet'\n\nconst replaceWhitespace = (str: string): string => str.replace(/\\s|\\\\n/g, '')\n\ntype KeyframesFn = (\n strings: Array<string>,\n ...interpolations: Array<Interpolation>\n) => string\n\nexport default (\n nameGenerator: NameGenerator,\n stringifyRules: Stringifier,\n css: Function\n): KeyframesFn => (...arr): string => {\n const styleSheet = StyleSheet.master\n const rules = css(...arr)\n const name = nameGenerator(hashStr(replaceWhitespace(JSON.stringify(rules))))\n const id = `sc-keyframes-${name}`\n\n if (!styleSheet.hasNameForId(id, name)) {\n styleSheet.inject(id, stringifyRules(rules, name, '@keyframes'), name)\n }\n\n return name\n}\n","// @flow\nimport hashStr from '../vendor/glamor/hash'\nimport StyleSheet from '../models/StyleSheet'\nimport type { Interpolation, Stringifier } from '../types'\n\ntype InjectGlobalFn = (\n strings: Array<string>,\n ...interpolations: Array<Interpolation>\n) => void\n\nexport default (stringifyRules: Stringifier, css: Function) => {\n const injectGlobal: InjectGlobalFn = (...args) => {\n const styleSheet = StyleSheet.master\n const rules = css(...args)\n const hash = hashStr(JSON.stringify(rules))\n const id = `sc-global-${hash}`\n\n if (!styleSheet.hasId(id)) {\n styleSheet.inject(id, stringifyRules(rules))\n }\n }\n\n return injectGlobal\n}\n"],"names":["getChildContext","unsubscribeId","unsubscribeFromContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECnBC;EACA;EACA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCCFAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EClBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECU0C,kCAAA;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECL6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6D7CC;;;kCAEAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EC/BE,iCAAA,OAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrDkC;;;;;;;;;;;;;;;;;;;;ACS3B;;;;;;;;;;;;;GAAA;;;;ACFF;;;;;;;;;;;;;GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.styled={},e.React)}(this,function(e,t){"use strict";var r="default"in t?t.default:t,n=/([A-Z])/g;var a=function(e){return e.replace(n,"-$1").toLowerCase()},o=/^ms-/;var i=function(e){return a(e).replace(o,"-ms-")},s="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},c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=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},f=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},p=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},h=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},d=function(e){return"object"===(void 0===e?"undefined":s(e))&&e.constructor===Object},m=function(e){function t(r){c(this,t);for(var n=arguments.length,a=Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];var i=h(this,e.call(this,"An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#"+r+" for more information. "+(a?"Additional arguments: "+a.join(", "):"")));return h(i)}return f(t,e),t}(Error),y=function e(t,n){return t.reduce(function(t,a){if(null==a||!1===a||""===a)return t;if(Array.isArray(a))return t.push.apply(t,e(a,n)),t;if(a.hasOwnProperty("styledComponentId"))return t.push("."+a.styledComponentId),t;if("function"==typeof a){if(n){var o=a(n);if(r.isValidElement(o)){var s=a.displayName||a.name;throw new m(11,s)}t.push.apply(t,e([o],n))}else t.push(a);return t}return t.push(d(a)?function e(t,r){var n=Object.keys(t).filter(function(e){var r=t[e];return null!=r&&!1!==r&&""!==r}).map(function(r){return d(t[r])?e(t[r],r):i(r)+": "+t[r]+";"}).join(" ");return r?r+" {\n "+n+"\n}":n}(a):a.toString()),t},[])};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(e,t){return e(t={exports:{}},t.exports),t.exports}var b=v(function(e,t){e.exports=function e(t){var r=/^\0+/g,n=/[\0\r\f]/g,a=/: */g,o=/zoo|gra/,i=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,u=/ *[\0] */g,l=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,p=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,h=/\W+/g,d=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,y=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,v=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,C=/\s{2,}/g,k=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,A=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,I="-webkit-",P="-moz-",j="-ms-",M=59,R=125,E=123,F=40,N=41,_=91,D=93,$=10,L=13,W=9,U=64,H=32,B=38,z=45,q=95,V=42,Y=44,G=58,K=39,X=34,Z=47,J=62,Q=43,ee=126,te=0,re=12,ne=11,ae=107,oe=109,ie=115,se=112,ce=111,ue=169,le=163,fe=100,pe=112,he=1,de=1,me=0,ye=1,ge=1,ve=1,be=0,Ce=0,ke=0,we=[],Se=[],xe=0,Ae=null,Oe=-2,Te=-1,Ie=0,Pe=1,je=2,Me=3,Re=0,Ee=1,Fe="",Ne="",_e="";function De(e,t,a,o,i){for(var s,c,l=0,f=0,p=0,h=0,g=0,v=0,b=0,C=0,w=0,x=0,A=0,O=0,T=0,q=0,be=0,Se=0,Ae=0,Oe=0,Te=0,Le=a.length,ze=Le-1,qe="",Ve="",Ye="",Ge="",Ke="",Xe="";be<Le;){if(b=a.charCodeAt(be),be===ze&&f+h+p+l!==0&&(0!==f&&(b=f===Z?$:Z),h=p=l=0,Le++,ze++),f+h+p+l===0){if(be===ze&&(Se>0&&(Ve=Ve.replace(n,"")),Ve.trim().length>0)){switch(b){case H:case W:case M:case L:case $:break;default:Ve+=a.charAt(be)}b=M}if(1===Ae)switch(b){case E:case R:case M:case X:case K:case F:case N:case Y:Ae=0;case W:case L:case $:case H:break;default:for(Ae=0,Te=be,g=b,be--,b=M;Te<Le;)switch(a.charCodeAt(Te++)){case $:case L:case M:++be,b=g,Te=Le;break;case G:Se>0&&(++be,b=g);case E:Te=Le}}switch(b){case E:for(Ve=Ve.trim(),g=Ve.charCodeAt(0),A=1,Te=++be;be<Le;){switch(b=a.charCodeAt(be)){case E:A++;break;case R:A--}if(0===A)break;be++}switch(Ye=a.substring(Te,be),g===te&&(g=(Ve=Ve.replace(r,"").trim()).charCodeAt(0)),g){case U:switch(Se>0&&(Ve=Ve.replace(n,"")),v=Ve.charCodeAt(1)){case fe:case oe:case ie:case z:s=t;break;default:s=we}if(Ye=De(t,s,Ye,v,i+1),Te=Ye.length,ke>0&&0===Te&&(Te=Ve.length),xe>0&&(s=$e(we,Ve,Oe),c=Be(Me,Ye,s,t,de,he,Te,v,i,o),Ve=s.join(""),void 0!==c&&0===(Te=(Ye=c.trim()).length)&&(v=0,Ye="")),Te>0)switch(v){case ie:Ve=Ve.replace(S,He);case fe:case oe:case z:Ye=Ve+"{"+Ye+"}";break;case ae:Ve=Ve.replace(d,"$1 $2"+(Ee>0?Fe:"")),Ye=Ve+"{"+Ye+"}",Ye=1===ge||2===ge&&Ue("@"+Ye,3)?"@"+I+Ye+"@"+Ye:"@"+Ye;break;default:Ye=Ve+Ye,o===pe&&(Ge+=Ye,Ye="")}else Ye="";break;default:Ye=De(t,$e(t,Ve,Oe),Ye,o,i+1)}Ke+=Ye,O=0,Ae=0,q=0,Se=0,Oe=0,T=0,Ve="",Ye="",b=a.charCodeAt(++be);break;case R:case M:if(Ve=(Se>0?Ve.replace(n,""):Ve).trim(),(Te=Ve.length)>1)switch(0===q&&((g=Ve.charCodeAt(0))===z||g>96&&g<123)&&(Te=(Ve=Ve.replace(" ",":")).length),xe>0&&void 0!==(c=Be(Pe,Ve,t,e,de,he,Ge.length,o,i,o))&&0===(Te=(Ve=c.trim()).length)&&(Ve="\0\0"),g=Ve.charCodeAt(0),v=Ve.charCodeAt(1),g+v){case te:break;case ue:case le:Xe+=Ve+a.charAt(be);break;default:if(Ve.charCodeAt(Te-1)===G)break;Ge+=We(Ve,g,v,Ve.charCodeAt(2))}O=0,Ae=0,q=0,Se=0,Oe=0,Ve="",b=a.charCodeAt(++be)}}switch(b){case L:case $:if(f+h+p+l+Ce===0)switch(x){case N:case K:case X:case U:case ee:case J:case V:case Q:case Z:case z:case G:case Y:case M:case E:case R:break;default:q>0&&(Ae=1)}f===Z?f=0:ye+O===0&&(Se=1,Ve+="\0"),xe*Re>0&&Be(Ie,Ve,t,e,de,he,Ge.length,o,i,o),he=1,de++;break;case M:case R:if(f+h+p+l===0){he++;break}default:switch(he++,qe=a.charAt(be),b){case W:case H:if(h+l+f===0)switch(C){case Y:case G:case W:case H:qe="";break;default:b!==H&&(qe=" ")}break;case te:qe="\\0";break;case re:qe="\\f";break;case ne:qe="\\v";break;case B:h+f+l===0&&ye>0&&(Oe=1,Se=1,qe="\f"+qe);break;case 108:if(h+f+l+me===0&&q>0)switch(be-q){case 2:C===se&&a.charCodeAt(be-3)===G&&(me=C);case 8:w===ce&&(me=w)}break;case G:h+f+l===0&&(q=be);break;case Y:f+p+h+l===0&&(Se=1,qe+="\r");break;case X:case K:0===f&&(h=h===b?0:0===h?b:h);break;case _:h+f+p===0&&l++;break;case D:h+f+p===0&&l--;break;case N:h+f+l===0&&p--;break;case F:if(h+f+l===0){if(0===O)switch(2*C+3*w){case 533:break;default:A=0,O=1}p++}break;case U:f+p+h+l+q+T===0&&(T=1);break;case V:case Z:if(h+l+p>0)break;switch(f){case 0:switch(2*b+3*a.charCodeAt(be+1)){case 235:f=Z;break;case 220:Te=be,f=V}break;case V:b===Z&&C===V&&(33===a.charCodeAt(Te+2)&&(Ge+=a.substring(Te,be+1)),qe="",f=0)}}if(0===f){if(ye+h+l+T===0&&o!==ae&&b!==M)switch(b){case Y:case ee:case J:case Q:case N:case F:if(0===O){switch(C){case W:case H:case $:case L:qe+="\0";break;default:qe="\0"+qe+(b===Y?"":"\0")}Se=1}else switch(b){case F:O=++A;break;case N:0==(O=--A)&&(Se=1,qe+="\0")}break;case W:case H:switch(C){case te:case E:case R:case M:case Y:case re:case W:case H:case $:case L:break;default:0===O&&(Se=1,qe+="\0")}}Ve+=qe,b!==H&&b!==W&&(x=b)}}w=C,C=b,be++}if(Te=Ge.length,ke>0&&0===Te&&0===Ke.length&&0===t[0].length==0&&(o!==oe||1===t.length&&(ye>0?Ne:_e)===t[0])&&(Te=t.join(",").length+2),Te>0){if(s=0===ye&&o!==ae?function(e){for(var t,r,a=0,o=e.length,i=Array(o);a<o;++a){for(var s=e[a].split(u),c="",l=0,f=0,p=0,h=0,d=s.length;l<d;++l)if(!(0===(f=(r=s[l]).length)&&d>1)){if(p=c.charCodeAt(c.length-1),h=r.charCodeAt(0),t="",0!==l)switch(p){case V:case ee:case J:case Q:case H:case F:break;default:t=" "}switch(h){case B:r=t+Ne;case ee:case J:case Q:case H:case N:case F:break;case _:r=t+r+Ne;break;case G:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(ve>0){r=t+r.substring(8,f-1);break}default:(l<1||s[l-1].length<1)&&(r=t+Ne+r)}break;case Y:t="";default:r=f>1&&r.indexOf(":")>0?t+r.replace(k,"$1"+Ne+"$2"):t+r+Ne}c+=r}i[a]=c.replace(n,"").trim()}return i}(t):t,xe>0&&void 0!==(c=Be(je,Ge,s,e,de,he,Te,o,i,o))&&0===(Ge=c).length)return Xe+Ge+Ke;if(Ge=s.join(",")+"{"+Ge+"}",ge*me!=0){switch(2!==ge||Ue(Ge,2)||(me=0),me){case ce:Ge=Ge.replace(y,":"+P+"$1")+Ge;break;case se:Ge=Ge.replace(m,"::"+I+"input-$1")+Ge.replace(m,"::"+P+"$1")+Ge.replace(m,":"+j+"input-$1")+Ge}me=0}}return Xe+Ge+Ke}function $e(e,t,r){var n=t.trim().split(l),a=n,o=n.length,i=e.length;switch(i){case 0:case 1:for(var s=0,c=0===i?"":e[0]+" ";s<o;++s)a[s]=Le(c,a[s],r,i).trim();break;default:for(var s=0,u=0,a=[];s<o;++s)for(var f=0;f<i;++f)a[u++]=Le(e[f]+" ",n[s],r,i).trim()}return a}function Le(e,t,r,n){var a=t,o=a.charCodeAt(0);switch(o<33&&(o=(a=a.trim()).charCodeAt(0)),o){case B:switch(ye+n){case 0:case 1:if(0===e.trim().length)break;default:return a.replace(f,"$1"+e.trim())}break;case G:switch(a.charCodeAt(1)){case 103:if(ve>0&&ye>0)return a.replace(p,"$1").replace(f,"$1"+_e);break;default:return e.trim()+a.replace(f,"$1"+e.trim())}default:if(r*ye>0&&a.indexOf("\f")>0)return a.replace(f,(e.charCodeAt(0)===G?"":"$1")+e.trim())}return e+a}function We(e,t,r,n){var u,l=0,f=e+";",p=2*t+3*r+4*n;if(944===p)return function(e){var t=e.length,r=e.indexOf(":",9)+1,n=e.substring(0,r).trim(),a=e.substring(r,t-1).trim();switch(e.charCodeAt(9)*Ee){case 0:break;case z:if(110!==e.charCodeAt(10))break;default:for(var o=a.split((a="",s)),i=0,r=0,t=o.length;i<t;r=0,++i){for(var u=o[i],l=u.split(c);u=l[r];){var f=u.charCodeAt(0);if(1===Ee&&(f>U&&f<90||f>96&&f<123||f===q||f===z&&u.charCodeAt(1)!==z))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=Fe}}l[r++]=u}a+=(0===i?"":",")+l.join(" ")}}return a=n+a+";",1===ge||2===ge&&Ue(a,1)?I+a+a:a}(f);if(0===ge||2===ge&&!Ue(f,1))return f;switch(p){case 1015:return 97===f.charCodeAt(10)?I+f+f:f;case 951:return 116===f.charCodeAt(3)?I+f+f:f;case 963:return 110===f.charCodeAt(5)?I+f+f:f;case 1009:if(100!==f.charCodeAt(4))break;case 969:case 942:return I+f+f;case 978:return I+f+P+f+f;case 1019:case 983:return I+f+P+f+j+f+f;case 883:return f.charCodeAt(8)===z?I+f+f:f;case 932:if(f.charCodeAt(4)===z)switch(f.charCodeAt(5)){case 103:return I+"box-"+f.replace("-grow","")+I+f+j+f.replace("grow","positive")+f;case 115:return I+f+j+f.replace("shrink","negative")+f;case 98:return I+f+j+f.replace("basis","preferred-size")+f}return I+f+j+f+f;case 964:return I+f+j+"flex-"+f+f;case 1023:if(99!==f.charCodeAt(8))break;return u=f.substring(f.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),I+"box-pack"+u+I+f+j+"flex-pack"+u+f;case 1005:return o.test(f)?f.replace(a,":"+I)+f.replace(a,":"+P)+f:f;case 1e3:switch(u=f.substring(13).trim(),l=u.indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(l)){case 226:u=f.replace(w,"tb");break;case 232:u=f.replace(w,"tb-rl");break;case 220:u=f.replace(w,"lr");break;default:return f}return I+f+j+u+f;case 1017:if(-1===f.indexOf("sticky",9))return f;case 975:switch(l=(f=e).length-10,u=(33===f.charCodeAt(l)?f.substring(0,l):f).substring(e.indexOf(":",7)+1).trim(),p=u.charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(u.charCodeAt(8)<111)break;case 115:f=f.replace(u,I+u)+";"+f;break;case 207:case 102:f=f.replace(u,I+(p>102?"inline-":"")+"box")+";"+f.replace(u,I+u)+";"+f.replace(u,j+u+"box")+";"+f}return f+";";case 938:if(f.charCodeAt(5)===z)switch(f.charCodeAt(6)){case 105:return u=f.replace("-items",""),I+f+I+"box-"+u+j+"flex-"+u+f;case 115:return I+f+j+"flex-item-"+f.replace(A,"")+f;default:return I+f+j+"flex-line-pack"+f.replace("align-content","").replace(A,"")+f}break;case 973:case 989:if(f.charCodeAt(3)!==z||122===f.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?We(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):f.replace(u,I+u)+f.replace(u,P+u.replace("fill-",""))+f;break;case 962:if(f=I+f+(102===f.charCodeAt(5)?j+f:"")+f,r+n===211&&105===f.charCodeAt(13)&&f.indexOf("transform",10)>0)return f.substring(0,f.indexOf(";",27)+1).replace(i,"$1"+I+"$2")+f}return f}function Ue(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10),a=e.substring(r+1,e.length-1);return Ae(2!==t?n:n.replace(O,"$1"),a,t)}function He(e,t){var r=We(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(x," or ($1)").substring(4):"("+t+")"}function Be(e,t,r,n,a,o,i,s,c,u){for(var l,f=0,p=t;f<xe;++f)switch(l=Se[f].call(qe,e,p,r,n,a,o,i,s,c,u)){case void 0:case!1:case!0:case null:break;default:p=l}switch(p){case void 0:case!1:case!0:case null:case t:break;default:return p}}function ze(e){for(var t in e){var r=e[t];switch(t){case"keyframe":Ee=0|r;break;case"global":ve=0|r;break;case"cascade":ye=0|r;break;case"compress":be=0|r;break;case"semicolon":Ce=0|r;break;case"preserve":ke=0|r;break;case"prefix":Ae=null,r?"function"!=typeof r?ge=1:(ge=2,Ae=r):ge=0}}return ze}function qe(t,r){if(void 0!==this&&this.constructor===qe)return e(t);var a=t,o=a.charCodeAt(0);o<33&&(o=(a=a.trim()).charCodeAt(0)),Ee>0&&(Fe=a.replace(h,o===_?"":"-")),o=1,1===ye?_e=a:Ne=a;var i,s=[_e];xe>0&&void 0!==(i=Be(Te,r,s,s,de,he,0,0,0,0))&&"string"==typeof i&&(r=i);var c=De(we,s,r,0,0);return xe>0&&void 0!==(i=Be(Oe,c,s,s,de,he,c.length,0,0,0))&&"string"!=typeof(c=i)&&(o=0),Fe="",_e="",Ne="",me=0,de=1,he=1,be*o==0?c:function(e){return e.replace(n,"").replace(g,"").replace(v,"$1").replace(b,"$1").replace(C," ")}(c)}return qe.use=function e(t){switch(t){case void 0:case null:xe=Se.length=0;break;default:switch(t.constructor){case Array:for(var r=0,n=t.length;r<n;++r)e(t[r]);break;case Function:Se[xe++]=t;break;case Boolean:Re=0|!!t}}return e},qe.set=ze,void 0!==t&&ze(t),qe}(null)}),C=v(function(e,t){e.exports=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,a,o,i,s,c,u,l,f){switch(r){case 1:if(0===l&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===u)return n+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(a[0]+n),"";default:return n+(0===f?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}}),k=/^\s*\/\/.*$/gm,w=new b({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),S=new b({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),x=[],A=function(e){if(-2===e){var t=x;return x=[],t}},O=C(function(e){x.push(e)});S.use([O,A]),w.use([O,A]);var T=function(e,t,r){var n=e.join("").replace(k,"");return S(r||!t?"":t,t&&r?r+" "+t+" { "+n+" }":n)};function I(e){return"function"==typeof e&&"string"==typeof e.styledComponentId}var P=function(e){return String.fromCharCode(e+(e>25?39:97))},j=function(e){var t="",r=void 0;for(r=e;r>52;r=Math.floor(r/52))t=P(r%52)+t;return P(r%52)+t},M=function(e,t){for(var r=[e[0]],n=0,a=t.length;n<a;n+=1)r.push(t[n],e[n+1]);return r},R=Object.freeze([]),E=Object.freeze({}),F=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e||d(e)?y(M(R,[e].concat(r))):y(M(e,r))},N="undefined"!=typeof process&&process.env.SC_ATTR||"data-styled-components",_="__styled-components-stylesheet__",D="undefined"!=typeof window&&"HTMLElement"in window,$=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,L=function(e){var t=""+(e||""),r=[];return t.replace($,function(e,t,n){return r.push({componentId:t,matchIndex:n}),e}),r.map(function(e,n){var a=e.componentId,o=e.matchIndex,i=r[n+1];return{componentId:a,cssFromDOM:i?t.slice(o,i.matchIndex):t.slice(o)}})},W=function(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null},U=function(e,t,r){r&&((e[t]||(e[t]=Object.create(null)))[r]=!0)},H=function(e,t){e[t]=Object.create(null)},B=function(e){return function(t,r){return void 0!==e[t]&&e[t][r]}},z=function(e){var t="";for(var r in e)t+=Object.keys(e[r]).join(" ")+" ";return t.trim()},q=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets.length,r=0;r<t;r+=1){var n=document.styleSheets[r];if(n.ownerNode===e)return n}throw new m(10)},V=function(e,t,r){if(!t)return!1;var n=e.cssRules.length;try{e.insertRule(t,r<=n?r:n)}catch(e){return!1}return!0},Y=function(e){return"\n/* sc-component-id: "+e+" */\n"},G=function(e,t){for(var r=0,n=0;n<=t;n+=1)r+=e[n];return r},K=function(e,t){return function(r){var n=W();return"<style "+[n&&'nonce="'+n+'"',N+'="'+z(t)+'"',r].filter(Boolean).join(" ")+">"+e()+"</style>"}},X=function(e,t){return function(){var n,a=((n={})[N]=z(t),n),o=W();return o&&(a.nonce=o),r.createElement("style",l({},a,{dangerouslySetInnerHTML:{__html:e()}}))}},Z=function(e){return function(){return Object.keys(e)}},J=function e(t,r){var n=void 0===t?Object.create(null):t,a=void 0===r?Object.create(null):r,o=function(e){var t=a[e];return void 0!==t?t:a[e]=[""]},i=function(){var e="";for(var t in a){var r=a[t][0];r&&(e+=Y(t)+r)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var r in e)t[r]=l({},e[r]);return t}(n),r=Object.create(null);for(var o in a)r[o]=[a[o][0]];return e(t,r)},css:i,getIds:Z(a),hasNameForId:B(n),insertMarker:o,insertRules:function(e,t,r){o(e)[0]+=t.join(" "),U(n,e,r)},removeRules:function(e){var t=a[e];void 0!==t&&(t[0]="",H(n,e))},sealed:!1,styleTag:null,toElement:X(i,n),toHTML:K(i,n)}},Q=function(e,t,r,n,a){return D&&!r?function(e,t){var r=Object.create(null),n=Object.create(null),a=[],o=void 0!==t,i=!1,s=function(e){var t=n[e];return void 0!==t?t:(n[e]=a.length,a.push(0),H(r,e),n[e])},c=function(){var t=q(e).cssRules,r="";for(var o in n){r+=Y(o);for(var i=n[o],s=G(a,i),c=s-a[i];c<s;c+=1){var u=t[c];void 0!==u&&(r+=u.cssText)}}return r};return{clone:function(){throw new m(5)},css:c,getIds:Z(n),hasNameForId:B(r),insertMarker:s,insertRules:function(n,c,u){for(var l=s(n),f=q(e),p=G(a,l),h=0,d=[],m=c.length,y=0;y<m;y+=1){var g=c[y],v=o;v&&-1!==g.indexOf("@import")?d.push(g):V(f,g,p+h)&&(v=!1,h+=1)}o&&d.length>0&&(i=!0,t().insertRules(n+"-import",d)),a[l]+=h,U(r,n,u)},removeRules:function(s){var c=n[s];if(void 0!==c){var u=a[c];!function(e,t,r){for(var n=t-r,a=t;a>n;a-=1)e.deleteRule(a)}(q(e),G(a,c),u),a[c]=0,H(r,s),o&&i&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:X(c,r),toHTML:K(c,r)}}(function(e,t,r){var n=document.createElement("style");n.setAttribute(N,"");var a=W();if(a&&n.setAttribute("nonce",a),n.appendChild(document.createTextNode("")),e&&!t)e.appendChild(n);else{if(!t||!e||!t.parentNode)throw new m(6);t.parentNode.insertBefore(n,r?t:t.nextSibling)}return n}(e,t,n),a):J()},ee=/\s+/,te=void 0;te=D?1e3:-1;var re=0,ne=void 0,ae=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D?document.head:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var r=t.tags[0];return t.importRuleTag=Q(t.target,r?r.styleTag:null,t.forceServer,!0)},re+=1,this.id=re,this.forceServer=n,this.target=n?null:r,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!D||this.forceServer)return this;var e=[],t=[],r=!1,n=document.querySelectorAll("style["+N+"]"),a=n.length;if(0===a)return this;for(var o=0;o<a;o+=1){var i=n[o];r||(r=!!i.getAttribute("data-styled-streamed"));for(var s=(i.getAttribute(N)||"").trim().split(ee),c=s.length,u=0;u<c;u+=1){var f=s[u];this.rehydratedNames[f]=!0}t.push.apply(t,L(i.textContent)),e.push(i)}var p=t.length;if(0===p)return this;var h=function(e,t,r,n){var a,o,i=(a=function(){for(var n=0,a=r.length;n<a;n+=1){var o=r[n],i=o.componentId,s=o.cssFromDOM,c=w("",s);e.insertRules(i,c)}for(var u=0,l=t.length;u<l;u+=1){var f=t[u];f.parentNode&&f.parentNode.removeChild(f)}},o=!1,function(){o||(o=!0,a())});return n&&i(),l({},e,{insertMarker:function(t){return i(),e.insertMarker(t)},insertRules:function(t,r,n){return i(),e.insertRules(t,r,n)}})}(this.makeTag(null),e,t,r);this.capacity=Math.max(1,te-p),this.tags.push(h);for(var d=0;d<p;d+=1)this.tagMap[t[d].componentId]=h;return this},e.reset=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ne=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var r=e.getIds(),n=e.clone(),a=0;a<r.length;a+=1)t.tagMap[r[a]]=n;return n}),t.rehydratedNames=l({},this.rehydratedNames),t.deferred=l({},this.deferred),t},e.prototype.sealAllTags=function(){this.capacity=1,this.tags.forEach(function(e){e.sealed=!0})},e.prototype.makeTag=function(e){var t=e?e.styleTag:null;return Q(this.target,t,this.forceServer,!1,this.getImportRuleTag)},e.prototype.getTagForId=function(e){var t=this.tagMap[e];if(void 0!==t&&!t.sealed)return t;var r=this.tags[this.tags.length-1];return this.capacity-=1,0===this.capacity&&(this.capacity=te,r=this.makeTag(r),this.tags.push(r)),this.tagMap[e]=r},e.prototype.hasId=function(e){return void 0!==this.tagMap[e]},e.prototype.hasNameForId=function(e,t){if(void 0===this.ignoreRehydratedNames[e]&&this.rehydratedNames[t])return!0;var r=this.tagMap[e];return void 0!==r&&r.hasNameForId(e,t)},e.prototype.deferredInject=function(e,t){if(void 0===this.tagMap[e]){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].deferredInject(e,t);this.getTagForId(e).insertMarker(e),this.deferred[e]=t}},e.prototype.inject=function(e,t,r){for(var n=this.clones,a=0;a<n.length;a+=1)n[a].inject(e,t,r);var o=this.getTagForId(e);if(void 0!==this.deferred[e]){var i=this.deferred[e].concat(t);o.insertRules(e,i,r),this.deferred[e]=void 0}else o.insertRules(e,t,r)},e.prototype.remove=function(e){var t=this.tagMap[e];if(void 0!==t){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].remove(e);t.removeRules(e),this.ignoreRehydratedNames[e]=!0,this.deferred[e]=void 0}},e.prototype.toHTML=function(){return this.tags.map(function(e){return e.toHTML()}).join("")},e.prototype.toReactElements=function(){var e=this.id;return this.tags.map(function(r,n){var a="sc-"+e+"-"+n;return t.cloneElement(r.toElement(),{key:a})})},u(e,null,[{key:"master",get:function(){return ne||(ne=(new e).rehydrate())}},{key:"instance",get:function(){return e.master}}]),e}();function oe(e){return function(){return e}}var ie=function(){};ie.thatReturns=oe,ie.thatReturnsFalse=oe(!1),ie.thatReturnsTrue=oe(!0),ie.thatReturnsNull=oe(null),ie.thatReturnsThis=function(){return this},ie.thatReturnsArgument=function(e){return e};var se=ie,ce=function(e){};var ue=function(e,t,r,n,a,o,i,s){if(ce(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,a,o,i,s],l=0;(c=new Error(t.replace(/%s/g,function(){return u[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},le=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}})()&&Object.assign;var he,de="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",me=v(function(e){e.exports=function(){function e(e,t,r,n,a,o){o!==de&&ue(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=se,r.PropTypes=r,r}()}),ye=function(e){function t(){return c(this,t),h(this,e.apply(this,arguments))}return f(t,e),t.prototype.getChildContext=function(){var e;return(e={})[_]=this.sheetInstance,e},t.prototype.componentWillMount=function(){if(this.props.sheet)this.sheetInstance=this.props.sheet;else{if(!this.props.target)throw new m(4);this.sheetInstance=new ae(this.props.target)}},t.prototype.render=function(){return r.Children.only(this.props.children)},t}(t.Component);ye.childContextTypes=((he={})[_]=me.oneOfType([me.instanceOf(ae),me.instanceOf(ge)]).isRequired,he);var ge=function(){function e(){c(this,e),this.masterSheet=ae.master,this.instance=this.masterSheet.clone(),this.closed=!1}return e.prototype.complete=function(){if(!this.closed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.closed=!0}},e.prototype.collectStyles=function(e){if(this.closed)throw new m(2);return r.createElement(ye,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.complete(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.complete(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new m(3)},e}(),ve=v(function(e,t){var r,n,a,o,i,s,c,u;e.exports=(r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a=Object.defineProperty,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,u=c&&c(Object),function e(t,l,f){if("string"!=typeof l){if(u){var p=c(l);p&&p!==u&&e(t,p,f)}var h=o(l);i&&(h=h.concat(i(l)));for(var d=0;d<h.length;++d){var m=h[d];if(!(r[m]||n[m]||f&&f[m])){var y=s(l,m);try{a(t,m,y)}catch(e){}}}return t}return t})}),be=function(e,t,r){var n=r&&e.theme===r.theme;return e.theme&&!n?e.theme:t},Ce=/[[\].#*$><+~=|^:(),"'`-]+/g,ke=/(^-|-$)/g;function we(e){return e.replace(Ce,"-").replace(ke,"")}function Se(e){return e.displayName||e.name||"Component"}function xe(e){return"string"==typeof e}var Ae=/^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveA(?:spectRatio|lpha)|ointsAt[X-Z]|anose1)|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:strokeMiterlimi|(?:specularConsta|repeatCou|fontVaria)n|(?:(?:specularE|e)xpon|renderingInt|asc)en|d(?:iffuseConsta|esce)n|(?:fontSizeAdju|lengthAdju|manife)s|baselineShif|onPointerOu|vectorEffec|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|k(?:ernel(?:UnitLength|Matrix)|[1-4])|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|(?:pointerEve|keyPoi)nts|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|unicodeRange|mathematical|vAlphabetic|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|a(?:rabicForm|l(?:phabetic|t)|sync)|pathLength|innerHTML|xlinkShow|(?:xlinkHr|glyphR)ef|(?:tabInde|(?:sand|b)bo|viewBo)x|(?:(?:href|xml|src)La|kerni)ng|autoPlay|o(?:verflow|pen)|f(?:o(?:ntSize|rm?)|il(?:ter|l))|r(?:e(?:quired|sult|f))?|divisor|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|i(?:temRef|n2|s)|t(?:arget[XY]|o)|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|(?:width|size)s|prefix|typeof|itemID|s(?:t(?:roke|art)|hape|cope|rc)|t(?:arget|ype)|(?:stri|la)ng|a(?:ccept|s)|m(?:edia|a(?:sk|x)|in)|x(?:mlns)?|width|value|size|href|k(?:ey)?|end|low|by|i[dn]|y[12]|g[12]|x[12]|f[xy]|[yz])$/,Oe=RegExp.prototype.test.bind(new RegExp("^(x|data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"));var Te,Ie,Pe,je="__styled-components__",Me=je+"next__",Re=me.shape({getTheme:me.func,subscribe:me.func,unsubscribe:me.func}),Ee=((Te={})[je]=me.func,Te[Me]=Re,Te),Fe=function(e){function t(){c(this,t);var r=h(this,e.call(this));return r.unsubscribeToOuterId=-1,r.getTheme=r.getTheme.bind(r),r}return f(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.context[Me];void 0!==t&&(this.unsubscribeToOuterId=t.subscribe(function(t){e.outerTheme=t,void 0!==e.broadcast&&e.publish(e.props.theme)})),this.broadcast=function(e){var t={},r=0,n=e;return{publish:function(e){for(var r in n=e,t){var a=t[r];void 0!==a&&a(n)}},subscribe:function(e){var a=r;return t[a]=e,r+=1,e(n),a},unsubscribe:function(e){t[e]=void 0}}}(this.getTheme())},t.prototype.getChildContext=function(){var e,t=this;return l({},this.context,((e={})[Me]={getTheme:this.getTheme,subscribe:this.broadcast.subscribe,unsubscribe:this.broadcast.unsubscribe},e[je]=function(e){var r=t.broadcast.subscribe(e);return function(){return t.broadcast.unsubscribe(r)}},e))},t.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.publish(e.theme)},t.prototype.componentWillUnmount=function(){-1!==this.unsubscribeToOuterId&&this.context[Me].unsubscribe(this.unsubscribeToOuterId)},t.prototype.getTheme=function(e){var t=e||this.props.theme;if("function"==typeof t)return t(this.outerTheme);if(null===t||Array.isArray(t)||"object"!==(void 0===t?"undefined":s(t)))throw new m(8);return l({},this.outerTheme,t)},t.prototype.publish=function(e){this.broadcast.publish(this.getTheme(e))},t.prototype.render=function(){return this.props.children?r.Children.only(this.props.children):null},t}(t.Component);Fe.childContextTypes=Ee,Fe.contextTypes=((Ie={})[Me]=Re,Ie);var Ne={},_e=l({},Ee,((Pe={})[_]=me.oneOfType([me.instanceOf(ae),me.instanceOf(ge)]),Pe)),De={},$e=function(e){function r(){var t,n;c(this,r);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return t=n=h(this,e.call.apply(e,[this].concat(o))),n.attrs={},n.state={theme:null,generatedClassName:""},n.unsubscribeId=-1,h(n,t)}return f(r,e),r.prototype.unsubscribeFromContext=function(){-1!==this.unsubscribeId&&this.context[Me].unsubscribe(this.unsubscribeId)},r.prototype.buildExecutionContext=function(e,r){var n=this.constructor.attrs,a=l({},r,{theme:e});return void 0===n?a:(this.attrs=Object.keys(n).reduce(function(e,r){var o=n[r];return e[r]="function"!=typeof o||function(e,t){for(var r=e;r;)if((r=Object.getPrototypeOf(r))&&r===t)return!0;return!1}(o,t.Component)?o:o(a),e},{}),l({},a,this.attrs))},r.prototype.generateAndInjectStyles=function(e,t){var r=this.constructor,n=r.attrs,a=r.componentStyle,o=(r.warnTooManyClasses,this.context[_]||ae.master);if(a.isStatic&&void 0===n)return a.generateAndInjectStyles(Ne,o);var i=this.buildExecutionContext(e,t);return a.generateAndInjectStyles(i,o)},r.prototype.componentWillMount=function(){var e=this,t=this.constructor.componentStyle,r=this.context[Me];if(t.isStatic){var n=this.generateAndInjectStyles(Ne,this.props);this.setState({generatedClassName:n})}else if(void 0!==r){var a=r.subscribe;this.unsubscribeId=a(function(t){var r=be(e.props,t,e.constructor.defaultProps),n=e.generateAndInjectStyles(r,e.props);e.setState({theme:r,generatedClassName:n})})}else{var o=this.props.theme||E,i=this.generateAndInjectStyles(o,this.props);this.setState({theme:o,generatedClassName:i})}},r.prototype.componentWillReceiveProps=function(e){var t=this;this.constructor.componentStyle.isStatic||this.setState(function(r){var n=be(e,r.theme,t.constructor.defaultProps);return{theme:n,generatedClassName:t.generateAndInjectStyles(n,e)}})},r.prototype.componentWillUnmount=function(){this.unsubscribeFromContext()},r.prototype.render=function(){var e=this.props.innerRef,r=this.state.generatedClassName,n=this.constructor,a=n.styledComponentId,o=n.target,i=xe(o),s=[this.props.className,a,this.attrs.className,r].filter(Boolean).join(" "),c=l({},this.attrs,{className:s});I(o)?c.innerRef=e:c.ref=e;var u,f=c,p=void 0;for(p in this.props)"innerRef"===p||"className"===p||i&&(u=p,!Ae.test(u)&&!Oe(u.toLowerCase()))||(f[p]="style"===p&&p in this.attrs?l({},this.attrs[p],this.props[p]):this.props[p]);return t.createElement(o,f)},r}(t.Component);function Le(e){for(var t,r=0|e.length,n=0|r,a=0;r>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++a;switch(r){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(a)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}var We=D,Ue=function e(t,r){for(var n=0,a=t.length;n<a;n+=1){var o=t[n];if(Array.isArray(o)&&!e(o))return!1;if("function"==typeof o&&!I(o))return!1}if(void 0!==r)for(var i in r)if("function"==typeof r[i])return!1;return!0},He="undefined"!=typeof module&&module.hot&&!1,Be=["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"],ze=v(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112;function f(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case o:case i:return e;default:switch(e=e&&e.$$typeof){case c:case l:case s:return e;default:return t}}case a:return t}}}t.typeOf=f,t.AsyncMode=u,t.ContextConsumer=c,t.ContextProvider=s,t.Element=n,t.ForwardRef=l,t.Fragment=o,t.Portal=a,t.StrictMode=i,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||"object"==typeof e&&null!==e&&(e.$$typeof===s||e.$$typeof===c||e.$$typeof===l)},t.isAsyncMode=function(e){return f(e)===u},t.isContextConsumer=function(e){return f(e)===c},t.isContextProvider=function(e){return f(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return f(e)===l},t.isFragment=function(e){return f(e)===o},t.isPortal=function(e){return f(e)===a},t.isStrictMode=function(e){return f(e)===i}});g(ze);ze.typeOf,ze.AsyncMode,ze.ContextConsumer,ze.ContextProvider,ze.Element,ze.ForwardRef,ze.Fragment,ze.Portal,ze.StrictMode,ze.isValidElementType,ze.isAsyncMode,ze.isContextConsumer,ze.isContextProvider,ze.isElement,ze.isForwardRef,ze.isFragment,ze.isPortal,ze.isStrictMode;var qe=v(function(e,t){});g(qe);qe.typeOf,qe.AsyncMode,qe.ContextConsumer,qe.ContextProvider,qe.Element,qe.ForwardRef,qe.Fragment,qe.Portal,qe.StrictMode,qe.isValidElementType,qe.isAsyncMode,qe.isContextConsumer,qe.isContextProvider,qe.isElement,qe.isForwardRef,qe.isFragment,qe.isPortal,qe.isStrictMode;var Ve=v(function(e){e.exports=ze}).isValidElementType,Ye={StyleSheet:ae},Ge=function(e,t,r){var n=function(t){return e(Le(t))};return function(){function e(t,r,n){c(this,e),this.rules=t,this.isStatic=!He&&Ue(t,r),this.componentId=n,ae.master.hasId(n)||ae.master.deferredInject(n,[])}return e.prototype.generateAndInjectStyles=function(e,a){var o=this.isStatic,i=this.componentId,s=this.lastClassName;if(We&&o&&void 0!==s&&a.hasNameForId(i,s))return s;var c=t(this.rules,e),u=n(this.componentId+c.join(""));return a.hasNameForId(i,u)||a.inject(this.componentId,r(c,"."+u),u),this.lastClassName=u,u},e.generateName=function(e){return n(e)},e}()}(j,y,T),Ke=function(e){return function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;if(!Ve(n))throw new m(1,String(n));var o=function(){return r(n,a,e.apply(void 0,arguments))};return o.withConfig=function(e){return t(r,n,l({},a,e))},o.attrs=function(e){return t(r,n,l({},a,{attrs:l({},a.attrs||E,e)}))},o}}(F),Xe=function(e,t){return function r(n,a,o){var i=a.isClass,s=void 0===i?!xe(n):i,d=a.displayName,m=void 0===d?function(e){return xe(e)?"styled."+e:"Styled("+Se(e)+")"}(n):d,y=a.componentId,g=void 0===y?function(e,t,r){var n="string"!=typeof t?"sc":we(t),a=(De[n]||0)+1;De[n]=a;var o=n+"-"+e.generateName(n+a);return void 0!==r?r+"-"+o:o}(e,a.displayName,a.parentComponentId):y,v=a.ParentComponent,b=void 0===v?$e:v,C=a.rules,k=a.attrs,w=a.displayName&&a.componentId?we(a.displayName)+"-"+a.componentId:a.componentId||g,S=new e(void 0===C?o:C.concat(o),k,w),x=function(e){function i(){return c(this,i),h(this,e.apply(this,arguments))}return f(i,e),i.withComponent=function(e){var t=a.componentId,n=p(a,["componentId"]),s=t&&t+"-"+(xe(e)?e:we(Se(e))),c=l({},n,{componentId:s,ParentComponent:i});return r(e,c,o)},u(i,null,[{key:"extend",get:function(){var e=a.rules,s=a.componentId,c=p(a,["rules","componentId"]),u=void 0===e?o:e.concat(o),f=l({},c,{rules:u,parentComponentId:s,ParentComponent:i});return t(r,n,f)}}]),i}(b);return x.attrs=k,x.componentStyle=S,x.contextTypes=_e,x.displayName=m,x.styledComponentId=w,x.target=n,s&&ve(x,n,{attrs:!0,componentStyle:!0,displayName:!0,extend:!0,styledComponentId:!0,target:!0,warnTooManyClasses:!0,withComponent:!0}),x}}(Ge,Ke),Ze=function(e,t,r){return function(){var n=ae.master,a=r.apply(void 0,arguments),o=e(Le(JSON.stringify(a).replace(/\s|\\n/g,""))),i="sc-keyframes-"+o;return n.hasNameForId(i,o)||n.inject(i,t(a,o,"@keyframes"),o),o}}(j,T,F),Je=function(e,t){return function(){var r=ae.master,n=t.apply(void 0,arguments),a="sc-global-"+Le(JSON.stringify(n));r.hasId(a)||r.inject(a,e(n))}}(T,F),Qe=function(e,t){var r=function(r){return t(e,r)};return Be.forEach(function(e){r[e]=r(e)}),r}(Xe,Ke);e.default=Qe,e.css=F,e.keyframes=Ze,e.injectGlobal=Je,e.isStyledComponent=I,e.consolidateStreamedStyles=function(){},e.ThemeProvider=Fe,e.withTheme=function(e){var t="function"==typeof e&&!(e.prototype&&"isReactComponent"in e.prototype),n=I(e)||t,a=function(t){function a(){var e,r;c(this,a);for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=r=h(this,t.call.apply(t,[this].concat(o))),r.state=E,r.unsubscribeId=-1,h(r,e)}return f(a,t),a.prototype.componentWillMount=function(){var e=this,t=this.constructor.defaultProps,r=this.context[Me],n=be(this.props,void 0,t);if(void 0===r&&void 0!==n)this.setState({theme:n});else{var a=r.subscribe;this.unsubscribeId=a(function(r){var n=be(e.props,r,t);e.setState({theme:n})})}},a.prototype.componentWillReceiveProps=function(e){var t=this.constructor.defaultProps;this.setState(function(r){return{theme:be(e,r.theme,t)}})},a.prototype.componentWillUnmount=function(){-1!==this.unsubscribeId&&this.context[Me].unsubscribe(this.unsubscribeId)},a.prototype.render=function(){var t=l({theme:this.state.theme},this.props);return n||(t.ref=t.innerRef,delete t.innerRef),r.createElement(e,t)},a}(r.Component);return a.contextTypes=Ee,a.displayName="WithTheme("+Se(e)+")",a.styledComponentId="withTheme",ve(a,e)},e.ServerStyleSheet=ge,e.StyleSheetManager=ye,e.__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS=Ye,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.styled={},e.React)}(this,function(e,t){"use strict";var r="default"in t?t.default:t,n=/([A-Z])/g;var a=function(e){return e.replace(n,"-$1").toLowerCase()},o=/^ms-/;var i=function(e){return a(e).replace(o,"-ms-")},s="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},c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},u=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=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},f=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},p=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},h=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},d=function(e){return"object"===(void 0===e?"undefined":s(e))&&e.constructor===Object},m=function(e){function t(r){c(this,t);for(var n=arguments.length,a=Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];var i=h(this,e.call(this,"An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#"+r+" for more information. "+(a?"Additional arguments: "+a.join(", "):"")));return h(i)}return f(t,e),t}(Error),y=function e(t,n){return t.reduce(function(t,a){if(null==a||!1===a||""===a)return t;if(Array.isArray(a))return t.push.apply(t,e(a,n)),t;if(a.hasOwnProperty("styledComponentId"))return t.push("."+a.styledComponentId),t;if("function"==typeof a){if(n){var o=a(n);if(r.isValidElement(o)){var s=a.displayName||a.name;throw new m(11,s)}t.push.apply(t,e([o],n))}else t.push(a);return t}return t.push(d(a)?function e(t,r){var n=Object.keys(t).filter(function(e){var r=t[e];return null!=r&&!1!==r&&""!==r}).map(function(r){return d(t[r])?e(t[r],r):i(r)+": "+t[r]+";"}).join(" ");return r?r+" {\n "+n+"\n}":n}(a):a.toString()),t},[])};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(e,t){return e(t={exports:{}},t.exports),t.exports}var b=v(function(e,t){e.exports=function e(t){var r=/^\0+/g,n=/[\0\r\f]/g,a=/: */g,o=/zoo|gra/,i=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,u=/ *[\0] */g,l=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,p=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,h=/\W+/g,d=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,y=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,v=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,C=/\s{2,}/g,k=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,A=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,I="-webkit-",P="-moz-",j="-ms-",M=59,R=125,E=123,F=40,N=41,_=91,D=93,$=10,L=13,W=9,U=64,H=32,B=38,q=45,z=95,V=42,Y=44,G=58,K=39,X=34,Z=47,J=62,Q=43,ee=126,te=0,re=12,ne=11,ae=107,oe=109,ie=115,se=112,ce=111,ue=169,le=163,fe=100,pe=112,he=1,de=1,me=0,ye=1,ge=1,ve=1,be=0,Ce=0,ke=0,we=[],Se=[],xe=0,Ae=null,Oe=-2,Te=-1,Ie=0,Pe=1,je=2,Me=3,Re=0,Ee=1,Fe="",Ne="",_e="";function De(e,t,a,o,i){for(var s,c,l=0,f=0,p=0,h=0,g=0,v=0,b=0,C=0,w=0,x=0,A=0,O=0,T=0,z=0,be=0,Se=0,Ae=0,Oe=0,Te=0,Le=a.length,qe=Le-1,ze="",Ve="",Ye="",Ge="",Ke="",Xe="";be<Le;){if(b=a.charCodeAt(be),be===qe&&f+h+p+l!==0&&(0!==f&&(b=f===Z?$:Z),h=p=l=0,Le++,qe++),f+h+p+l===0){if(be===qe&&(Se>0&&(Ve=Ve.replace(n,"")),Ve.trim().length>0)){switch(b){case H:case W:case M:case L:case $:break;default:Ve+=a.charAt(be)}b=M}if(1===Ae)switch(b){case E:case R:case M:case X:case K:case F:case N:case Y:Ae=0;case W:case L:case $:case H:break;default:for(Ae=0,Te=be,g=b,be--,b=M;Te<Le;)switch(a.charCodeAt(Te++)){case $:case L:case M:++be,b=g,Te=Le;break;case G:Se>0&&(++be,b=g);case E:Te=Le}}switch(b){case E:for(Ve=Ve.trim(),g=Ve.charCodeAt(0),A=1,Te=++be;be<Le;){switch(b=a.charCodeAt(be)){case E:A++;break;case R:A--}if(0===A)break;be++}switch(Ye=a.substring(Te,be),g===te&&(g=(Ve=Ve.replace(r,"").trim()).charCodeAt(0)),g){case U:switch(Se>0&&(Ve=Ve.replace(n,"")),v=Ve.charCodeAt(1)){case fe:case oe:case ie:case q:s=t;break;default:s=we}if(Ye=De(t,s,Ye,v,i+1),Te=Ye.length,ke>0&&0===Te&&(Te=Ve.length),xe>0&&(s=$e(we,Ve,Oe),c=Be(Me,Ye,s,t,de,he,Te,v,i,o),Ve=s.join(""),void 0!==c&&0===(Te=(Ye=c.trim()).length)&&(v=0,Ye="")),Te>0)switch(v){case ie:Ve=Ve.replace(S,He);case fe:case oe:case q:Ye=Ve+"{"+Ye+"}";break;case ae:Ve=Ve.replace(d,"$1 $2"+(Ee>0?Fe:"")),Ye=Ve+"{"+Ye+"}",Ye=1===ge||2===ge&&Ue("@"+Ye,3)?"@"+I+Ye+"@"+Ye:"@"+Ye;break;default:Ye=Ve+Ye,o===pe&&(Ge+=Ye,Ye="")}else Ye="";break;default:Ye=De(t,$e(t,Ve,Oe),Ye,o,i+1)}Ke+=Ye,O=0,Ae=0,z=0,Se=0,Oe=0,T=0,Ve="",Ye="",b=a.charCodeAt(++be);break;case R:case M:if(Ve=(Se>0?Ve.replace(n,""):Ve).trim(),(Te=Ve.length)>1)switch(0===z&&((g=Ve.charCodeAt(0))===q||g>96&&g<123)&&(Te=(Ve=Ve.replace(" ",":")).length),xe>0&&void 0!==(c=Be(Pe,Ve,t,e,de,he,Ge.length,o,i,o))&&0===(Te=(Ve=c.trim()).length)&&(Ve="\0\0"),g=Ve.charCodeAt(0),v=Ve.charCodeAt(1),g+v){case te:break;case ue:case le:Xe+=Ve+a.charAt(be);break;default:if(Ve.charCodeAt(Te-1)===G)break;Ge+=We(Ve,g,v,Ve.charCodeAt(2))}O=0,Ae=0,z=0,Se=0,Oe=0,Ve="",b=a.charCodeAt(++be)}}switch(b){case L:case $:if(f+h+p+l+Ce===0)switch(x){case N:case K:case X:case U:case ee:case J:case V:case Q:case Z:case q:case G:case Y:case M:case E:case R:break;default:z>0&&(Ae=1)}f===Z?f=0:ye+O===0&&(Se=1,Ve+="\0"),xe*Re>0&&Be(Ie,Ve,t,e,de,he,Ge.length,o,i,o),he=1,de++;break;case M:case R:if(f+h+p+l===0){he++;break}default:switch(he++,ze=a.charAt(be),b){case W:case H:if(h+l+f===0)switch(C){case Y:case G:case W:case H:ze="";break;default:b!==H&&(ze=" ")}break;case te:ze="\\0";break;case re:ze="\\f";break;case ne:ze="\\v";break;case B:h+f+l===0&&ye>0&&(Oe=1,Se=1,ze="\f"+ze);break;case 108:if(h+f+l+me===0&&z>0)switch(be-z){case 2:C===se&&a.charCodeAt(be-3)===G&&(me=C);case 8:w===ce&&(me=w)}break;case G:h+f+l===0&&(z=be);break;case Y:f+p+h+l===0&&(Se=1,ze+="\r");break;case X:case K:0===f&&(h=h===b?0:0===h?b:h);break;case _:h+f+p===0&&l++;break;case D:h+f+p===0&&l--;break;case N:h+f+l===0&&p--;break;case F:if(h+f+l===0){if(0===O)switch(2*C+3*w){case 533:break;default:A=0,O=1}p++}break;case U:f+p+h+l+z+T===0&&(T=1);break;case V:case Z:if(h+l+p>0)break;switch(f){case 0:switch(2*b+3*a.charCodeAt(be+1)){case 235:f=Z;break;case 220:Te=be,f=V}break;case V:b===Z&&C===V&&(33===a.charCodeAt(Te+2)&&(Ge+=a.substring(Te,be+1)),ze="",f=0)}}if(0===f){if(ye+h+l+T===0&&o!==ae&&b!==M)switch(b){case Y:case ee:case J:case Q:case N:case F:if(0===O){switch(C){case W:case H:case $:case L:ze+="\0";break;default:ze="\0"+ze+(b===Y?"":"\0")}Se=1}else switch(b){case F:O=++A;break;case N:0==(O=--A)&&(Se=1,ze+="\0")}break;case W:case H:switch(C){case te:case E:case R:case M:case Y:case re:case W:case H:case $:case L:break;default:0===O&&(Se=1,ze+="\0")}}Ve+=ze,b!==H&&b!==W&&(x=b)}}w=C,C=b,be++}if(Te=Ge.length,ke>0&&0===Te&&0===Ke.length&&0===t[0].length==0&&(o!==oe||1===t.length&&(ye>0?Ne:_e)===t[0])&&(Te=t.join(",").length+2),Te>0){if(s=0===ye&&o!==ae?function(e){for(var t,r,a=0,o=e.length,i=Array(o);a<o;++a){for(var s=e[a].split(u),c="",l=0,f=0,p=0,h=0,d=s.length;l<d;++l)if(!(0===(f=(r=s[l]).length)&&d>1)){if(p=c.charCodeAt(c.length-1),h=r.charCodeAt(0),t="",0!==l)switch(p){case V:case ee:case J:case Q:case H:case F:break;default:t=" "}switch(h){case B:r=t+Ne;case ee:case J:case Q:case H:case N:case F:break;case _:r=t+r+Ne;break;case G:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(ve>0){r=t+r.substring(8,f-1);break}default:(l<1||s[l-1].length<1)&&(r=t+Ne+r)}break;case Y:t="";default:r=f>1&&r.indexOf(":")>0?t+r.replace(k,"$1"+Ne+"$2"):t+r+Ne}c+=r}i[a]=c.replace(n,"").trim()}return i}(t):t,xe>0&&void 0!==(c=Be(je,Ge,s,e,de,he,Te,o,i,o))&&0===(Ge=c).length)return Xe+Ge+Ke;if(Ge=s.join(",")+"{"+Ge+"}",ge*me!=0){switch(2!==ge||Ue(Ge,2)||(me=0),me){case ce:Ge=Ge.replace(y,":"+P+"$1")+Ge;break;case se:Ge=Ge.replace(m,"::"+I+"input-$1")+Ge.replace(m,"::"+P+"$1")+Ge.replace(m,":"+j+"input-$1")+Ge}me=0}}return Xe+Ge+Ke}function $e(e,t,r){var n=t.trim().split(l),a=n,o=n.length,i=e.length;switch(i){case 0:case 1:for(var s=0,c=0===i?"":e[0]+" ";s<o;++s)a[s]=Le(c,a[s],r,i).trim();break;default:for(var s=0,u=0,a=[];s<o;++s)for(var f=0;f<i;++f)a[u++]=Le(e[f]+" ",n[s],r,i).trim()}return a}function Le(e,t,r,n){var a=t,o=a.charCodeAt(0);switch(o<33&&(o=(a=a.trim()).charCodeAt(0)),o){case B:switch(ye+n){case 0:case 1:if(0===e.trim().length)break;default:return a.replace(f,"$1"+e.trim())}break;case G:switch(a.charCodeAt(1)){case 103:if(ve>0&&ye>0)return a.replace(p,"$1").replace(f,"$1"+_e);break;default:return e.trim()+a.replace(f,"$1"+e.trim())}default:if(r*ye>0&&a.indexOf("\f")>0)return a.replace(f,(e.charCodeAt(0)===G?"":"$1")+e.trim())}return e+a}function We(e,t,r,n){var u,l=0,f=e+";",p=2*t+3*r+4*n;if(944===p)return function(e){var t=e.length,r=e.indexOf(":",9)+1,n=e.substring(0,r).trim(),a=e.substring(r,t-1).trim();switch(e.charCodeAt(9)*Ee){case 0:break;case q:if(110!==e.charCodeAt(10))break;default:for(var o=a.split((a="",s)),i=0,r=0,t=o.length;i<t;r=0,++i){for(var u=o[i],l=u.split(c);u=l[r];){var f=u.charCodeAt(0);if(1===Ee&&(f>U&&f<90||f>96&&f<123||f===z||f===q&&u.charCodeAt(1)!==q))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=Fe}}l[r++]=u}a+=(0===i?"":",")+l.join(" ")}}return a=n+a+";",1===ge||2===ge&&Ue(a,1)?I+a+a:a}(f);if(0===ge||2===ge&&!Ue(f,1))return f;switch(p){case 1015:return 97===f.charCodeAt(10)?I+f+f:f;case 951:return 116===f.charCodeAt(3)?I+f+f:f;case 963:return 110===f.charCodeAt(5)?I+f+f:f;case 1009:if(100!==f.charCodeAt(4))break;case 969:case 942:return I+f+f;case 978:return I+f+P+f+f;case 1019:case 983:return I+f+P+f+j+f+f;case 883:return f.charCodeAt(8)===q?I+f+f:f;case 932:if(f.charCodeAt(4)===q)switch(f.charCodeAt(5)){case 103:return I+"box-"+f.replace("-grow","")+I+f+j+f.replace("grow","positive")+f;case 115:return I+f+j+f.replace("shrink","negative")+f;case 98:return I+f+j+f.replace("basis","preferred-size")+f}return I+f+j+f+f;case 964:return I+f+j+"flex-"+f+f;case 1023:if(99!==f.charCodeAt(8))break;return u=f.substring(f.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),I+"box-pack"+u+I+f+j+"flex-pack"+u+f;case 1005:return o.test(f)?f.replace(a,":"+I)+f.replace(a,":"+P)+f:f;case 1e3:switch(u=f.substring(13).trim(),l=u.indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(l)){case 226:u=f.replace(w,"tb");break;case 232:u=f.replace(w,"tb-rl");break;case 220:u=f.replace(w,"lr");break;default:return f}return I+f+j+u+f;case 1017:if(-1===f.indexOf("sticky",9))return f;case 975:switch(l=(f=e).length-10,u=(33===f.charCodeAt(l)?f.substring(0,l):f).substring(e.indexOf(":",7)+1).trim(),p=u.charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(u.charCodeAt(8)<111)break;case 115:f=f.replace(u,I+u)+";"+f;break;case 207:case 102:f=f.replace(u,I+(p>102?"inline-":"")+"box")+";"+f.replace(u,I+u)+";"+f.replace(u,j+u+"box")+";"+f}return f+";";case 938:if(f.charCodeAt(5)===q)switch(f.charCodeAt(6)){case 105:return u=f.replace("-items",""),I+f+I+"box-"+u+j+"flex-"+u+f;case 115:return I+f+j+"flex-item-"+f.replace(A,"")+f;default:return I+f+j+"flex-line-pack"+f.replace("align-content","").replace(A,"")+f}break;case 973:case 989:if(f.charCodeAt(3)!==q||122===f.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?We(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):f.replace(u,I+u)+f.replace(u,P+u.replace("fill-",""))+f;break;case 962:if(f=I+f+(102===f.charCodeAt(5)?j+f:"")+f,r+n===211&&105===f.charCodeAt(13)&&f.indexOf("transform",10)>0)return f.substring(0,f.indexOf(";",27)+1).replace(i,"$1"+I+"$2")+f}return f}function Ue(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10),a=e.substring(r+1,e.length-1);return Ae(2!==t?n:n.replace(O,"$1"),a,t)}function He(e,t){var r=We(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(x," or ($1)").substring(4):"("+t+")"}function Be(e,t,r,n,a,o,i,s,c,u){for(var l,f=0,p=t;f<xe;++f)switch(l=Se[f].call(ze,e,p,r,n,a,o,i,s,c,u)){case void 0:case!1:case!0:case null:break;default:p=l}switch(p){case void 0:case!1:case!0:case null:case t:break;default:return p}}function qe(e){for(var t in e){var r=e[t];switch(t){case"keyframe":Ee=0|r;break;case"global":ve=0|r;break;case"cascade":ye=0|r;break;case"compress":be=0|r;break;case"semicolon":Ce=0|r;break;case"preserve":ke=0|r;break;case"prefix":Ae=null,r?"function"!=typeof r?ge=1:(ge=2,Ae=r):ge=0}}return qe}function ze(t,r){if(void 0!==this&&this.constructor===ze)return e(t);var a=t,o=a.charCodeAt(0);o<33&&(o=(a=a.trim()).charCodeAt(0)),Ee>0&&(Fe=a.replace(h,o===_?"":"-")),o=1,1===ye?_e=a:Ne=a;var i,s=[_e];xe>0&&void 0!==(i=Be(Te,r,s,s,de,he,0,0,0,0))&&"string"==typeof i&&(r=i);var c=De(we,s,r,0,0);return xe>0&&void 0!==(i=Be(Oe,c,s,s,de,he,c.length,0,0,0))&&"string"!=typeof(c=i)&&(o=0),Fe="",_e="",Ne="",me=0,de=1,he=1,be*o==0?c:function(e){return e.replace(n,"").replace(g,"").replace(v,"$1").replace(b,"$1").replace(C," ")}(c)}return ze.use=function e(t){switch(t){case void 0:case null:xe=Se.length=0;break;default:switch(t.constructor){case Array:for(var r=0,n=t.length;r<n;++r)e(t[r]);break;case Function:Se[xe++]=t;break;case Boolean:Re=0|!!t}}return e},ze.set=qe,void 0!==t&&qe(t),ze}(null)}),C=v(function(e,t){e.exports=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,a,o,i,s,c,u,l,f){switch(r){case 1:if(0===l&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===u)return n+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(a[0]+n),"";default:return n+(0===f?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}}),k=/^\s*\/\/.*$/gm,w=new b({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),S=new b({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),x=[],A=function(e){if(-2===e){var t=x;return x=[],t}},O=C(function(e){x.push(e)});S.use([O,A]),w.use([O,A]);var T=function(e,t,r){var n=e.join("").replace(k,"");return S(r||!t?"":t,t&&r?r+" "+t+" { "+n+" }":n)};function I(e){return"function"==typeof e&&"string"==typeof e.styledComponentId}var P=function(e){return String.fromCharCode(e+(e>25?39:97))},j=function(e){var t="",r=void 0;for(r=e;r>52;r=Math.floor(r/52))t=P(r%52)+t;return P(r%52)+t},M=function(e,t){for(var r=[e[0]],n=0,a=t.length;n<a;n+=1)r.push(t[n],e[n+1]);return r},R=Object.freeze([]),E=Object.freeze({}),F=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e||d(e)?y(M(R,[e].concat(r))):y(M(e,r))},N="undefined"!=typeof process&&process.env.SC_ATTR||"data-styled-components",_="__styled-components-stylesheet__",D="undefined"!=typeof window&&"HTMLElement"in window,$=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,L=function(e){var t=""+(e||""),r=[];return t.replace($,function(e,t,n){return r.push({componentId:t,matchIndex:n}),e}),r.map(function(e,n){var a=e.componentId,o=e.matchIndex,i=r[n+1];return{componentId:a,cssFromDOM:i?t.slice(o,i.matchIndex):t.slice(o)}})},W=function(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null},U=function(e,t,r){r&&((e[t]||(e[t]=Object.create(null)))[r]=!0)},H=function(e,t){e[t]=Object.create(null)},B=function(e){return function(t,r){return void 0!==e[t]&&e[t][r]}},q=function(e){var t="";for(var r in e)t+=Object.keys(e[r]).join(" ")+" ";return t.trim()},z=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets.length,r=0;r<t;r+=1){var n=document.styleSheets[r];if(n.ownerNode===e)return n}throw new m(10)},V=function(e,t,r){if(!t)return!1;var n=e.cssRules.length;try{e.insertRule(t,r<=n?r:n)}catch(e){return!1}return!0},Y=function(e){return"\n/* sc-component-id: "+e+" */\n"},G=function(e,t){for(var r=0,n=0;n<=t;n+=1)r+=e[n];return r},K=function(e,t){return function(r){var n=W();return"<style "+[n&&'nonce="'+n+'"',N+'="'+q(t)+'"',r].filter(Boolean).join(" ")+">"+e()+"</style>"}},X=function(e,t){return function(){var n,a=((n={})[N]=q(t),n),o=W();return o&&(a.nonce=o),r.createElement("style",l({},a,{dangerouslySetInnerHTML:{__html:e()}}))}},Z=function(e){return function(){return Object.keys(e)}},J=function e(t,r){var n=void 0===t?Object.create(null):t,a=void 0===r?Object.create(null):r,o=function(e){var t=a[e];return void 0!==t?t:a[e]=[""]},i=function(){var e="";for(var t in a){var r=a[t][0];r&&(e+=Y(t)+r)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var r in e)t[r]=l({},e[r]);return t}(n),r=Object.create(null);for(var o in a)r[o]=[a[o][0]];return e(t,r)},css:i,getIds:Z(a),hasNameForId:B(n),insertMarker:o,insertRules:function(e,t,r){o(e)[0]+=t.join(" "),U(n,e,r)},removeRules:function(e){var t=a[e];void 0!==t&&(t[0]="",H(n,e))},sealed:!1,styleTag:null,toElement:X(i,n),toHTML:K(i,n)}},Q=function(e,t,r,n,a){return D&&!r?function(e,t){var r=Object.create(null),n=Object.create(null),a=[],o=void 0!==t,i=!1,s=function(e){var t=n[e];return void 0!==t?t:(n[e]=a.length,a.push(0),H(r,e),n[e])},c=function(){var t=z(e).cssRules,r="";for(var o in n){r+=Y(o);for(var i=n[o],s=G(a,i),c=s-a[i];c<s;c+=1){var u=t[c];void 0!==u&&(r+=u.cssText)}}return r};return{clone:function(){throw new m(5)},css:c,getIds:Z(n),hasNameForId:B(r),insertMarker:s,insertRules:function(n,c,u){for(var l=s(n),f=z(e),p=G(a,l),h=0,d=[],m=c.length,y=0;y<m;y+=1){var g=c[y],v=o;v&&-1!==g.indexOf("@import")?d.push(g):V(f,g,p+h)&&(v=!1,h+=1)}o&&d.length>0&&(i=!0,t().insertRules(n+"-import",d)),a[l]+=h,U(r,n,u)},removeRules:function(s){var c=n[s];if(void 0!==c){var u=a[c];!function(e,t,r){for(var n=t-r,a=t;a>n;a-=1)e.deleteRule(a)}(z(e),G(a,c),u),a[c]=0,H(r,s),o&&i&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:X(c,r),toHTML:K(c,r)}}(function(e,t,r){var n=document.createElement("style");n.setAttribute(N,"");var a=W();if(a&&n.setAttribute("nonce",a),n.appendChild(document.createTextNode("")),e&&!t)e.appendChild(n);else{if(!t||!e||!t.parentNode)throw new m(6);t.parentNode.insertBefore(n,r?t:t.nextSibling)}return n}(e,t,n),a):J()},ee=/\s+/,te=void 0;te=D?1e3:-1;var re=0,ne=void 0,ae=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D?document.head:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var r=t.tags[0];return t.importRuleTag=Q(t.target,r?r.styleTag:null,t.forceServer,!0)},re+=1,this.id=re,this.forceServer=n,this.target=n?null:r,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!D||this.forceServer)return this;var e=[],t=[],r=!1,n=document.querySelectorAll("style["+N+"]"),a=n.length;if(0===a)return this;for(var o=0;o<a;o+=1){var i=n[o];r||(r=!!i.getAttribute("data-styled-streamed"));for(var s=(i.getAttribute(N)||"").trim().split(ee),c=s.length,u=0;u<c;u+=1){var f=s[u];this.rehydratedNames[f]=!0}t.push.apply(t,L(i.textContent)),e.push(i)}var p=t.length;if(0===p)return this;var h=function(e,t,r,n){var a,o,i=(a=function(){for(var n=0,a=r.length;n<a;n+=1){var o=r[n],i=o.componentId,s=o.cssFromDOM,c=w("",s);e.insertRules(i,c)}for(var u=0,l=t.length;u<l;u+=1){var f=t[u];f.parentNode&&f.parentNode.removeChild(f)}},o=!1,function(){o||(o=!0,a())});return n&&i(),l({},e,{insertMarker:function(t){return i(),e.insertMarker(t)},insertRules:function(t,r,n){return i(),e.insertRules(t,r,n)}})}(this.makeTag(null),e,t,r);this.capacity=Math.max(1,te-p),this.tags.push(h);for(var d=0;d<p;d+=1)this.tagMap[t[d].componentId]=h;return this},e.reset=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ne=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var r=e.getIds(),n=e.clone(),a=0;a<r.length;a+=1)t.tagMap[r[a]]=n;return n}),t.rehydratedNames=l({},this.rehydratedNames),t.deferred=l({},this.deferred),t},e.prototype.sealAllTags=function(){this.capacity=1,this.tags.forEach(function(e){e.sealed=!0})},e.prototype.makeTag=function(e){var t=e?e.styleTag:null;return Q(this.target,t,this.forceServer,!1,this.getImportRuleTag)},e.prototype.getTagForId=function(e){var t=this.tagMap[e];if(void 0!==t&&!t.sealed)return t;var r=this.tags[this.tags.length-1];return this.capacity-=1,0===this.capacity&&(this.capacity=te,r=this.makeTag(r),this.tags.push(r)),this.tagMap[e]=r},e.prototype.hasId=function(e){return void 0!==this.tagMap[e]},e.prototype.hasNameForId=function(e,t){if(void 0===this.ignoreRehydratedNames[e]&&this.rehydratedNames[t])return!0;var r=this.tagMap[e];return void 0!==r&&r.hasNameForId(e,t)},e.prototype.deferredInject=function(e,t){if(void 0===this.tagMap[e]){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].deferredInject(e,t);this.getTagForId(e).insertMarker(e),this.deferred[e]=t}},e.prototype.inject=function(e,t,r){for(var n=this.clones,a=0;a<n.length;a+=1)n[a].inject(e,t,r);var o=this.getTagForId(e);if(void 0!==this.deferred[e]){var i=this.deferred[e].concat(t);o.insertRules(e,i,r),this.deferred[e]=void 0}else o.insertRules(e,t,r)},e.prototype.remove=function(e){var t=this.tagMap[e];if(void 0!==t){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].remove(e);t.removeRules(e),this.ignoreRehydratedNames[e]=!0,this.deferred[e]=void 0}},e.prototype.toHTML=function(){return this.tags.map(function(e){return e.toHTML()}).join("")},e.prototype.toReactElements=function(){var e=this.id;return this.tags.map(function(r,n){var a="sc-"+e+"-"+n;return t.cloneElement(r.toElement(),{key:a})})},u(e,null,[{key:"master",get:function(){return ne||(ne=(new e).rehydrate())}},{key:"instance",get:function(){return e.master}}]),e}();function oe(e){return function(){return e}}var ie=function(){};ie.thatReturns=oe,ie.thatReturnsFalse=oe(!1),ie.thatReturnsTrue=oe(!0),ie.thatReturnsNull=oe(null),ie.thatReturnsThis=function(){return this},ie.thatReturnsArgument=function(e){return e};var se=ie,ce=function(e){};var ue=function(e,t,r,n,a,o,i,s){if(ce(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,a,o,i,s],l=0;(c=new Error(t.replace(/%s/g,function(){return u[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},le=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}})()&&Object.assign;var he,de="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",me=v(function(e){e.exports=function(){function e(e,t,r,n,a,o){o!==de&&ue(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=se,r.PropTypes=r,r}()}),ye=function(e){function t(){return c(this,t),h(this,e.apply(this,arguments))}return f(t,e),t.prototype.getChildContext=function(){var e;return(e={})[_]=this.sheetInstance,e},t.prototype.componentWillMount=function(){if(this.props.sheet)this.sheetInstance=this.props.sheet;else{if(!this.props.target)throw new m(4);this.sheetInstance=new ae(this.props.target)}},t.prototype.render=function(){return r.Children.only(this.props.children)},t}(t.Component);ye.childContextTypes=((he={})[_]=me.oneOfType([me.instanceOf(ae),me.instanceOf(ge)]).isRequired,he);var ge=function(){function e(){c(this,e),this.masterSheet=ae.master,this.instance=this.masterSheet.clone(),this.closed=!1}return e.prototype.complete=function(){if(!this.closed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.closed=!0}},e.prototype.collectStyles=function(e){if(this.closed)throw new m(2);return r.createElement(ye,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.complete(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.complete(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new m(3)},e}(),ve=v(function(e,t){var r,n,a,o,i,s,c,u;e.exports=(r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a=Object.defineProperty,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,u=c&&c(Object),function e(t,l,f){if("string"!=typeof l){if(u){var p=c(l);p&&p!==u&&e(t,p,f)}var h=o(l);i&&(h=h.concat(i(l)));for(var d=0;d<h.length;++d){var m=h[d];if(!(r[m]||n[m]||f&&f[m])){var y=s(l,m);try{a(t,m,y)}catch(e){}}}return t}return t})}),be=function(e,t,r){var n=r&&e.theme===r.theme;return e.theme&&!n?e.theme:t},Ce=/[[\].#*$><+~=|^:(),"'`-]+/g,ke=/(^-|-$)/g;function we(e){return e.replace(Ce,"-").replace(ke,"")}function Se(e){return e.displayName||e.name||"Component"}function xe(e){return"string"==typeof e}var Ae=/^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveAspectRatio|ointsAt[X-Z]|anose1)|(?:(?:allowPaymentReque|(?:fontSize|length)Adju|manife)s|strokeMiterlimi|(?:(?:specularE|e)xpon|renderingInt|asc)en|(?:specularConsta|repeatCou|fontVaria)n|d(?:iffuseConsta|esce)n|baselineShif|vectorEffec|onPointerOu|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|a(?:l(?:lowUserMedia|phabetic|t)|rabicForm|sync)|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|(?:pointerEve|keyPoi)nts|preserveAlpha|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|unicodeRange|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|mathematical|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|vAlphabetic|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|pathLength|(?:xlinkHr|glyphR)ef|innerHTML|xlinkShow|f(?:o(?:ntSize|rm?)|il(?:ter|l))|(?:tabInde|(?:sand|b)bo|viewBo)x|autoPlay|r(?:e(?:quired|sult|f))?|(?:(?:href|xml|src)La|kerni)ng|o(?:verflow|pen)|i(?:temRef|n2|s)|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|divisor|t(?:arget[XY]|o)|(?:stri|la)ng|(?:width|size)s|prefix|typeof|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|llow|s)|itemID|t(?:arget|ype)|m(?:edia|a(?:sk|x)|in)|value|width|x(?:mlns)?|size|href|k(?:ey)?|end|low|by|x[12]|y[12]|g[12]|i[dn]|f[xy]|[yz])$/,Oe=RegExp.prototype.test.bind(new RegExp("^(x|data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"));var Te,Ie,Pe,je="__styled-components__",Me=je+"next__",Re=me.shape({getTheme:me.func,subscribe:me.func,unsubscribe:me.func}),Ee=((Te={})[je]=me.func,Te[Me]=Re,Te),Fe=function(e){function t(){c(this,t);var r=h(this,e.call(this));return r.unsubscribeToOuterId=-1,r.getTheme=r.getTheme.bind(r),r}return f(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.context[Me];void 0!==t&&(this.unsubscribeToOuterId=t.subscribe(function(t){e.outerTheme=t,void 0!==e.broadcast&&e.publish(e.props.theme)})),this.broadcast=function(e){var t={},r=0,n=e;return{publish:function(e){for(var r in n=e,t){var a=t[r];void 0!==a&&a(n)}},subscribe:function(e){var a=r;return t[a]=e,r+=1,e(n),a},unsubscribe:function(e){t[e]=void 0}}}(this.getTheme())},t.prototype.getChildContext=function(){var e,t=this;return l({},this.context,((e={})[Me]={getTheme:this.getTheme,subscribe:this.broadcast.subscribe,unsubscribe:this.broadcast.unsubscribe},e[je]=function(e){var r=t.broadcast.subscribe(e);return function(){return t.broadcast.unsubscribe(r)}},e))},t.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.publish(e.theme)},t.prototype.componentWillUnmount=function(){-1!==this.unsubscribeToOuterId&&this.context[Me].unsubscribe(this.unsubscribeToOuterId)},t.prototype.getTheme=function(e){var t=e||this.props.theme;if("function"==typeof t)return t(this.outerTheme);if(null===t||Array.isArray(t)||"object"!==(void 0===t?"undefined":s(t)))throw new m(8);return l({},this.outerTheme,t)},t.prototype.publish=function(e){this.broadcast.publish(this.getTheme(e))},t.prototype.render=function(){return this.props.children?r.Children.only(this.props.children):null},t}(t.Component);Fe.childContextTypes=Ee,Fe.contextTypes=((Ie={})[Me]=Re,Ie);var Ne={},_e=l({},Ee,((Pe={})[_]=me.oneOfType([me.instanceOf(ae),me.instanceOf(ge)]),Pe)),De={},$e=function(e){function r(){var t,n;c(this,r);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return t=n=h(this,e.call.apply(e,[this].concat(o))),n.attrs={},n.state={theme:null,generatedClassName:""},n.unsubscribeId=-1,h(n,t)}return f(r,e),r.prototype.unsubscribeFromContext=function(){-1!==this.unsubscribeId&&this.context[Me].unsubscribe(this.unsubscribeId)},r.prototype.buildExecutionContext=function(e,r){var n=this.constructor.attrs,a=l({},r,{theme:e});return void 0===n?a:(this.attrs=Object.keys(n).reduce(function(e,r){var o=n[r];return e[r]="function"!=typeof o||function(e,t){for(var r=e;r;)if((r=Object.getPrototypeOf(r))&&r===t)return!0;return!1}(o,t.Component)?o:o(a),e},{}),l({},a,this.attrs))},r.prototype.generateAndInjectStyles=function(e,t){var r=this.constructor,n=r.attrs,a=r.componentStyle,o=(r.warnTooManyClasses,this.context[_]||ae.master);if(a.isStatic&&void 0===n)return a.generateAndInjectStyles(Ne,o);var i=this.buildExecutionContext(e,t);return a.generateAndInjectStyles(i,o)},r.prototype.componentWillMount=function(){var e=this,t=this.constructor.componentStyle,r=this.context[Me];if(t.isStatic){var n=this.generateAndInjectStyles(Ne,this.props);this.setState({generatedClassName:n})}else if(void 0!==r){var a=r.subscribe;this.unsubscribeId=a(function(t){var r=be(e.props,t,e.constructor.defaultProps),n=e.generateAndInjectStyles(r,e.props);e.setState({theme:r,generatedClassName:n})})}else{var o=this.props.theme||E,i=this.generateAndInjectStyles(o,this.props);this.setState({theme:o,generatedClassName:i})}},r.prototype.componentWillReceiveProps=function(e){var t=this;this.constructor.componentStyle.isStatic||this.setState(function(r){var n=be(e,r.theme,t.constructor.defaultProps);return{theme:n,generatedClassName:t.generateAndInjectStyles(n,e)}})},r.prototype.componentWillUnmount=function(){this.unsubscribeFromContext()},r.prototype.render=function(){var e=this.props.innerRef,r=this.state.generatedClassName,n=this.constructor,a=n.styledComponentId,o=n.target,i=xe(o),s=[this.props.className,a,this.attrs.className,r].filter(Boolean).join(" "),c=l({},this.attrs,{className:s});I(o)?c.innerRef=e:c.ref=e;var u,f=c,p=void 0;for(p in this.props)"innerRef"===p||"className"===p||i&&(u=p,!Ae.test(u)&&!Oe(u.toLowerCase()))||(f[p]="style"===p&&p in this.attrs?l({},this.attrs[p],this.props[p]):this.props[p]);return t.createElement(o,f)},r}(t.Component);function Le(e){for(var t,r=0|e.length,n=0|r,a=0;r>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++a;switch(r){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(a)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}var We=D,Ue=function e(t,r){for(var n=0,a=t.length;n<a;n+=1){var o=t[n];if(Array.isArray(o)&&!e(o))return!1;if("function"==typeof o&&!I(o))return!1}if(void 0!==r)for(var i in r)if("function"==typeof r[i])return!1;return!0},He="undefined"!=typeof module&&module.hot&&!1,Be=["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"],qe=v(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112;function f(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case o:case i:return e;default:switch(e=e&&e.$$typeof){case c:case l:case s:return e;default:return t}}case a:return t}}}t.typeOf=f,t.AsyncMode=u,t.ContextConsumer=c,t.ContextProvider=s,t.Element=n,t.ForwardRef=l,t.Fragment=o,t.Portal=a,t.StrictMode=i,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||"object"==typeof e&&null!==e&&(e.$$typeof===s||e.$$typeof===c||e.$$typeof===l)},t.isAsyncMode=function(e){return f(e)===u},t.isContextConsumer=function(e){return f(e)===c},t.isContextProvider=function(e){return f(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return f(e)===l},t.isFragment=function(e){return f(e)===o},t.isPortal=function(e){return f(e)===a},t.isStrictMode=function(e){return f(e)===i}});g(qe);qe.typeOf,qe.AsyncMode,qe.ContextConsumer,qe.ContextProvider,qe.Element,qe.ForwardRef,qe.Fragment,qe.Portal,qe.StrictMode,qe.isValidElementType,qe.isAsyncMode,qe.isContextConsumer,qe.isContextProvider,qe.isElement,qe.isForwardRef,qe.isFragment,qe.isPortal,qe.isStrictMode;var ze=v(function(e,t){});g(ze);ze.typeOf,ze.AsyncMode,ze.ContextConsumer,ze.ContextProvider,ze.Element,ze.ForwardRef,ze.Fragment,ze.Portal,ze.StrictMode,ze.isValidElementType,ze.isAsyncMode,ze.isContextConsumer,ze.isContextProvider,ze.isElement,ze.isForwardRef,ze.isFragment,ze.isPortal,ze.isStrictMode;var Ve=v(function(e){e.exports=qe}).isValidElementType,Ye={StyleSheet:ae},Ge=function(e,t,r){var n=function(t){return e(Le(t))};return function(){function e(t,r,n){c(this,e),this.rules=t,this.isStatic=!He&&Ue(t,r),this.componentId=n,ae.master.hasId(n)||ae.master.deferredInject(n,[])}return e.prototype.generateAndInjectStyles=function(e,a){var o=this.isStatic,i=this.componentId,s=this.lastClassName;if(We&&o&&void 0!==s&&a.hasNameForId(i,s))return s;var c=t(this.rules,e),u=n(this.componentId+c.join(""));return a.hasNameForId(i,u)||a.inject(this.componentId,r(c,"."+u),u),this.lastClassName=u,u},e.generateName=function(e){return n(e)},e}()}(j,y,T),Ke=function(e){return function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;if(!Ve(n))throw new m(1,String(n));var o=function(){return r(n,a,e.apply(void 0,arguments))};return o.withConfig=function(e){return t(r,n,l({},a,e))},o.attrs=function(e){return t(r,n,l({},a,{attrs:l({},a.attrs||E,e)}))},o}}(F),Xe=function(e,t){return function r(n,a,o){var i=a.isClass,s=void 0===i?!xe(n):i,d=a.displayName,m=void 0===d?function(e){return xe(e)?"styled."+e:"Styled("+Se(e)+")"}(n):d,y=a.componentId,g=void 0===y?function(e,t,r){var n="string"!=typeof t?"sc":we(t),a=(De[n]||0)+1;De[n]=a;var o=n+"-"+e.generateName(n+a);return void 0!==r?r+"-"+o:o}(e,a.displayName,a.parentComponentId):y,v=a.ParentComponent,b=void 0===v?$e:v,C=a.rules,k=a.attrs,w=a.displayName&&a.componentId?we(a.displayName)+"-"+a.componentId:a.componentId||g,S=new e(void 0===C?o:C.concat(o),k,w),x=function(e){function i(){return c(this,i),h(this,e.apply(this,arguments))}return f(i,e),i.withComponent=function(e){var t=a.componentId,n=p(a,["componentId"]),s=t&&t+"-"+(xe(e)?e:we(Se(e))),c=l({},n,{componentId:s,ParentComponent:i});return r(e,c,o)},u(i,null,[{key:"extend",get:function(){var e=a.rules,s=a.componentId,c=p(a,["rules","componentId"]),u=void 0===e?o:e.concat(o),f=l({},c,{rules:u,parentComponentId:s,ParentComponent:i});return t(r,n,f)}}]),i}(b);return x.attrs=k,x.componentStyle=S,x.contextTypes=_e,x.displayName=m,x.styledComponentId=w,x.target=n,s&&ve(x,n,{attrs:!0,componentStyle:!0,displayName:!0,extend:!0,styledComponentId:!0,target:!0,warnTooManyClasses:!0,withComponent:!0}),x}}(Ge,Ke),Ze=function(e,t,r){return function(){var n=ae.master,a=r.apply(void 0,arguments),o=e(Le(JSON.stringify(a).replace(/\s|\\n/g,""))),i="sc-keyframes-"+o;return n.hasNameForId(i,o)||n.inject(i,t(a,o,"@keyframes"),o),o}}(j,T,F),Je=function(e,t){return function(){var r=ae.master,n=t.apply(void 0,arguments),a="sc-global-"+Le(JSON.stringify(n));r.hasId(a)||r.inject(a,e(n))}}(T,F),Qe=function(e,t){var r=function(r){return t(e,r)};return Be.forEach(function(e){r[e]=r(e)}),r}(Xe,Ke);e.default=Qe,e.css=F,e.keyframes=Ze,e.injectGlobal=Je,e.isStyledComponent=I,e.consolidateStreamedStyles=function(){},e.ThemeProvider=Fe,e.withTheme=function(e){var t="function"==typeof e&&!(e.prototype&&"isReactComponent"in e.prototype),n=I(e)||t,a=function(t){function a(){var e,r;c(this,a);for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=r=h(this,t.call.apply(t,[this].concat(o))),r.state=E,r.unsubscribeId=-1,h(r,e)}return f(a,t),a.prototype.componentWillMount=function(){var e=this,t=this.constructor.defaultProps,r=this.context[Me],n=be(this.props,void 0,t);if(void 0===r&&void 0!==n)this.setState({theme:n});else{var a=r.subscribe;this.unsubscribeId=a(function(r){var n=be(e.props,r,t);e.setState({theme:n})})}},a.prototype.componentWillReceiveProps=function(e){var t=this.constructor.defaultProps;this.setState(function(r){return{theme:be(e,r.theme,t)}})},a.prototype.componentWillUnmount=function(){-1!==this.unsubscribeId&&this.context[Me].unsubscribe(this.unsubscribeId)},a.prototype.render=function(){var t=l({theme:this.state.theme},this.props);return n||(t.ref=t.innerRef,delete t.innerRef),r.createElement(e,t)},a}(r.Component);return a.contextTypes=Ee,a.displayName="WithTheme("+Se(e)+")",a.styledComponentId="withTheme",ve(a,e)},e.ServerStyleSheet=ge,e.StyleSheetManager=ye,e.__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS=Ye,Object.defineProperty(e,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=styled-components.min.js.map