styled-components 6.0.6-test.0 → 6.0.7

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 (102) hide show
  1. package/dist/hoc/withTheme.d.ts +1 -1
  2. package/dist/models/ComponentStyle.d.ts +1 -1
  3. package/dist/models/StyleSheetManager.d.ts +1 -1
  4. package/dist/models/ThemeProvider.d.ts +1 -1
  5. package/dist/sheet/Sheet.d.ts +3 -3
  6. package/dist/sheet/Tag.d.ts +7 -7
  7. package/dist/sheet/dom.d.ts +1 -1
  8. package/dist/sheet/types.d.ts +1 -1
  9. package/dist/styled-components.browser.cjs.js +1 -1
  10. package/dist/styled-components.browser.cjs.js.map +1 -1
  11. package/dist/styled-components.browser.esm.js +1 -1
  12. package/dist/styled-components.browser.esm.js.map +1 -1
  13. package/dist/styled-components.cjs.js +1 -1
  14. package/dist/styled-components.cjs.js.map +1 -1
  15. package/dist/styled-components.esm.js +1 -1
  16. package/dist/styled-components.esm.js.map +1 -1
  17. package/dist/styled-components.js +3 -11
  18. package/dist/styled-components.js.map +1 -1
  19. package/dist/styled-components.min.js +1 -1
  20. package/dist/styled-components.min.js.map +1 -1
  21. package/dist/test/utils.d.ts +0 -1
  22. package/dist/types.d.ts +15 -15
  23. package/dist/utils/checkDynamicCreation.d.ts +1 -1
  24. package/dist/utils/determineTheme.d.ts +2 -2
  25. package/dist/utils/flatten.d.ts +1 -1
  26. package/dist/utils/hoist.d.ts +1 -1
  27. package/dist/utils/joinStrings.d.ts +2 -2
  28. package/dist/utils/stylis.d.ts +4 -4
  29. package/native/dist/base.d.ts +12 -0
  30. package/native/dist/constants.d.ts +8 -0
  31. package/native/dist/constructors/constructWithOptions.d.ts +18 -0
  32. package/native/dist/constructors/createGlobalStyle.d.ts +3 -0
  33. package/native/dist/constructors/css.d.ts +4 -0
  34. package/native/dist/constructors/keyframes.d.ts +3 -0
  35. package/native/dist/constructors/styled.d.ts +180 -0
  36. package/native/dist/hoc/withTheme.d.ts +3 -0
  37. package/native/dist/hoc/withTheme.spec.d.ts +1 -0
  38. package/native/dist/index-standalone.d.ts +2 -0
  39. package/native/dist/index.d.ts +4 -0
  40. package/native/dist/macro/index.d.ts +2 -0
  41. package/native/dist/models/ComponentStyle.d.ts +15 -0
  42. package/native/dist/models/GlobalStyle.d.ts +11 -0
  43. package/native/dist/models/InlineStyle.d.ts +6 -0
  44. package/native/dist/models/Keyframes.d.ts +10 -0
  45. package/native/dist/models/ServerStyleSheet.d.ts +16 -0
  46. package/native/dist/models/StyleSheetManager.d.ts +65 -0
  47. package/native/dist/models/StyledComponent.d.ts +3 -0
  48. package/native/dist/models/StyledNativeComponent.d.ts +3 -0
  49. package/native/dist/models/ThemeProvider.d.ts +47 -0
  50. package/native/dist/native/index.d.ts +36 -0
  51. package/native/dist/secretInternals.d.ts +5 -0
  52. package/native/dist/sheet/GroupIDAllocator.d.ts +4 -0
  53. package/native/dist/sheet/GroupedTag.d.ts +11 -0
  54. package/native/dist/sheet/Rehydration.d.ts +3 -0
  55. package/native/dist/sheet/Sheet.d.ts +38 -0
  56. package/native/dist/sheet/Tag.d.ts +54 -0
  57. package/native/dist/sheet/dom.d.ts +4 -0
  58. package/native/dist/sheet/index.d.ts +1 -0
  59. package/native/dist/sheet/types.d.ts +34 -0
  60. package/native/dist/styled-components.native.cjs.js +2 -0
  61. package/native/dist/styled-components.native.cjs.js.map +1 -0
  62. package/native/dist/styled-components.native.esm.js +2 -0
  63. package/native/dist/styled-components.native.esm.js.map +1 -0
  64. package/native/dist/test/globals.d.ts +2 -0
  65. package/native/dist/test/utils.d.ts +186 -0
  66. package/native/dist/test/veryLargeUnionType.d.ts +1 -0
  67. package/native/dist/types.d.ts +161 -0
  68. package/native/dist/utils/addUnitIfNeeded.d.ts +1 -0
  69. package/native/dist/utils/checkDynamicCreation.d.ts +1 -0
  70. package/native/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  71. package/native/dist/utils/determineTheme.d.ts +4 -0
  72. package/native/dist/utils/domElements.d.ts +2 -0
  73. package/native/dist/utils/empties.d.ts +3 -0
  74. package/native/dist/utils/error.d.ts +5 -0
  75. package/native/dist/utils/errors.d.ts +21 -0
  76. package/native/dist/utils/escape.d.ts +5 -0
  77. package/native/dist/utils/flatten.d.ts +4 -0
  78. package/native/dist/utils/generateAlphabeticName.d.ts +1 -0
  79. package/native/dist/utils/generateComponentId.d.ts +1 -0
  80. package/native/dist/utils/generateDisplayName.d.ts +2 -0
  81. package/native/dist/utils/getComponentName.d.ts +2 -0
  82. package/native/dist/utils/hash.d.ts +3 -0
  83. package/native/dist/utils/hoist.d.ts +51 -0
  84. package/native/dist/utils/hyphenateStyleName.d.ts +14 -0
  85. package/native/dist/utils/interleave.d.ts +2 -0
  86. package/native/dist/utils/isFunction.d.ts +1 -0
  87. package/native/dist/utils/isPlainObject.d.ts +1 -0
  88. package/native/dist/utils/isStatelessFunction.d.ts +1 -0
  89. package/native/dist/utils/isStaticRules.d.ts +2 -0
  90. package/native/dist/utils/isStyledComponent.d.ts +2 -0
  91. package/native/dist/utils/isTag.d.ts +2 -0
  92. package/native/dist/utils/joinStrings.d.ts +5 -0
  93. package/native/dist/utils/mixinDeep.d.ts +6 -0
  94. package/native/dist/utils/nonce.d.ts +1 -0
  95. package/native/dist/utils/setToString.d.ts +17 -0
  96. package/native/dist/utils/stylis.d.ts +10 -0
  97. package/native/package.json +4 -4
  98. package/package.json +2 -25
  99. package/dist/styled-components.native.cjs.js +0 -2
  100. package/dist/styled-components.native.cjs.js.map +0 -1
  101. package/dist/styled-components.native.esm.js +0 -2
  102. package/dist/styled-components.native.esm.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { AnyComponent, ExecutionProps } from '../types';
