styled-components 6.0.0-alpha.6 → 6.0.0-alpha.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.
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.js +1 -1
- 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/dist/tsconfig.tsbuildinfo +1 -1
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/is-prop-valid"),t=require("react"),n=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e),a=r(t),l=r(n),c=r(s);const u="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d="undefined"!=typeof window&&"HTMLElement"in window,h=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),p={},m=/invalid hook call/i,f=new Set,y=(e,n)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou 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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{m.test(t)?(e=!1,f.delete(o)):s(t,...n)},t.useRef(),e&&!f.has(o)&&(console.warn(o),f.add(o))}catch(e){m.test(e.message)&&f.delete(o)}finally{console.error=s}}},g=Object.freeze([]),S=Object.freeze({});function v(e,t,n=S){return e.theme!==n.theme&&e.theme||t||n.theme}var w=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const b=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function N(e){return e.replace(b,"-").replace(E,"")}const _=/(a)(d)/gi,C=e=>String.fromCharCode(e+(e>25?39:97));function $(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=C(t%52)+n;return(C(t%52)+n).replace(_,"$1-$2")}const P=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},A=e=>P(5381,e);function I(e){return $(A(e)>>>0)}function x(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function O(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function R(e){return O(e)?`styled.${e}`:`Styled(${x(e)})`}const D="function"==typeof Symbol&&Symbol.for,T=D?Symbol.for("react.memo"):60115,j=D?Symbol.for("react.forward_ref"):60112,k={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},V={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z={[j]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[T]:M};function B(e){return("type"in(t=e)&&t.type.$$typeof)===T?M:"$$typeof"in e?z[e.$$typeof]:k;var t}const L=Object.defineProperty,G=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,q=Object.getOwnPropertyDescriptor,Y=Object.getPrototypeOf,H=Object.prototype;function W(e,t,n){if("string"!=typeof t){if(H){const o=Y(t);o&&o!==H&&W(e,o,n)}let o=G(t);F&&(o=o.concat(F(t)));const s=B(e),r=B(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in V||n&&n[a]||r&&a in r||s&&a in s)){const n=q(t,a);try{L(e,a,n)}catch(e){}}}}return e}function U(e){return"object"==typeof e&&"styledComponentId"in e}function J(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function X(e,t,n=!1){if(!n&&!J(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=X(e[n],t[n]);else if(J(t))for(const n in t)e[n]=X(e[n],t[n]);return e}const Z="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"}:{};function K(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(Z[e],...t).trim())}let Q=new Map,ee=new Map,te=1;const ne=e=>{if(Q.has(e))return Q.get(e);for(;ee.has(te);)te++;const t=te++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw K(16,`${t}`);return Q.set(e,t),ee.set(t,e),t},oe=e=>ee.get(e),se=(e,t)=>{Q.set(e,t),ee.set(t,e)},re=`style[${u}][data-styled-version="6.0.0-alpha.6"]`,ie=new RegExp(`^${u}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ae=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},le=(e,t)=>{const n=(t.textContent??"").split("/*!sc*/\n"),o=[];for(let t=0,s=n.length;t<s;t++){const s=n[t].trim();if(!s)continue;const r=s.match(ie);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(se(n,t),ae(e,n,r[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(s)}};function ce(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}const ue=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(u))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(u,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.6");const i=ce();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o};let de=d;const he={isServer:!d,useCSSOMInjection:!h};class pe{gs;names;options;server;tag;static registerId(e){return ne(e)}constructor(e=S,t={},n){this.options={...he,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&d&&de&&(de=!1,(e=>{const t=document.querySelectorAll(re);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&"active"!==o.getAttribute(u)&&(le(e,o),o.parentNode&&o.parentNode.removeChild(o))}})(this))}reconstructWithOptions(e,t=!0){return new pe({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=ue(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw K(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=ue(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw K(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(ne(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(ne(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ne(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=oe(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${u}.g${s}[id="${n}"]`;let l="";void 0!==r&&r.forEach((e=>{e.length>0&&(l+=`${e},`)})),o+=`${i}${a}{content:"${l}"}/*!sc*/\n`}return o})(this)}}const me=/^\s*\/\/.*$/gm,fe=[":","[",".","#"];function ye({options:e=S,plugins:t=g}=S){let n,s,r,i;const a=(e,t,o)=>0===t&&fe.includes(o[s.length])||o.match(i)?e:`.${n}`,l=e=>{if(e.type===o.RULESET&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(r,a)}},c=(a,c="",u="",d="&")=>{let h=a.replace(me,"");n=d,s=c,r=new RegExp(`\\${s}\\b`,"g"),i=new RegExp(`(\\${s}\\b){2,}`);const p=t.slice();return(e.prefix||void 0===e.prefix)&&p.unshift(o.prefixer),p.push(l,o.stringify),o.serialize(o.compile(u||c?`${u} ${c} { ${h} }`:h),o.middleware(p))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||K(15),P(e,t.name))),5381).toString():"",c}const ge=a.default.createContext(void 0),Se=ge.Consumer,ve=a.default.createContext(void 0);ve.Consumer;const we=new pe,be=ye();function Ee(){return t.useContext(ge)||we}function Ne(){return t.useContext(ve)||be}function _e(e){const[n,o]=t.useState(e.stylisPlugins),s=Ee(),r=t.useMemo((()=>{let 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]),i=t.useMemo((()=>ye({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return t.useEffect((()=>{l.default(n,e.stylisPlugins)||o(e.stylisPlugins)}),[e.stylisPlugins]),a.default.createElement(ge.Provider,{value:r},a.default.createElement(ve.Provider,{value:i},"production"!==process.env.NODE_ENV?a.default.Children.only(e.children):e.children))}class Ce{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=be)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw K(12,String(this.name))};getName(e=be){return this.name+e.hash}}const $e=/([A-Z])/,Pe=/([A-Z])/g,Ae=/^ms-/,Ie=e=>`-${e.toLowerCase()}`;function xe(e){return $e.test(e)?e.replace(Pe,Ie).replace(Ae,"-ms-"):e}function Oe(e){return"function"==typeof e}const Re=e=>null==e||!1===e||""===e,De=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!Re(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Oe(e[t])?n.push(`${xe(t)}:`,e[t],";"):J(e[t])?n.push(...De(e[t],t)):n.push(`${xe(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in c.default?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function Te(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Te(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(Re(e))return"";if(U(e))return`.${e.styledComponentId}`;if(Oe(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Ce||J(r)||console.error(`${x(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.`),Te(r,t,n,o)}}var s;return e instanceof Ce?n?(e.inject(n,o),e.getName(o)):e:J(e)?De(e):e.toString()}function je(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Oe(n)&&!U(n))return!1}return!0}const ke=A("6.0.0-alpha.6");class Ve{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&je(e),this.componentId=t,this.baseHash=P(ke,t),this.baseStyle=n,pe.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=Te(this.rules,e,t,n).join(""),i=$(P(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=P(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=P(i,s+o));else if(s){const r=Te(s,e,t,n),l=Array.isArray(r)?r.join(""):r;i=P(i,l+o),a+=l}}if(a){const e=$(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const Me=a.default.createContext(void 0),ze=Me.Consumer,Be={};function Le(e,t){const n="string"!=typeof e?"sc":N(e);Be[n]=(Be[n]||0)+1;const o=`${n}-${I("6.0.0-alpha.6"+n+Be[n])}`;return t?`${t}-${o}`:o}function Ge(e,n,o){const s=U(e),r=e,l=!O(e),{attrs:c=g,componentId:u=Le(n.displayName,n.parentComponentId),displayName:d=R(e)}=n,h=n.displayName&&n.componentId?`${N(n.displayName)}-${n.componentId}`:n.componentId||u,p=s&&r.attrs?r.attrs.concat(c).filter(Boolean):c;let{shouldForwardProp:m}=n;if(s&&r.shouldForwardProp){const e=r.shouldForwardProp;if(n.shouldForwardProp){const t=n.shouldForwardProp;m=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else m=e}const f=new Ve(o,h,s?r.componentStyle:void 0),b=f.isStatic&&0===c.length;function E(e,n){return function(e,n,o,s){const{attrs:r,componentStyle:a,defaultProps:l,foldedComponentIds:c,shouldForwardProp:u,styledComponentId:d,target:h}=e;"production"!==process.env.NODE_ENV&&t.useDebugValue(d);const p=v(n,t.useContext(Me),l),[m,f]=function(e=S,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(p||S,n,r),y=function(e,n,o,s){const r=Ee(),i=Ne(),a=n?e.generateAndInjectStyles(S,r,i):e.generateAndInjectStyles(o,r,i);return"production"!==process.env.NODE_ENV&&t.useDebugValue(a),"production"!==process.env.NODE_ENV&&!n&&s&&s(a),a}(a,s,m,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,b=f.$as||n.$as||f.as||n.as||h,E=O(b),N=f!==n?{...n,...f}:n,_={};for(const e in N)"$"!==e[0]&&"as"!==e&&("forwardedAs"===e?_.as=N[e]:(u?u(e,i.default,b):!E||i.default(e))&&(_[e]=N[e]));return n.style&&f.style!==n.style&&(_.style={...n.style,...f.style}),_[E&&-1===w.indexOf(b)?"class":"className"]=c.concat(d,y!==d?y:null,n.className,f.className).filter(Boolean).join(" "),_.ref=g,t.createElement(b,_)}(_,e,n,b)}E.displayName=d;let _=a.default.forwardRef(E);return _.attrs=p,_.componentStyle=f,_.displayName=d,_.shouldForwardProp=m,_.foldedComponentIds=s?r.foldedComponentIds.concat(r.styledComponentId):g,_.styledComponentId=h,_.target=s?r.target:e,_.withComponent=function(e){const{componentId:t,...s}=n,r=t&&`${t}-${O(e)?e:N(x(e))}`;return Ge(e,{...s,attrs:p,componentId:r},o)},Object.defineProperty(_,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=s?function(e={},...t){for(const n of t)X(e,n,!0);return e}({},r.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(y(d,h),_.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\nConsider 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 />`),o=!0,n={}}}})(d,h)),_.toString=()=>`.${_.styledComponentId}`,l&&W(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_}function Fe(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const qe=e=>(Array.isArray(e)&&(e.isCss=!0),e);function Ye(e,...t){if(Oe(e)||J(e))return qe(Te(Fe(g,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:qe(Te(Fe(n,t)))}function He(e,t,n=S){if(!t)throw K(1,t);const o=(o,...s)=>e(t,n,Ye(o,...s));return o.attrs=o=>He(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>He(e,t,{...n,...o}),o}const We=e=>He(Ge,e),Ue=We;w.forEach((e=>{Ue[e]=We(e)}));class Je{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=je(e),pe.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(Te(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&pe.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}const Xe={StyleSheet:pe,mainSheet:we};"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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||=0,1===window["__styled-components-init__"]&&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["__styled-components-init__"]+=1),exports.ServerStyleSheet=class{instance;sealed;constructor(){this.instance=new pe({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=ce();return`<style ${[t&&`nonce="${t}"`,`${u}="true"`,'data-styled-version="6.0.0-alpha.6"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw K(2);return a.default.createElement(_e,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw K(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw K(2);const e={[u]:"","data-styled-version":"6.0.0-alpha.6",dangerouslySetInnerHTML:{__html:this.instance.toString()}},t=ce();return t&&(e.nonce=t),[a.default.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){throw K(3)}seal=()=>{this.sealed=!0}},exports.StyleSheetConsumer=Se,exports.StyleSheetContext=ge,exports.StyleSheetManager=_e,exports.ThemeConsumer=ze,exports.ThemeContext=Me,exports.ThemeProvider=function(e){const n=t.useContext(Me),o=t.useMemo((()=>function(e,t){if(!e)throw K(14);if(Oe(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw K(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw K(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?a.default.createElement(Me.Provider,{value:o},e.children):null},exports.__PRIVATE__=Xe,exports.createGlobalStyle=function(e,...t){const n=Ye(e,...t),o=`sc-global-${I(JSON.stringify(n))}`,s=new Je(n,o);"production"!==process.env.NODE_ENV&&y(o);const r=e=>{const t=Ee(),r=Ne(),l=a.default.useContext(Me),c=a.default.useRef(t.allocateGSInstance(o)).current;return"production"!==process.env.NODE_ENV&&a.default.Children.count(e.children)&&console.warn(`The global style component ${o} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&n.some((e=>"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.server&&i(c,e,t,l,r),(a.default.useInsertionEffect||a.default.useLayoutEffect)((()=>{if(!t.server)return i(c,e,t,l,r),()=>s.removeStyles(c,t)}),[c,e,t,l,r]),null};function i(e,t,n,o,i){if(s.isStatic)s.renderStyles(e,p,n,i);else{const a={...t,theme:v(t,o,r.defaultProps)};s.renderStyles(e,a,n,i)}}return a.default.memo(r)},exports.css=Ye,exports.default=Ue,exports.isStyledComponent=U,exports.keyframes=function(e,...t){"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.");const n=Ye(e,...t).join(""),o=I(n);return new Ce(o,n)},exports.useTheme=()=>t.useContext(Me),exports.version="6.0.0-alpha.6",exports.withTheme=function(e){const t=a.default.forwardRef(((t,n)=>{const o=v(t,a.default.useContext(Me),e.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 "${x(e)}"`),a.default.createElement(e,{...t,theme:o,ref:n})}));return t.displayName=`WithTheme(${x(e)})`,W(t,e)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/is-prop-valid"),t=require("react"),n=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e),a=r(t),l=r(n),c=r(s);const u="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d="undefined"!=typeof window&&"HTMLElement"in window,h=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),p={},m=/invalid hook call/i,f=new Set,y=(e,n)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou 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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{m.test(t)?(e=!1,f.delete(o)):s(t,...n)},t.useRef(),e&&!f.has(o)&&(console.warn(o),f.add(o))}catch(e){m.test(e.message)&&f.delete(o)}finally{console.error=s}}},g=Object.freeze([]),S=Object.freeze({});function v(e,t,n=S){return e.theme!==n.theme&&e.theme||t||n.theme}var w=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const b=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function N(e){return e.replace(b,"-").replace(E,"")}const _=/(a)(d)/gi,C=e=>String.fromCharCode(e+(e>25?39:97));function $(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=C(t%52)+n;return(C(t%52)+n).replace(_,"$1-$2")}const P=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},A=e=>P(5381,e);function I(e){return $(A(e)>>>0)}function x(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function O(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function R(e){return O(e)?`styled.${e}`:`Styled(${x(e)})`}const D="function"==typeof Symbol&&Symbol.for,T=D?Symbol.for("react.memo"):60115,j=D?Symbol.for("react.forward_ref"):60112,k={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},V={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z={[j]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[T]:M};function B(e){return("type"in(t=e)&&t.type.$$typeof)===T?M:"$$typeof"in e?z[e.$$typeof]:k;var t}const L=Object.defineProperty,G=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,q=Object.getOwnPropertyDescriptor,Y=Object.getPrototypeOf,H=Object.prototype;function W(e,t,n){if("string"!=typeof t){if(H){const o=Y(t);o&&o!==H&&W(e,o,n)}let o=G(t);F&&(o=o.concat(F(t)));const s=B(e),r=B(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in V||n&&n[a]||r&&a in r||s&&a in s)){const n=q(t,a);try{L(e,a,n)}catch(e){}}}}return e}function U(e){return"object"==typeof e&&"styledComponentId"in e}function J(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function X(e,t,n=!1){if(!n&&!J(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=X(e[n],t[n]);else if(J(t))for(const n in t)e[n]=X(e[n],t[n]);return e}const Z="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"}:{};function K(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(Z[e],...t).trim())}let Q=new Map,ee=new Map,te=1;const ne=e=>{if(Q.has(e))return Q.get(e);for(;ee.has(te);)te++;const t=te++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw K(16,`${t}`);return Q.set(e,t),ee.set(t,e),t},oe=e=>ee.get(e),se=(e,t)=>{Q.set(e,t),ee.set(t,e)},re=`style[${u}][data-styled-version="6.0.0-alpha.7"]`,ie=new RegExp(`^${u}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ae=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},le=(e,t)=>{const n=(t.textContent??"").split("/*!sc*/\n"),o=[];for(let t=0,s=n.length;t<s;t++){const s=n[t].trim();if(!s)continue;const r=s.match(ie);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(se(n,t),ae(e,n,r[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(s)}};function ce(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}const ue=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(u))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(u,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.7");const i=ce();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o};let de=d;const he={isServer:!d,useCSSOMInjection:!h};class pe{gs;names;options;server;tag;static registerId(e){return ne(e)}constructor(e=S,t={},n){this.options={...he,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&d&&de&&(de=!1,(e=>{const t=document.querySelectorAll(re);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&"active"!==o.getAttribute(u)&&(le(e,o),o.parentNode&&o.parentNode.removeChild(o))}})(this))}reconstructWithOptions(e,t=!0){return new pe({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=ue(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw K(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=ue(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw K(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(ne(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(ne(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ne(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=oe(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${u}.g${s}[id="${n}"]`;let l="";void 0!==r&&r.forEach((e=>{e.length>0&&(l+=`${e},`)})),o+=`${i}${a}{content:"${l}"}/*!sc*/\n`}return o})(this)}}const me=/^\s*\/\/.*$/gm,fe=[":","[",".","#"];function ye({options:e=S,plugins:t=g}=S){let n,s,r,i;const a=(e,t,o)=>0===t&&fe.includes(o[s.length])||o.match(i)?e:`.${n}`,l=e=>{if(e.type===o.RULESET&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(r,a)}},c=(a,c="",u="",d="&")=>{let h=a.replace(me,"");n=d,s=c,r=new RegExp(`\\${s}\\b`,"g"),i=new RegExp(`(\\${s}\\b){2,}`);const p=t.slice();return(e.prefix||void 0===e.prefix)&&p.unshift(o.prefixer),p.push(l,o.stringify),o.serialize(o.compile(u||c?`${u} ${c} { ${h} }`:h),o.middleware(p))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||K(15),P(e,t.name))),5381).toString():"",c}const ge=a.default.createContext(void 0),Se=ge.Consumer,ve=a.default.createContext(void 0);ve.Consumer;const we=new pe,be=ye();function Ee(){return t.useContext(ge)||we}function Ne(){return t.useContext(ve)||be}function _e(e){const[n,o]=t.useState(e.stylisPlugins),s=Ee(),r=t.useMemo((()=>{let 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]),i=t.useMemo((()=>ye({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return t.useEffect((()=>{l.default(n,e.stylisPlugins)||o(e.stylisPlugins)}),[e.stylisPlugins]),a.default.createElement(ge.Provider,{value:r},a.default.createElement(ve.Provider,{value:i},"production"!==process.env.NODE_ENV?a.default.Children.only(e.children):e.children))}class Ce{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=be)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw K(12,String(this.name))};getName(e=be){return this.name+e.hash}}const $e=/([A-Z])/,Pe=/([A-Z])/g,Ae=/^ms-/,Ie=e=>`-${e.toLowerCase()}`;function xe(e){return $e.test(e)?e.replace(Pe,Ie).replace(Ae,"-ms-"):e}function Oe(e){return"function"==typeof e}const Re=e=>null==e||!1===e||""===e,De=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!Re(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Oe(e[t])?n.push(`${xe(t)}:`,e[t],";"):J(e[t])?n.push(...De(e[t],t)):n.push(`${xe(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in c.default?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function Te(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Te(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(Re(e))return"";if(U(e))return`.${e.styledComponentId}`;if(Oe(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Ce||J(r)||console.error(`${x(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.`),Te(r,t,n,o)}}var s;return e instanceof Ce?n?(e.inject(n,o),e.getName(o)):e:J(e)?De(e):e.toString()}function je(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Oe(n)&&!U(n))return!1}return!0}const ke=A("6.0.0-alpha.7");class Ve{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&je(e),this.componentId=t,this.baseHash=P(ke,t),this.baseStyle=n,pe.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=Te(this.rules,e,t,n).join(""),i=$(P(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=P(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=P(i,s+o));else if(s){const r=Te(s,e,t,n),l=Array.isArray(r)?r.join(""):r;i=P(i,l+o),a+=l}}if(a){const e=$(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const Me=a.default.createContext(void 0),ze=Me.Consumer,Be={};function Le(e,t){const n="string"!=typeof e?"sc":N(e);Be[n]=(Be[n]||0)+1;const o=`${n}-${I("6.0.0-alpha.7"+n+Be[n])}`;return t?`${t}-${o}`:o}function Ge(e,n,o){const s=U(e),r=e,l=!O(e),{attrs:c=g,componentId:u=Le(n.displayName,n.parentComponentId),displayName:d=R(e)}=n,h=n.displayName&&n.componentId?`${N(n.displayName)}-${n.componentId}`:n.componentId||u,p=s&&r.attrs?r.attrs.concat(c).filter(Boolean):c;let{shouldForwardProp:m}=n;if(s&&r.shouldForwardProp){const e=r.shouldForwardProp;if(n.shouldForwardProp){const t=n.shouldForwardProp;m=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else m=e}const f=new Ve(o,h,s?r.componentStyle:void 0),b=f.isStatic&&0===c.length;function E(e,n){return function(e,n,o,s){const{attrs:r,componentStyle:a,defaultProps:l,foldedComponentIds:c,shouldForwardProp:u,styledComponentId:d,target:h}=e;"production"!==process.env.NODE_ENV&&t.useDebugValue(d);const p=v(n,t.useContext(Me),l),[m,f]=function(e=S,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(p||S,n,r),y=function(e,n,o,s){const r=Ee(),i=Ne(),a=n?e.generateAndInjectStyles(S,r,i):e.generateAndInjectStyles(o,r,i);return"production"!==process.env.NODE_ENV&&t.useDebugValue(a),"production"!==process.env.NODE_ENV&&!n&&s&&s(a),a}(a,s,m,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,b=f.$as||n.$as||f.as||n.as||h,E=O(b),N=f!==n?{...n,...f}:n,_={};for(const e in N)"$"!==e[0]&&"as"!==e&&("forwardedAs"===e?_.as=N[e]:(u?u(e,i.default,b):!E||i.default(e))&&(_[e]=N[e]));return n.style&&f.style!==n.style&&(_.style={...n.style,...f.style}),_[E&&-1===w.indexOf(b)?"class":"className"]=c.concat(d,y!==d?y:null,n.className,f.className).filter(Boolean).join(" "),_.ref=g,t.createElement(b,_)}(_,e,n,b)}E.displayName=d;let _=a.default.forwardRef(E);return _.attrs=p,_.componentStyle=f,_.displayName=d,_.shouldForwardProp=m,_.foldedComponentIds=s?r.foldedComponentIds.concat(r.styledComponentId):g,_.styledComponentId=h,_.target=s?r.target:e,_.withComponent=function(e){const{componentId:t,...s}=n,r=t&&`${t}-${O(e)?e:N(x(e))}`;return Ge(e,{...s,attrs:p,componentId:r},o)},Object.defineProperty(_,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=s?function(e={},...t){for(const n of t)X(e,n,!0);return e}({},r.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(y(d,h),_.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\nConsider 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 />`),o=!0,n={}}}})(d,h)),_.toString=()=>`.${_.styledComponentId}`,l&&W(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_}function Fe(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const qe=e=>(Array.isArray(e)&&(e.isCss=!0),e);function Ye(e,...t){if(Oe(e)||J(e))return qe(Te(Fe(g,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:qe(Te(Fe(n,t)))}function He(e,t,n=S){if(!t)throw K(1,t);const o=(o,...s)=>e(t,n,Ye(o,...s));return o.attrs=o=>He(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>He(e,t,{...n,...o}),o}const We=e=>He(Ge,e),Ue=We;w.forEach((e=>{Ue[e]=We(e)}));class Je{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=je(e),pe.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(Te(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&pe.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}const Xe={StyleSheet:pe,mainSheet:we};"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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||=0,1===window["__styled-components-init__"]&&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["__styled-components-init__"]+=1),exports.ServerStyleSheet=class{instance;sealed;constructor(){this.instance=new pe({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=ce();return`<style ${[t&&`nonce="${t}"`,`${u}="true"`,'data-styled-version="6.0.0-alpha.7"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw K(2);return a.default.createElement(_e,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw K(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw K(2);const e={[u]:"","data-styled-version":"6.0.0-alpha.7",dangerouslySetInnerHTML:{__html:this.instance.toString()}},t=ce();return t&&(e.nonce=t),[a.default.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){throw K(3)}seal=()=>{this.sealed=!0}},exports.StyleSheetConsumer=Se,exports.StyleSheetContext=ge,exports.StyleSheetManager=_e,exports.ThemeConsumer=ze,exports.ThemeContext=Me,exports.ThemeProvider=function(e){const n=t.useContext(Me),o=t.useMemo((()=>function(e,t){if(!e)throw K(14);if(Oe(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw K(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw K(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?a.default.createElement(Me.Provider,{value:o},e.children):null},exports.__PRIVATE__=Xe,exports.createGlobalStyle=function(e,...t){const n=Ye(e,...t),o=`sc-global-${I(JSON.stringify(n))}`,s=new Je(n,o);"production"!==process.env.NODE_ENV&&y(o);const r=e=>{const t=Ee(),r=Ne(),l=a.default.useContext(Me),c=a.default.useRef(t.allocateGSInstance(o)).current;return"production"!==process.env.NODE_ENV&&a.default.Children.count(e.children)&&console.warn(`The global style component ${o} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&n.some((e=>"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.server&&i(c,e,t,l,r),(a.default.useInsertionEffect||a.default.useLayoutEffect)((()=>{if(!t.server)return i(c,e,t,l,r),()=>s.removeStyles(c,t)}),[c,e,t,l,r]),null};function i(e,t,n,o,i){if(s.isStatic)s.renderStyles(e,p,n,i);else{const a={...t,theme:v(t,o,r.defaultProps)};s.renderStyles(e,a,n,i)}}return a.default.memo(r)},exports.css=Ye,exports.default=Ue,exports.isStyledComponent=U,exports.keyframes=function(e,...t){"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.");const n=Ye(e,...t).join(""),o=I(n);return new Ce(o,n)},exports.useTheme=()=>t.useContext(Me),exports.version="6.0.0-alpha.7",exports.withTheme=function(e){const t=a.default.forwardRef(((t,n)=>{const o=v(t,a.default.useContext(Me),e.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 "${x(e)}"`),a.default.createElement(e,{...t,theme:o,ref:n})}));return t.displayName=`WithTheme(${x(e)})`,W(t,e)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@emotion/is-prop-valid";import t,{useRef as n,useState as o,useContext as s,useMemo as r,useEffect as i,createElement as a,useDebugValue as c}from"react";import l from"shallowequal";import{prefixer as u,stringify as d,serialize as h,compile as p,middleware as m,RULESET as f}from"stylis";import y from"@emotion/unitless";const g="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="6.0.0-alpha.6",v="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),b={},E=/invalid hook call/i,N=new Set,_=(e,t)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${t?` with the id of "${t}"`:""} has been created dynamically.\nYou 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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{E.test(t)?(e=!1,N.delete(o)):s(t,...n)},n(),e&&!N.has(o)&&(console.warn(o),N.add(o))}catch(e){E.test(e.message)&&N.delete(o)}finally{console.error=s}}},$=Object.freeze([]),C=Object.freeze({});function A(e,t,n=C){return e.theme!==n.theme&&e.theme||t||n.theme}var P=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const I=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,O=/(^-|-$)/g;function R(e){return e.replace(I,"-").replace(O,"")}const D=/(a)(d)/gi,j=e=>String.fromCharCode(e+(e>25?39:97));function T(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=j(t%52)+n;return(j(t%52)+n).replace(D,"$1-$2")}const x=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},k=e=>x(5381,e);function V(e){return T(k(e)>>>0)}function z(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function B(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function M(e){return B(e)?`styled.${e}`:`Styled(${z(e)})`}const L="function"==typeof Symbol&&Symbol.for,F=L?Symbol.for("react.memo"):60115,G=L?Symbol.for("react.forward_ref"):60112,Y={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={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},W={[G]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[F]:q};function U(e){return("type"in(t=e)&&t.type.$$typeof)===F?q:"$$typeof"in e?W[e.$$typeof]:Y;var t}const J=Object.defineProperty,X=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,K=Object.getOwnPropertyDescriptor,Q=Object.getPrototypeOf,ee=Object.prototype;function te(e,t,n){if("string"!=typeof t){if(ee){const o=Q(t);o&&o!==ee&&te(e,o,n)}let o=X(t);Z&&(o=o.concat(Z(t)));const s=U(e),r=U(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in H||n&&n[a]||r&&a in r||s&&a in s)){const n=K(t,a);try{J(e,a,n)}catch(e){}}}}return e}function ne(e){return"object"==typeof e&&"styledComponentId"in e}function oe(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function se(e,t,n=!1){if(!n&&!oe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=se(e[n],t[n]);else if(oe(t))for(const n in t)e[n]=se(e[n],t[n]);return e}const re="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"}:{};function ie(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(re[e],...t).trim())}let ae=new Map,ce=new Map,le=1;const ue=e=>{if(ae.has(e))return ae.get(e);for(;ce.has(le);)le++;const t=le++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ie(16,`${t}`);return ae.set(e,t),ce.set(t,e),t},de=e=>ce.get(e),he=(e,t)=>{ae.set(e,t),ce.set(t,e)},pe=`style[${g}][data-styled-version="6.0.0-alpha.6"]`,me=new RegExp(`^${g}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),fe=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},ye=(e,t)=>{const n=(t.textContent??"").split("/*!sc*/\n"),o=[];for(let t=0,s=n.length;t<s;t++){const s=n[t].trim();if(!s)continue;const r=s.match(me);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(he(n,t),fe(e,n,r[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(s)}};function ge(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}const Se=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(g))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(g,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.6");const i=ge();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o};let ve=v;const we={isServer:!v,useCSSOMInjection:!w};class be{gs;names;options;server;tag;static registerId(e){return ue(e)}constructor(e=C,t={},n){this.options={...we,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&v&&ve&&(ve=!1,(e=>{const t=document.querySelectorAll(pe);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&"active"!==o.getAttribute(g)&&(ye(e,o),o.parentNode&&o.parentNode.removeChild(o))}})(this))}reconstructWithOptions(e,t=!0){return new be({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw ie(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=Se(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw ie(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(ue(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(ue(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ue(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=de(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${g}.g${s}[id="${n}"]`;let c="";void 0!==r&&r.forEach((e=>{e.length>0&&(c+=`${e},`)})),o+=`${i}${a}{content:"${c}"}/*!sc*/\n`}return o})(this)}}const Ee=/^\s*\/\/.*$/gm,Ne=[":","[",".","#"];function _e({options:e=C,plugins:t=$}=C){let n,o,s,r;const i=(e,t,s)=>0===t&&Ne.includes(s[o.length])||s.match(r)?e:`.${n}`,a=e=>{if(e.type===f&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(s,i)}},c=(i,c="",l="",f="&")=>{let y=i.replace(Ee,"");n=f,o=c,s=new RegExp(`\\${o}\\b`,"g"),r=new RegExp(`(\\${o}\\b){2,}`);const g=t.slice();return(e.prefix||void 0===e.prefix)&&g.unshift(u),g.push(a,d),h(p(l||c?`${l} ${c} { ${y} }`:y),m(g))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||ie(15),x(e,t.name))),5381).toString():"",c}const $e=t.createContext(void 0),Ce=$e.Consumer,Ae=t.createContext(void 0);Ae.Consumer;const Pe=new be,Ie=_e();function Oe(){return s($e)||Pe}function Re(){return s(Ae)||Ie}function De(e){const[n,s]=o(e.stylisPlugins),a=Oe(),c=r((()=>{let t=a;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]),u=r((()=>_e({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return i((()=>{l(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),t.createElement($e.Provider,{value:c},t.createElement(Ae.Provider,{value:u},"production"!==process.env.NODE_ENV?t.Children.only(e.children):e.children))}class je{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=Ie)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw ie(12,String(this.name))};getName(e=Ie){return this.name+e.hash}}const Te=/([A-Z])/,xe=/([A-Z])/g,ke=/^ms-/,Ve=e=>`-${e.toLowerCase()}`;function ze(e){return Te.test(e)?e.replace(xe,Ve).replace(ke,"-ms-"):e}function Be(e){return"function"==typeof e}const Me=e=>null==e||!1===e||""===e,Le=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!Me(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Be(e[t])?n.push(`${ze(t)}:`,e[t],";"):oe(e[t])?n.push(...Le(e[t],t)):n.push(`${ze(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in y?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function Fe(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Fe(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(Me(e))return"";if(ne(e))return`.${e.styledComponentId}`;if(Be(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof je||oe(r)||console.error(`${z(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.`),Fe(r,t,n,o)}}var s;return e instanceof je?n?(e.inject(n,o),e.getName(o)):e:oe(e)?Le(e):e.toString()}function Ge(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Be(n)&&!ne(n))return!1}return!0}const Ye=k("6.0.0-alpha.6");class He{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(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=x(Ye,t),this.baseStyle=n,be.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=Fe(this.rules,e,t,n).join(""),i=T(x(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=x(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=x(i,s+o));else if(s){const r=Fe(s,e,t,n),c=Array.isArray(r)?r.join(""):r;i=x(i,c+o),a+=c}}if(a){const e=T(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const qe=t.createContext(void 0),We=qe.Consumer;function Ue(e){const n=s(qe),o=r((()=>function(e,t){if(!e)throw ie(14);if(Be(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw ie(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw ie(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?t.createElement(qe.Provider,{value:o},e.children):null}const Je={};function Xe(e,t){const n="string"!=typeof e?"sc":R(e);Je[n]=(Je[n]||0)+1;const o=`${n}-${V("6.0.0-alpha.6"+n+Je[n])}`;return t?`${t}-${o}`:o}function Ze(n,o,r){const i=ne(n),l=n,u=!B(n),{attrs:d=$,componentId:h=Xe(o.displayName,o.parentComponentId),displayName:p=M(n)}=o,m=o.displayName&&o.componentId?`${R(o.displayName)}-${o.componentId}`:o.componentId||h,f=i&&l.attrs?l.attrs.concat(d).filter(Boolean):d;let{shouldForwardProp:y}=o;if(i&&l.shouldForwardProp){const e=l.shouldForwardProp;if(o.shouldForwardProp){const t=o.shouldForwardProp;y=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else y=e}const g=new He(r,m,i?l.componentStyle:void 0),S=g.isStatic&&0===d.length;function v(t,n){return function(t,n,o,r){const{attrs:i,componentStyle:l,defaultProps:u,foldedComponentIds:d,shouldForwardProp:h,styledComponentId:p,target:m}=t;"production"!==process.env.NODE_ENV&&c(p);const f=A(n,s(qe),u),[y,g]=function(e=C,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(f||C,n,i),S=function(e,t,n,o){const s=Oe(),r=Re(),i=t?e.generateAndInjectStyles(C,s,r):e.generateAndInjectStyles(n,s,r);return"production"!==process.env.NODE_ENV&&c(i),"production"!==process.env.NODE_ENV&&!t&&o&&o(i),i}(l,r,y,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=o,w=g.$as||n.$as||g.as||n.as||m,b=B(w),E=g!==n?{...n,...g}:n,N={};for(const t in E)"$"!==t[0]&&"as"!==t&&("forwardedAs"===t?N.as=E[t]:(h?h(t,e,w):!b||e(t))&&(N[t]=E[t]));return n.style&&g.style!==n.style&&(N.style={...n.style,...g.style}),N[b&&-1===P.indexOf(w)?"class":"className"]=d.concat(p,S!==p?S:null,n.className,g.className).filter(Boolean).join(" "),N.ref=v,a(w,N)}(w,t,n,S)}v.displayName=p;let w=t.forwardRef(v);return w.attrs=f,w.componentStyle=g,w.displayName=p,w.shouldForwardProp=y,w.foldedComponentIds=i?l.foldedComponentIds.concat(l.styledComponentId):$,w.styledComponentId=m,w.target=i?l.target:n,w.withComponent=function(e){const{componentId:t,...n}=o,s=t&&`${t}-${B(e)?e:R(z(e))}`;return Ze(e,{...n,attrs:f,componentId:s},r)},Object.defineProperty(w,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e={},...t){for(const n of t)se(e,n,!0);return e}({},l.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(_(p,m),w.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\nConsider 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 />`),o=!0,n={}}}})(p,m)),w.toString=()=>`.${w.styledComponentId}`,u&&te(w,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}function Ke(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const Qe=e=>(Array.isArray(e)&&(e.isCss=!0),e);function et(e,...t){if(Be(e)||oe(e))return Qe(Fe(Ke($,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:Qe(Fe(Ke(n,t)))}function tt(e,t,n=C){if(!t)throw ie(1,t);const o=(o,...s)=>e(t,n,et(o,...s));return o.attrs=o=>tt(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>tt(e,t,{...n,...o}),o}const nt=e=>tt(Ze,e),ot=nt;P.forEach((e=>{ot[e]=nt(e)}));class st{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=Ge(e),be.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(Fe(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&be.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}function rt(e,...n){const o=et(e,...n),s=`sc-global-${V(JSON.stringify(o))}`,r=new st(o,s);"production"!==process.env.NODE_ENV&&_(s);const i=e=>{const n=Oe(),i=Re(),c=t.useContext(qe),l=t.useRef(n.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some((e=>"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.server&&a(l,e,n,c,i),(t.useInsertionEffect||t.useLayoutEffect)((()=>{if(!n.server)return a(l,e,n,c,i),()=>r.removeStyles(l,n)}),[l,e,n,c,i]),null};function a(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,b,n,s);else{const a={...t,theme:A(t,o,i.defaultProps)};r.renderStyles(e,a,n,s)}}return t.memo(i)}function it(e,...t){"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.");const n=et(e,...t).join(""),o=V(n);return new je(o,n)}function at(e){const n=t.forwardRef(((n,o)=>{const s=A(n,t.useContext(qe),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${z(e)}"`),t.createElement(e,{...n,theme:s,ref:o})}));return n.displayName=`WithTheme(${z(e)})`,te(n,e)}const ct=()=>s(qe);class lt{instance;sealed;constructor(){this.instance=new be({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=ge();return`<style ${[t&&`nonce="${t}"`,`${g}="true"`,'data-styled-version="6.0.0-alpha.6"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw ie(2);return t.createElement(De,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw ie(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw ie(2);const e={[g]:"","data-styled-version":"6.0.0-alpha.6",dangerouslySetInnerHTML:{__html:this.instance.toString()}},n=ge();return n&&(e.nonce=n),[t.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){throw ie(3)}seal=()=>{this.sealed=!0}}const ut={StyleSheet:be,mainSheet:Pe};"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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||=0,1===window["__styled-components-init__"]&&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["__styled-components-init__"]+=1);export{lt as ServerStyleSheet,Ce as StyleSheetConsumer,$e as StyleSheetContext,De as StyleSheetManager,We as ThemeConsumer,qe as ThemeContext,Ue as ThemeProvider,ut as __PRIVATE__,rt as createGlobalStyle,et as css,ot as default,ne as isStyledComponent,it as keyframes,ct as useTheme,S as version,at as withTheme};
|
|
1
|
+
import e from"@emotion/is-prop-valid";import t,{useRef as n,useState as o,useContext as s,useMemo as r,useEffect as i,createElement as a,useDebugValue as c}from"react";import l from"shallowequal";import{prefixer as u,stringify as d,serialize as h,compile as p,middleware as m,RULESET as f}from"stylis";import y from"@emotion/unitless";const g="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="6.0.0-alpha.7",v="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),b={},E=/invalid hook call/i,N=new Set,_=(e,t)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${t?` with the id of "${t}"`:""} has been created dynamically.\nYou 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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{E.test(t)?(e=!1,N.delete(o)):s(t,...n)},n(),e&&!N.has(o)&&(console.warn(o),N.add(o))}catch(e){E.test(e.message)&&N.delete(o)}finally{console.error=s}}},$=Object.freeze([]),C=Object.freeze({});function A(e,t,n=C){return e.theme!==n.theme&&e.theme||t||n.theme}var P=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const I=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,O=/(^-|-$)/g;function R(e){return e.replace(I,"-").replace(O,"")}const D=/(a)(d)/gi,j=e=>String.fromCharCode(e+(e>25?39:97));function T(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=j(t%52)+n;return(j(t%52)+n).replace(D,"$1-$2")}const x=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},k=e=>x(5381,e);function V(e){return T(k(e)>>>0)}function z(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function B(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function M(e){return B(e)?`styled.${e}`:`Styled(${z(e)})`}const L="function"==typeof Symbol&&Symbol.for,F=L?Symbol.for("react.memo"):60115,G=L?Symbol.for("react.forward_ref"):60112,Y={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={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},W={[G]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[F]:q};function U(e){return("type"in(t=e)&&t.type.$$typeof)===F?q:"$$typeof"in e?W[e.$$typeof]:Y;var t}const J=Object.defineProperty,X=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,K=Object.getOwnPropertyDescriptor,Q=Object.getPrototypeOf,ee=Object.prototype;function te(e,t,n){if("string"!=typeof t){if(ee){const o=Q(t);o&&o!==ee&&te(e,o,n)}let o=X(t);Z&&(o=o.concat(Z(t)));const s=U(e),r=U(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in H||n&&n[a]||r&&a in r||s&&a in s)){const n=K(t,a);try{J(e,a,n)}catch(e){}}}}return e}function ne(e){return"object"==typeof e&&"styledComponentId"in e}function oe(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function se(e,t,n=!1){if(!n&&!oe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=se(e[n],t[n]);else if(oe(t))for(const n in t)e[n]=se(e[n],t[n]);return e}const re="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"}:{};function ie(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(re[e],...t).trim())}let ae=new Map,ce=new Map,le=1;const ue=e=>{if(ae.has(e))return ae.get(e);for(;ce.has(le);)le++;const t=le++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ie(16,`${t}`);return ae.set(e,t),ce.set(t,e),t},de=e=>ce.get(e),he=(e,t)=>{ae.set(e,t),ce.set(t,e)},pe=`style[${g}][data-styled-version="6.0.0-alpha.7"]`,me=new RegExp(`^${g}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),fe=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},ye=(e,t)=>{const n=(t.textContent??"").split("/*!sc*/\n"),o=[];for(let t=0,s=n.length;t<s;t++){const s=n[t].trim();if(!s)continue;const r=s.match(me);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(he(n,t),fe(e,n,r[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(s)}};function ge(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}const Se=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(g))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(g,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.7");const i=ge();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o};let ve=v;const we={isServer:!v,useCSSOMInjection:!w};class be{gs;names;options;server;tag;static registerId(e){return ue(e)}constructor(e=C,t={},n){this.options={...we,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&v&&ve&&(ve=!1,(e=>{const t=document.querySelectorAll(pe);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&"active"!==o.getAttribute(g)&&(ye(e,o),o.parentNode&&o.parentNode.removeChild(o))}})(this))}reconstructWithOptions(e,t=!0){return new be({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw ie(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=Se(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw ie(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(ue(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(ue(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ue(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=de(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${g}.g${s}[id="${n}"]`;let c="";void 0!==r&&r.forEach((e=>{e.length>0&&(c+=`${e},`)})),o+=`${i}${a}{content:"${c}"}/*!sc*/\n`}return o})(this)}}const Ee=/^\s*\/\/.*$/gm,Ne=[":","[",".","#"];function _e({options:e=C,plugins:t=$}=C){let n,o,s,r;const i=(e,t,s)=>0===t&&Ne.includes(s[o.length])||s.match(r)?e:`.${n}`,a=e=>{if(e.type===f&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(s,i)}},c=(i,c="",l="",f="&")=>{let y=i.replace(Ee,"");n=f,o=c,s=new RegExp(`\\${o}\\b`,"g"),r=new RegExp(`(\\${o}\\b){2,}`);const g=t.slice();return(e.prefix||void 0===e.prefix)&&g.unshift(u),g.push(a,d),h(p(l||c?`${l} ${c} { ${y} }`:y),m(g))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||ie(15),x(e,t.name))),5381).toString():"",c}const $e=t.createContext(void 0),Ce=$e.Consumer,Ae=t.createContext(void 0);Ae.Consumer;const Pe=new be,Ie=_e();function Oe(){return s($e)||Pe}function Re(){return s(Ae)||Ie}function De(e){const[n,s]=o(e.stylisPlugins),a=Oe(),c=r((()=>{let t=a;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]),u=r((()=>_e({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return i((()=>{l(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),t.createElement($e.Provider,{value:c},t.createElement(Ae.Provider,{value:u},"production"!==process.env.NODE_ENV?t.Children.only(e.children):e.children))}class je{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=Ie)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw ie(12,String(this.name))};getName(e=Ie){return this.name+e.hash}}const Te=/([A-Z])/,xe=/([A-Z])/g,ke=/^ms-/,Ve=e=>`-${e.toLowerCase()}`;function ze(e){return Te.test(e)?e.replace(xe,Ve).replace(ke,"-ms-"):e}function Be(e){return"function"==typeof e}const Me=e=>null==e||!1===e||""===e,Le=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!Me(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Be(e[t])?n.push(`${ze(t)}:`,e[t],";"):oe(e[t])?n.push(...Le(e[t],t)):n.push(`${ze(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in y?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function Fe(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Fe(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(Me(e))return"";if(ne(e))return`.${e.styledComponentId}`;if(Be(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof je||oe(r)||console.error(`${z(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.`),Fe(r,t,n,o)}}var s;return e instanceof je?n?(e.inject(n,o),e.getName(o)):e:oe(e)?Le(e):e.toString()}function Ge(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Be(n)&&!ne(n))return!1}return!0}const Ye=k("6.0.0-alpha.7");class He{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(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=x(Ye,t),this.baseStyle=n,be.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=Fe(this.rules,e,t,n).join(""),i=T(x(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=x(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=x(i,s+o));else if(s){const r=Fe(s,e,t,n),c=Array.isArray(r)?r.join(""):r;i=x(i,c+o),a+=c}}if(a){const e=T(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const qe=t.createContext(void 0),We=qe.Consumer;function Ue(e){const n=s(qe),o=r((()=>function(e,t){if(!e)throw ie(14);if(Be(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw ie(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw ie(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?t.createElement(qe.Provider,{value:o},e.children):null}const Je={};function Xe(e,t){const n="string"!=typeof e?"sc":R(e);Je[n]=(Je[n]||0)+1;const o=`${n}-${V("6.0.0-alpha.7"+n+Je[n])}`;return t?`${t}-${o}`:o}function Ze(n,o,r){const i=ne(n),l=n,u=!B(n),{attrs:d=$,componentId:h=Xe(o.displayName,o.parentComponentId),displayName:p=M(n)}=o,m=o.displayName&&o.componentId?`${R(o.displayName)}-${o.componentId}`:o.componentId||h,f=i&&l.attrs?l.attrs.concat(d).filter(Boolean):d;let{shouldForwardProp:y}=o;if(i&&l.shouldForwardProp){const e=l.shouldForwardProp;if(o.shouldForwardProp){const t=o.shouldForwardProp;y=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else y=e}const g=new He(r,m,i?l.componentStyle:void 0),S=g.isStatic&&0===d.length;function v(t,n){return function(t,n,o,r){const{attrs:i,componentStyle:l,defaultProps:u,foldedComponentIds:d,shouldForwardProp:h,styledComponentId:p,target:m}=t;"production"!==process.env.NODE_ENV&&c(p);const f=A(n,s(qe),u),[y,g]=function(e=C,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(f||C,n,i),S=function(e,t,n,o){const s=Oe(),r=Re(),i=t?e.generateAndInjectStyles(C,s,r):e.generateAndInjectStyles(n,s,r);return"production"!==process.env.NODE_ENV&&c(i),"production"!==process.env.NODE_ENV&&!t&&o&&o(i),i}(l,r,y,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=o,w=g.$as||n.$as||g.as||n.as||m,b=B(w),E=g!==n?{...n,...g}:n,N={};for(const t in E)"$"!==t[0]&&"as"!==t&&("forwardedAs"===t?N.as=E[t]:(h?h(t,e,w):!b||e(t))&&(N[t]=E[t]));return n.style&&g.style!==n.style&&(N.style={...n.style,...g.style}),N[b&&-1===P.indexOf(w)?"class":"className"]=d.concat(p,S!==p?S:null,n.className,g.className).filter(Boolean).join(" "),N.ref=v,a(w,N)}(w,t,n,S)}v.displayName=p;let w=t.forwardRef(v);return w.attrs=f,w.componentStyle=g,w.displayName=p,w.shouldForwardProp=y,w.foldedComponentIds=i?l.foldedComponentIds.concat(l.styledComponentId):$,w.styledComponentId=m,w.target=i?l.target:n,w.withComponent=function(e){const{componentId:t,...n}=o,s=t&&`${t}-${B(e)?e:R(z(e))}`;return Ze(e,{...n,attrs:f,componentId:s},r)},Object.defineProperty(w,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e={},...t){for(const n of t)se(e,n,!0);return e}({},l.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(_(p,m),w.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\nConsider 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 />`),o=!0,n={}}}})(p,m)),w.toString=()=>`.${w.styledComponentId}`,u&&te(w,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}function Ke(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const Qe=e=>(Array.isArray(e)&&(e.isCss=!0),e);function et(e,...t){if(Be(e)||oe(e))return Qe(Fe(Ke($,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:Qe(Fe(Ke(n,t)))}function tt(e,t,n=C){if(!t)throw ie(1,t);const o=(o,...s)=>e(t,n,et(o,...s));return o.attrs=o=>tt(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>tt(e,t,{...n,...o}),o}const nt=e=>tt(Ze,e),ot=nt;P.forEach((e=>{ot[e]=nt(e)}));class st{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=Ge(e),be.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(Fe(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&be.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}function rt(e,...n){const o=et(e,...n),s=`sc-global-${V(JSON.stringify(o))}`,r=new st(o,s);"production"!==process.env.NODE_ENV&&_(s);const i=e=>{const n=Oe(),i=Re(),c=t.useContext(qe),l=t.useRef(n.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some((e=>"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.server&&a(l,e,n,c,i),(t.useInsertionEffect||t.useLayoutEffect)((()=>{if(!n.server)return a(l,e,n,c,i),()=>r.removeStyles(l,n)}),[l,e,n,c,i]),null};function a(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,b,n,s);else{const a={...t,theme:A(t,o,i.defaultProps)};r.renderStyles(e,a,n,s)}}return t.memo(i)}function it(e,...t){"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.");const n=et(e,...t).join(""),o=V(n);return new je(o,n)}function at(e){const n=t.forwardRef(((n,o)=>{const s=A(n,t.useContext(qe),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${z(e)}"`),t.createElement(e,{...n,theme:s,ref:o})}));return n.displayName=`WithTheme(${z(e)})`,te(n,e)}const ct=()=>s(qe);class lt{instance;sealed;constructor(){this.instance=new be({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=ge();return`<style ${[t&&`nonce="${t}"`,`${g}="true"`,'data-styled-version="6.0.0-alpha.7"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw ie(2);return t.createElement(De,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw ie(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw ie(2);const e={[g]:"","data-styled-version":"6.0.0-alpha.7",dangerouslySetInnerHTML:{__html:this.instance.toString()}},n=ge();return n&&(e.nonce=n),[t.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){throw ie(3)}seal=()=>{this.sealed=!0}}const ut={StyleSheet:be,mainSheet:Pe};"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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||=0,1===window["__styled-components-init__"]&&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["__styled-components-init__"]+=1);export{lt as ServerStyleSheet,Ce as StyleSheetConsumer,$e as StyleSheetContext,De as StyleSheetManager,We as ThemeConsumer,qe as ThemeContext,Ue as ThemeProvider,ut as __PRIVATE__,rt as createGlobalStyle,et as css,ot as default,ne as isStyledComponent,it as keyframes,ct as useTheme,S as version,at as withTheme};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/is-prop-valid"),t=require("react"),n=require("shallowequal"),s=require("stylis"),o=require("@emotion/unitless");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e),a=r(t),l=r(n),c=r(o);const u="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),h={},p=/invalid hook call/i,m=new Set,f=(e,n)=>{if("production"!==process.env.NODE_ENV){const s=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou 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.`,o=console.error;try{let e=!0;console.error=(t,...n)=>{p.test(t)?(e=!1,m.delete(s)):o(t,...n)},t.useRef(),e&&!m.has(s)&&(console.warn(s),m.add(s))}catch(e){p.test(e.message)&&m.delete(s)}finally{console.error=o}}},y=Object.freeze([]),g=Object.freeze({});function S(e,t,n=g){return e.theme!==n.theme&&e.theme||t||n.theme}var v=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const w=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,b=/(^-|-$)/g;function E(e){return e.replace(w,"-").replace(b,"")}const N=/(a)(d)/gi,C=e=>String.fromCharCode(e+(e>25?39:97));function _(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=C(t%52)+n;return(C(t%52)+n).replace(N,"$1-$2")}const $=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},P=e=>$(5381,e);function A(e){return _(P(e)>>>0)}function I(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function O(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function x(e){return O(e)?`styled.${e}`:`Styled(${I(e)})`}const R="function"==typeof Symbol&&Symbol.for,D=R?Symbol.for("react.memo"):60115,T=R?Symbol.for("react.forward_ref"):60112,j={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},V={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M={[T]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[D]:V};function z(e){return("type"in(t=e)&&t.type.$$typeof)===D?V:"$$typeof"in e?M[e.$$typeof]:j;var t}const B=Object.defineProperty,G=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,L=Object.getOwnPropertyDescriptor,q=Object.getPrototypeOf,Y=Object.prototype;function H(e,t,n){if("string"!=typeof t){if(Y){const s=q(t);s&&s!==Y&&H(e,s,n)}let s=G(t);F&&(s=s.concat(F(t)));const o=z(e),r=z(t);for(let i=0;i<s.length;++i){const a=s[i];if(!(a in k||n&&n[a]||r&&a in r||o&&a in o)){const n=L(t,a);try{B(e,a,n)}catch(e){}}}}return e}function W(e){return"object"==typeof e&&"styledComponentId"in e}function U(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function J(e,t,n=!1){if(!n&&!U(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=J(e[n],t[n]);else if(U(t))for(const n in t)e[n]=J(e[n],t[n]);return e}const Z="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"}:{};function X(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,s=e.length;t<s;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(Z[e],...t).trim())}let K=new Map,Q=new Map,ee=1;const te=e=>{if(K.has(e))return K.get(e);for(;Q.has(ee);)ee++;const t=ee++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw X(16,`${t}`);return K.set(e,t),Q.set(t,e),t},ne=e=>Q.get(e);function se(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}new RegExp(`^${u}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`);const oe=e=>{const t=document.head,n=e||t,s=document.createElement("style"),o=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(u))return n}})(n),r=void 0!==o?o.nextSibling:null;s.setAttribute(u,"active"),s.setAttribute("data-styled-version","6.0.0-alpha.6");const i=se();return i&&s.setAttribute("nonce",i),n.insertBefore(s,r),s},re={isServer:!0,useCSSOMInjection:!d};class ie{gs;names;options;server;tag;static registerId(e){return te(e)}constructor(e=g,t={},n){this.options={...re,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,this.server}reconstructWithOptions(e,t=!0){return new ie({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=oe(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,s=t.length;n<s;n++){const s=t[n];if(s.ownerNode===e)return s}throw X(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=oe(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),s=this.nodes[e];return this.element.insertBefore(n,s||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let s=n;for(;e>=s;)if(s<<=1,s<0)throw X(16,`${e}`);this.groupSizes=new Uint32Array(s),this.groupSizes.set(t),this.length=s;for(let e=n;e<s;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let s=0,o=t.length;s<o;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),s=n+t;this.groupSizes[e]=0;for(let e=n;e<s;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],s=this.indexOfGroup(e),o=s+n;for(let e=s;e<o;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(te(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(te(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(te(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let s="";for(let o=0;o<n;o++){const n=ne(o);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(o);if(void 0===r||0===i.length)continue;const a=`${u}.g${o}[id="${n}"]`;let l="";void 0!==r&&r.forEach((e=>{e.length>0&&(l+=`${e},`)})),s+=`${i}${a}{content:"${l}"}/*!sc*/\n`}return s})(this)}}const ae=/^\s*\/\/.*$/gm,le=[":","[",".","#"];function ce({options:e=g,plugins:t=y}=g){let n,o,r,i;const a=(e,t,s)=>0===t&&le.includes(s[o.length])||s.match(i)?e:`.${n}`,l=e=>{if(e.type===s.RULESET&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(r,a)}},c=(a,c="",u="",d="&")=>{let h=a.replace(ae,"");n=d,o=c,r=new RegExp(`\\${o}\\b`,"g"),i=new RegExp(`(\\${o}\\b){2,}`);const p=t.slice();return(e.prefix||void 0===e.prefix)&&p.unshift(s.prefixer),p.push(l,s.stringify),s.serialize(s.compile(u||c?`${u} ${c} { ${h} }`:h),s.middleware(p))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||X(15),$(e,t.name))),5381).toString():"",c}const ue=a.default.createContext(void 0),de=ue.Consumer,he=a.default.createContext(void 0);he.Consumer;const pe=new ie,me=ce();function fe(){return t.useContext(ue)||pe}function ye(){return t.useContext(he)||me}function ge(e){const[n,s]=t.useState(e.stylisPlugins),o=fe(),r=t.useMemo((()=>{let t=o;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]),i=t.useMemo((()=>ce({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return t.useEffect((()=>{l.default(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),a.default.createElement(ue.Provider,{value:r},a.default.createElement(he.Provider,{value:i},"production"!==process.env.NODE_ENV?a.default.Children.only(e.children):e.children))}class Se{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=me)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw X(12,String(this.name))};getName(e=me){return this.name+e.hash}}const ve=/([A-Z])/,we=/([A-Z])/g,be=/^ms-/,Ee=e=>`-${e.toLowerCase()}`;function Ne(e){return ve.test(e)?e.replace(we,Ee).replace(be,"-ms-"):e}function Ce(e){return"function"==typeof e}const _e=e=>null==e||!1===e||""===e,$e=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!_e(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Ce(e[t])?n.push(`${Ne(t)}:`,e[t],";"):U(e[t])?n.push(...$e(e[t],t)):n.push(`${Ne(t)}: ${s=t,o=e[t],null==o||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||s in c.default?String(o).trim():`${o}px`};`));var s,o;return t?[`${t} {`,...n,"}"]:n};function Pe(e,t,n,s){if(Array.isArray(e)){const o=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Pe(e[i],t,n,s),""!==r&&(Array.isArray(r)?o.push(...r):o.push(r));return o}if(_e(e))return"";if(W(e))return`.${e.styledComponentId}`;if(Ce(e)){if("function"!=typeof(o=e)||o.prototype&&o.prototype.isReactComponent||!t)return e;{const o=e,r=o(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Se||U(r)||console.error(`${I(o)} 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.`),Pe(r,t,n,s)}}var o;return e instanceof Se?n?(e.inject(n,s),e.getName(s)):e:U(e)?$e(e):e.toString()}function Ae(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Ce(n)&&!W(n))return!1}return!0}const Ie=P("6.0.0-alpha.6");class Oe{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ae(e),this.componentId=t,this.baseHash=$(Ie,t),this.baseStyle=n,ie.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:s}=this,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(s,this.staticRulesId))o.push(this.staticRulesId);else{const r=Pe(this.rules,e,t,n).join(""),i=_($(this.baseHash,r)>>>0);if(!t.hasNameForId(s,i)){const e=n(r,`.${i}`,void 0,s);t.insertRules(s,i,e)}o.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=$(this.baseHash,n.hash),a="";for(let s=0;s<r;s++){const o=this.rules[s];if("string"==typeof o)a+=o,"production"!==process.env.NODE_ENV&&(i=$(i,o+s));else if(o){const r=Pe(o,e,t,n),l=Array.isArray(r)?r.join(""):r;i=$(i,l+s),a+=l}}if(a){const e=_(i>>>0);if(!t.hasNameForId(s,e)){const o=n(a,`.${e}`,void 0,s);t.insertRules(s,e,o)}o.push(e)}}return o.join(" ")}}const xe=a.default.createContext(void 0),Re=xe.Consumer,De={};function Te(e,t){const n="string"!=typeof e?"sc":E(e);De[n]=(De[n]||0)+1;const s=`${n}-${A("6.0.0-alpha.6"+n+De[n])}`;return t?`${t}-${s}`:s}function je(e,n,s){const o=W(e),r=e,l=!O(e),{attrs:c=y,componentId:u=Te(n.displayName,n.parentComponentId),displayName:d=x(e)}=n,h=n.displayName&&n.componentId?`${E(n.displayName)}-${n.componentId}`:n.componentId||u,p=o&&r.attrs?r.attrs.concat(c).filter(Boolean):c;let{shouldForwardProp:m}=n;if(o&&r.shouldForwardProp){const e=r.shouldForwardProp;if(n.shouldForwardProp){const t=n.shouldForwardProp;m=(n,s,o)=>e(n,s,o)&&t(n,s,o)}else m=e}const w=new Oe(s,h,o?r.componentStyle:void 0),b=w.isStatic&&0===c.length;function N(e,n){return function(e,n,s,o){const{attrs:r,componentStyle:a,defaultProps:l,foldedComponentIds:c,shouldForwardProp:u,styledComponentId:d,target:h}=e;"production"!==process.env.NODE_ENV&&t.useDebugValue(d);const p=S(n,t.useContext(xe),l),[m,f]=function(e=g,t,n){const s={...t,theme:e},o={};return n.forEach((e=>{const t="function"==typeof e?e(s):e;let n;for(n in t)s[n]=o[n]="className"===n?(r=o[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[s,o]}(p||g,n,r),y=function(e,n,s,o){const r=fe(),i=ye(),a=n?e.generateAndInjectStyles(g,r,i):e.generateAndInjectStyles(s,r,i);return"production"!==process.env.NODE_ENV&&t.useDebugValue(a),"production"!==process.env.NODE_ENV&&!n&&o&&o(a),a}(a,o,m,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),w=s,b=f.$as||n.$as||f.as||n.as||h,E=O(b),N=f!==n?{...n,...f}:n,C={};for(const e in N)"$"!==e[0]&&"as"!==e&&("forwardedAs"===e?C.as=N[e]:(u?u(e,i.default,b):!E||i.default(e))&&(C[e]=N[e]));return n.style&&f.style!==n.style&&(C.style={...n.style,...f.style}),C[E&&-1===v.indexOf(b)?"class":"className"]=c.concat(d,y!==d?y:null,n.className,f.className).filter(Boolean).join(" "),C.ref=w,t.createElement(b,C)}(C,e,n,b)}N.displayName=d;let C=a.default.forwardRef(N);return C.attrs=p,C.componentStyle=w,C.displayName=d,C.shouldForwardProp=m,C.foldedComponentIds=o?r.foldedComponentIds.concat(r.styledComponentId):y,C.styledComponentId=h,C.target=o?r.target:e,C.withComponent=function(e){const{componentId:t,...o}=n,r=t&&`${t}-${O(e)?e:E(I(e))}`;return je(e,{...o,attrs:p,componentId:r},s)},Object.defineProperty(C,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=o?function(e={},...t){for(const n of t)J(e,n,!0);return e}({},r.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(f(d,h),C.warnTooManyClasses=((e,t)=>{let n={},s=!1;return o=>{if(!s&&(n[o]=!0,Object.keys(n).length>=200)){const o=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${o}.\nConsider 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 />`),s=!0,n={}}}})(d,h)),C.toString=()=>`.${C.styledComponentId}`,l&&H(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}function ke(e,t){const n=[e[0]];for(let s=0,o=t.length;s<o;s+=1)n.push(t[s],e[s+1]);return n}const Ve=e=>(Array.isArray(e)&&(e.isCss=!0),e);function Me(e,...t){if(Ce(e)||U(e))return Ve(Pe(ke(y,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:Ve(Pe(ke(n,t)))}function ze(e,t,n=g){if(!t)throw X(1,t);const s=(s,...o)=>e(t,n,Me(s,...o));return s.attrs=s=>ze(e,t,{...n,attrs:Array.prototype.concat(n.attrs,s).filter(Boolean)}),s.withConfig=s=>ze(e,t,{...n,...s}),s}const Be=e=>ze(je,e),Ge=Be;v.forEach((e=>{Ge[e]=Be(e)}));class Fe{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=Ae(e),ie.registerId(this.componentId+1)}createStyles(e,t,n,s){const o=s(Pe(this.rules,t,n,s).join(""),""),r=this.componentId+e;n.insertRules(r,r,o)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,s){e>2&&ie.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,s)}}const Le=/^\s*<\/[a-z]/i,qe={StyleSheet:ie,mainSheet:pe};"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"),"production"!==process.env.NODE_ENV&&process.env.NODE_ENV,exports.ServerStyleSheet=class{instance;sealed;constructor(){this.instance=new ie({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=se();return`<style ${[t&&`nonce="${t}"`,`${u}="true"`,'data-styled-version="6.0.0-alpha.6"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw X(2);return a.default.createElement(ge,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw X(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw X(2);const e={[u]:"","data-styled-version":"6.0.0-alpha.6",dangerouslySetInnerHTML:{__html:this.instance.toString()}},t=se();return t&&(e.nonce=t),[a.default.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){if(this.sealed)throw X(2);{this.seal();const{Transform:t}=require("stream"),n=e,{instance:s,_emitSheetCSS:o}=this,r=new t({transform:function(e,t,n){const r=e.toString(),i=o();if(s.clearTag(),Le.test(r)){const e=r.indexOf(">")+1,t=r.slice(0,e),n=r.slice(e);this.push(t+i+n)}else this.push(i+r);n()}});return n.on("error",(e=>{r.emit("error",e)})),n.pipe(r)}}seal=()=>{this.sealed=!0}},exports.StyleSheetConsumer=de,exports.StyleSheetContext=ue,exports.StyleSheetManager=ge,exports.ThemeConsumer=Re,exports.ThemeContext=xe,exports.ThemeProvider=function(e){const n=t.useContext(xe),s=t.useMemo((()=>function(e,t){if(!e)throw X(14);if(Ce(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw X(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw X(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?a.default.createElement(xe.Provider,{value:s},e.children):null},exports.__PRIVATE__=qe,exports.createGlobalStyle=function(e,...t){const n=Me(e,...t),s=`sc-global-${A(JSON.stringify(n))}`,o=new Fe(n,s);"production"!==process.env.NODE_ENV&&f(s);const r=e=>{const t=fe(),i=ye(),l=a.default.useContext(xe),c=a.default.useRef(t.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&a.default.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&n.some((e=>"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.server&&function(e,t,n,s,i){if(o.isStatic)o.renderStyles(e,h,n,i);else{const a={...t,theme:S(t,s,r.defaultProps)};o.renderStyles(e,a,n,i)}}(c,e,t,l,i),null};return a.default.memo(r)},exports.css=Me,exports.default=Ge,exports.isStyledComponent=W,exports.keyframes=function(e,...t){"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.");const n=Me(e,...t).join(""),s=A(n);return new Se(s,n)},exports.useTheme=()=>t.useContext(xe),exports.version="6.0.0-alpha.6",exports.withTheme=function(e){const t=a.default.forwardRef(((t,n)=>{const s=S(t,a.default.useContext(xe),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${I(e)}"`),a.default.createElement(e,{...t,theme:s,ref:n})}));return t.displayName=`WithTheme(${I(e)})`,H(t,e)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/is-prop-valid"),t=require("react"),n=require("shallowequal"),s=require("stylis"),o=require("@emotion/unitless");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e),a=r(t),l=r(n),c=r(o);const u="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),h={},p=/invalid hook call/i,m=new Set,f=(e,n)=>{if("production"!==process.env.NODE_ENV){const s=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou 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.`,o=console.error;try{let e=!0;console.error=(t,...n)=>{p.test(t)?(e=!1,m.delete(s)):o(t,...n)},t.useRef(),e&&!m.has(s)&&(console.warn(s),m.add(s))}catch(e){p.test(e.message)&&m.delete(s)}finally{console.error=o}}},y=Object.freeze([]),g=Object.freeze({});function S(e,t,n=g){return e.theme!==n.theme&&e.theme||t||n.theme}var v=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const w=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,b=/(^-|-$)/g;function E(e){return e.replace(w,"-").replace(b,"")}const N=/(a)(d)/gi,C=e=>String.fromCharCode(e+(e>25?39:97));function _(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=C(t%52)+n;return(C(t%52)+n).replace(N,"$1-$2")}const $=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},P=e=>$(5381,e);function A(e){return _(P(e)>>>0)}function I(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function O(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function x(e){return O(e)?`styled.${e}`:`Styled(${I(e)})`}const R="function"==typeof Symbol&&Symbol.for,D=R?Symbol.for("react.memo"):60115,T=R?Symbol.for("react.forward_ref"):60112,j={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},V={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M={[T]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[D]:V};function z(e){return("type"in(t=e)&&t.type.$$typeof)===D?V:"$$typeof"in e?M[e.$$typeof]:j;var t}const B=Object.defineProperty,G=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,L=Object.getOwnPropertyDescriptor,q=Object.getPrototypeOf,Y=Object.prototype;function H(e,t,n){if("string"!=typeof t){if(Y){const s=q(t);s&&s!==Y&&H(e,s,n)}let s=G(t);F&&(s=s.concat(F(t)));const o=z(e),r=z(t);for(let i=0;i<s.length;++i){const a=s[i];if(!(a in k||n&&n[a]||r&&a in r||o&&a in o)){const n=L(t,a);try{B(e,a,n)}catch(e){}}}}return e}function W(e){return"object"==typeof e&&"styledComponentId"in e}function U(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function J(e,t,n=!1){if(!n&&!U(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=J(e[n],t[n]);else if(U(t))for(const n in t)e[n]=J(e[n],t[n]);return e}const Z="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"}:{};function X(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,s=e.length;t<s;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(Z[e],...t).trim())}let K=new Map,Q=new Map,ee=1;const te=e=>{if(K.has(e))return K.get(e);for(;Q.has(ee);)ee++;const t=ee++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw X(16,`${t}`);return K.set(e,t),Q.set(t,e),t},ne=e=>Q.get(e);function se(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}new RegExp(`^${u}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`);const oe=e=>{const t=document.head,n=e||t,s=document.createElement("style"),o=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(u))return n}})(n),r=void 0!==o?o.nextSibling:null;s.setAttribute(u,"active"),s.setAttribute("data-styled-version","6.0.0-alpha.7");const i=se();return i&&s.setAttribute("nonce",i),n.insertBefore(s,r),s},re={isServer:!0,useCSSOMInjection:!d};class ie{gs;names;options;server;tag;static registerId(e){return te(e)}constructor(e=g,t={},n){this.options={...re,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,this.server}reconstructWithOptions(e,t=!0){return new ie({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=oe(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,s=t.length;n<s;n++){const s=t[n];if(s.ownerNode===e)return s}throw X(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=oe(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),s=this.nodes[e];return this.element.insertBefore(n,s||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let s=n;for(;e>=s;)if(s<<=1,s<0)throw X(16,`${e}`);this.groupSizes=new Uint32Array(s),this.groupSizes.set(t),this.length=s;for(let e=n;e<s;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let s=0,o=t.length;s<o;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),s=n+t;this.groupSizes[e]=0;for(let e=n;e<s;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],s=this.indexOfGroup(e),o=s+n;for(let e=s;e<o;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(te(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(te(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(te(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let s="";for(let o=0;o<n;o++){const n=ne(o);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(o);if(void 0===r||0===i.length)continue;const a=`${u}.g${o}[id="${n}"]`;let l="";void 0!==r&&r.forEach((e=>{e.length>0&&(l+=`${e},`)})),s+=`${i}${a}{content:"${l}"}/*!sc*/\n`}return s})(this)}}const ae=/^\s*\/\/.*$/gm,le=[":","[",".","#"];function ce({options:e=g,plugins:t=y}=g){let n,o,r,i;const a=(e,t,s)=>0===t&&le.includes(s[o.length])||s.match(i)?e:`.${n}`,l=e=>{if(e.type===s.RULESET&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(r,a)}},c=(a,c="",u="",d="&")=>{let h=a.replace(ae,"");n=d,o=c,r=new RegExp(`\\${o}\\b`,"g"),i=new RegExp(`(\\${o}\\b){2,}`);const p=t.slice();return(e.prefix||void 0===e.prefix)&&p.unshift(s.prefixer),p.push(l,s.stringify),s.serialize(s.compile(u||c?`${u} ${c} { ${h} }`:h),s.middleware(p))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||X(15),$(e,t.name))),5381).toString():"",c}const ue=a.default.createContext(void 0),de=ue.Consumer,he=a.default.createContext(void 0);he.Consumer;const pe=new ie,me=ce();function fe(){return t.useContext(ue)||pe}function ye(){return t.useContext(he)||me}function ge(e){const[n,s]=t.useState(e.stylisPlugins),o=fe(),r=t.useMemo((()=>{let t=o;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]),i=t.useMemo((()=>ce({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return t.useEffect((()=>{l.default(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),a.default.createElement(ue.Provider,{value:r},a.default.createElement(he.Provider,{value:i},"production"!==process.env.NODE_ENV?a.default.Children.only(e.children):e.children))}class Se{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=me)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw X(12,String(this.name))};getName(e=me){return this.name+e.hash}}const ve=/([A-Z])/,we=/([A-Z])/g,be=/^ms-/,Ee=e=>`-${e.toLowerCase()}`;function Ne(e){return ve.test(e)?e.replace(we,Ee).replace(be,"-ms-"):e}function Ce(e){return"function"==typeof e}const _e=e=>null==e||!1===e||""===e,$e=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!_e(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Ce(e[t])?n.push(`${Ne(t)}:`,e[t],";"):U(e[t])?n.push(...$e(e[t],t)):n.push(`${Ne(t)}: ${s=t,o=e[t],null==o||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||s in c.default?String(o).trim():`${o}px`};`));var s,o;return t?[`${t} {`,...n,"}"]:n};function Pe(e,t,n,s){if(Array.isArray(e)){const o=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Pe(e[i],t,n,s),""!==r&&(Array.isArray(r)?o.push(...r):o.push(r));return o}if(_e(e))return"";if(W(e))return`.${e.styledComponentId}`;if(Ce(e)){if("function"!=typeof(o=e)||o.prototype&&o.prototype.isReactComponent||!t)return e;{const o=e,r=o(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Se||U(r)||console.error(`${I(o)} 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.`),Pe(r,t,n,s)}}var o;return e instanceof Se?n?(e.inject(n,s),e.getName(s)):e:U(e)?$e(e):e.toString()}function Ae(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Ce(n)&&!W(n))return!1}return!0}const Ie=P("6.0.0-alpha.7");class Oe{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ae(e),this.componentId=t,this.baseHash=$(Ie,t),this.baseStyle=n,ie.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:s}=this,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(s,this.staticRulesId))o.push(this.staticRulesId);else{const r=Pe(this.rules,e,t,n).join(""),i=_($(this.baseHash,r)>>>0);if(!t.hasNameForId(s,i)){const e=n(r,`.${i}`,void 0,s);t.insertRules(s,i,e)}o.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=$(this.baseHash,n.hash),a="";for(let s=0;s<r;s++){const o=this.rules[s];if("string"==typeof o)a+=o,"production"!==process.env.NODE_ENV&&(i=$(i,o+s));else if(o){const r=Pe(o,e,t,n),l=Array.isArray(r)?r.join(""):r;i=$(i,l+s),a+=l}}if(a){const e=_(i>>>0);if(!t.hasNameForId(s,e)){const o=n(a,`.${e}`,void 0,s);t.insertRules(s,e,o)}o.push(e)}}return o.join(" ")}}const xe=a.default.createContext(void 0),Re=xe.Consumer,De={};function Te(e,t){const n="string"!=typeof e?"sc":E(e);De[n]=(De[n]||0)+1;const s=`${n}-${A("6.0.0-alpha.7"+n+De[n])}`;return t?`${t}-${s}`:s}function je(e,n,s){const o=W(e),r=e,l=!O(e),{attrs:c=y,componentId:u=Te(n.displayName,n.parentComponentId),displayName:d=x(e)}=n,h=n.displayName&&n.componentId?`${E(n.displayName)}-${n.componentId}`:n.componentId||u,p=o&&r.attrs?r.attrs.concat(c).filter(Boolean):c;let{shouldForwardProp:m}=n;if(o&&r.shouldForwardProp){const e=r.shouldForwardProp;if(n.shouldForwardProp){const t=n.shouldForwardProp;m=(n,s,o)=>e(n,s,o)&&t(n,s,o)}else m=e}const w=new Oe(s,h,o?r.componentStyle:void 0),b=w.isStatic&&0===c.length;function N(e,n){return function(e,n,s,o){const{attrs:r,componentStyle:a,defaultProps:l,foldedComponentIds:c,shouldForwardProp:u,styledComponentId:d,target:h}=e;"production"!==process.env.NODE_ENV&&t.useDebugValue(d);const p=S(n,t.useContext(xe),l),[m,f]=function(e=g,t,n){const s={...t,theme:e},o={};return n.forEach((e=>{const t="function"==typeof e?e(s):e;let n;for(n in t)s[n]=o[n]="className"===n?(r=o[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[s,o]}(p||g,n,r),y=function(e,n,s,o){const r=fe(),i=ye(),a=n?e.generateAndInjectStyles(g,r,i):e.generateAndInjectStyles(s,r,i);return"production"!==process.env.NODE_ENV&&t.useDebugValue(a),"production"!==process.env.NODE_ENV&&!n&&o&&o(a),a}(a,o,m,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),w=s,b=f.$as||n.$as||f.as||n.as||h,E=O(b),N=f!==n?{...n,...f}:n,C={};for(const e in N)"$"!==e[0]&&"as"!==e&&("forwardedAs"===e?C.as=N[e]:(u?u(e,i.default,b):!E||i.default(e))&&(C[e]=N[e]));return n.style&&f.style!==n.style&&(C.style={...n.style,...f.style}),C[E&&-1===v.indexOf(b)?"class":"className"]=c.concat(d,y!==d?y:null,n.className,f.className).filter(Boolean).join(" "),C.ref=w,t.createElement(b,C)}(C,e,n,b)}N.displayName=d;let C=a.default.forwardRef(N);return C.attrs=p,C.componentStyle=w,C.displayName=d,C.shouldForwardProp=m,C.foldedComponentIds=o?r.foldedComponentIds.concat(r.styledComponentId):y,C.styledComponentId=h,C.target=o?r.target:e,C.withComponent=function(e){const{componentId:t,...o}=n,r=t&&`${t}-${O(e)?e:E(I(e))}`;return je(e,{...o,attrs:p,componentId:r},s)},Object.defineProperty(C,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=o?function(e={},...t){for(const n of t)J(e,n,!0);return e}({},r.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(f(d,h),C.warnTooManyClasses=((e,t)=>{let n={},s=!1;return o=>{if(!s&&(n[o]=!0,Object.keys(n).length>=200)){const o=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${o}.\nConsider 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 />`),s=!0,n={}}}})(d,h)),C.toString=()=>`.${C.styledComponentId}`,l&&H(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}function ke(e,t){const n=[e[0]];for(let s=0,o=t.length;s<o;s+=1)n.push(t[s],e[s+1]);return n}const Ve=e=>(Array.isArray(e)&&(e.isCss=!0),e);function Me(e,...t){if(Ce(e)||U(e))return Ve(Pe(ke(y,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:Ve(Pe(ke(n,t)))}function ze(e,t,n=g){if(!t)throw X(1,t);const s=(s,...o)=>e(t,n,Me(s,...o));return s.attrs=s=>ze(e,t,{...n,attrs:Array.prototype.concat(n.attrs,s).filter(Boolean)}),s.withConfig=s=>ze(e,t,{...n,...s}),s}const Be=e=>ze(je,e),Ge=Be;v.forEach((e=>{Ge[e]=Be(e)}));class Fe{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=Ae(e),ie.registerId(this.componentId+1)}createStyles(e,t,n,s){const o=s(Pe(this.rules,t,n,s).join(""),""),r=this.componentId+e;n.insertRules(r,r,o)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,s){e>2&&ie.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,s)}}const Le=/^\s*<\/[a-z]/i,qe={StyleSheet:ie,mainSheet:pe};"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"),"production"!==process.env.NODE_ENV&&process.env.NODE_ENV,exports.ServerStyleSheet=class{instance;sealed;constructor(){this.instance=new ie({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=se();return`<style ${[t&&`nonce="${t}"`,`${u}="true"`,'data-styled-version="6.0.0-alpha.7"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw X(2);return a.default.createElement(ge,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw X(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw X(2);const e={[u]:"","data-styled-version":"6.0.0-alpha.7",dangerouslySetInnerHTML:{__html:this.instance.toString()}},t=se();return t&&(e.nonce=t),[a.default.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){if(this.sealed)throw X(2);{this.seal();const{Transform:t}=require("stream"),n=e,{instance:s,_emitSheetCSS:o}=this,r=new t({transform:function(e,t,n){const r=e.toString(),i=o();if(s.clearTag(),Le.test(r)){const e=r.indexOf(">")+1,t=r.slice(0,e),n=r.slice(e);this.push(t+i+n)}else this.push(i+r);n()}});return n.on("error",(e=>{r.emit("error",e)})),n.pipe(r)}}seal=()=>{this.sealed=!0}},exports.StyleSheetConsumer=de,exports.StyleSheetContext=ue,exports.StyleSheetManager=ge,exports.ThemeConsumer=Re,exports.ThemeContext=xe,exports.ThemeProvider=function(e){const n=t.useContext(xe),s=t.useMemo((()=>function(e,t){if(!e)throw X(14);if(Ce(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw X(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw X(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?a.default.createElement(xe.Provider,{value:s},e.children):null},exports.__PRIVATE__=qe,exports.createGlobalStyle=function(e,...t){const n=Me(e,...t),s=`sc-global-${A(JSON.stringify(n))}`,o=new Fe(n,s);"production"!==process.env.NODE_ENV&&f(s);const r=e=>{const t=fe(),i=ye(),l=a.default.useContext(xe),c=a.default.useRef(t.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&a.default.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&n.some((e=>"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.server&&function(e,t,n,s,i){if(o.isStatic)o.renderStyles(e,h,n,i);else{const a={...t,theme:S(t,s,r.defaultProps)};o.renderStyles(e,a,n,i)}}(c,e,t,l,i),null};return a.default.memo(r)},exports.css=Me,exports.default=Ge,exports.isStyledComponent=W,exports.keyframes=function(e,...t){"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.");const n=Me(e,...t).join(""),s=A(n);return new Se(s,n)},exports.useTheme=()=>t.useContext(xe),exports.version="6.0.0-alpha.7",exports.withTheme=function(e){const t=a.default.forwardRef(((t,n)=>{const s=S(t,a.default.useContext(xe),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${I(e)}"`),a.default.createElement(e,{...t,theme:s,ref:n})}));return t.displayName=`WithTheme(${I(e)})`,H(t,e)};
|
|
2
2
|
//# sourceMappingURL=styled-components.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@emotion/is-prop-valid";import t,{useRef as n,useState as o,useContext as s,useMemo as r,useEffect as i,createElement as a,useDebugValue as c}from"react";import l from"shallowequal";import{prefixer as u,stringify as h,serialize as d,compile as p,middleware as m,RULESET as f}from"stylis";import y from"@emotion/unitless";const g="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="6.0.0-alpha.6",v=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),w={},b=/invalid hook call/i,E=new Set,N=(e,t)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${t?` with the id of "${t}"`:""} has been created dynamically.\nYou 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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{b.test(t)?(e=!1,E.delete(o)):s(t,...n)},n(),e&&!E.has(o)&&(console.warn(o),E.add(o))}catch(e){b.test(e.message)&&E.delete(o)}finally{console.error=s}}},$=Object.freeze([]),_=Object.freeze({});function C(e,t,n=_){return e.theme!==n.theme&&e.theme||t||n.theme}var P=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const A=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,I=/(^-|-$)/g;function O(e){return e.replace(A,"-").replace(I,"")}const D=/(a)(d)/gi,R=e=>String.fromCharCode(e+(e>25?39:97));function j(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=R(t%52)+n;return(R(t%52)+n).replace(D,"$1-$2")}const T=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},x=e=>T(5381,e);function k(e){return j(x(e)>>>0)}function V(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function z(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function B(e){return z(e)?`styled.${e}`:`Styled(${V(e)})`}const M="function"==typeof Symbol&&Symbol.for,F=M?Symbol.for("react.memo"):60115,G=M?Symbol.for("react.forward_ref"):60112,L={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Y={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},H={[G]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[F]:q};function W(e){return("type"in(t=e)&&t.type.$$typeof)===F?q:"$$typeof"in e?H[e.$$typeof]:L;var t}const U=Object.defineProperty,J=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,K=Object.getPrototypeOf,Q=Object.prototype;function ee(e,t,n){if("string"!=typeof t){if(Q){const o=K(t);o&&o!==Q&&ee(e,o,n)}let o=J(t);Z&&(o=o.concat(Z(t)));const s=W(e),r=W(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in Y||n&&n[a]||r&&a in r||s&&a in s)){const n=X(t,a);try{U(e,a,n)}catch(e){}}}}return e}function te(e){return"object"==typeof e&&"styledComponentId"in e}function ne(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function oe(e,t,n=!1){if(!n&&!ne(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=oe(e[n],t[n]);else if(ne(t))for(const n in t)e[n]=oe(e[n],t[n]);return e}const 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"}:{};function re(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(se[e],...t).trim())}let ie=new Map,ae=new Map,ce=1;const le=e=>{if(ie.has(e))return ie.get(e);for(;ae.has(ce);)ce++;const t=ce++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw re(16,`${t}`);return ie.set(e,t),ae.set(t,e),t},ue=e=>ae.get(e);function he(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}new RegExp(`^${g}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`);const de=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(g))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(g,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.6");const i=he();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o},pe={isServer:!0,useCSSOMInjection:!v};class me{gs;names;options;server;tag;static registerId(e){return le(e)}constructor(e=_,t={},n){this.options={...pe,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,this.server}reconstructWithOptions(e,t=!0){return new me({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=de(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw re(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=de(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw re(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(le(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(le(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(le(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=ue(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${g}.g${s}[id="${n}"]`;let c="";void 0!==r&&r.forEach((e=>{e.length>0&&(c+=`${e},`)})),o+=`${i}${a}{content:"${c}"}/*!sc*/\n`}return o})(this)}}const fe=/^\s*\/\/.*$/gm,ye=[":","[",".","#"];function ge({options:e=_,plugins:t=$}=_){let n,o,s,r;const i=(e,t,s)=>0===t&&ye.includes(s[o.length])||s.match(r)?e:`.${n}`,a=e=>{if(e.type===f&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(s,i)}},c=(i,c="",l="",f="&")=>{let y=i.replace(fe,"");n=f,o=c,s=new RegExp(`\\${o}\\b`,"g"),r=new RegExp(`(\\${o}\\b){2,}`);const g=t.slice();return(e.prefix||void 0===e.prefix)&&g.unshift(u),g.push(a,h),d(p(l||c?`${l} ${c} { ${y} }`:y),m(g))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||re(15),T(e,t.name))),5381).toString():"",c}const Se=t.createContext(void 0),ve=Se.Consumer,we=t.createContext(void 0);we.Consumer;const be=new me,Ee=ge();function Ne(){return s(Se)||be}function $e(){return s(we)||Ee}function _e(e){const[n,s]=o(e.stylisPlugins),a=Ne(),c=r((()=>{let t=a;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]),u=r((()=>ge({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return i((()=>{l(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),t.createElement(Se.Provider,{value:c},t.createElement(we.Provider,{value:u},"production"!==process.env.NODE_ENV?t.Children.only(e.children):e.children))}class Ce{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=Ee)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw re(12,String(this.name))};getName(e=Ee){return this.name+e.hash}}const Pe=/([A-Z])/,Ae=/([A-Z])/g,Ie=/^ms-/,Oe=e=>`-${e.toLowerCase()}`;function De(e){return Pe.test(e)?e.replace(Ae,Oe).replace(Ie,"-ms-"):e}function Re(e){return"function"==typeof e}const je=e=>null==e||!1===e||""===e,Te=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!je(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Re(e[t])?n.push(`${De(t)}:`,e[t],";"):ne(e[t])?n.push(...Te(e[t],t)):n.push(`${De(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in y?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function xe(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=xe(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(je(e))return"";if(te(e))return`.${e.styledComponentId}`;if(Re(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Ce||ne(r)||console.error(`${V(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.`),xe(r,t,n,o)}}var s;return e instanceof Ce?n?(e.inject(n,o),e.getName(o)):e:ne(e)?Te(e):e.toString()}function ke(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Re(n)&&!te(n))return!1}return!0}const Ve=x("6.0.0-alpha.6");class ze{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&ke(e),this.componentId=t,this.baseHash=T(Ve,t),this.baseStyle=n,me.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=xe(this.rules,e,t,n).join(""),i=j(T(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=T(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=T(i,s+o));else if(s){const r=xe(s,e,t,n),c=Array.isArray(r)?r.join(""):r;i=T(i,c+o),a+=c}}if(a){const e=j(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const Be=t.createContext(void 0),Me=Be.Consumer;function Fe(e){const n=s(Be),o=r((()=>function(e,t){if(!e)throw re(14);if(Re(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw re(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw re(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?t.createElement(Be.Provider,{value:o},e.children):null}const Ge={};function Le(e,t){const n="string"!=typeof e?"sc":O(e);Ge[n]=(Ge[n]||0)+1;const o=`${n}-${k("6.0.0-alpha.6"+n+Ge[n])}`;return t?`${t}-${o}`:o}function Ye(n,o,r){const i=te(n),l=n,u=!z(n),{attrs:h=$,componentId:d=Le(o.displayName,o.parentComponentId),displayName:p=B(n)}=o,m=o.displayName&&o.componentId?`${O(o.displayName)}-${o.componentId}`:o.componentId||d,f=i&&l.attrs?l.attrs.concat(h).filter(Boolean):h;let{shouldForwardProp:y}=o;if(i&&l.shouldForwardProp){const e=l.shouldForwardProp;if(o.shouldForwardProp){const t=o.shouldForwardProp;y=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else y=e}const g=new ze(r,m,i?l.componentStyle:void 0),S=g.isStatic&&0===h.length;function v(t,n){return function(t,n,o,r){const{attrs:i,componentStyle:l,defaultProps:u,foldedComponentIds:h,shouldForwardProp:d,styledComponentId:p,target:m}=t;"production"!==process.env.NODE_ENV&&c(p);const f=C(n,s(Be),u),[y,g]=function(e=_,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(f||_,n,i),S=function(e,t,n,o){const s=Ne(),r=$e(),i=t?e.generateAndInjectStyles(_,s,r):e.generateAndInjectStyles(n,s,r);return"production"!==process.env.NODE_ENV&&c(i),"production"!==process.env.NODE_ENV&&!t&&o&&o(i),i}(l,r,y,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=o,w=g.$as||n.$as||g.as||n.as||m,b=z(w),E=g!==n?{...n,...g}:n,N={};for(const t in E)"$"!==t[0]&&"as"!==t&&("forwardedAs"===t?N.as=E[t]:(d?d(t,e,w):!b||e(t))&&(N[t]=E[t]));return n.style&&g.style!==n.style&&(N.style={...n.style,...g.style}),N[b&&-1===P.indexOf(w)?"class":"className"]=h.concat(p,S!==p?S:null,n.className,g.className).filter(Boolean).join(" "),N.ref=v,a(w,N)}(w,t,n,S)}v.displayName=p;let w=t.forwardRef(v);return w.attrs=f,w.componentStyle=g,w.displayName=p,w.shouldForwardProp=y,w.foldedComponentIds=i?l.foldedComponentIds.concat(l.styledComponentId):$,w.styledComponentId=m,w.target=i?l.target:n,w.withComponent=function(e){const{componentId:t,...n}=o,s=t&&`${t}-${z(e)?e:O(V(e))}`;return Ye(e,{...n,attrs:f,componentId:s},r)},Object.defineProperty(w,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e={},...t){for(const n of t)oe(e,n,!0);return e}({},l.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(N(p,m),w.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\nConsider 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 />`),o=!0,n={}}}})(p,m)),w.toString=()=>`.${w.styledComponentId}`,u&&ee(w,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}function qe(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const He=e=>(Array.isArray(e)&&(e.isCss=!0),e);function We(e,...t){if(Re(e)||ne(e))return He(xe(qe($,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:He(xe(qe(n,t)))}function Ue(e,t,n=_){if(!t)throw re(1,t);const o=(o,...s)=>e(t,n,We(o,...s));return o.attrs=o=>Ue(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>Ue(e,t,{...n,...o}),o}const Je=e=>Ue(Ye,e),Ze=Je;P.forEach((e=>{Ze[e]=Je(e)}));class Xe{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=ke(e),me.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(xe(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&me.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}function Ke(e,...n){const o=We(e,...n),s=`sc-global-${k(JSON.stringify(o))}`,r=new Xe(o,s);"production"!==process.env.NODE_ENV&&N(s);const i=e=>{const n=Ne(),a=$e(),c=t.useContext(Be),l=t.useRef(n.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some((e=>"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.server&&function(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,w,n,s);else{const a={...t,theme:C(t,o,i.defaultProps)};r.renderStyles(e,a,n,s)}}(l,e,n,c,a),null};return t.memo(i)}function Qe(e,...t){"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.");const n=We(e,...t).join(""),o=k(n);return new Ce(o,n)}function et(e){const n=t.forwardRef(((n,o)=>{const s=C(n,t.useContext(Be),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${V(e)}"`),t.createElement(e,{...n,theme:s,ref:o})}));return n.displayName=`WithTheme(${V(e)})`,ee(n,e)}const tt=()=>s(Be),nt=/^\s*<\/[a-z]/i;class ot{instance;sealed;constructor(){this.instance=new me({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=he();return`<style ${[t&&`nonce="${t}"`,`${g}="true"`,'data-styled-version="6.0.0-alpha.6"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw re(2);return t.createElement(_e,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw re(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw re(2);const e={[g]:"","data-styled-version":"6.0.0-alpha.6",dangerouslySetInnerHTML:{__html:this.instance.toString()}},n=he();return n&&(e.nonce=n),[t.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){if(this.sealed)throw re(2);{this.seal();const{Transform:t}=require("stream"),n=e,{instance:o,_emitSheetCSS:s}=this,r=new t({transform:function(e,t,n){const r=e.toString(),i=s();if(o.clearTag(),nt.test(r)){const e=r.indexOf(">")+1,t=r.slice(0,e),n=r.slice(e);this.push(t+i+n)}else this.push(i+r);n()}});return n.on("error",(e=>{r.emit("error",e)})),n.pipe(r)}}seal=()=>{this.sealed=!0}}const st={StyleSheet:me,mainSheet:be};"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"),"production"!==process.env.NODE_ENV&&process.env.NODE_ENV;export{ot as ServerStyleSheet,ve as StyleSheetConsumer,Se as StyleSheetContext,_e as StyleSheetManager,Me as ThemeConsumer,Be as ThemeContext,Fe as ThemeProvider,st as __PRIVATE__,Ke as createGlobalStyle,We as css,Ze as default,te as isStyledComponent,Qe as keyframes,tt as useTheme,S as version,et as withTheme};
|
|
1
|
+
import e from"@emotion/is-prop-valid";import t,{useRef as n,useState as o,useContext as s,useMemo as r,useEffect as i,createElement as a,useDebugValue as c}from"react";import l from"shallowequal";import{prefixer as u,stringify as h,serialize as d,compile as p,middleware as m,RULESET as f}from"stylis";import y from"@emotion/unitless";const g="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="6.0.0-alpha.7",v=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),w={},b=/invalid hook call/i,E=new Set,N=(e,t)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${t?` with the id of "${t}"`:""} has been created dynamically.\nYou 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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{b.test(t)?(e=!1,E.delete(o)):s(t,...n)},n(),e&&!E.has(o)&&(console.warn(o),E.add(o))}catch(e){b.test(e.message)&&E.delete(o)}finally{console.error=s}}},$=Object.freeze([]),_=Object.freeze({});function C(e,t,n=_){return e.theme!==n.theme&&e.theme||t||n.theme}var P=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const A=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,I=/(^-|-$)/g;function O(e){return e.replace(A,"-").replace(I,"")}const D=/(a)(d)/gi,R=e=>String.fromCharCode(e+(e>25?39:97));function j(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=R(t%52)+n;return(R(t%52)+n).replace(D,"$1-$2")}const T=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},x=e=>T(5381,e);function k(e){return j(x(e)>>>0)}function V(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function z(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function B(e){return z(e)?`styled.${e}`:`Styled(${V(e)})`}const M="function"==typeof Symbol&&Symbol.for,F=M?Symbol.for("react.memo"):60115,G=M?Symbol.for("react.forward_ref"):60112,L={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Y={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},H={[G]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[F]:q};function W(e){return("type"in(t=e)&&t.type.$$typeof)===F?q:"$$typeof"in e?H[e.$$typeof]:L;var t}const U=Object.defineProperty,J=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,K=Object.getPrototypeOf,Q=Object.prototype;function ee(e,t,n){if("string"!=typeof t){if(Q){const o=K(t);o&&o!==Q&&ee(e,o,n)}let o=J(t);Z&&(o=o.concat(Z(t)));const s=W(e),r=W(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in Y||n&&n[a]||r&&a in r||s&&a in s)){const n=X(t,a);try{U(e,a,n)}catch(e){}}}}return e}function te(e){return"object"==typeof e&&"styledComponentId"in e}function ne(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function oe(e,t,n=!1){if(!n&&!ne(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=oe(e[n],t[n]);else if(ne(t))for(const n in t)e[n]=oe(e[n],t[n]);return e}const 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"}:{};function re(e,...t){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#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach((e=>{t=t.replace(/%[a-z]/,e)})),t}(se[e],...t).trim())}let ie=new Map,ae=new Map,ce=1;const le=e=>{if(ie.has(e))return ie.get(e);for(;ae.has(ce);)ce++;const t=ce++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw re(16,`${t}`);return ie.set(e,t),ae.set(t,e),t},ue=e=>ae.get(e);function he(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}new RegExp(`^${g}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`);const de=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(g))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(g,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.7");const i=he();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o},pe={isServer:!0,useCSSOMInjection:!v};class me{gs;names;options;server;tag;static registerId(e){return le(e)}constructor(e=_,t={},n){this.options={...pe,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,this.server}reconstructWithOptions(e,t=!0){return new me({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=de(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw re(17)})(t),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=de(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw re(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=`${this.tag.getRule(e)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(le(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(le(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(le(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=ue(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${g}.g${s}[id="${n}"]`;let c="";void 0!==r&&r.forEach((e=>{e.length>0&&(c+=`${e},`)})),o+=`${i}${a}{content:"${c}"}/*!sc*/\n`}return o})(this)}}const fe=/^\s*\/\/.*$/gm,ye=[":","[",".","#"];function ge({options:e=_,plugins:t=$}=_){let n,o,s,r;const i=(e,t,s)=>0===t&&ye.includes(s[o.length])||s.match(r)?e:`.${n}`,a=e=>{if(e.type===f&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(s,i)}},c=(i,c="",l="",f="&")=>{let y=i.replace(fe,"");n=f,o=c,s=new RegExp(`\\${o}\\b`,"g"),r=new RegExp(`(\\${o}\\b){2,}`);const g=t.slice();return(e.prefix||void 0===e.prefix)&&g.unshift(u),g.push(a,h),d(p(l||c?`${l} ${c} { ${y} }`:y),m(g))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||re(15),T(e,t.name))),5381).toString():"",c}const Se=t.createContext(void 0),ve=Se.Consumer,we=t.createContext(void 0);we.Consumer;const be=new me,Ee=ge();function Ne(){return s(Se)||be}function $e(){return s(we)||Ee}function _e(e){const[n,s]=o(e.stylisPlugins),a=Ne(),c=r((()=>{let t=a;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]),u=r((()=>ge({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return i((()=>{l(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),t.createElement(Se.Provider,{value:c},t.createElement(we.Provider,{value:u},"production"!==process.env.NODE_ENV?t.Children.only(e.children):e.children))}class Ce{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=Ee)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw re(12,String(this.name))};getName(e=Ee){return this.name+e.hash}}const Pe=/([A-Z])/,Ae=/([A-Z])/g,Ie=/^ms-/,Oe=e=>`-${e.toLowerCase()}`;function De(e){return Pe.test(e)?e.replace(Ae,Oe).replace(Ie,"-ms-"):e}function Re(e){return"function"==typeof e}const je=e=>null==e||!1===e||""===e,Te=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!je(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Re(e[t])?n.push(`${De(t)}:`,e[t],";"):ne(e[t])?n.push(...Te(e[t],t)):n.push(`${De(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in y?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function xe(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=xe(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(je(e))return"";if(te(e))return`.${e.styledComponentId}`;if(Re(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Ce||ne(r)||console.error(`${V(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.`),xe(r,t,n,o)}}var s;return e instanceof Ce?n?(e.inject(n,o),e.getName(o)):e:ne(e)?Te(e):e.toString()}function ke(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Re(n)&&!te(n))return!1}return!0}const Ve=x("6.0.0-alpha.7");class ze{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&ke(e),this.componentId=t,this.baseHash=T(Ve,t),this.baseStyle=n,me.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=xe(this.rules,e,t,n).join(""),i=j(T(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=T(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=T(i,s+o));else if(s){const r=xe(s,e,t,n),c=Array.isArray(r)?r.join(""):r;i=T(i,c+o),a+=c}}if(a){const e=j(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const Be=t.createContext(void 0),Me=Be.Consumer;function Fe(e){const n=s(Be),o=r((()=>function(e,t){if(!e)throw re(14);if(Re(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw re(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw re(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?t.createElement(Be.Provider,{value:o},e.children):null}const Ge={};function Le(e,t){const n="string"!=typeof e?"sc":O(e);Ge[n]=(Ge[n]||0)+1;const o=`${n}-${k("6.0.0-alpha.7"+n+Ge[n])}`;return t?`${t}-${o}`:o}function Ye(n,o,r){const i=te(n),l=n,u=!z(n),{attrs:h=$,componentId:d=Le(o.displayName,o.parentComponentId),displayName:p=B(n)}=o,m=o.displayName&&o.componentId?`${O(o.displayName)}-${o.componentId}`:o.componentId||d,f=i&&l.attrs?l.attrs.concat(h).filter(Boolean):h;let{shouldForwardProp:y}=o;if(i&&l.shouldForwardProp){const e=l.shouldForwardProp;if(o.shouldForwardProp){const t=o.shouldForwardProp;y=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else y=e}const g=new ze(r,m,i?l.componentStyle:void 0),S=g.isStatic&&0===h.length;function v(t,n){return function(t,n,o,r){const{attrs:i,componentStyle:l,defaultProps:u,foldedComponentIds:h,shouldForwardProp:d,styledComponentId:p,target:m}=t;"production"!==process.env.NODE_ENV&&c(p);const f=C(n,s(Be),u),[y,g]=function(e=_,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(f||_,n,i),S=function(e,t,n,o){const s=Ne(),r=$e(),i=t?e.generateAndInjectStyles(_,s,r):e.generateAndInjectStyles(n,s,r);return"production"!==process.env.NODE_ENV&&c(i),"production"!==process.env.NODE_ENV&&!t&&o&&o(i),i}(l,r,y,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=o,w=g.$as||n.$as||g.as||n.as||m,b=z(w),E=g!==n?{...n,...g}:n,N={};for(const t in E)"$"!==t[0]&&"as"!==t&&("forwardedAs"===t?N.as=E[t]:(d?d(t,e,w):!b||e(t))&&(N[t]=E[t]));return n.style&&g.style!==n.style&&(N.style={...n.style,...g.style}),N[b&&-1===P.indexOf(w)?"class":"className"]=h.concat(p,S!==p?S:null,n.className,g.className).filter(Boolean).join(" "),N.ref=v,a(w,N)}(w,t,n,S)}v.displayName=p;let w=t.forwardRef(v);return w.attrs=f,w.componentStyle=g,w.displayName=p,w.shouldForwardProp=y,w.foldedComponentIds=i?l.foldedComponentIds.concat(l.styledComponentId):$,w.styledComponentId=m,w.target=i?l.target:n,w.withComponent=function(e){const{componentId:t,...n}=o,s=t&&`${t}-${z(e)?e:O(V(e))}`;return Ye(e,{...n,attrs:f,componentId:s},r)},Object.defineProperty(w,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e={},...t){for(const n of t)oe(e,n,!0);return e}({},l.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(N(p,m),w.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\nConsider 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 />`),o=!0,n={}}}})(p,m)),w.toString=()=>`.${w.styledComponentId}`,u&&ee(w,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}function qe(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const He=e=>(Array.isArray(e)&&(e.isCss=!0),e);function We(e,...t){if(Re(e)||ne(e))return He(xe(qe($,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:He(xe(qe(n,t)))}function Ue(e,t,n=_){if(!t)throw re(1,t);const o=(o,...s)=>e(t,n,We(o,...s));return o.attrs=o=>Ue(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>Ue(e,t,{...n,...o}),o}const Je=e=>Ue(Ye,e),Ze=Je;P.forEach((e=>{Ze[e]=Je(e)}));class Xe{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=ke(e),me.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(xe(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&me.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}function Ke(e,...n){const o=We(e,...n),s=`sc-global-${k(JSON.stringify(o))}`,r=new Xe(o,s);"production"!==process.env.NODE_ENV&&N(s);const i=e=>{const n=Ne(),a=$e(),c=t.useContext(Be),l=t.useRef(n.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some((e=>"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.server&&function(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,w,n,s);else{const a={...t,theme:C(t,o,i.defaultProps)};r.renderStyles(e,a,n,s)}}(l,e,n,c,a),null};return t.memo(i)}function Qe(e,...t){"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.");const n=We(e,...t).join(""),o=k(n);return new Ce(o,n)}function et(e){const n=t.forwardRef(((n,o)=>{const s=C(n,t.useContext(Be),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${V(e)}"`),t.createElement(e,{...n,theme:s,ref:o})}));return n.displayName=`WithTheme(${V(e)})`,ee(n,e)}const tt=()=>s(Be),nt=/^\s*<\/[a-z]/i;class ot{instance;sealed;constructor(){this.instance=new me({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=he();return`<style ${[t&&`nonce="${t}"`,`${g}="true"`,'data-styled-version="6.0.0-alpha.7"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw re(2);return t.createElement(_e,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw re(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw re(2);const e={[g]:"","data-styled-version":"6.0.0-alpha.7",dangerouslySetInnerHTML:{__html:this.instance.toString()}},n=he();return n&&(e.nonce=n),[t.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){if(this.sealed)throw re(2);{this.seal();const{Transform:t}=require("stream"),n=e,{instance:o,_emitSheetCSS:s}=this,r=new t({transform:function(e,t,n){const r=e.toString(),i=s();if(o.clearTag(),nt.test(r)){const e=r.indexOf(">")+1,t=r.slice(0,e),n=r.slice(e);this.push(t+i+n)}else this.push(i+r);n()}});return n.on("error",(e=>{r.emit("error",e)})),n.pipe(r)}}seal=()=>{this.sealed=!0}}const st={StyleSheet:me,mainSheet:be};"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"),"production"!==process.env.NODE_ENV&&process.env.NODE_ENV;export{ot as ServerStyleSheet,ve as StyleSheetConsumer,Se as StyleSheetContext,_e as StyleSheetManager,Me as ThemeConsumer,Be as ThemeContext,Fe as ThemeProvider,st as __PRIVATE__,Ke as createGlobalStyle,We as css,Ze as default,te as isStyledComponent,Qe as keyframes,tt as useTheme,S as version,et as withTheme};
|
|
2
2
|
//# sourceMappingURL=styled-components.esm.js.map
|