styled-components 6.4.0-prerelease.2 → 6.4.0-prerelease.3
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.
- package/dist/base.d.ts +2 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constructors/createTheme.d.ts +89 -0
- package/dist/models/ComponentStyle.d.ts +1 -4
- package/dist/sheet/Sheet.d.ts +2 -0
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +150 -17
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/native/dist/base.d.ts +2 -1
- package/native/dist/constants.d.ts +1 -0
- package/native/dist/constructors/createTheme.d.ts +89 -0
- package/native/dist/dist/base.d.ts +2 -1
- package/native/dist/dist/constants.d.ts +1 -0
- package/native/dist/dist/constructors/createTheme.d.ts +89 -0
- package/native/dist/dist/models/ComponentStyle.d.ts +1 -4
- package/native/dist/dist/sheet/Sheet.d.ts +2 -0
- package/native/dist/models/ComponentStyle.d.ts +1 -4
- package/native/dist/sheet/Sheet.d.ts +2 -0
- package/native/dist/sheet/Tag.d.ts +4 -4
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/package.json +4 -3
package/dist/base.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SC_VERSION } from './constants';
|
|
2
2
|
import createGlobalStyle from './constructors/createGlobalStyle';
|
|
3
|
+
import createTheme from './constructors/createTheme';
|
|
3
4
|
import css from './constructors/css';
|
|
4
5
|
import keyframes from './constructors/keyframes';
|
|
5
6
|
import withTheme from './hoc/withTheme';
|
|
@@ -9,4 +10,4 @@ import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from './models/T
|
|
|
9
10
|
import isStyledComponent from './utils/isStyledComponent';
|
|
10
11
|
export * from './secretInternals';
|
|
11
12
|
export { Attrs, DefaultTheme, Keyframes, ShouldForwardProp } from './types';
|
|
12
|
-
export { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };
|
|
13
|
+
export { IStyleSheetContext, IStyleSheetManager, IStylisContext, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, createGlobalStyle, createTheme, css, isStyledComponent, keyframes, useTheme, SC_VERSION as version, withTheme, };
|
package/dist/constants.d.ts
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import createGlobalStyle from './createGlobalStyle';
|
|
2
|
+
type ThemeLeaf = string | number;
|
|
3
|
+
/**
|
|
4
|
+
* Recursively maps a theme object so every leaf value becomes
|
|
5
|
+
* a `var(--sc-path, fallback)` CSS string.
|
|
6
|
+
*/
|
|
7
|
+
type CSSVarTheme<T> = {
|
|
8
|
+
[K in keyof T]: T[K] extends ThemeLeaf ? string : CSSVarTheme<T[K]>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The object returned by `createTheme`. Same shape as the input theme but
|
|
12
|
+
* every leaf is a CSS `var()` reference. Also carries a `GlobalStyle`
|
|
13
|
+
* component and the original `raw` theme object.
|
|
14
|
+
*/
|
|
15
|
+
type ThemeContract<T> = CSSVarTheme<T> & {
|
|
16
|
+
/**
|
|
17
|
+
* A `createGlobalStyle` component that emits `:root` CSS custom properties
|
|
18
|
+
* from the current ThemeProvider context. Mount this once at the root of
|
|
19
|
+
* your app so RSC components can consume theme values via CSS variables.
|
|
20
|
+
*/
|
|
21
|
+
GlobalStyle: ReturnType<typeof createGlobalStyle>;
|
|
22
|
+
/** The original theme object, for passing to `ThemeProvider`. */
|
|
23
|
+
raw: T;
|
|
24
|
+
/**
|
|
25
|
+
* Read the current resolved CSS variable values from the DOM and return
|
|
26
|
+
* an object with the same shape as the original theme. Each leaf is the
|
|
27
|
+
* computed value (e.g. `"#0070f3"`), not the `var()` reference.
|
|
28
|
+
*
|
|
29
|
+
* Optionally pass a target element to read scoped variables from
|
|
30
|
+
* (defaults to `document.documentElement`).
|
|
31
|
+
*
|
|
32
|
+
* Client-only — throws if called on the server.
|
|
33
|
+
*/
|
|
34
|
+
resolve(el?: Element): T;
|
|
35
|
+
};
|
|
36
|
+
interface CreateThemeOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Prefix for CSS variable names. Defaults to `"sc"`.
|
|
39
|
+
* Useful for isolation when multiple design systems or microfrontends
|
|
40
|
+
* coexist on the same page.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* createTheme(theme, { prefix: 'ds' })
|
|
44
|
+
* // → var(--ds-colors-primary, #0070f3)
|
|
45
|
+
*/
|
|
46
|
+
prefix?: string;
|
|
47
|
+
/**
|
|
48
|
+
* CSS selector for the variable declarations. Defaults to `":root"`.
|
|
49
|
+
* Use `":host"` for web components / Shadow DOM, or a class selector
|
|
50
|
+
* for scoped theming.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* createTheme(theme, { selector: ':host' })
|
|
54
|
+
* // → :host { --sc-colors-primary: #0070f3; }
|
|
55
|
+
*/
|
|
56
|
+
selector?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a theme contract that bridges `ThemeProvider` and CSS custom properties.
|
|
60
|
+
*
|
|
61
|
+
* Returns an object with the same shape as the input theme, but every leaf value
|
|
62
|
+
* is a `var(--prefix-*, fallback)` CSS string. Use these in styled component
|
|
63
|
+
* templates — they work in both client and RSC contexts.
|
|
64
|
+
*
|
|
65
|
+
* Mount the returned `GlobalStyle` component inside your `ThemeProvider` to emit
|
|
66
|
+
* the CSS variables. When the theme changes (e.g. light → dark), the variables
|
|
67
|
+
* update automatically.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* const theme = createTheme({
|
|
72
|
+
* colors: { primary: '#0070f3', text: '#111' },
|
|
73
|
+
* });
|
|
74
|
+
*
|
|
75
|
+
* // Root layout (client):
|
|
76
|
+
* <ThemeProvider theme={themes[preset]}>
|
|
77
|
+
* <theme.GlobalStyle />
|
|
78
|
+
* {children}
|
|
79
|
+
* </ThemeProvider>
|
|
80
|
+
*
|
|
81
|
+
* // Any RSC file:
|
|
82
|
+
* const Card = styled.div`
|
|
83
|
+
* color: ${theme.colors.primary};
|
|
84
|
+
* // → "var(--sc-colors-primary, #0070f3)"
|
|
85
|
+
* `;
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export default function createTheme<T extends Record<string, any>>(defaultTheme: T, options?: CreateThemeOptions): ThemeContract<T>;
|
|
89
|
+
export {};
|
|
@@ -11,8 +11,5 @@ export default class ComponentStyle {
|
|
|
11
11
|
rules: RuleSet<any>;
|
|
12
12
|
staticRulesId: string;
|
|
13
13
|
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle | undefined);
|
|
14
|
-
generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier):
|
|
15
|
-
className: string;
|
|
16
|
-
css: string;
|
|
17
|
-
};
|
|
14
|
+
generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): string;
|
|
18
15
|
}
|
package/dist/sheet/Sheet.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ type NamesAllocationMap = Map<string, Set<string>>;
|
|
|
13
13
|
/** Contains the main stylesheet logic for stringification and caching */
|
|
14
14
|
export default class StyleSheet implements Sheet {
|
|
15
15
|
gs: GlobalStylesAllocationMap;
|
|
16
|
+
/** Keyframe component IDs for efficient RSC rendering (avoids scanning all names) */
|
|
17
|
+
keyframeIds: Set<string>;
|
|
16
18
|
names: NamesAllocationMap;
|
|
17
19
|
options: SheetOptions;
|
|
18
20
|
server: boolean;
|
|
@@ -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("@emotion/unitless"),o=require("stylis");function s(e){return e&&e.__esModule?e:{default:e}}function i(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 a=/*#__PURE__*/s(t),c=/*#__PURE__*/s(n),u=/*#__PURE__*/s(r),l=/*#__PURE__*/i(o),d="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",p="active",h="data-styled-version",f="6.4.0-prerelease.2",m="/*!sc*/\n",y="undefined"!=typeof window&&"undefined"!=typeof document,v=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),g={},S="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 _(){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 w(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(_.apply(void 0,e.__spreadArray([S[t]],n,!1)).trim())}var b=1<<30,N=new Map,C=new Map,E=1,A=function(e){if(N.has(e))return N.get(e);for(;C.has(E);)E++;var t=E++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>b))throw w(16,"".concat(t));return N.set(e,t),C.set(t,e),t},P=function(e,t){E=t+1,N.set(e,t),C.set(t,e)},I=/invalid hook call/i,R=new Set,x=function(t,n){if("production"!==process.env.NODE_ENV){var r=n?' with the id of "'.concat(n,'"'):"",o="The component ".concat(t).concat(r," 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.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",s=console.error;try{var i=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];I.test(t)?(i=!1,R.delete(o)):s.apply(void 0,e.__spreadArray([t],n,!1))},"function"==typeof c.default.useState&&c.default.useState(null),i&&!R.has(o)&&(console.warn(o),R.add(o))}catch(e){I.test(e.message)&&R.delete(o)}finally{console.error=s}}},O=Object.freeze([]),D=Object.freeze({});function T(e,t,n){return void 0===n&&(n=D),e.theme!==n.theme&&e.theme||t||n.theme}var j=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),k=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,M=/(^-|-$)/g;function V(e){return e.replace(k,"-").replace(M,"")}var G=/(a)(d)/gi,F=function(e){return String.fromCharCode(e+(e>25?39:97))};function L(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=F(t%52)+n;return(F(t%52)+n).replace(G,"$1-$2")}var z,B=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},$=function(e){return B(5381,e)};function q(e){return L($(e)>>>0)}function Y(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function W(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var H="function"==typeof Symbol&&Symbol.for,U=H?Symbol.for("react.memo"):60115,J=H?Symbol.for("react.forward_ref"):60112,X={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},K={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Q=((z={})[J]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},z[U]=K,z);function ee(e){return("type"in(t=e)&&t.type.$$typeof)===U?K:"$$typeof"in e?Q[e.$$typeof]:X;var t}var te=Object.defineProperty,ne=Object.getOwnPropertyNames,re=Object.getOwnPropertySymbols,oe=Object.getOwnPropertyDescriptor,se=Object.getPrototypeOf,ie=Object.prototype;function ae(e,t,n){if("string"!=typeof t){if(ie){var r=se(t);r&&r!==ie&&ae(e,r,n)}var o=ne(t);re&&(o=o.concat(re(t)));for(var s=ee(e),i=ee(t),a=0;a<o.length;++a){var c=o[a];if(!(c in Z||n&&n[c]||i&&c in i||s&&c in s)){var u=oe(t,c);try{te(e,c,u)}catch(e){}}}}return e}function ce(e){return"function"==typeof e}function ue(e){return"object"==typeof e&&"styledComponentId"in e}function le(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function de(e,t){return e.join(t||"")}function pe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function he(e,t,n){if(void 0===n&&(n=!1),!n&&!pe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=he(e[r],t[r]);else if(pe(t))for(var r in t)e[r]=he(e[r],t[r]);return e}function fe(e,t){Object.defineProperty(e,"toString",{value:t})}var me=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,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 w(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=0,c=(s=0,t.length);s<c;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++,a++);a>0&&this._cGroup>e&&(this._cIndex+=a)},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);t>0&&this._cGroup>e&&(this._cIndex-=t)}},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+=this.tag.getRule(s)+m;return t},e}(),ye="style[".concat(d,"][").concat(h,'="').concat(f,'"]'),ve=new RegExp("^".concat(d,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ge=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},Se=function(e){if(!e)return document;if(ge(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(ge(t))return t}return document},_e=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)},we=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(m),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ve);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(P(l,u),_e(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},be=function(e){for(var t=Se(e.options.target).querySelectorAll(ye),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(d)!==p&&(we(e,o),o.parentNode&&o.parentNode.removeChild(o))}},Ne=!1;function Ce(){if(!1!==Ne)return Ne;if("undefined"!=typeof document){var e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Ne=e.nonce||e.getAttribute("content")||void 0;var t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Ne=t.getAttribute("content")||void 0}return Ne="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}var Ee=function(e,t){var n=document.head,r=e||n,o=document.createElement("style"),s=function(e){var t=Array.from(e.querySelectorAll("style[".concat(d,"]")));return t[t.length-1]}(r),i=void 0!==s?s.nextSibling:null;o.setAttribute(d,p),o.setAttribute(h,f);var a=t||Ce();return a&&o.setAttribute("nonce",a),r.insertBefore(o,i),o},Ae=function(){function e(e,t){this.element=Ee(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,r=0,o=n.length;r<o;r++){var s=n[r];if(s.ownerNode===e)return s}throw w(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}(),Pe=function(){function e(e,t){this.element=Ee(e,t),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}(),Ie=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):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}(),Re=y,xe={isServer:!y,useCSSOMInjection:!v},Oe=function(){function t(t,n,r){void 0===t&&(t=D),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},xe),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&y&&Re&&(Re=!1,be(this)),fe(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return C.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o);if(void 0===s||!s.size)return"continue";var i=t.getGroup(n);if(0===i.length)return"continue";var a=d+".g"+n+'[id="'+o+'"]',c="";s.forEach(function(e){e.length>0&&(c+=e+",")}),r+=i+a+'{content:"'+c+'"}'+m},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return A(e)},t.prototype.rehydrate=function(){!this.server&&y&&be(this)},t.prototype.reconstructWithOptions=function(n,r){void 0===r&&(r=!0);var o=new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0);return!this.server&&y&&n.target!==this.options.target&&Se(this.options.target)!==Se(n.target)&&be(o),o},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,r=e.nonce;return e.isServer?new Ie(n):t?new Ae(n,r):new Pe(n,r)}(this.options),new me(e)));var e},t.prototype.hasNameForId=function(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r},t.prototype.registerName=function(e,t){A(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(A(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(A(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}();function De(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in u.default||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Te=function(e){return e>="A"&&e<="Z"};function je(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Te(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var ke=Symbol.for("sc-keyframes");function Me(e){return"object"==typeof e&&null!==e&&ke in e}var Ve=function(e){return null==e||!1===e||""===e},Ge=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!Ve(o)&&(Array.isArray(o)&&o.isCss||ce(o)?n.push("".concat(je(r),":"),o,";"):pe(o)?n.push.apply(n,e.__spreadArray(e.__spreadArray(["".concat(r," {")],Ge(o),!1),["}"],!1)):n.push("".concat(je(r),": ").concat(De(r,o),";")))}return n};function Fe(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(Ve(e))return o;if(ue(e))return o.push(".".concat(e.styledComponentId)),o;if(ce(e)){if(!ce(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return o.push(e),o;var s=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof s||Array.isArray(s)||Me(s)||pe(s)||null===s||console.error("".concat(Y(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.")),Fe(s,t,n,r,o)}var i;if(Me(e))return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(pe(e)){for(var a=Ge(e),c=0;c<a.length;c++)o.push(a[c]);return o}if(!Array.isArray(e))return o.push(e.toString()),o;for(c=0;c<e.length;c++)Fe(e[c],t,n,r,o);return o}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ce(n)&&!ue(n))return!1}return!0}var ze=$(f),Be=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=B(ze,t),this.baseStyle=n,Oe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=le(r,this.staticRulesId);else{var o=de(Fe(this.rules,e,t,n)),s=L(B(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=le(r,s),this.staticRulesId=s}else{for(var a=B(this.baseHash,n.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l,"production"!==process.env.NODE_ENV&&(a=B(a,l));else if(l){var d=de(Fe(l,e,t,n));a=B(B(a,String(u)),d),c+=d}}if(c){var p=L(a>>>0);if(!t.hasNameForId(this.componentId,p)){var h=n(c,".".concat(p),void 0,this.componentId);t.insertRules(this.componentId,p,h)}r=le(r,p)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(A(this.componentId)):""}},e}(),$e=/&/g,qe=47,Ye=42;function We(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==r||o||i!==qe||e.charCodeAt(s+1)!==Ye)if(o)i===Ye&&e.charCodeAt(s+1)===qe&&(o=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,s++}return 0!==n||0!==r}function He(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=He(e.children,t)),e})}function Ue(e){var t,n,r,o=void 0===e?D:e,s=o.options,i=void 0===s?D:s,a=o.plugins,c=void 0===a?O:a,u=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},d=c.slice();d.push(function(e){e.type===l.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace($e,n).replace(r,u))}),i.prefix&&d.push(l.prefixer),d.push(l.stringify);var p=[],h=l.middleware(d.concat(l.rulesheet(function(e){return p.push(e)}))),f=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=void 0;var c=function(e){if(!We(e))return e;for(var t=e.length,n="",r=0,o=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==qe||e.charCodeAt(a+1)!==Ye)if(i)c===Ye&&e.charCodeAt(a+1)===qe&&(i=!1,a++);else if(34!==c&&39!==c||0!==a&&92===e.charCodeAt(a-1)){if(0===s)if(123===c)o++;else if(125===c){if(--o<0){for(var u=a+1;u<t;){var l=e.charCodeAt(u);if(59===l||10===l)break;u++}u<t&&59===e.charCodeAt(u)&&u++,o=0,a=u-1,r=u;continue}0===o&&(n+=e.substring(r,a+1),r=a+1)}else 59===c&&0===o&&(n+=e.substring(r,a+1),r=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(r<t){var d=e.substring(r);We(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=0,o=0,s=0,i=0;o<t;){var a=e.charCodeAt(o);if(34!==a&&39!==a||0!==o&&92===e.charCodeAt(o-1))if(0===s)if(a===qe&&o+1<t&&e.charCodeAt(o+1)===Ye){for(o+=2;o+1<t&&(e.charCodeAt(o)!==Ye||e.charCodeAt(o+1)!==qe);)o++;o+=2}else if(40===a&&o>=3&&108==(32|e.charCodeAt(o-1))&&114==(32|e.charCodeAt(o-2))&&117==(32|e.charCodeAt(o-3)))i=1,o++;else if(i>0)41===a?i--:40===a&&i++,o++;else if(a===Ye&&o+1<t&&e.charCodeAt(o+1)===qe)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===qe&&o+1<t&&e.charCodeAt(o+1)===qe){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===s?s=a:s===a&&(s=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(e)),u=l.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(u=He(u,i.namespace)),p=[],l.serialize(u,h),p};return f.hash=c.length?c.reduce(function(e,t){return t.name||w(15),B(e,t.name)},5381).toString():"",f}var Je=new Oe,Xe=Ue(),Ze=c.default.createContext({shouldForwardProp:void 0,styleSheet:Je,stylis:Xe}),Ke=Ze.Consumer,Qe=c.default.createContext(void 0);function et(){return c.default.useContext(Ze)}function tt(e){if(!c.default.useMemo)return e.children;var t=et().styleSheet,n=c.default.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target?n=n.reconstructWithOptions({target:e.target,nonce:e.nonce},!1):void 0!==e.nonce&&(n=n.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,t]),r=c.default.useMemo(function(){return Ue({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),o=c.default.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return c.default.createElement(Ze.Provider,{value:o},c.default.createElement(Qe.Provider,{value:r},e.children))}var nt=c.default.createContext(void 0),rt=nt.Consumer,ot={},st=new Set;function it(t,r,o){var s=ue(t),i=t,u=!W(t),l=r.attrs,d=void 0===l?O:l,p=r.componentId,h=void 0===p?function(e,t){var n="string"!=typeof e?"sc":V(e);ot[n]=(ot[n]||0)+1;var r="".concat(n,"-").concat(q(f+n+ot[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,m=r.displayName,y=void 0===m?function(e){return W(e)?"styled.".concat(e):"Styled(".concat(Y(e),")")}(t):m,v=r.displayName&&r.componentId?"".concat(V(r.displayName),"-").concat(r.componentId):r.componentId||h,g=s&&i.attrs?i.attrs.concat(d).filter(Boolean):d,S=r.shouldForwardProp;if(s&&i.shouldForwardProp){var _=i.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return _(e,t)&&w(e,t)}}else S=_}var b=new Be(o,v,s?i.componentStyle:void 0);function N(t,r){return function(t,r,o){var s=t.attrs,i=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,d=t.styledComponentId,p=t.target,h=c.default.useContext(nt),f=et(),m=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(d);var y=T(r,h,u)||D,v=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=ce(o=t[i])?o(e.__assign({},s)):o;for(var c in a)"className"===c?s.className=le(s.className,a[c]):"style"===c?s.style=e.__assign(e.__assign({},s.style),a[c]):c in n&&void 0===n[c]||(s[c]=a[c])}return"className"in n&&"string"==typeof n.className&&(s.className=le(s.className,n.className)),s}(s,r,y),g=v.as||p,S={};for(var _ in v)void 0===v[_]||"$"===_[0]||"as"===_||"theme"===_&&v.theme===y||("forwardedAs"===_?S.as=v.forwardedAs:m&&!m(_,g)||(S[_]=v[_],m||"development"!==process.env.NODE_ENV||a.default(_)||st.has(_)||!j.has(g)||(st.add(_),console.warn('styled-components: it looks like an unknown prop "'.concat(_,'" 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 n=et(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(r.className),r}(i,v),b=w.className;"production"!==process.env.NODE_ENV&&t.warnTooManyClasses&&t.warnTooManyClasses(b);var N=le(l,d);return b&&(N+=" "+b),v.className&&(N+=" "+v.className),S[W(g)&&!j.has(g)?"class":"className"]=N,o&&(S.ref=o),n.createElement(g,S)}(C,t,r)}N.displayName=y;var C=c.default.forwardRef(N);return C.attrs=g,C.componentStyle=b,C.displayName=y,C.shouldForwardProp=S,C.foldedComponentIds=s?le(i.foldedComponentIds,i.styledComponentId):"",C.styledComponentId=v,C.target=s?i.target:t,Object.defineProperty(C,"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++)he(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(x(y,v),C.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,v)),fe(C,function(){return".".concat(C.styledComponentId)}),u&&ae(C,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function at(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 ct=function(e){return Object.assign(e,{isCss:!0})};function ut(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ce(t)||pe(t))return ct(Fe(at(O,e.__spreadArray([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Fe(o):ct(Fe(at(o,n)))}function lt(t,n,r){if(void 0===r&&(r=D),!n)throw w(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,ut.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return lt(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return lt(t,n,e.__assign(e.__assign({},r),o))},o}var dt=function(e){return lt(it,e)},pt=dt;j.forEach(function(e){pt[e]=dt(e)});var ht,ft=function(){function e(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=Le(e),Oe.registerId(this.componentId)}return e.prototype.removeStyles=function(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)},e.prototype.renderStyles=function(e,t,n,r){var o=this.componentId;if(this.isStatic)if(n.hasNameForId(o,o+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{var s=this.computeRules(e,t,n,r);n.insertRules(o,s.name,s.rules)}else{var i=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&i){var a=i.rules,c=this.instanceRules.get(e).rules;if(a.length===c.length){for(var u=!0,l=0;l<a.length;l++)if(a[l]!==c[l]){u=!1;break}if(u)return}}this.rebuildGroup(n)}},e.prototype.computeRules=function(e,t,n,r){var o=de(Fe(this.rules,t,n,r)),s={name:this.componentId+e,rules:r(o,"")};return this.instanceRules.set(e,s),s},e.prototype.rebuildGroup=function(e){var t=this.componentId;e.clearRules(t),this.instanceRules.forEach(function(n){e.insertRules(t,n.name,n.rules)})},e}(),mt=function(){function e(e,t){var n=this;this[ht]=!0,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,A(this.id),fe(this,function(){throw w(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Xe),this.name+e.hash},e}();ht=ke;var yt=function(){function t(t){var n=(void 0===t?{}:t).nonce,r=this;this._emitSheetCSS=function(){var e=r.instance.toString();if(!e)return"";var t=r.instance.options.nonce||Ce(),n=de([t&&'nonce="'.concat(t,'"'),"".concat(d,'="true"'),"".concat(h,'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw w(2);return r._emitSheetCSS()},this.getStyleElement=function(){var t;if(r.sealed)throw w(2);var n=r.instance.toString();if(!n)return[];var o=((t={})[d]="",t[h]=f,t.dangerouslySetInnerHTML={__html:n},t),s=r.instance.options.nonce||Ce();return s&&(o.nonce=s),[c.default.createElement("style",e.__assign({},o,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new Oe({isServer:!0,nonce:n}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw w(2);return c.default.createElement(tt,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw w(3)},t}(),vt={StyleSheet:Oe,mainSheet:Je};"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 gt="__sc-".concat(d,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[gt]||(window[gt]=0),1===window[gt]&&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://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."),window[gt]+=1),exports.ServerStyleSheet=yt,exports.StyleSheetConsumer=Ke,exports.StyleSheetContext=Ze,exports.StyleSheetManager=tt,exports.ThemeConsumer=rt,exports.ThemeContext=nt,exports.ThemeProvider=function(t){var n=c.default.useContext(nt),r=c.default.useMemo(function(){return function(t,n){if(!t)throw w(14);if(ce(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw w(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw w(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,n)},[t.theme,n]);return t.children?c.default.createElement(nt.Provider,{value:r},t.children):null},exports.__PRIVATE__=vt,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=ut.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(q(JSON.stringify(o))),i=new ft(o,s);"production"!==process.env.NODE_ENV&&x(s);var a=function(e){var t,n=et(),r=c.default.useContext(nt),a=c.default.useRef(null);return null===a.current&&(a.current=n.styleSheet.allocateGSInstance(s)),t=a.current,"production"!==process.env.NODE_ENV&&c.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."),n.styleSheet.server&&u(t,e,n.styleSheet,r,n.stylis),c.default.useLayoutEffect(function(){return n.styleSheet.server||u(t,e,n.styleSheet,r,n.stylis),function(){i.removeStyles(t,n.styleSheet)}},[t,e,n.styleSheet,r,n.stylis]),n.styleSheet.server&&i.instanceRules.delete(t),null};function u(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,g,r,s);else{var c=e.__assign(e.__assign({},n),{theme:T(n,o,a.defaultProps)});i.renderStyles(t,c,r,s)}}return c.default.memo(a)},exports.css=ut,exports.default=pt,exports.isStyledComponent=ue,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=de(ut.apply(void 0,e.__spreadArray([t],n,!1))),s=q(o);return new mt(s,o)},exports.styled=pt,exports.useTheme=function(){var e=c.default.useContext(nt);if(!e)throw w(18);return e},exports.version=f,exports.withTheme=function(t){var n=c.default.forwardRef(function(n,r){var o=T(n,c.default.useContext(nt),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(Y(t),'"')),c.default.createElement(t,e.__assign(e.__assign({},n),{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(Y(t),")"),ae(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("@emotion/unitless"),o=require("stylis");function s(e){return e&&e.__esModule?e:{default:e}}function i(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 a=/*#__PURE__*/s(t),c=/*#__PURE__*/s(n),u=/*#__PURE__*/s(r),l=/*#__PURE__*/i(o),d="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",p="active",h="data-styled-version",f="6.4.0-prerelease.3",m="/*!sc*/\n",y="undefined"!=typeof window&&"undefined"!=typeof document,v=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),g="sc-keyframes-",S={},_="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 w(){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 b(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(w.apply(void 0,e.__spreadArray([_[t]],n,!1)).trim())}var E=1<<30,C=new Map,N=new Map,A=1,P=function(e){if(C.has(e))return C.get(e);for(;N.has(A);)A++;var t=A++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>E))throw b(16,"".concat(t));return C.set(e,t),N.set(t,e),t},I=function(e,t){A=t+1,C.set(e,t),N.set(t,e)},O=/invalid hook call/i,x=new Set,R=function(t,n){if("production"!==process.env.NODE_ENV){var r=n?' with the id of "'.concat(n,'"'):"",o="The component ".concat(t).concat(r," 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.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",s=console.error;try{var i=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];O.test(t)?(i=!1,x.delete(o)):s.apply(void 0,e.__spreadArray([t],n,!1))},"function"==typeof c.default.useState&&c.default.useState(null),i&&!x.has(o)&&(console.warn(o),x.add(o))}catch(e){O.test(e.message)&&x.delete(o)}finally{console.error=s}}},T=Object.freeze([]),D=Object.freeze({});function j(e,t,n){return void 0===n&&(n=D),e.theme!==n.theme&&e.theme||t||n.theme}var k=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),M=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,V=/(^-|-$)/g;function G(e){return e.replace(M,"-").replace(V,"")}var F=/(a)(d)/gi,L=function(e){return String.fromCharCode(e+(e>25?39:97))};function z(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=L(t%52)+n;return(L(t%52)+n).replace(F,"$1-$2")}var B,$=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},q=function(e){return $(5381,e)};function Y(e){return z(q(e)>>>0)}function W(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function H(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var U="function"==typeof Symbol&&Symbol.for,J=U?Symbol.for("react.memo"):60115,X=U?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},K={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ee=((B={})[X]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},B[J]=Q,B);function te(e){return("type"in(t=e)&&t.type.$$typeof)===J?Q:"$$typeof"in e?ee[e.$$typeof]:Z;var t}var ne=Object.defineProperty,re=Object.getOwnPropertyNames,oe=Object.getOwnPropertySymbols,se=Object.getOwnPropertyDescriptor,ie=Object.getPrototypeOf,ae=Object.prototype;function ce(e,t,n){if("string"!=typeof t){if(ae){var r=ie(t);r&&r!==ae&&ce(e,r,n)}var o=re(t);oe&&(o=o.concat(oe(t)));for(var s=te(e),i=te(t),a=0;a<o.length;++a){var c=o[a];if(!(c in K||n&&n[c]||i&&c in i||s&&c in s)){var u=se(t,c);try{ne(e,c,u)}catch(e){}}}}return e}function ue(e){return"function"==typeof e}function le(e){return"object"==typeof e&&"styledComponentId"in e}function de(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function pe(e,t){return e.join(t||"")}function he(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function fe(e,t,n){if(void 0===n&&(n=!1),!n&&!he(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=fe(e[r],t[r]);else if(he(t))for(var r in t)e[r]=fe(e[r],t[r]);return e}function me(e,t){Object.defineProperty(e,"toString",{value:t})}var ye=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,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 b(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=0,c=(s=0,t.length);s<c;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++,a++);a>0&&this._cGroup>e&&(this._cIndex+=a)},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);t>0&&this._cGroup>e&&(this._cIndex-=t)}},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+=this.tag.getRule(s)+m;return t},e}(),ve="style[".concat(d,"][").concat(h,'="').concat(f,'"]'),ge=new RegExp("^".concat(d,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Se=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},_e=function(e){if(!e)return document;if(Se(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(Se(t))return t}return document},we=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)},be=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(m),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ge);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(I(l,u),we(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},Ee=function(e){for(var t=_e(e.options.target).querySelectorAll(ve),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(d)!==p&&(be(e,o),o.parentNode&&o.parentNode.removeChild(o))}},Ce=!1;function Ne(){if(!1!==Ce)return Ce;if("undefined"!=typeof document){var e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Ce=e.nonce||e.getAttribute("content")||void 0;var t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Ce=t.getAttribute("content")||void 0}return Ce="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}var Ae=function(e,t){var n=document.head,r=e||n,o=document.createElement("style"),s=function(e){var t=Array.from(e.querySelectorAll("style[".concat(d,"]")));return t[t.length-1]}(r),i=void 0!==s?s.nextSibling:null;o.setAttribute(d,p),o.setAttribute(h,f);var a=t||Ne();return a&&o.setAttribute("nonce",a),r.insertBefore(o,i),o},Pe=function(){function e(e,t){this.element=Ae(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,r=0,o=n.length;r<o;r++){var s=n[r];if(s.ownerNode===e)return s}throw b(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}(),Ie=function(){function e(e,t){this.element=Ae(e,t),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}(),Oe=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):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}(),xe=y,Re={isServer:!y,useCSSOMInjection:!v},Te=function(){function t(t,n,r){void 0===t&&(t=D),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},Re),t),this.gs=n,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!t.isServer,!this.server&&y&&xe&&(xe=!1,Ee(this)),me(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return N.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o);if(void 0===s||!s.size)return"continue";var i=t.getGroup(n);if(0===i.length)return"continue";var a=d+".g"+n+'[id="'+o+'"]',c="";s.forEach(function(e){e.length>0&&(c+=e+",")}),r+=i+a+'{content:"'+c+'"}'+m},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return P(e)},t.prototype.rehydrate=function(){!this.server&&y&&Ee(this)},t.prototype.reconstructWithOptions=function(n,r){void 0===r&&(r=!0);var o=new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0);return o.keyframeIds=new Set(this.keyframeIds),!this.server&&y&&n.target!==this.options.target&&_e(this.options.target)!==_e(n.target)&&Ee(o),o},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,r=e.nonce;return e.isServer?new Oe(n):t?new Pe(n,r):new Ie(n,r)}(this.options),new ye(e)));var e},t.prototype.hasNameForId=function(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r},t.prototype.registerName=function(e,t){P(e),e.startsWith(g)&&this.keyframeIds.add(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(P(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(P(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}();function De(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in u.default||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var je=function(e){return e>="A"&&e<="Z"};function ke(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;je(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Me=Symbol.for("sc-keyframes");function Ve(e){return"object"==typeof e&&null!==e&&Me in e}var Ge=function(e){return null==e||!1===e||""===e},Fe=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!Ge(o)&&(Array.isArray(o)&&o.isCss||ue(o)?n.push("".concat(ke(r),":"),o,";"):he(o)?n.push.apply(n,e.__spreadArray(e.__spreadArray(["".concat(r," {")],Fe(o),!1),["}"],!1)):n.push("".concat(ke(r),": ").concat(De(r,o),";")))}return n};function Le(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(Ge(e))return o;if(le(e))return o.push(".".concat(e.styledComponentId)),o;if(ue(e)){if(!ue(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return o.push(e),o;var s=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof s||Array.isArray(s)||Ve(s)||he(s)||null===s||console.error("".concat(W(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(s,t,n,r,o)}var i;if(Ve(e))return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(he(e)){for(var a=Fe(e),c=0;c<a.length;c++)o.push(a[c]);return o}if(!Array.isArray(e))return o.push(e.toString()),o;for(c=0;c<e.length;c++)Le(e[c],t,n,r,o);return o}function ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ue(n)&&!le(n))return!1}return!0}var Be=q(f),$e=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&ze(e),this.componentId=t,this.baseHash=$(Be,t),this.baseStyle=n,Te.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=de(r,this.staticRulesId);else{var o=pe(Le(this.rules,e,t,n)),s=z($(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,"."+s,void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=de(r,s),this.staticRulesId=s}else{for(var a=$(this.baseHash,n.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l,"production"!==process.env.NODE_ENV&&(a=$(a,l));else if(l){var d=pe(Le(l,e,t,n));a=$($(a,String(u)),d),c+=d}}if(c){var p=z(a>>>0);if(!t.hasNameForId(this.componentId,p)){var h=n(c,"."+p,void 0,this.componentId);t.insertRules(this.componentId,p,h)}r=de(r,p)}}return r},e}(),qe=/&/g,Ye=47,We=42;function He(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==r||o||i!==Ye||e.charCodeAt(s+1)!==We)if(o)i===We&&e.charCodeAt(s+1)===Ye&&(o=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,s++}return 0!==n||0!==r}function Ue(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=Ue(e.children,t)),e})}function Je(e){var t,n,r,o=void 0===e?D:e,s=o.options,i=void 0===s?D:s,a=o.plugins,c=void 0===a?T:a,u=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},d=c.slice();d.push(function(e){e.type===l.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(qe,n).replace(r,u))}),i.prefix&&d.push(l.prefixer),d.push(l.stringify);var p=[],h=l.middleware(d.concat(l.rulesheet(function(e){return p.push(e)}))),f=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=void 0;var c=function(e){if(!He(e))return e;for(var t=e.length,n="",r=0,o=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==Ye||e.charCodeAt(a+1)!==We)if(i)c===We&&e.charCodeAt(a+1)===Ye&&(i=!1,a++);else if(34!==c&&39!==c||0!==a&&92===e.charCodeAt(a-1)){if(0===s)if(123===c)o++;else if(125===c){if(--o<0){for(var u=a+1;u<t;){var l=e.charCodeAt(u);if(59===l||10===l)break;u++}u<t&&59===e.charCodeAt(u)&&u++,o=0,a=u-1,r=u;continue}0===o&&(n+=e.substring(r,a+1),r=a+1)}else 59===c&&0===o&&(n+=e.substring(r,a+1),r=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(r<t){var d=e.substring(r);He(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=0,o=0,s=0,i=0;o<t;){var a=e.charCodeAt(o);if(34!==a&&39!==a||0!==o&&92===e.charCodeAt(o-1))if(0===s)if(a===Ye&&o+1<t&&e.charCodeAt(o+1)===We){for(o+=2;o+1<t&&(e.charCodeAt(o)!==We||e.charCodeAt(o+1)!==Ye);)o++;o+=2}else if(40===a&&o>=3&&108==(32|e.charCodeAt(o-1))&&114==(32|e.charCodeAt(o-2))&&117==(32|e.charCodeAt(o-3)))i=1,o++;else if(i>0)41===a?i--:40===a&&i++,o++;else if(a===We&&o+1<t&&e.charCodeAt(o+1)===Ye)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===Ye&&o+1<t&&e.charCodeAt(o+1)===Ye){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===s?s=a:s===a&&(s=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(e)),u=l.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(u=Ue(u,i.namespace)),p=[],l.serialize(u,h),p};return f.hash=c.length?c.reduce(function(e,t){return t.name||b(15),$(e,t.name)},5381).toString():"",f}var Xe=new Te,Ze=Je(),Ke=c.default.createContext({shouldForwardProp:void 0,styleSheet:Xe,stylis:Ze}),Qe=Ke.Consumer,et=c.default.createContext(void 0);function tt(){return c.default.useContext(Ke)}function nt(e){if(!c.default.useMemo)return e.children;var t=tt().styleSheet,n=c.default.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target?n=n.reconstructWithOptions({target:e.target,nonce:e.nonce},!1):void 0!==e.nonce&&(n=n.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,t]),r=c.default.useMemo(function(){return Je({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),o=c.default.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return c.default.createElement(Ke.Provider,{value:o},c.default.createElement(et.Provider,{value:r},e.children))}var rt=c.default.createContext(void 0),ot=rt.Consumer,st={},it=new Set;function at(t,r,o){var s=le(t),i=t,u=!H(t),l=r.attrs,d=void 0===l?T:l,p=r.componentId,h=void 0===p?function(e,t){var n="string"!=typeof e?"sc":G(e);st[n]=(st[n]||0)+1;var r="".concat(n,"-").concat(Y(f+n+st[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,m=r.displayName,y=void 0===m?function(e){return H(e)?"styled.".concat(e):"Styled(".concat(W(e),")")}(t):m,v=r.displayName&&r.componentId?"".concat(G(r.displayName),"-").concat(r.componentId):r.componentId||h,g=s&&i.attrs?i.attrs.concat(d).filter(Boolean):d,S=r.shouldForwardProp;if(s&&i.shouldForwardProp){var _=i.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return _(e,t)&&w(e,t)}}else S=_}var b=new $e(o,v,s?i.componentStyle:void 0);function E(t,r){return function(t,r,o){var s=t.attrs,i=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,d=t.styledComponentId,p=t.target,h=c.default.useContext(rt),f=tt(),m=t.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(d);var y=j(r,h,u)||D,v=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=ue(o=t[i])?o(e.__assign({},s)):o;for(var c in a)"className"===c?s.className=de(s.className,a[c]):"style"===c?s.style=e.__assign(e.__assign({},s.style),a[c]):c in n&&void 0===n[c]||(s[c]=a[c])}return"className"in n&&"string"==typeof n.className&&(s.className=de(s.className,n.className)),s}(s,r,y),g=v.as||p,S={};for(var _ in v)void 0===v[_]||"$"===_[0]||"as"===_||"theme"===_&&v.theme===y||("forwardedAs"===_?S.as=v.forwardedAs:m&&!m(_,g)||(S[_]=v[_],m||"development"!==process.env.NODE_ENV||a.default(_)||it.has(_)||!k.has(g)||(it.add(_),console.warn('styled-components: it looks like an unknown prop "'.concat(_,'" 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,n,r){var o=e.generateAndInjectStyles(t,n,r);return"production"!==process.env.NODE_ENV&&c.default.useDebugValue&&c.default.useDebugValue(o),o}(i,v,f.styleSheet,f.stylis);"production"!==process.env.NODE_ENV&&t.warnTooManyClasses&&t.warnTooManyClasses(w);var b=de(l,d);return w&&(b+=" "+w),v.className&&(b+=" "+v.className),S[H(g)&&!k.has(g)?"class":"className"]=b,o&&(S.ref=o),n.createElement(g,S)}(C,t,r)}E.displayName=y;var C=c.default.forwardRef(E);return C.attrs=g,C.componentStyle=b,C.displayName=y,C.shouldForwardProp=S,C.foldedComponentIds=s?de(i.foldedComponentIds,i.styledComponentId):"",C.styledComponentId=v,C.target=s?i.target:t,Object.defineProperty(C,"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++)fe(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(R(y,v),C.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,v)),me(C,function(){return".".concat(C.styledComponentId)}),u&&ce(C,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function ct(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 ut=function(e){return Object.assign(e,{isCss:!0})};function lt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ue(t)||he(t))return ut(Le(ct(T,e.__spreadArray([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Le(o):ut(Le(ct(o,n)))}function dt(t,n,r){if(void 0===r&&(r=D),!n)throw b(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,lt.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return dt(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return dt(t,n,e.__assign(e.__assign({},r),o))},o}var pt=function(e){return dt(at,e)},ht=pt;k.forEach(function(e){ht[e]=pt(e)});var ft,mt,yt=function(){function e(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=ze(e),Te.registerId(this.componentId)}return e.prototype.removeStyles=function(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)},e.prototype.renderStyles=function(e,t,n,r){var o=this.componentId;if(this.isStatic)if(n.hasNameForId(o,o+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{var s=this.computeRules(e,t,n,r);n.insertRules(o,s.name,s.rules)}else{var i=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&i){var a=i.rules,c=this.instanceRules.get(e).rules;if(a.length===c.length){for(var u=!0,l=0;l<a.length;l++)if(a[l]!==c[l]){u=!1;break}if(u)return}}this.rebuildGroup(n)}},e.prototype.computeRules=function(e,t,n,r){var o=pe(Le(this.rules,t,n,r)),s={name:this.componentId+e,rules:r(o,"")};return this.instanceRules.set(e,s),s},e.prototype.rebuildGroup=function(e){var t=this.componentId;e.clearRules(t),this.instanceRules.forEach(function(n){e.insertRules(t,n.name,n.rules)})},e}();function vt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=lt.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(Y(JSON.stringify(o))),i=new yt(o,s);"production"!==process.env.NODE_ENV&&R(s);var a=function(e){var t,n=tt(),r=c.default.useContext(rt),a=c.default.useRef(null);return null===a.current&&(a.current=n.styleSheet.allocateGSInstance(s)),t=a.current,"production"!==process.env.NODE_ENV&&c.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."),n.styleSheet.server&&u(t,e,n.styleSheet,r,n.stylis),c.default.useLayoutEffect(function(){return n.styleSheet.server||u(t,e,n.styleSheet,r,n.stylis),function(){i.removeStyles(t,n.styleSheet)}},i.isStatic?[t,n.styleSheet]:[t,e,n.styleSheet,r,n.stylis]),n.styleSheet.server&&i.instanceRules.delete(t),null};function u(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,S,r,s);else{var c=e.__assign(e.__assign({},n),{theme:j(n,o,a.defaultProps)});i.renderStyles(t,c,r,s)}}return c.default.memo(a)}function gt(e,t,n,r,o){for(var s in e){var i=e[s],a=o?o+"-"+s:s;if("object"==typeof i&&null!==i){var c={};gt(i,t,c,r,a),n[s]=c}else n[s]=r(a,i,s)}}function St(e,t,n,r){var o="";for(var s in e){var i=e[s],a=t[s],c=r?r+"-"+s:s;"object"==typeof i&&null!==i?"object"==typeof a&&null!==a&&(o+=St(i,a,n,c)):void 0!==a&&"function"!=typeof a&&(o+="--"+n+c+":"+a+";")}return o}var _t=function(){function e(e,t){var n=this;this[mt]=!0,this.inject=function(e,t){void 0===t&&(t=Ze);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=g+e,this.rules=t,P(this.id),me(this,function(){throw b(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Ze),this.name+e.hash},e}();mt=Me;var wt=function(){function t(t){var n=(void 0===t?{}:t).nonce,r=this;this._emitSheetCSS=function(){var e=r.instance.toString();if(!e)return"";var t=r.instance.options.nonce||Ne(),n=pe([t&&'nonce="'.concat(t,'"'),"".concat(d,'="true"'),"".concat(h,'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw b(2);return r._emitSheetCSS()},this.getStyleElement=function(){var t;if(r.sealed)throw b(2);var n=r.instance.toString();if(!n)return[];var o=((t={})[d]="",t[h]=f,t.dangerouslySetInnerHTML={__html:n},t),s=r.instance.options.nonce||Ne();return s&&(o.nonce=s),[c.default.createElement("style",e.__assign({},o,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new Te({isServer:!0,nonce:n}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw b(2);return c.default.createElement(nt,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw b(3)},t}(),bt={StyleSheet:Te,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 Et="__sc-".concat(d,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[Et]||(window[Et]=0),1===window[Et]&&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://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."),window[Et]+=1),exports.ServerStyleSheet=wt,exports.StyleSheetConsumer=Qe,exports.StyleSheetContext=Ke,exports.StyleSheetManager=nt,exports.ThemeConsumer=ot,exports.ThemeContext=rt,exports.ThemeProvider=function(t){var n=c.default.useContext(rt),r=c.default.useMemo(function(){return function(t,n){if(!t)throw b(14);if(ue(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw b(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw b(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,n)},[t.theme,n]);return t.children?c.default.createElement(rt.Provider,{value:r},t.children):null},exports.__PRIVATE__=bt,exports.createGlobalStyle=vt,exports.createTheme=function(t,n){var r,o,s,i,a=(null!==(r=null==n?void 0:n.prefix)&&void 0!==r?r:"sc")+"-",c=null!==(o=null==n?void 0:n.selector)&&void 0!==o?o:":root",u=(gt(t,s=a,i={},function(e,t){if("production"!==process.env.NODE_ENV){for(var n=String(t),r=0,o=0;o<n.length&&(40===n.charCodeAt(o)?r++:41===n.charCodeAt(o)&&r--,!(r<0));o++);0!==r&&console.warn('createTheme: value "'.concat(n,'" at "').concat(e,'" contains unbalanced parentheses and may break the var() fallback'))}return"var(--"+s+e+", "+t+")"}),i),l=vt(ft||(ft=e.__makeTemplateObject(["\n "," {\n ","\n }\n "],["\n "," {\n ","\n }\n "])),c,function(e){return St(t,e.theme,a)});return Object.assign(u,{GlobalStyle:l,raw:t,resolve:function(e){if(!y)throw new Error("createTheme.resolve() is client-only");var n=null!=e?e:document.documentElement;return function(e,t,n){var r={};return gt(e,t,r,function(e,r){return n.getPropertyValue("--"+t+e).trim()||r}),r}(t,a,getComputedStyle(n))}})},exports.css=lt,exports.default=ht,exports.isStyledComponent=le,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=pe(lt.apply(void 0,e.__spreadArray([t],n,!1))),s=Y(o);return new _t(s,o)},exports.styled=ht,exports.useTheme=function(){var e=c.default.useContext(rt);if(!e)throw b(18);return e},exports.version=f,exports.withTheme=function(t){var n=c.default.forwardRef(function(n,r){var o=j(n,c.default.useContext(rt),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(W(t),'"')),c.default.createElement(t,e.__assign(e.__assign({},n),{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(W(t),")"),ce(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|