3
- export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "defaultProps" | "displayName" | "$$typeof" | "propTypes" | "compare" | "type" : T extends React.ForwardRefExoticComponent<any> ? "defaultProps" | "displayName" | "$$typeof" | "propTypes" | "render" : "length" | "defaultProps" | "displayName" | "propTypes" | "contextType" | "contextTypes" | "childContextTypes" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "type" | "getDefaultProps" | "mixins" | "name" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; };
3
+ export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "compare" | "type" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "prototype" | "arguments" | "caller" | "name" | "type" | "getDefaultProps" | "mixins" | "callee" | "arity">]: T[key]; };
@@ -10,6 +10,6 @@ export default class ComponentStyle {
10
10
  isStatic: boolean;
11
11
  rules: RuleSet<any>;
12
12
  staticRulesId: string;
13
- constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle);
13
+ constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle | undefined);
14
14
  generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): string;
15
15
  }
@@ -5,7 +5,7 @@ import { ShouldForwardProp, Stringifier } from '../types';
5
5
  export declare const mainSheet: StyleSheet;
6
6
  export declare const mainStylis: Stringifier;
7
7
  export type IStyleSheetContext = {
8
- shouldForwardProp?: ShouldForwardProp<'web'>;
8
+ shouldForwardProp?: ShouldForwardProp<'web'> | undefined;
9
9
  styleSheet: StyleSheet;
10
10
  stylis: Stringifier;
11
11
  };
@@ -24,7 +24,7 @@ import React from 'react';
24
24
  export interface DefaultTheme {
25
25
  [key: string]: any;
26
26
  }
27
- type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme;
27
+ type ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;
28
28
  type ThemeArgument = DefaultTheme | ThemeFn;
29
29
  type Props = {
30
30
  children?: React.ReactNode;
@@ -2,7 +2,7 @@ import { GroupedTag, Sheet, SheetOptions } from './types';
2
2
  type SheetConstructorArgs = {
3
3
  isServer?: boolean;
4
4
  useCSSOMInjection?: boolean;
5
- target?: HTMLElement;
5
+ target?: HTMLElement | undefined;
6
6
  };
7
7
  type GlobalStylesAllocationMap = {
8
8
  [key: string]: number;
@@ -14,10 +14,10 @@ export default class StyleSheet implements Sheet {
14
14
  names: NamesAllocationMap;
15
15
  options: SheetOptions;
16
16
  server: boolean;
17
- tag?: GroupedTag;
17
+ tag?: GroupedTag | undefined;
18
18
  /** Register a group ID to give it an index */
19
19
  static registerId(id: string): number;
20
- constructor(options?: SheetConstructorArgs, globalStyles?: GlobalStylesAllocationMap, names?: NamesAllocationMap);
20
+ constructor(options?: SheetConstructorArgs, globalStyles?: GlobalStylesAllocationMap, names?: NamesAllocationMap | undefined);
21
21
  reconstructWithOptions(options: SheetConstructorArgs, withNames?: boolean): StyleSheet;
22
22
  allocateGSInstance(id: string): number;
23
23
  /** Lazily initialises a GroupedTag for when it's actually needed */
@@ -1,28 +1,28 @@
1
1
  import { SheetOptions } from './types';
2
2
  /** Create a CSSStyleSheet-like tag depending on the environment */
3
3
  export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOptions) => {
4
- element: HTMLStyleElement;
5
- sheet: CSSStyleSheet;
4
+ rules: string[];
6
5
  length: number;
7
6
  insertRule(index: number, rule: string): boolean;
8
7
  deleteRule(index: number): void;
9
8
  getRule(index: number): string;
10
9
  } | {
11
10
  element: HTMLStyleElement;
12
- nodes: NodeListOf<Node>;
11
+ sheet: CSSStyleSheet;
13
12
  length: number;
14
13
  insertRule(index: number, rule: string): boolean;
15
14
  deleteRule(index: number): void;
16
15
  getRule(index: number): string;
17
16
  } | {
18
- rules: string[];
17
+ element: HTMLStyleElement;
18
+ nodes: NodeListOf<Node>;
19
19
  length: number;
20
20
  insertRule(index: number, rule: string): boolean;
21
21
  deleteRule(index: number): void;
22
22
  getRule(index: number): string;
23
23
  };
24
24
  export declare const CSSOMTag: {
25
- new (target?: HTMLElement): {
25
+ new (target?: HTMLElement | undefined): {
26
26
  element: HTMLStyleElement;
27
27
  sheet: CSSStyleSheet;
28
28
  length: number;
@@ -33,7 +33,7 @@ export declare const CSSOMTag: {
33
33
  };
34
34
  /** A Tag that emulates the CSSStyleSheet API but uses text nodes */
35
35
  export declare const TextTag: {
36
- new (target?: HTMLElement): {
36
+ new (target?: HTMLElement | undefined): {
37
37
  element: HTMLStyleElement;
38
38
  nodes: NodeListOf<Node>;
39
39
  length: number;
@@ -44,7 +44,7 @@ export declare const TextTag: {
44
44
  };
45
45
  /** A completely virtual (server-side) Tag that doesn't manipulate the DOM */
46
46
  export declare const VirtualTag: {
47
- new (_target?: HTMLElement): {
47
+ new (_target?: HTMLElement | undefined): {
48
48
  rules: string[];
49
49
  length: number;
50
50
  insertRule(index: number, rule: string): boolean;
@@ -1,4 +1,4 @@
1
1
  /** Create a style element inside `target` or <head> after the last */
2
- export declare const makeStyleTag: (target?: HTMLElement) => HTMLStyleElement;
2
+ export declare const makeStyleTag: (target?: HTMLElement | undefined) => HTMLStyleElement;
3
3
  /** Get the CSSStyleSheet instance for a given style element */
4
4
  export declare const getSheet: (tag: HTMLStyleElement) => CSSStyleSheet;
@@ -16,7 +16,7 @@ export interface GroupedTag {
16
16
  }
17
17
  export type SheetOptions = {
18
18
  isServer: boolean;
19
- target?: HTMLElement;
19
+ target?: HTMLElement | undefined;
20
20
  useCSSOMInjection: boolean;
21
21
  };
22
22
  export interface Sheet {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=/*#__PURE__*/i(t),l=/*#__PURE__*/i(n),u=/*#__PURE__*/i(r),p=/*#__PURE__*/a(o),d=/*#__PURE__*/i(s),h="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",f="6.0.6-test.0",y="undefined"!=typeof window&&"HTMLElement"in window,m=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),v={},g=/invalid hook call/i,S=new Set,w=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];g.test(t)?(a=!1,S.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},n.useRef(),a&&!S.has(s)&&(console.warn(s),S.add(s))}catch(e){g.test(e.message)&&S.delete(s)}finally{console.error=i}}},_=Object.freeze([]),b=Object.freeze({});function E(e,t,n){return void 0===n&&(n=b),e.theme!==n.theme&&e.theme||t||n.theme}var N=new Set(["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","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","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),P=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,C=/(^-|-$)/g;function A(e){return e.replace(P,"-").replace(C,"")}var I=/(a)(d)/gi,O=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=O(t%52)+n;return(O(t%52)+n).replace(I,"$1-$2")}var D,T=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},R=function(e){return T(5381,e)};function j(e){return x(R(e)>>>0)}function k(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function V(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var M="function"==typeof Symbol&&Symbol.for,F=M?Symbol.for("react.memo"):60115,z=M?Symbol.for("react.forward_ref"):60112,$={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},B={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},L={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},G=((D={})[z]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},D[F]=L,D);function q(e){return("type"in(t=e)&&t.type.$$typeof)===F?L:"$$typeof"in e?G[e.$$typeof]:$;var t}var Y=Object.defineProperty,W=Object.getOwnPropertyNames,H=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,X=Object.prototype;function Z(e,t,n){if("string"!=typeof t){if(X){var r=J(t);r&&r!==X&&Z(e,r,n)}var o=W(t);H&&(o=o.concat(H(t)));for(var s=q(e),i=q(t),a=0;a<o.length;++a){var c=o[a];if(!(c in B||n&&n[c]||i&&c in i||s&&c in s)){var l=U(t,c);try{Y(e,c,l)}catch(e){}}}}return e}function K(e){return"function"==typeof e}function Q(e){return"object"==typeof e&&"styledComponentId"in e}function ee(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function te(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function ne(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function re(e,t,n){if(void 0===n&&(n=!1),!n&&!ne(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=re(e[r],t[r]);else if(ne(t))for(var r in t)e[r]=re(e[r],t[r]);return e}function oe(e,t){Object.defineProperty(e,"toString",{value:t})}var se="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",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",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function ie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function ae(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(ie.apply(void 0,e.__spreadArray([se[t]],n,!1)).trim())}var ce=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ae(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),le=new Map,ue=new Map,pe=1,de=function(e){if(le.has(e))return le.get(e);for(;ue.has(pe);)pe++;var t=pe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ae(16,"".concat(t));return le.set(e,t),ue.set(t,e),t},he=function(e,t){le.set(e,t),ue.set(t,e)},fe="style[".concat(h,"][").concat("data-styled-version",'="').concat(f,'"]'),ye=new RegExp("^".concat(h,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),me=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},ve=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ye);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(he(u,l),me(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function ge(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Se=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(h))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(h,"active"),r.setAttribute("data-styled-version",f);var i=ge();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},we=function(){function e(e){this.element=Se(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ae(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),_e=function(){function e(e){this.element=Se(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),be=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Ee=y,Ne={isServer:!y,useCSSOMInjection:!m},Pe=function(){function t(t,n,r){void 0===t&&(t=b),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},Ne),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&y&&Ee&&(Ee=!1,function(e){for(var t=document.querySelectorAll(fe),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(h)&&(ve(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),oe(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return ue.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(h,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return de(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new be(n):t?new we(n):new _e(n)}(this.options),new ce(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(de(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(de(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(de(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),Ce=/&/g,Ae=/^\s*\/\/.*$/gm;function Ie(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ie(e.children,t)),e})}function Oe(e){var t,n,r,o=void 0===e?b:e,s=o.options,i=void 0===s?b:s,a=o.plugins,c=void 0===a?_:a,l=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===p.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Ce,n).replace(r,l))}),i.prefix&&u.push(p.prefixer),u.push(p.stringify);var d=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(Ae,""),l=p.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(l=Ie(l,i.namespace));var d=[];return p.serialize(l,p.middleware(u.concat(p.rulesheet(function(e){return d.push(e)})))),d};return d.hash=c.length?c.reduce(function(e,t){return t.name||ae(15),T(e,t.name)},5381).toString():"",d}var xe=new Pe,De=Oe(),Te=l.default.createContext({shouldForwardProp:void 0,styleSheet:xe,stylis:De}),Re=Te.Consumer,je=l.default.createContext(void 0);function ke(){return n.useContext(Te)}function Ve(e){var t=n.useState(e.stylisPlugins),r=t[0],o=t[1],s=ke().styleSheet,i=n.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),a=n.useMemo(function(){return Oe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return n.useEffect(function(){u.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),l.default.createElement(Te.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:i,stylis:a}},l.default.createElement(je.Provider,{value:a},e.children))}var Me=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=De);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,oe(this,function(){throw ae(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=De),this.name+e.hash},e}(),Fe=function(e){return e>="A"&&e<="Z"};function ze(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Fe(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var $e=function(e){return null==e||!1===e||""===e},Be=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!$e(i)&&(Array.isArray(i)&&i.isCss||K(i)?o.push("".concat(ze(s),":"),i,";"):ne(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],Be(i),!1),["}"],!1)):o.push("".concat(ze(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in d.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function Le(e,t,n,r){if($e(e))return[];if(Q(e))return[".".concat(e.styledComponentId)];if(K(e)){if(!K(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Me||ne(o)||null===o||console.error("".concat(k(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Le(o,t,n,r)}var s;return e instanceof Me?n?(e.inject(n,r),[e.getName(r)]):[e]:ne(e)?Be(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Le(e,t,n,r)})):[e.toString()]}function Ge(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(K(n)&&!Q(n))return!1}return!0}var qe=R(f),Ye=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ge(e),this.componentId=t,this.baseHash=T(qe,t),this.baseStyle=n,Pe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ee(r,this.staticRulesId);else{var o=te(Le(this.rules,e,t,n)),s=x(T(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=ee(r,s),this.staticRulesId=s}else{for(var a=T(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=T(a,u));else if(u){var p=te(Le(u,e,t,n));a=T(a,p),c+=p}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=ee(r,d)}}return r},e}(),We=l.default.createContext(void 0),He=We.Consumer,Ue={},Je=new Set;function Xe(t,r,o){var s=Q(t),i=t,a=!V(t),u=r.attrs,p=void 0===u?_:u,d=r.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":A(e);Ue[n]=(Ue[n]||0)+1;var r="".concat(n,"-").concat(j(f+n+Ue[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):d,y=r.displayName,m=void 0===y?function(e){return V(e)?"styled.".concat(e):"Styled(".concat(k(e),")")}(t):y,v=r.displayName&&r.componentId?"".concat(A(r.displayName),"-").concat(r.componentId):r.componentId||h,g=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,S=r.shouldForwardProp;if(s&&i.shouldForwardProp){var P=i.shouldForwardProp;if(r.shouldForwardProp){var C=r.shouldForwardProp;S=function(e,t){return P(e,t)&&C(e,t)}}else S=P}var I=new Ye(o,v,s?i.componentStyle:void 0);function O(t,r){return function(t,r,o){var s=t.attrs,i=t.componentStyle,a=t.defaultProps,u=t.foldedComponentIds,p=t.styledComponentId,d=t.target,h=l.default.useContext(We),f=ke(),y=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&n.useDebugValue(p);var m=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=K(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?ee(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=ee(s.className,n.className)),s}(s,r,E(r,h,a)||b),v=m.as||d,g={};for(var S in m)void 0===m[S]||"$"===S[0]||"as"===S||"theme"===S||("forwardedAs"===S?g.as=m.forwardedAs:y&&!y(S,v)||(g[S]=m[S],y||"development"!==process.env.NODE_ENV||c.default(S)||Je.has(S)||!N.has(v)||(Je.add(S),console.warn('styled-components: it looks like an unknown prop "'.concat(S,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var w=function(e,t){var r=ke(),o=e.generateAndInjectStyles(t,r.styleSheet,r.stylis);return"production"!==process.env.NODE_ENV&&n.useDebugValue(o),o}(i,m);"production"!==process.env.NODE_ENV&&t.warnTooManyClasses&&t.warnTooManyClasses(w);var _=ee(u,p);return w&&(_+=" "+w),m.className&&(_+=" "+m.className),g[V(v)&&!N.has(v)?"class":"className"]=_,g.ref=o,n.createElement(v,g)}(x,t,r)}"production"!==process.env.NODE_ENV&&(O.displayName=m);var x=l.default.forwardRef(O);return x.attrs=g,x.componentStyle=I,x.shouldForwardProp=S,"production"!==process.env.NODE_ENV&&(x.displayName=m),x.foldedComponentIds=s?ee(i.foldedComponentIds,i.styledComponentId):"",x.styledComponentId=v,x.target=s?i.target:t,Object.defineProperty(x,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)re(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(w(m,v),x.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,v)),oe(x,function(){return".".concat(x.styledComponentId)}),a&&Z(x,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}function Ze(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var Ke=function(e){return Object.assign(e,{isCss:!0})};function Qe(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(K(t)||ne(t)){var o=t;return Ke(Le(Ze(_,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?Le(s):Ke(Le(Ze(s,n)))}function et(t,n,r){if(void 0===r&&(r=b),!n)throw ae(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,Qe.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return et(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return et(t,n,e.__assign(e.__assign({},r),o))},o}var tt=function(e){return et(Xe,e)},nt=tt;N.forEach(function(e){nt[e]=tt(e)});var rt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ge(e),Pe.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(te(Le(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Pe.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),ot=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ge(),r=te([n&&'nonce="'.concat(n,'"'),"".concat(h,'="true"'),"".concat("data-styled-version",'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ae(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ae(2);var r=((n={})[h]="",n["data-styled-version"]=f,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ge();return o&&(r.nonce=o),[l.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Pe({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ae(2);return l.default.createElement(Ve,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw ae(3)},t}(),st={StyleSheet:Pe,mainSheet:xe};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var it="__sc-".concat(h,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[it]||(window[it]=0),1===window[it]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[it]+=1),exports.ServerStyleSheet=ot,exports.StyleSheetConsumer=Re,exports.StyleSheetContext=Te,exports.StyleSheetManager=Ve,exports.ThemeConsumer=He,exports.ThemeContext=We,exports.ThemeProvider=function(t){var r=l.default.useContext(We),o=n.useMemo(function(){return function(t,n){if(!t)throw ae(14);if(K(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ae(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ae(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)},[t.theme,r]);return t.children?l.default.createElement(We.Provider,{value:o},t.children):null},exports.__PRIVATE__=st,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Qe.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(j(JSON.stringify(o))),i=new rt(o,s);"production"!==process.env.NODE_ENV&&w(s);var a=function(e){var t=ke(),n=l.default.useContext(We),r=l.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&l.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.styleSheet.server&&c(r,e,t.styleSheet,n,t.stylis),l.default.useLayoutEffect(function(){if(!t.styleSheet.server)return c(r,e,t.styleSheet,n,t.stylis),function(){return i.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function c(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,v,r,s);else{var c=e.__assign(e.__assign({},n),{theme:E(n,o,a.defaultProps)});i.renderStyles(t,c,r,s)}}return l.default.memo(a)},exports.css=Qe,exports.default=nt,exports.isStyledComponent=Q,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=te(Qe.apply(void 0,e.__spreadArray([t],n,!1))),s=j(o);return new Me(s,o)},exports.styled=nt,exports.useTheme=function(){var e=n.useContext(We);if(!e)throw ae(18);return e},exports.version=f,exports.withTheme=function(t){var n=l.default.forwardRef(function(n,r){var o=E(n,l.default.useContext(We),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(k(t),'"')),l.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return"production"!==process.env.NODE_ENV&&(n.displayName="WithTheme(".concat(k(t),")")),Z(n,t)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=/*#__PURE__*/i(t),l=/*#__PURE__*/i(n),u=/*#__PURE__*/i(r),p=/*#__PURE__*/a(o),d=/*#__PURE__*/i(s),h="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",f="undefined"!=typeof window&&"HTMLElement"in window,y=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),m={},v=/invalid hook call/i,g=new Set,S=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];v.test(t)?(a=!1,g.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},n.useRef(),a&&!g.has(s)&&(console.warn(s),g.add(s))}catch(e){v.test(e.message)&&g.delete(s)}finally{console.error=i}}},w=Object.freeze([]),_=Object.freeze({});function b(e,t,n){return void 0===n&&(n=_),e.theme!==n.theme&&e.theme||t||n.theme}var E=new Set(["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","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","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),N=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,P=/(^-|-$)/g;function C(e){return e.replace(N,"-").replace(P,"")}var A=/(a)(d)/gi,I=function(e){return String.fromCharCode(e+(e>25?39:97))};function O(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=I(t%52)+n;return(I(t%52)+n).replace(A,"$1-$2")}var x,D=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},T=function(e){return D(5381,e)};function R(e){return O(T(e)>>>0)}function j(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function k(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var V="function"==typeof Symbol&&Symbol.for,M=V?Symbol.for("react.memo"):60115,F=V?Symbol.for("react.forward_ref"):60112,z={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},B={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L=((x={})[F]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},x[M]=B,x);function G(e){return("type"in(t=e)&&t.type.$$typeof)===M?B:"$$typeof"in e?L[e.$$typeof]:z;var t}var q=Object.defineProperty,Y=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,U=Object.getPrototypeOf,J=Object.prototype;function X(e,t,n){if("string"!=typeof t){if(J){var r=U(t);r&&r!==J&&X(e,r,n)}var o=Y(t);W&&(o=o.concat(W(t)));for(var s=G(e),i=G(t),a=0;a<o.length;++a){var c=o[a];if(!(c in $||n&&n[c]||i&&c in i||s&&c in s)){var l=H(t,c);try{q(e,c,l)}catch(e){}}}}return e}function Z(e){return"function"==typeof e}function K(e){return"object"==typeof e&&"styledComponentId"in e}function Q(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ee(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function te(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ne(e,t,n){if(void 0===n&&(n=!1),!n&&!te(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ne(e[r],t[r]);else if(te(t))for(var r in t)e[r]=ne(e[r],t[r]);return e}function re(e,t){Object.defineProperty(e,"toString",{value:t})}var oe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",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",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function se(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function ie(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(se.apply(void 0,e.__spreadArray([oe[t]],n,!1)).trim())}var ae=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ie(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),ce=new Map,le=new Map,ue=1,pe=function(e){if(ce.has(e))return ce.get(e);for(;le.has(ue);)ue++;var t=ue++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ie(16,"".concat(t));return ce.set(e,t),le.set(t,e),t},de=function(e,t){ce.set(e,t),le.set(t,e)},he="style[".concat(h,"][").concat("data-styled-version",'="').concat("6.0.7",'"]'),fe=new RegExp("^".concat(h,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ye=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},me=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(fe);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(de(u,l),ye(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function ve(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ge=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(h,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(h,"active"),r.setAttribute("data-styled-version","6.0.7");var i=ve();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Se=function(){function e(e){this.element=ge(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ie(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),we=function(){function e(e){this.element=ge(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_e=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),be=f,Ee={isServer:!f,useCSSOMInjection:!y},Ne=function(){function t(t,n,r){void 0===t&&(t=_),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},Ee),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&f&&be&&(be=!1,function(e){for(var t=document.querySelectorAll(he),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(h)&&(me(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),re(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return le.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(h,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return pe(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new _e(n):t?new Se(n):new we(n)}(this.options),new ae(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(pe(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(pe(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(pe(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),Pe=/&/g,Ce=/^\s*\/\/.*$/gm;function Ae(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ae(e.children,t)),e})}function Ie(e){var t,n,r,o=void 0===e?_:e,s=o.options,i=void 0===s?_:s,a=o.plugins,c=void 0===a?w:a,l=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===p.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Pe,n).replace(r,l))}),i.prefix&&u.push(p.prefixer),u.push(p.stringify);var d=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(Ce,""),l=p.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(l=Ae(l,i.namespace));var d=[];return p.serialize(l,p.middleware(u.concat(p.rulesheet(function(e){return d.push(e)})))),d};return d.hash=c.length?c.reduce(function(e,t){return t.name||ie(15),D(e,t.name)},5381).toString():"",d}var Oe=new Ne,xe=Ie(),De=l.default.createContext({shouldForwardProp:void 0,styleSheet:Oe,stylis:xe}),Te=De.Consumer,Re=l.default.createContext(void 0);function je(){return n.useContext(De)}function ke(e){var t=n.useState(e.stylisPlugins),r=t[0],o=t[1],s=je().styleSheet,i=n.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),a=n.useMemo(function(){return Ie({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return n.useEffect(function(){u.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),l.default.createElement(De.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:i,stylis:a}},l.default.createElement(Re.Provider,{value:a},e.children))}var Ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=xe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,re(this,function(){throw ie(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=xe),this.name+e.hash},e}(),Me=function(e){return e>="A"&&e<="Z"};function Fe(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Me(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var ze=function(e){return null==e||!1===e||""===e},$e=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!ze(i)&&(Array.isArray(i)&&i.isCss||Z(i)?o.push("".concat(Fe(s),":"),i,";"):te(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],$e(i),!1),["}"],!1)):o.push("".concat(Fe(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in d.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function Be(e,t,n,r){if(ze(e))return[];if(K(e))return[".".concat(e.styledComponentId)];if(Z(e)){if(!Z(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Ve||te(o)||null===o||console.error("".concat(j(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Be(o,t,n,r)}var s;return e instanceof Ve?n?(e.inject(n,r),[e.getName(r)]):[e]:te(e)?$e(e):Array.isArray(e)?Array.prototype.concat.apply(w,e.map(function(e){return Be(e,t,n,r)})):[e.toString()]}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Z(n)&&!K(n))return!1}return!0}var Ge=T("6.0.7"),qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Le(e),this.componentId=t,this.baseHash=D(Ge,t),this.baseStyle=n,Ne.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Q(r,this.staticRulesId);else{var o=ee(Be(this.rules,e,t,n)),s=O(D(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=Q(r,s),this.staticRulesId=s}else{for(var a=D(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=D(a,u));else if(u){var p=ee(Be(u,e,t,n));a=D(a,p),c+=p}}if(c){var d=O(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=Q(r,d)}}return r},e}(),Ye=l.default.createContext(void 0),We=Ye.Consumer,He={},Ue=new Set;function Je(t,r,o){var s=K(t),i=t,a=!k(t),u=r.attrs,p=void 0===u?w:u,d=r.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":C(e);He[n]=(He[n]||0)+1;var r="".concat(n,"-").concat(R("6.0.7"+n+He[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):d,f=r.displayName,y=void 0===f?function(e){return k(e)?"styled.".concat(e):"Styled(".concat(j(e),")")}(t):f,m=r.displayName&&r.componentId?"".concat(C(r.displayName),"-").concat(r.componentId):r.componentId||h,v=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,g=r.shouldForwardProp;if(s&&i.shouldForwardProp){var N=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;g=function(e,t){return N(e,t)&&P(e,t)}}else g=N}var A=new qe(o,m,s?i.componentStyle:void 0);function I(t,r){return function(t,r,o){var s=t.attrs,i=t.componentStyle,a=t.defaultProps,u=t.foldedComponentIds,p=t.styledComponentId,d=t.target,h=l.default.useContext(Ye),f=je(),y=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&n.useDebugValue(p);var m=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=Z(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?Q(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=Q(s.className,n.className)),s}(s,r,b(r,h,a)||_),v=m.as||d,g={};for(var S in m)void 0===m[S]||"$"===S[0]||"as"===S||"theme"===S||("forwardedAs"===S?g.as=m.forwardedAs:y&&!y(S,v)||(g[S]=m[S],y||"development"!==process.env.NODE_ENV||c.default(S)||Ue.has(S)||!E.has(v)||(Ue.add(S),console.warn('styled-components: it looks like an unknown prop "'.concat(S,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var w=function(e,t){var r=je(),o=e.generateAndInjectStyles(t,r.styleSheet,r.stylis);return"production"!==process.env.NODE_ENV&&n.useDebugValue(o),o}(i,m);"production"!==process.env.NODE_ENV&&t.warnTooManyClasses&&t.warnTooManyClasses(w);var N=Q(u,p);return w&&(N+=" "+w),m.className&&(N+=" "+m.className),g[k(v)&&!E.has(v)?"class":"className"]=N,g.ref=o,n.createElement(v,g)}(O,t,r)}"production"!==process.env.NODE_ENV&&(I.displayName=y);var O=l.default.forwardRef(I);return O.attrs=v,O.componentStyle=A,O.shouldForwardProp=g,"production"!==process.env.NODE_ENV&&(O.displayName=y),O.foldedComponentIds=s?Q(i.foldedComponentIds,i.styledComponentId):"",O.styledComponentId=m,O.target=s?i.target:t,Object.defineProperty(O,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)ne(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(S(y,m),O.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(y,m)),re(O,function(){return".".concat(O.styledComponentId)}),a&&X(O,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),O}function Xe(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var Ze=function(e){return Object.assign(e,{isCss:!0})};function Ke(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(Z(t)||te(t)){var o=t;return Ze(Be(Xe(w,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?Be(s):Ze(Be(Xe(s,n)))}function Qe(t,n,r){if(void 0===r&&(r=_),!n)throw ie(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,Ke.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Qe(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Qe(t,n,e.__assign(e.__assign({},r),o))},o}var et=function(e){return Qe(Je,e)},tt=et;E.forEach(function(e){tt[e]=et(e)});var nt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Le(e),Ne.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(ee(Be(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Ne.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),rt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ve(),r=ee([n&&'nonce="'.concat(n,'"'),"".concat(h,'="true"'),"".concat("data-styled-version",'="').concat("6.0.7",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ie(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ie(2);var r=((n={})[h]="",n["data-styled-version"]="6.0.7",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ve();return o&&(r.nonce=o),[l.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Ne({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ie(2);return l.default.createElement(ke,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw ie(3)},t}(),ot={StyleSheet:Ne,mainSheet:Oe};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var st="__sc-".concat(h,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[st]||(window[st]=0),1===window[st]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[st]+=1),exports.ServerStyleSheet=rt,exports.StyleSheetConsumer=Te,exports.StyleSheetContext=De,exports.StyleSheetManager=ke,exports.ThemeConsumer=We,exports.ThemeContext=Ye,exports.ThemeProvider=function(t){var r=l.default.useContext(Ye),o=n.useMemo(function(){return function(t,n){if(!t)throw ie(14);if(Z(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ie(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ie(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)},[t.theme,r]);return t.children?l.default.createElement(Ye.Provider,{value:o},t.children):null},exports.__PRIVATE__=ot,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Ke.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(R(JSON.stringify(o))),i=new nt(o,s);"production"!==process.env.NODE_ENV&&S(s);var a=function(e){var t=je(),n=l.default.useContext(Ye),r=l.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&l.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.styleSheet.server&&c(r,e,t.styleSheet,n,t.stylis),l.default.useLayoutEffect(function(){if(!t.styleSheet.server)return c(r,e,t.styleSheet,n,t.stylis),function(){return i.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function c(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,m,r,s);else{var c=e.__assign(e.__assign({},n),{theme:b(n,o,a.defaultProps)});i.renderStyles(t,c,r,s)}}return l.default.memo(a)},exports.css=Ke,exports.default=tt,exports.isStyledComponent=K,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=ee(Ke.apply(void 0,e.__spreadArray([t],n,!1))),s=R(o);return new Ve(s,o)},exports.styled=tt,exports.useTheme=function(){var e=n.useContext(Ye);if(!e)throw ie(18);return e},exports.version="6.0.7",exports.withTheme=function(t){var n=l.default.forwardRef(function(n,r){var o=b(n,l.default.useContext(Ye),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(j(t),'"')),l.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return"production"!==process.env.NODE_ENV&&(n.displayName="WithTheme(".concat(j(t),")")),X(n,t)};
2
2
  //# sourceMappingURL=styled-components.browser.cjs.js.map