styled-components 6.0.0-alpha.2 → 6.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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.min.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -1
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/primitives/dist/styled-components-primitives.cjs.js +1 -1
- package/primitives/dist/styled-components-primitives.esm.js +1 -1
- package/primitives/dist/types.d.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),c=i(n),u=i(r),l=i(s),d="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",p="6.0.0-alpha.2",h="undefined"!=typeof window&&"HTMLElement"in window,f=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),y={},m=/invalid hook call/i,v=new Set,g=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];m.test(t)?(a=!1,v.delete(s)):i.apply(void 0,e.__spreadArray([t],e.__read(n),!1))},n.useRef(),a&&!v.has(s)&&(console.warn(s),v.add(s))}catch(e){m.test(e.message)&&v.delete(s)}finally{console.error=i}}},_=Object.freeze([]),S=Object.freeze({});function w(e,t,n){return void 0===n&&(n=S),e.theme!==n.theme&&e.theme||t||n.theme}var b=["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"],E=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,N=/(^-|-$)/g;function C(e){return e.replace(E,"-").replace(N,"")}var A=/(a)(d)/gi,P=function(e){return String.fromCharCode(e+(e>25?39:97))};function I(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=P(t%52)+n;return(P(t%52)+n).replace(A,"$1-$2")}var x,O=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},R=function(e){return O(5381,e)};function D(e){return I(R(e)>>>0)}function T(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function j(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var k="function"==typeof Symbol&&Symbol.for,V=k?Symbol.for("react.memo"):60115,M=k?Symbol.for("react.forward_ref"):60112,$={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},B={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L=((x={})[M]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},x[V]=B,x);function G(e){return("type"in(t=e)&&t.type.$$typeof)===V?B:"$$typeof"in e?L[e.$$typeof]:$;var t}var F=Object.defineProperty,q=Object.getOwnPropertyNames,Y=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,W=Object.getPrototypeOf,U=Object.prototype;function J(e,t,n){if("string"!=typeof t){if(U){var r=W(t);r&&r!==U&&J(e,r,n)}var o=q(t);Y&&(o=o.concat(Y(t)));for(var s=G(e),i=G(t),a=0;a<o.length;++a){var c=o[a];if(!(c in z||n&&n[c]||i&&c in i||s&&c in s)){var u=H(t,c);try{F(e,c,u)}catch(e){}}}}return e}function X(e){return"object"==typeof e&&"styledComponentId"in e}function Z(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 K(e,t,n){if(void 0===n&&(n=!1),!n&&!Z(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=K(e[r],t[r]);else if(Z(t))for(var r in t)e[r]=K(e[r],t[r]);return e}var Q="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 ee(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function te(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(ee.apply(void 0,e.__spreadArray([Q[t]],e.__read(n),!1)).trim())}var ne=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw te(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}var i=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var a=t.length;s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)}else this.tag.insertRule(i,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),re=new Map,oe=new Map,se=1,ie=function(e){if(re.has(e))return re.get(e);for(;oe.has(se);)se++;var t=se++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw te(16,"".concat(t));return re.set(e,t),oe.set(t,e),t},ae=function(e,t){re.set(e,t),oe.set(t,e)},ce="style[".concat(d,"][").concat("data-styled-version",'="').concat(p,'"]'),ue=new RegExp("^".concat(d,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),le=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},de=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ue);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(ae(l,u),le(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}};function pe(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var he=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(d))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(d,"active"),r.setAttribute("data-styled-version",p);var i=pe();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},fe=function(){function e(e){var t=this.element=he(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw te(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),ye=function(){function e(e){var t=this.element=he(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),me=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),ve=h,ge={isServer:!h,useCSSOMInjection:!f},_e=function(){function t(t,n,r){void 0===t&&(t=S),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},ge),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&h&&ve&&(ve=!1,function(e){for(var t=document.querySelectorAll(ce),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(d)&&(de(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return t.registerId=function(e){return ie(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,r=e.target;return t?new me(r):n?new fe(r):new ye(r)}(this.options),new ne(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(ie(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ie(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ie(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return oe.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(d,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},t}(),Se=/^\s*\/\/.*$/gm,we=[":","[",".","#"];function be(e){var t,n,r,s,i=void 0===e?S:e,a=i.options,c=void 0===a?S:a,u=i.plugins,l=void 0===u?_:u,d=function(e,r,o){return 0===r&&we.includes(o[n.length])||o.match(s)?e:".".concat(t)},p=function(e){if(e.type===o.RULESET&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(r,d)}},h=function(e,i,a,u){void 0===i&&(i=""),void 0===a&&(a=""),void 0===u&&(u="&");var d=e.replace(Se,"");t=u,n=i,r=new RegExp("\\".concat(n,"\\b"),"g"),s=new RegExp("(\\".concat(n,"\\b){2,}"));var h=l.slice();return(c.prefix||void 0===c.prefix)&&h.unshift(o.prefixer),h.push(p,o.stringify),o.serialize(o.compile(a||i?"".concat(a," ").concat(i," { ").concat(d," }"):d),o.middleware(h))};return h.hash=l.length?l.reduce((function(e,t){return t.name||te(15),O(e,t.name)}),5381).toString():"",h}var Ee=c.default.createContext(void 0),Ne=Ee.Consumer,Ce=c.default.createContext(void 0);Ce.Consumer;var Ae=new _e,Pe=be();function Ie(){return n.useContext(Ee)||Ae}function xe(){return n.useContext(Ce)||Pe}function Oe(t){var r=e.__read(n.useState(t.stylisPlugins),2),o=r[0],s=r[1],i=Ie(),a=n.useMemo((function(){var e=i;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),l=n.useMemo((function(){return be({options:{prefix:!t.disableVendorPrefixes},plugins:o})}),[t.disableVendorPrefixes,o]);return n.useEffect((function(){u.default(o,t.stylisPlugins)||s(t.stylisPlugins)}),[t.stylisPlugins]),c.default.createElement(Ee.Provider,{value:a},c.default.createElement(Ce.Provider,{value:l},"production"!==process.env.NODE_ENV?c.default.Children.only(t.children):t.children))}var Re=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw te(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Pe),this.name+e.hash},e}(),De=/([A-Z])/,Te=/([A-Z])/g,je=/^ms-/,ke=function(e){return"-".concat(e.toLowerCase())};function Ve(e){return De.test(e)?e.replace(Te,ke).replace(je,"-ms-"):e}function Me(e){return"function"==typeof e}var $e=function(e){return null==e||!1===e||""===e},ze=function(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!$e(t[i])&&(Array.isArray(t[i])&&t[i].isCss||Me(t[i])?s.push("".concat(Ve(i),":"),t[i],";"):Z(t[i])?s.push.apply(s,e.__spreadArray([],e.__read(ze(t[i],i)),!1)):s.push("".concat(Ve(i),": ").concat((r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.default?String(o).trim():"".concat(o,"px")),";")));return n?e.__spreadArray(e.__spreadArray(["".concat(n," {")],e.__read(s),!1),["}"],!1):s};function Be(t,n,r,o){if(Array.isArray(t)){for(var s=[],i=0,a=t.length,c=void 0;i<a;i+=1)""!==(c=Be(t[i],n,r,o))&&(Array.isArray(c)?s.push.apply(s,e.__spreadArray([],e.__read(c),!1)):s.push(c));return s}if($e(t))return"";if(X(t))return".".concat(t.styledComponentId);if(Me(t)){if("function"!=typeof(l=t)||l.prototype&&l.prototype.isReactComponent||!n)return t;var u=t;return c=u(n),"production"===process.env.NODE_ENV||"object"!=typeof c||Array.isArray(c)||c instanceof Re||Z(c)||console.error("".concat(T(u)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Be(c,n,r,o)}var l;return t instanceof Re?r?(t.inject(r,o),t.getName(o)):t:Z(t)?ze(t):t.toString()}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Me(n)&&!X(n))return!1}return!0}var Ge=R(p),Fe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Le(e),this.componentId=t,this.baseHash=O(Ge,t),this.baseStyle=n,_e.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=Be(this.rules,e,t,n).join(""),i=I(O(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,".".concat(i),void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=O(this.baseHash,n.hash),l="",d=0;d<c;d++){var p=this.rules[d];if("string"==typeof p)l+=p,"production"!==process.env.NODE_ENV&&(u=O(u,p+d));else if(p){var h=Be(p,e,t,n),f=Array.isArray(h)?h.join(""):h;u=O(u,f+d),l+=f}}if(l){var y=I(u>>>0);if(!t.hasNameForId(r,y)){var m=n(l,".".concat(y),void 0,r);t.insertRules(r,y,m)}o.push(y)}}return o.join(" ")},e}(),qe=c.default.createContext(void 0),Ye=qe.Consumer,He={};function We(t,r,o){var s=X(t),i=t,u=!j(t),l=r.attrs,d=void 0===l?_:l,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":C(e);He[n]=(He[n]||0)+1;var r="".concat(n,"-").concat(D(p+n+He[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):h,y=r.displayName,m=void 0===y?function(e){return j(e)?"styled.".concat(e):"Styled(".concat(T(e),")")}(t):y,v=r.displayName&&r.componentId?"".concat(C(r.displayName),"-").concat(r.componentId):r.componentId||f,E=s&&i.attrs?i.attrs.concat(d).filter(Boolean):d,N=r.shouldForwardProp;if(s&&i.shouldForwardProp){var A=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;N=function(e,t,n){return A(e,t,n)&&P(e,t,n)}}else N=A}var I=new Fe(o,v,s?i.componentStyle:void 0),x=I.isStatic&&0===d.length;function O(t,r){return function(t,r,o,s){var i=t.attrs,c=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,d=t.shouldForwardProp,p=t.styledComponentId,h=t.target;"production"!==process.env.NODE_ENV&&n.useDebugValue(p);var f=w(r,n.useContext(qe),u),y=e.__read(function(t,n,r){void 0===t&&(t=S);var o=e.__assign(e.__assign({},n),{theme:t}),s={};return r.forEach((function(e){var t,n,r,i="function"==typeof e?e(o):e;for(t in i)o[t]=s[t]="className"===t?(n=s[t],r=i[t],n&&r?"".concat(n," ").concat(r):n||r):i[t]})),[o,s]}(f||S,r,i),2),m=y[0],v=y[1],g=function(e,t,r,o){var s=Ie(),i=xe(),a=t?e.generateAndInjectStyles(S,s,i):e.generateAndInjectStyles(r,s,i);return"production"!==process.env.NODE_ENV&&n.useDebugValue(a),"production"!==process.env.NODE_ENV&&!t&&o&&o(a),a}(c,s,m,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),_=o,E=v.$as||r.$as||v.as||r.as||h,N=j(E),C=v!==r?e.__assign(e.__assign({},r),v):r,A={};for(var P in C)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?A.as=C[P]:(d?d(P,a.default,E):!N||a.default(P))&&(A[P]=C[P]));return r.style&&v.style!==r.style&&(A.style=e.__assign(e.__assign({},r.style),v.style)),A[N&&-1===b.indexOf(E)?"class":"className"]=l.concat(p,g!==p?g:null,r.className,v.className).filter(Boolean).join(" "),A.ref=_,n.createElement(E,A)}(R,t,r,x)}O.displayName=m;var R=c.default.forwardRef(O);return R.attrs=E,R.componentStyle=I,R.displayName=m,R.shouldForwardProp=N,R.foldedComponentIds=s?i.foldedComponentIds.concat(i.styledComponentId):_,R.styledComponentId=v,R.target=s?i.target:t,R.withComponent=function(t){var n=r.componentId,s=e.__rest(r,["componentId"]),i=n&&"".concat(n,"-").concat(j(t)?t:C(T(t)));return We(t,e.__assign(e.__assign({},s),{attrs:E,componentId:i}),o)},Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=s?function(t){var n,r;void 0===t&&(t={});for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];try{for(var i=e.__values(o),a=i.next();!a.done;a=i.next())K(t,a.value,!0)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t}({},i.defaultProps,t):t}}),"production"!==process.env.NODE_ENV&&(g(m,v),R.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,v)),R.toString=function(){return".".concat(R.styledComponentId)},u&&J(R,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),R}function Ue(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var Je=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Xe(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(Me(t)||Z(t)){var o=t;return Je(Be(Ue(_,e.__spreadArray([o],e.__read(n),!1))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?s:Je(Be(Ue(s,n)))}function Ze(t,n,r){if(void 0===r&&(r=S),!n)throw te(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,Xe.apply(void 0,e.__spreadArray([o],e.__read(s),!1)))};return o.attrs=function(o){return Ze(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ze(t,n,e.__assign(e.__assign({},r),o))},o}var Ke=function(e){return Ze(We,e)},Qe=Ke;b.forEach((function(e){Qe[e]=Ke(e)}));var et=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Le(e),_e.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Be(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&_e.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),tt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=pe(),r=[n&&'nonce="'.concat(n,'"'),"".concat(d,'="true"'),"".concat("data-styled-version",'="').concat(p,'"')].filter(Boolean).join(" ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw te(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw te(2);var r=((n={})[d]="",n["data-styled-version"]=p,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=pe();return o&&(r.nonce=o),[c.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new _e({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw te(2);return c.default.createElement(Oe,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw te(3)},t}(),nt={StyleSheet:_e,mainSheet:Ae};"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__"]||(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=tt,exports.StyleSheetConsumer=Ne,exports.StyleSheetContext=Ee,exports.StyleSheetManager=Oe,exports.ThemeConsumer=Ye,exports.ThemeContext=qe,exports.ThemeProvider=function(t){var r=n.useContext(qe),o=n.useMemo((function(){return function(t,n){if(!t)throw te(14);if(Me(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw te(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw te(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)}),[t.theme,r]);return t.children?c.default.createElement(qe.Provider,{value:o},t.children):null},exports.__PRIVATE__=nt,exports.createGlobalStyle=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=Xe.apply(void 0,e.__spreadArray([t],e.__read(r),!1)),i="sc-global-".concat(D(JSON.stringify(s))),a=new et(s,i);"production"!==process.env.NODE_ENV&&g(i);var u=function(e){var t=Ie(),r=xe(),o=n.useContext(qe),u=n.useRef(t.allocateGSInstance(i)).current;return"production"!==process.env.NODE_ENV&&c.default.Children.count(e.children)&&console.warn("The global style component ".concat(i," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&s.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&l(u,e,t,o,r),n.useLayoutEffect((function(){if(!t.server)return l(u,e,t,o,r),function(){return a.removeStyles(u,t)}}),[u,e,t,o,r]),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,y,r,s);else{var i=e.__assign(e.__assign({},n),{theme:w(n,o,u.defaultProps)});a.renderStyles(t,i,r,s)}}return c.default.memo(u)},exports.css=Xe,exports.default=Qe,exports.isStyledComponent=X,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=Xe.apply(void 0,e.__spreadArray([t],e.__read(n),!1)).join(""),s=D(o);return new Re(s,o)},exports.useTheme=function(){return n.useContext(qe)},exports.version=p,exports.withTheme=function(t){var n=c.default.forwardRef((function(n,r){var o=w(n,c.default.useContext(qe),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(T(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))}));return n.displayName="WithTheme(".concat(T(t),")"),J(n,t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),c=i(n),u=i(r),l=i(s),d="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",p="6.0.0-alpha.3",h="undefined"!=typeof window&&"HTMLElement"in window,f=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),y={},m=/invalid hook call/i,v=new Set,g=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];m.test(t)?(a=!1,v.delete(s)):i.apply(void 0,e.__spreadArray([t],e.__read(n),!1))},n.useRef(),a&&!v.has(s)&&(console.warn(s),v.add(s))}catch(e){m.test(e.message)&&v.delete(s)}finally{console.error=i}}},_=Object.freeze([]),S=Object.freeze({});function w(e,t,n){return void 0===n&&(n=S),e.theme!==n.theme&&e.theme||t||n.theme}var b=["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"],E=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,N=/(^-|-$)/g;function C(e){return e.replace(E,"-").replace(N,"")}var A=/(a)(d)/gi,P=function(e){return String.fromCharCode(e+(e>25?39:97))};function I(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=P(t%52)+n;return(P(t%52)+n).replace(A,"$1-$2")}var x,O=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},R=function(e){return O(5381,e)};function D(e){return I(R(e)>>>0)}function T(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function j(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var k="function"==typeof Symbol&&Symbol.for,V=k?Symbol.for("react.memo"):60115,M=k?Symbol.for("react.forward_ref"):60112,$={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},B={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L=((x={})[M]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},x[V]=B,x);function G(e){return("type"in(t=e)&&t.type.$$typeof)===V?B:"$$typeof"in e?L[e.$$typeof]:$;var t}var F=Object.defineProperty,q=Object.getOwnPropertyNames,Y=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,W=Object.getPrototypeOf,U=Object.prototype;function J(e,t,n){if("string"!=typeof t){if(U){var r=W(t);r&&r!==U&&J(e,r,n)}var o=q(t);Y&&(o=o.concat(Y(t)));for(var s=G(e),i=G(t),a=0;a<o.length;++a){var c=o[a];if(!(c in z||n&&n[c]||i&&c in i||s&&c in s)){var u=H(t,c);try{F(e,c,u)}catch(e){}}}}return e}function X(e){return"object"==typeof e&&"styledComponentId"in e}function Z(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 K(e,t,n){if(void 0===n&&(n=!1),!n&&!Z(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=K(e[r],t[r]);else if(Z(t))for(var r in t)e[r]=K(e[r],t[r]);return e}var Q="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 ee(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function te(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(ee.apply(void 0,e.__spreadArray([Q[t]],e.__read(n),!1)).trim())}var ne=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw te(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}var i=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var a=t.length;s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)}else this.tag.insertRule(i,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),re=new Map,oe=new Map,se=1,ie=function(e){if(re.has(e))return re.get(e);for(;oe.has(se);)se++;var t=se++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw te(16,"".concat(t));return re.set(e,t),oe.set(t,e),t},ae=function(e,t){re.set(e,t),oe.set(t,e)},ce="style[".concat(d,"][").concat("data-styled-version",'="').concat(p,'"]'),ue=new RegExp("^".concat(d,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),le=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},de=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ue);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(ae(l,u),le(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}};function pe(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var he=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(d))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(d,"active"),r.setAttribute("data-styled-version",p);var i=pe();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},fe=function(){function e(e){var t=this.element=he(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw te(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),ye=function(){function e(e){var t=this.element=he(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),me=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),ve=h,ge={isServer:!h,useCSSOMInjection:!f},_e=function(){function t(t,n,r){void 0===t&&(t=S),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},ge),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&h&&ve&&(ve=!1,function(e){for(var t=document.querySelectorAll(ce),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(d)&&(de(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return t.registerId=function(e){return ie(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,r=e.target;return t?new me(r):n?new fe(r):new ye(r)}(this.options),new ne(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(ie(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ie(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ie(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return oe.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(d,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},t}(),Se=/^\s*\/\/.*$/gm,we=[":","[",".","#"];function be(e){var t,n,r,s,i=void 0===e?S:e,a=i.options,c=void 0===a?S:a,u=i.plugins,l=void 0===u?_:u,d=function(e,r,o){return 0===r&&we.includes(o[n.length])||o.match(s)?e:".".concat(t)},p=function(e){if(e.type===o.RULESET&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(r,d)}},h=function(e,i,a,u){void 0===i&&(i=""),void 0===a&&(a=""),void 0===u&&(u="&");var d=e.replace(Se,"");t=u,n=i,r=new RegExp("\\".concat(n,"\\b"),"g"),s=new RegExp("(\\".concat(n,"\\b){2,}"));var h=l.slice();return(c.prefix||void 0===c.prefix)&&h.unshift(o.prefixer),h.push(p,o.stringify),o.serialize(o.compile(a||i?"".concat(a," ").concat(i," { ").concat(d," }"):d),o.middleware(h))};return h.hash=l.length?l.reduce((function(e,t){return t.name||te(15),O(e,t.name)}),5381).toString():"",h}var Ee=c.default.createContext(void 0),Ne=Ee.Consumer,Ce=c.default.createContext(void 0);Ce.Consumer;var Ae=new _e,Pe=be();function Ie(){return n.useContext(Ee)||Ae}function xe(){return n.useContext(Ce)||Pe}function Oe(t){var r=e.__read(n.useState(t.stylisPlugins),2),o=r[0],s=r[1],i=Ie(),a=n.useMemo((function(){var e=i;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),l=n.useMemo((function(){return be({options:{prefix:!t.disableVendorPrefixes},plugins:o})}),[t.disableVendorPrefixes,o]);return n.useEffect((function(){u.default(o,t.stylisPlugins)||s(t.stylisPlugins)}),[t.stylisPlugins]),c.default.createElement(Ee.Provider,{value:a},c.default.createElement(Ce.Provider,{value:l},"production"!==process.env.NODE_ENV?c.default.Children.only(t.children):t.children))}var Re=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw te(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Pe),this.name+e.hash},e}(),De=/([A-Z])/,Te=/([A-Z])/g,je=/^ms-/,ke=function(e){return"-".concat(e.toLowerCase())};function Ve(e){return De.test(e)?e.replace(Te,ke).replace(je,"-ms-"):e}function Me(e){return"function"==typeof e}var $e=function(e){return null==e||!1===e||""===e},ze=function(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!$e(t[i])&&(Array.isArray(t[i])&&t[i].isCss||Me(t[i])?s.push("".concat(Ve(i),":"),t[i],";"):Z(t[i])?s.push.apply(s,e.__spreadArray([],e.__read(ze(t[i],i)),!1)):s.push("".concat(Ve(i),": ").concat((r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.default?String(o).trim():"".concat(o,"px")),";")));return n?e.__spreadArray(e.__spreadArray(["".concat(n," {")],e.__read(s),!1),["}"],!1):s};function Be(t,n,r,o){if(Array.isArray(t)){for(var s=[],i=0,a=t.length,c=void 0;i<a;i+=1)""!==(c=Be(t[i],n,r,o))&&(Array.isArray(c)?s.push.apply(s,e.__spreadArray([],e.__read(c),!1)):s.push(c));return s}if($e(t))return"";if(X(t))return".".concat(t.styledComponentId);if(Me(t)){if("function"!=typeof(l=t)||l.prototype&&l.prototype.isReactComponent||!n)return t;var u=t;return c=u(n),"production"===process.env.NODE_ENV||"object"!=typeof c||Array.isArray(c)||c instanceof Re||Z(c)||console.error("".concat(T(u)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Be(c,n,r,o)}var l;return t instanceof Re?r?(t.inject(r,o),t.getName(o)):t:Z(t)?ze(t):t.toString()}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Me(n)&&!X(n))return!1}return!0}var Ge=R(p),Fe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Le(e),this.componentId=t,this.baseHash=O(Ge,t),this.baseStyle=n,_e.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=Be(this.rules,e,t,n).join(""),i=I(O(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,".".concat(i),void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=O(this.baseHash,n.hash),l="",d=0;d<c;d++){var p=this.rules[d];if("string"==typeof p)l+=p,"production"!==process.env.NODE_ENV&&(u=O(u,p+d));else if(p){var h=Be(p,e,t,n),f=Array.isArray(h)?h.join(""):h;u=O(u,f+d),l+=f}}if(l){var y=I(u>>>0);if(!t.hasNameForId(r,y)){var m=n(l,".".concat(y),void 0,r);t.insertRules(r,y,m)}o.push(y)}}return o.join(" ")},e}(),qe=c.default.createContext(void 0),Ye=qe.Consumer,He={};function We(t,r,o){var s=X(t),i=t,u=!j(t),l=r.attrs,d=void 0===l?_:l,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":C(e);He[n]=(He[n]||0)+1;var r="".concat(n,"-").concat(D(p+n+He[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):h,y=r.displayName,m=void 0===y?function(e){return j(e)?"styled.".concat(e):"Styled(".concat(T(e),")")}(t):y,v=r.displayName&&r.componentId?"".concat(C(r.displayName),"-").concat(r.componentId):r.componentId||f,E=s&&i.attrs?i.attrs.concat(d).filter(Boolean):d,N=r.shouldForwardProp;if(s&&i.shouldForwardProp){var A=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;N=function(e,t,n){return A(e,t,n)&&P(e,t,n)}}else N=A}var I=new Fe(o,v,s?i.componentStyle:void 0),x=I.isStatic&&0===d.length;function O(t,r){return function(t,r,o,s){var i=t.attrs,c=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,d=t.shouldForwardProp,p=t.styledComponentId,h=t.target;"production"!==process.env.NODE_ENV&&n.useDebugValue(p);var f=w(r,n.useContext(qe),u),y=e.__read(function(t,n,r){void 0===t&&(t=S);var o=e.__assign(e.__assign({},n),{theme:t}),s={};return r.forEach((function(e){var t,n,r,i="function"==typeof e?e(o):e;for(t in i)o[t]=s[t]="className"===t?(n=s[t],r=i[t],n&&r?"".concat(n," ").concat(r):n||r):i[t]})),[o,s]}(f||S,r,i),2),m=y[0],v=y[1],g=function(e,t,r,o){var s=Ie(),i=xe(),a=t?e.generateAndInjectStyles(S,s,i):e.generateAndInjectStyles(r,s,i);return"production"!==process.env.NODE_ENV&&n.useDebugValue(a),"production"!==process.env.NODE_ENV&&!t&&o&&o(a),a}(c,s,m,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),_=o,E=v.$as||r.$as||v.as||r.as||h,N=j(E),C=v!==r?e.__assign(e.__assign({},r),v):r,A={};for(var P in C)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?A.as=C[P]:(d?d(P,a.default,E):!N||a.default(P))&&(A[P]=C[P]));return r.style&&v.style!==r.style&&(A.style=e.__assign(e.__assign({},r.style),v.style)),A[N&&-1===b.indexOf(E)?"class":"className"]=l.concat(p,g!==p?g:null,r.className,v.className).filter(Boolean).join(" "),A.ref=_,n.createElement(E,A)}(R,t,r,x)}O.displayName=m;var R=c.default.forwardRef(O);return R.attrs=E,R.componentStyle=I,R.displayName=m,R.shouldForwardProp=N,R.foldedComponentIds=s?i.foldedComponentIds.concat(i.styledComponentId):_,R.styledComponentId=v,R.target=s?i.target:t,R.withComponent=function(t){var n=r.componentId,s=e.__rest(r,["componentId"]),i=n&&"".concat(n,"-").concat(j(t)?t:C(T(t)));return We(t,e.__assign(e.__assign({},s),{attrs:E,componentId:i}),o)},Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=s?function(t){var n,r;void 0===t&&(t={});for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];try{for(var i=e.__values(o),a=i.next();!a.done;a=i.next())K(t,a.value,!0)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t}({},i.defaultProps,t):t}}),"production"!==process.env.NODE_ENV&&(g(m,v),R.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,v)),R.toString=function(){return".".concat(R.styledComponentId)},u&&J(R,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),R}function Ue(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var Je=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Xe(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(Me(t)||Z(t)){var o=t;return Je(Be(Ue(_,e.__spreadArray([o],e.__read(n),!1))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?s:Je(Be(Ue(s,n)))}function Ze(t,n,r){if(void 0===r&&(r=S),!n)throw te(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,Xe.apply(void 0,e.__spreadArray([o],e.__read(s),!1)))};return o.attrs=function(o){return Ze(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ze(t,n,e.__assign(e.__assign({},r),o))},o}var Ke=function(e){return Ze(We,e)},Qe=Ke;b.forEach((function(e){Qe[e]=Ke(e)}));var et=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Le(e),_e.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(Be(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&_e.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),tt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=pe(),r=[n&&'nonce="'.concat(n,'"'),"".concat(d,'="true"'),"".concat("data-styled-version",'="').concat(p,'"')].filter(Boolean).join(" ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw te(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw te(2);var r=((n={})[d]="",n["data-styled-version"]=p,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=pe();return o&&(r.nonce=o),[c.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new _e({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw te(2);return c.default.createElement(Oe,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw te(3)},t}(),nt={StyleSheet:_e,mainSheet:Ae};"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__"]||(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=tt,exports.StyleSheetConsumer=Ne,exports.StyleSheetContext=Ee,exports.StyleSheetManager=Oe,exports.ThemeConsumer=Ye,exports.ThemeContext=qe,exports.ThemeProvider=function(t){var r=n.useContext(qe),o=n.useMemo((function(){return function(t,n){if(!t)throw te(14);if(Me(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw te(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw te(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)}),[t.theme,r]);return t.children?c.default.createElement(qe.Provider,{value:o},t.children):null},exports.__PRIVATE__=nt,exports.createGlobalStyle=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=Xe.apply(void 0,e.__spreadArray([t],e.__read(r),!1)),i="sc-global-".concat(D(JSON.stringify(s))),a=new et(s,i);"production"!==process.env.NODE_ENV&&g(i);var u=function(e){var t=Ie(),r=xe(),o=n.useContext(qe),u=n.useRef(t.allocateGSInstance(i)).current;return"production"!==process.env.NODE_ENV&&c.default.Children.count(e.children)&&console.warn("The global style component ".concat(i," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&s.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&l(u,e,t,o,r),n.useLayoutEffect((function(){if(!t.server)return l(u,e,t,o,r),function(){return a.removeStyles(u,t)}}),[u,e,t,o,r]),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,y,r,s);else{var i=e.__assign(e.__assign({},n),{theme:w(n,o,u.defaultProps)});a.renderStyles(t,i,r,s)}}return c.default.memo(u)},exports.css=Xe,exports.default=Qe,exports.isStyledComponent=X,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=Xe.apply(void 0,e.__spreadArray([t],e.__read(n),!1)).join(""),s=D(o);return new Re(s,o)},exports.useTheme=function(){return n.useContext(qe)},exports.version=p,exports.withTheme=function(t){var n=c.default.forwardRef((function(n,r){var o=w(n,c.default.useContext(qe),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(T(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))}));return n.displayName="WithTheme(".concat(T(t),")"),J(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__read as t,__values as n,__assign as o,__rest as r}from"tslib";import i from"@emotion/is-prop-valid";import s,{useRef as a,useState as c,useContext as l,useMemo as u,useEffect as p,createElement as d,useDebugValue as h,useLayoutEffect as f}from"react";import y from"shallowequal";import{prefixer as m,stringify as v,serialize as g,compile as S,middleware as w,RULESET as b}from"stylis";import E from"@emotion/unitless";var N="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",_="6.0.0-alpha.2",C="undefined"!=typeof window&&"HTMLElement"in window,A=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={},I=/invalid hook call/i,O=new Set,D=function(n,o){if("production"!==process.env.NODE_ENV){var r=o?' with the id of "'.concat(o,'"'):"",i="The component ".concat(n).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",s=console.error;try{var c=!0;console.error=function(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];I.test(n)?(c=!1,O.delete(i)):s.apply(void 0,e([n],t(o),!1))},a(),c&&!O.has(i)&&(console.warn(i),O.add(i))}catch(e){I.test(e.message)&&O.delete(i)}finally{console.error=s}}},R=Object.freeze([]),j=Object.freeze({});function T(e,t,n){return void 0===n&&(n=j),e.theme!==n.theme&&e.theme||t||n.theme}var x=["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"],k=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,V=/(^-|-$)/g;function $(e){return e.replace(k,"-").replace(V,"")}var B=/(a)(d)/gi,z=function(e){return String.fromCharCode(e+(e>25?39:97))};function M(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=z(t%52)+n;return(z(t%52)+n).replace(B,"$1-$2")}var F,G=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},L=function(e){return G(5381,e)};function Y(e){return M(L(e)>>>0)}function q(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function H(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var W="function"==typeof Symbol&&Symbol.for,U=W?Symbol.for("react.memo"):60115,J=W?Symbol.for("react.forward_ref"):60112,X={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},K={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Q=((F={})[J]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[U]=K,F);function ee(e){return("type"in(t=e)&&t.type.$$typeof)===U?K:"$$typeof"in e?Q[e.$$typeof]:X;var t}var te=Object.defineProperty,ne=Object.getOwnPropertyNames,oe=Object.getOwnPropertySymbols,re=Object.getOwnPropertyDescriptor,ie=Object.getPrototypeOf,se=Object.prototype;function ae(e,t,n){if("string"!=typeof t){if(se){var o=ie(t);o&&o!==se&&ae(e,o,n)}var r=ne(t);oe&&(r=r.concat(oe(t)));for(var i=ee(e),s=ee(t),a=0;a<r.length;++a){var c=r[a];if(!(c in Z||n&&n[c]||s&&c in s||i&&c in i)){var l=re(t,c);try{te(e,c,l)}catch(e){}}}}return e}function ce(e){return"object"==typeof e&&"styledComponentId"in e}function le(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 ue(e,t,n){if(void 0===n&&(n=!1),!n&&!le(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=ue(e[o],t[o]);else if(le(t))for(var o in t)e[o]=ue(e[o],t[o]);return e}var pe="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 de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,i=e.length;r<i;r+=1)o.push(e[r]);return o.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function he(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(n," for more information.").concat(o.length>0?" Args: ".concat(o.join(", ")):"")):new Error(de.apply(void 0,e([pe[n]],t(o),!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var i=o;i<r;i++)this.groupSizes[i]=0}var s=this.indexOfGroup(e+1);if(Array.isArray(t)){i=0;for(var a=t.length;i<a;i++)this.tag.insertRule(s,t[i])&&(this.groupSizes[e]++,s++)}else this.tag.insertRule(s,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,i=o;i<r;i++)t+="".concat(this.tag.getRule(i)).concat("/*!sc*/\n");return t},e}(),ye=new Map,me=new Map,ve=1,ge=function(e){if(ye.has(e))return ye.get(e);for(;me.has(ve);)ve++;var t=ve++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw he(16,"".concat(t));return ye.set(e,t),me.set(t,e),t},Se=function(e,t){ye.set(e,t),me.set(t,e)},we="style[".concat(N,"][").concat("data-styled-version",'="').concat(_,'"]'),be=new RegExp("^".concat(N,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ee=function(e,t,n){for(var o,r=n.split(","),i=0,s=r.length;i<s;i++)(o=r[i])&&e.registerName(t,o)},Ne=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),r=[],i=0,s=o.length;i<s;i++){var a=o[i].trim();if(a){var c=a.match(be);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(Se(u,l),Ee(e,u,c[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}};function _e(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ce=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var o=t[n];if(o&&1===o.nodeType&&o.hasAttribute(N))return o}}(n),i=void 0!==r?r.nextSibling:null;o.setAttribute(N,"active"),o.setAttribute("data-styled-version",_);var s=_e();return s&&o.setAttribute("nonce",s),n.insertBefore(o,i),o},Ae=function(){function e(e){var t=this.element=Ce(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw he(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Pe=function(){function e(e){var t=this.element=Ce(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Ie=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Oe=C,De={isServer:!C,useCSSOMInjection:!A},Re=function(){function e(e,t,n){void 0===e&&(e=j),void 0===t&&(t={}),this.options=o(o({},De),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&C&&Oe&&(Oe=!1,function(e){for(var t=document.querySelectorAll(we),n=0,o=t.length;n<o;n++){var r=t[n];r&&"active"!==r.getAttribute(N)&&(Ne(e,r),r.parentNode&&r.parentNode.removeChild(r))}}(this))}return e.registerId=function(e){return ge(e)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(o(o({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,o=e.target;return t?new Ie(o):n?new Ae(o):new Pe(o)}(this.options),new fe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ge(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ge(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ge(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return me.get(e)}(n);if(void 0===r)return"continue";var i=e.names.get(r),s=t.getGroup(n);if(void 0===i||0===s.length)return"continue";var a="".concat(N,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),o+="".concat(s).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},i=0;i<n;i++)r(i);return o}(this)},e}(),je=/^\s*\/\/.*$/gm,Te=[":","[",".","#"];function xe(e){var t,n,o,r,i=void 0===e?j:e,s=i.options,a=void 0===s?j:s,c=i.plugins,l=void 0===c?R:c,u=function(e,o,i){return 0===o&&Te.includes(i[n.length])||i.match(r)?e:".".concat(t)},p=function(e){if(e.type===b&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(o,u)}},d=function(e,i,s,c){void 0===i&&(i=""),void 0===s&&(s=""),void 0===c&&(c="&");var u=e.replace(je,"");t=c,n=i,o=new RegExp("\\".concat(n,"\\b"),"g"),r=new RegExp("(\\".concat(n,"\\b){2,}"));var d=l.slice();return(a.prefix||void 0===a.prefix)&&d.unshift(m),d.push(p,v),g(S(s||i?"".concat(s," ").concat(i," { ").concat(u," }"):u),w(d))};return d.hash=l.length?l.reduce((function(e,t){return t.name||he(15),G(e,t.name)}),5381).toString():"",d}var ke=s.createContext(void 0),Ve=ke.Consumer,$e=s.createContext(void 0);$e.Consumer;var Be=new Re,ze=xe();function Me(){return l(ke)||Be}function Fe(){return l($e)||ze}function Ge(e){var n=t(c(e.stylisPlugins),2),o=n[0],r=n[1],i=Me(),a=u((function(){var t=i;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]),l=u((function(){return xe({options:{prefix:!e.disableVendorPrefixes},plugins:o})}),[e.disableVendorPrefixes,o]);return p((function(){y(o,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),s.createElement(ke.Provider,{value:a},s.createElement($e.Provider,{value:l},"production"!==process.env.NODE_ENV?s.Children.only(e.children):e.children))}var Le=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"))},this.toString=function(){throw he(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),Ye=/([A-Z])/,qe=/([A-Z])/g,He=/^ms-/,We=function(e){return"-".concat(e.toLowerCase())};function Ue(e){return Ye.test(e)?e.replace(qe,We).replace(He,"-ms-"):e}function Je(e){return"function"==typeof e}var Xe=function(e){return null==e||!1===e||""===e},Ze=function(n,o){var r,i,s=[];for(var a in n)n.hasOwnProperty(a)&&!Xe(n[a])&&(Array.isArray(n[a])&&n[a].isCss||Je(n[a])?s.push("".concat(Ue(a),":"),n[a],";"):le(n[a])?s.push.apply(s,e([],t(Ze(n[a],a)),!1)):s.push("".concat(Ue(a),": ").concat((r=a,null==(i=n[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in E?String(i).trim():"".concat(i,"px")),";")));return o?e(e(["".concat(o," {")],t(s),!1),["}"],!1):s};function Ke(n,o,r,i){if(Array.isArray(n)){for(var s=[],a=0,c=n.length,l=void 0;a<c;a+=1)""!==(l=Ke(n[a],o,r,i))&&(Array.isArray(l)?s.push.apply(s,e([],t(l),!1)):s.push(l));return s}if(Xe(n))return"";if(ce(n))return".".concat(n.styledComponentId);if(Je(n)){if("function"!=typeof(p=n)||p.prototype&&p.prototype.isReactComponent||!o)return n;var u=n;return l=u(o),"production"===process.env.NODE_ENV||"object"!=typeof l||Array.isArray(l)||l instanceof Le||le(l)||console.error("".concat(q(u)," 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.")),Ke(l,o,r,i)}var p;return n instanceof Le?r?(n.inject(r,i),n.getName(i)):n:le(n)?Ze(n):n.toString()}function Qe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Je(n)&&!ce(n))return!1}return!0}var et=L(_),tt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Qe(e),this.componentId=t,this.baseHash=G(et,t),this.baseStyle=n,Re.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.componentId,r=[];if(this.baseStyle&&r.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))r.push(this.staticRulesId);else{var i=Ke(this.rules,e,t,n).join(""),s=M(G(this.baseHash,i)>>>0);if(!t.hasNameForId(o,s)){var a=n(i,".".concat(s),void 0,o);t.insertRules(o,s,a)}r.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,l=G(this.baseHash,n.hash),u="",p=0;p<c;p++){var d=this.rules[p];if("string"==typeof d)u+=d,"production"!==process.env.NODE_ENV&&(l=G(l,d+p));else if(d){var h=Ke(d,e,t,n),f=Array.isArray(h)?h.join(""):h;l=G(l,f+p),u+=f}}if(u){var y=M(l>>>0);if(!t.hasNameForId(o,y)){var m=n(u,".".concat(y),void 0,o);t.insertRules(o,y,m)}r.push(y)}}return r.join(" ")},e}(),nt=s.createContext(void 0),ot=nt.Consumer;function rt(e){var t=l(nt),n=u((function(){return function(e,t){if(!e)throw he(14);if(Je(e)){var n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw he(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw he(8);return t?o(o({},t),e):e}(e.theme,t)}),[e.theme,t]);return e.children?s.createElement(nt.Provider,{value:n},e.children):null}var it={};function st(e,a,c){var u=ce(e),p=e,f=!H(e),y=a.attrs,m=void 0===y?R:y,v=a.componentId,g=void 0===v?function(e,t){var n="string"!=typeof e?"sc":$(e);it[n]=(it[n]||0)+1;var o="".concat(n,"-").concat(Y(_+n+it[n]));return t?"".concat(t,"-").concat(o):o}(a.displayName,a.parentComponentId):v,S=a.displayName,w=void 0===S?function(e){return H(e)?"styled.".concat(e):"Styled(".concat(q(e),")")}(e):S,b=a.displayName&&a.componentId?"".concat($(a.displayName),"-").concat(a.componentId):a.componentId||g,E=u&&p.attrs?p.attrs.concat(m).filter(Boolean):m,N=a.shouldForwardProp;if(u&&p.shouldForwardProp){var C=p.shouldForwardProp;if(a.shouldForwardProp){var A=a.shouldForwardProp;N=function(e,t,n){return C(e,t,n)&&A(e,t,n)}}else N=C}var P=new tt(c,b,u?p.componentStyle:void 0),I=P.isStatic&&0===m.length;function O(e,n){return function(e,n,r,s){var a=e.attrs,c=e.componentStyle,u=e.defaultProps,p=e.foldedComponentIds,f=e.shouldForwardProp,y=e.styledComponentId,m=e.target;"production"!==process.env.NODE_ENV&&h(y);var v=T(n,l(nt),u),g=t(function(e,t,n){void 0===e&&(e=j);var r=o(o({},t),{theme:e}),i={};return n.forEach((function(e){var t,n,o,s="function"==typeof e?e(r):e;for(t in s)r[t]=i[t]="className"===t?(n=i[t],o=s[t],n&&o?"".concat(n," ").concat(o):n||o):s[t]})),[r,i]}(v||j,n,a),2),S=g[0],w=g[1],b=function(e,t,n,o){var r=Me(),i=Fe(),s=t?e.generateAndInjectStyles(j,r,i):e.generateAndInjectStyles(n,r,i);return"production"!==process.env.NODE_ENV&&h(s),"production"!==process.env.NODE_ENV&&!t&&o&&o(s),s}(c,s,S,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),E=r,N=w.$as||n.$as||w.as||n.as||m,_=H(N),C=w!==n?o(o({},n),w):n,A={};for(var P in C)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?A.as=C[P]:(f?f(P,i,N):!_||i(P))&&(A[P]=C[P]));return n.style&&w.style!==n.style&&(A.style=o(o({},n.style),w.style)),A[_&&-1===x.indexOf(N)?"class":"className"]=p.concat(y,b!==y?b:null,n.className,w.className).filter(Boolean).join(" "),A.ref=E,d(N,A)}(k,e,n,I)}O.displayName=w;var k=s.forwardRef(O);return k.attrs=E,k.componentStyle=P,k.displayName=w,k.shouldForwardProp=N,k.foldedComponentIds=u?p.foldedComponentIds.concat(p.styledComponentId):R,k.styledComponentId=b,k.target=u?p.target:e,k.withComponent=function(e){var t=a.componentId,n=r(a,["componentId"]),i=t&&"".concat(t,"-").concat(H(e)?e:$(q(e)));return st(e,o(o({},n),{attrs:E,componentId:i}),c)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=u?function(e){var t,o;void 0===e&&(e={});for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];try{for(var s=n(r),a=s.next();!a.done;a=s.next())ue(e,a.value,!0)}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}return e}({},p.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(D(w,b),k.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var i=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(i,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={}}}}(w,b)),k.toString=function(){return".".concat(k.styledComponentId)},f&&ae(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}function at(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var ct=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function lt(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];if(Je(n)||le(n)){var i=n;return ct(Ke(at(R,e([i],t(o),!1))))}var s=n;return 0===o.length&&1===s.length&&"string"==typeof s[0]?s:ct(Ke(at(s,o)))}function ut(n,r,i){if(void 0===i&&(i=j),!r)throw he(1,r);var s=function(o){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];return n(r,i,lt.apply(void 0,e([o],t(s),!1)))};return s.attrs=function(e){return ut(n,r,o(o({},i),{attrs:Array.prototype.concat(i.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,r,o(o({},i),e))},s}var pt=function(e){return ut(st,e)},dt=pt;x.forEach((function(e){dt[e]=pt(e)}));var ht=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Qe(e),Re.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,o){var r=o(Ke(this.rules,t,n,o).join(""),""),i=this.componentId+e;n.insertRules(i,i,r)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,o){e>2&&Re.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)},e}();function ft(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var c=lt.apply(void 0,e([n],t(r),!1)),u="sc-global-".concat(Y(JSON.stringify(c))),p=new ht(c,u);"production"!==process.env.NODE_ENV&&D(u);var d=function(e){var t=Me(),n=Fe(),o=l(nt),r=a(t.allocateGSInstance(u)).current;return"production"!==process.env.NODE_ENV&&s.Children.count(e.children)&&console.warn("The global style component ".concat(u," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&c.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&h(r,e,t,o,n),f((function(){if(!t.server)return h(r,e,t,o,n),function(){return p.removeStyles(r,t)}}),[r,e,t,o,n]),null};function h(e,t,n,r,i){if(p.isStatic)p.renderStyles(e,P,n,i);else{var s=o(o({},t),{theme:T(t,r,d.defaultProps)});p.renderStyles(e,s,n,i)}}return s.memo(d)}function yt(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var i=lt.apply(void 0,e([n],t(o),!1)).join(""),s=Y(i);return new Le(s,i)}function mt(e){var t=s.forwardRef((function(t,n){var r=T(t,s.useContext(nt),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===r&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(q(e),'"')),s.createElement(e,o({},t,{theme:r,ref:n}))}));return t.displayName="WithTheme(".concat(q(e),")"),ae(t,e)}var vt=function(){return l(nt)},gt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=_e(),o=[n&&'nonce="'.concat(n,'"'),"".concat(N,'="true"'),"".concat("data-styled-version",'="').concat(_,'"')].filter(Boolean).join(" ");return"<style ".concat(o,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw he(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw he(2);var n=((t={})[N]="",t["data-styled-version"]=_,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=_e();return r&&(n.nonce=r),[s.createElement("style",o({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Re({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw he(2);return s.createElement(Ge,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw he(3)},e}(),St={StyleSheet:Re,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&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||(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{gt as ServerStyleSheet,Ve as StyleSheetConsumer,ke as StyleSheetContext,Ge as StyleSheetManager,ot as ThemeConsumer,nt as ThemeContext,rt as ThemeProvider,St as __PRIVATE__,ft as createGlobalStyle,lt as css,dt as default,ce as isStyledComponent,yt as keyframes,vt as useTheme,_ as version,mt as withTheme};
|
|
1
|
+
import{__spreadArray as e,__read as t,__values as n,__assign as o,__rest as r}from"tslib";import i from"@emotion/is-prop-valid";import s,{useRef as a,useState as c,useContext as l,useMemo as u,useEffect as p,createElement as d,useDebugValue as h,useLayoutEffect as f}from"react";import y from"shallowequal";import{prefixer as m,stringify as v,serialize as g,compile as S,middleware as w,RULESET as b}from"stylis";import E from"@emotion/unitless";var N="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",_="6.0.0-alpha.3",C="undefined"!=typeof window&&"HTMLElement"in window,A=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={},I=/invalid hook call/i,O=new Set,D=function(n,o){if("production"!==process.env.NODE_ENV){var r=o?' with the id of "'.concat(o,'"'):"",i="The component ".concat(n).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",s=console.error;try{var c=!0;console.error=function(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];I.test(n)?(c=!1,O.delete(i)):s.apply(void 0,e([n],t(o),!1))},a(),c&&!O.has(i)&&(console.warn(i),O.add(i))}catch(e){I.test(e.message)&&O.delete(i)}finally{console.error=s}}},R=Object.freeze([]),j=Object.freeze({});function T(e,t,n){return void 0===n&&(n=j),e.theme!==n.theme&&e.theme||t||n.theme}var x=["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"],k=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,V=/(^-|-$)/g;function $(e){return e.replace(k,"-").replace(V,"")}var B=/(a)(d)/gi,z=function(e){return String.fromCharCode(e+(e>25?39:97))};function M(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=z(t%52)+n;return(z(t%52)+n).replace(B,"$1-$2")}var F,G=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},L=function(e){return G(5381,e)};function Y(e){return M(L(e)>>>0)}function q(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function H(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var W="function"==typeof Symbol&&Symbol.for,U=W?Symbol.for("react.memo"):60115,J=W?Symbol.for("react.forward_ref"):60112,X={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},K={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Q=((F={})[J]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[U]=K,F);function ee(e){return("type"in(t=e)&&t.type.$$typeof)===U?K:"$$typeof"in e?Q[e.$$typeof]:X;var t}var te=Object.defineProperty,ne=Object.getOwnPropertyNames,oe=Object.getOwnPropertySymbols,re=Object.getOwnPropertyDescriptor,ie=Object.getPrototypeOf,se=Object.prototype;function ae(e,t,n){if("string"!=typeof t){if(se){var o=ie(t);o&&o!==se&&ae(e,o,n)}var r=ne(t);oe&&(r=r.concat(oe(t)));for(var i=ee(e),s=ee(t),a=0;a<r.length;++a){var c=r[a];if(!(c in Z||n&&n[c]||s&&c in s||i&&c in i)){var l=re(t,c);try{te(e,c,l)}catch(e){}}}}return e}function ce(e){return"object"==typeof e&&"styledComponentId"in e}function le(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 ue(e,t,n){if(void 0===n&&(n=!1),!n&&!le(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=ue(e[o],t[o]);else if(le(t))for(var o in t)e[o]=ue(e[o],t[o]);return e}var pe="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 de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,i=e.length;r<i;r+=1)o.push(e[r]);return o.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function he(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(n," for more information.").concat(o.length>0?" Args: ".concat(o.join(", ")):"")):new Error(de.apply(void 0,e([pe[n]],t(o),!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var i=o;i<r;i++)this.groupSizes[i]=0}var s=this.indexOfGroup(e+1);if(Array.isArray(t)){i=0;for(var a=t.length;i<a;i++)this.tag.insertRule(s,t[i])&&(this.groupSizes[e]++,s++)}else this.tag.insertRule(s,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,i=o;i<r;i++)t+="".concat(this.tag.getRule(i)).concat("/*!sc*/\n");return t},e}(),ye=new Map,me=new Map,ve=1,ge=function(e){if(ye.has(e))return ye.get(e);for(;me.has(ve);)ve++;var t=ve++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw he(16,"".concat(t));return ye.set(e,t),me.set(t,e),t},Se=function(e,t){ye.set(e,t),me.set(t,e)},we="style[".concat(N,"][").concat("data-styled-version",'="').concat(_,'"]'),be=new RegExp("^".concat(N,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ee=function(e,t,n){for(var o,r=n.split(","),i=0,s=r.length;i<s;i++)(o=r[i])&&e.registerName(t,o)},Ne=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),r=[],i=0,s=o.length;i<s;i++){var a=o[i].trim();if(a){var c=a.match(be);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(Se(u,l),Ee(e,u,c[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}};function _e(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ce=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var o=t[n];if(o&&1===o.nodeType&&o.hasAttribute(N))return o}}(n),i=void 0!==r?r.nextSibling:null;o.setAttribute(N,"active"),o.setAttribute("data-styled-version",_);var s=_e();return s&&o.setAttribute("nonce",s),n.insertBefore(o,i),o},Ae=function(){function e(e){var t=this.element=Ce(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw he(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Pe=function(){function e(e){var t=this.element=Ce(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Ie=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Oe=C,De={isServer:!C,useCSSOMInjection:!A},Re=function(){function e(e,t,n){void 0===e&&(e=j),void 0===t&&(t={}),this.options=o(o({},De),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&C&&Oe&&(Oe=!1,function(e){for(var t=document.querySelectorAll(we),n=0,o=t.length;n<o;n++){var r=t[n];r&&"active"!==r.getAttribute(N)&&(Ne(e,r),r.parentNode&&r.parentNode.removeChild(r))}}(this))}return e.registerId=function(e){return ge(e)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(o(o({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,o=e.target;return t?new Ie(o):n?new Ae(o):new Pe(o)}(this.options),new fe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ge(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ge(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ge(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return me.get(e)}(n);if(void 0===r)return"continue";var i=e.names.get(r),s=t.getGroup(n);if(void 0===i||0===s.length)return"continue";var a="".concat(N,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),o+="".concat(s).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},i=0;i<n;i++)r(i);return o}(this)},e}(),je=/^\s*\/\/.*$/gm,Te=[":","[",".","#"];function xe(e){var t,n,o,r,i=void 0===e?j:e,s=i.options,a=void 0===s?j:s,c=i.plugins,l=void 0===c?R:c,u=function(e,o,i){return 0===o&&Te.includes(i[n.length])||i.match(r)?e:".".concat(t)},p=function(e){if(e.type===b&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(o,u)}},d=function(e,i,s,c){void 0===i&&(i=""),void 0===s&&(s=""),void 0===c&&(c="&");var u=e.replace(je,"");t=c,n=i,o=new RegExp("\\".concat(n,"\\b"),"g"),r=new RegExp("(\\".concat(n,"\\b){2,}"));var d=l.slice();return(a.prefix||void 0===a.prefix)&&d.unshift(m),d.push(p,v),g(S(s||i?"".concat(s," ").concat(i," { ").concat(u," }"):u),w(d))};return d.hash=l.length?l.reduce((function(e,t){return t.name||he(15),G(e,t.name)}),5381).toString():"",d}var ke=s.createContext(void 0),Ve=ke.Consumer,$e=s.createContext(void 0);$e.Consumer;var Be=new Re,ze=xe();function Me(){return l(ke)||Be}function Fe(){return l($e)||ze}function Ge(e){var n=t(c(e.stylisPlugins),2),o=n[0],r=n[1],i=Me(),a=u((function(){var t=i;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]),l=u((function(){return xe({options:{prefix:!e.disableVendorPrefixes},plugins:o})}),[e.disableVendorPrefixes,o]);return p((function(){y(o,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),s.createElement(ke.Provider,{value:a},s.createElement($e.Provider,{value:l},"production"!==process.env.NODE_ENV?s.Children.only(e.children):e.children))}var Le=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"))},this.toString=function(){throw he(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),Ye=/([A-Z])/,qe=/([A-Z])/g,He=/^ms-/,We=function(e){return"-".concat(e.toLowerCase())};function Ue(e){return Ye.test(e)?e.replace(qe,We).replace(He,"-ms-"):e}function Je(e){return"function"==typeof e}var Xe=function(e){return null==e||!1===e||""===e},Ze=function(n,o){var r,i,s=[];for(var a in n)n.hasOwnProperty(a)&&!Xe(n[a])&&(Array.isArray(n[a])&&n[a].isCss||Je(n[a])?s.push("".concat(Ue(a),":"),n[a],";"):le(n[a])?s.push.apply(s,e([],t(Ze(n[a],a)),!1)):s.push("".concat(Ue(a),": ").concat((r=a,null==(i=n[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in E?String(i).trim():"".concat(i,"px")),";")));return o?e(e(["".concat(o," {")],t(s),!1),["}"],!1):s};function Ke(n,o,r,i){if(Array.isArray(n)){for(var s=[],a=0,c=n.length,l=void 0;a<c;a+=1)""!==(l=Ke(n[a],o,r,i))&&(Array.isArray(l)?s.push.apply(s,e([],t(l),!1)):s.push(l));return s}if(Xe(n))return"";if(ce(n))return".".concat(n.styledComponentId);if(Je(n)){if("function"!=typeof(p=n)||p.prototype&&p.prototype.isReactComponent||!o)return n;var u=n;return l=u(o),"production"===process.env.NODE_ENV||"object"!=typeof l||Array.isArray(l)||l instanceof Le||le(l)||console.error("".concat(q(u)," 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.")),Ke(l,o,r,i)}var p;return n instanceof Le?r?(n.inject(r,i),n.getName(i)):n:le(n)?Ze(n):n.toString()}function Qe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Je(n)&&!ce(n))return!1}return!0}var et=L(_),tt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Qe(e),this.componentId=t,this.baseHash=G(et,t),this.baseStyle=n,Re.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.componentId,r=[];if(this.baseStyle&&r.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))r.push(this.staticRulesId);else{var i=Ke(this.rules,e,t,n).join(""),s=M(G(this.baseHash,i)>>>0);if(!t.hasNameForId(o,s)){var a=n(i,".".concat(s),void 0,o);t.insertRules(o,s,a)}r.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,l=G(this.baseHash,n.hash),u="",p=0;p<c;p++){var d=this.rules[p];if("string"==typeof d)u+=d,"production"!==process.env.NODE_ENV&&(l=G(l,d+p));else if(d){var h=Ke(d,e,t,n),f=Array.isArray(h)?h.join(""):h;l=G(l,f+p),u+=f}}if(u){var y=M(l>>>0);if(!t.hasNameForId(o,y)){var m=n(u,".".concat(y),void 0,o);t.insertRules(o,y,m)}r.push(y)}}return r.join(" ")},e}(),nt=s.createContext(void 0),ot=nt.Consumer;function rt(e){var t=l(nt),n=u((function(){return function(e,t){if(!e)throw he(14);if(Je(e)){var n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw he(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw he(8);return t?o(o({},t),e):e}(e.theme,t)}),[e.theme,t]);return e.children?s.createElement(nt.Provider,{value:n},e.children):null}var it={};function st(e,a,c){var u=ce(e),p=e,f=!H(e),y=a.attrs,m=void 0===y?R:y,v=a.componentId,g=void 0===v?function(e,t){var n="string"!=typeof e?"sc":$(e);it[n]=(it[n]||0)+1;var o="".concat(n,"-").concat(Y(_+n+it[n]));return t?"".concat(t,"-").concat(o):o}(a.displayName,a.parentComponentId):v,S=a.displayName,w=void 0===S?function(e){return H(e)?"styled.".concat(e):"Styled(".concat(q(e),")")}(e):S,b=a.displayName&&a.componentId?"".concat($(a.displayName),"-").concat(a.componentId):a.componentId||g,E=u&&p.attrs?p.attrs.concat(m).filter(Boolean):m,N=a.shouldForwardProp;if(u&&p.shouldForwardProp){var C=p.shouldForwardProp;if(a.shouldForwardProp){var A=a.shouldForwardProp;N=function(e,t,n){return C(e,t,n)&&A(e,t,n)}}else N=C}var P=new tt(c,b,u?p.componentStyle:void 0),I=P.isStatic&&0===m.length;function O(e,n){return function(e,n,r,s){var a=e.attrs,c=e.componentStyle,u=e.defaultProps,p=e.foldedComponentIds,f=e.shouldForwardProp,y=e.styledComponentId,m=e.target;"production"!==process.env.NODE_ENV&&h(y);var v=T(n,l(nt),u),g=t(function(e,t,n){void 0===e&&(e=j);var r=o(o({},t),{theme:e}),i={};return n.forEach((function(e){var t,n,o,s="function"==typeof e?e(r):e;for(t in s)r[t]=i[t]="className"===t?(n=i[t],o=s[t],n&&o?"".concat(n," ").concat(o):n||o):s[t]})),[r,i]}(v||j,n,a),2),S=g[0],w=g[1],b=function(e,t,n,o){var r=Me(),i=Fe(),s=t?e.generateAndInjectStyles(j,r,i):e.generateAndInjectStyles(n,r,i);return"production"!==process.env.NODE_ENV&&h(s),"production"!==process.env.NODE_ENV&&!t&&o&&o(s),s}(c,s,S,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),E=r,N=w.$as||n.$as||w.as||n.as||m,_=H(N),C=w!==n?o(o({},n),w):n,A={};for(var P in C)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?A.as=C[P]:(f?f(P,i,N):!_||i(P))&&(A[P]=C[P]));return n.style&&w.style!==n.style&&(A.style=o(o({},n.style),w.style)),A[_&&-1===x.indexOf(N)?"class":"className"]=p.concat(y,b!==y?b:null,n.className,w.className).filter(Boolean).join(" "),A.ref=E,d(N,A)}(k,e,n,I)}O.displayName=w;var k=s.forwardRef(O);return k.attrs=E,k.componentStyle=P,k.displayName=w,k.shouldForwardProp=N,k.foldedComponentIds=u?p.foldedComponentIds.concat(p.styledComponentId):R,k.styledComponentId=b,k.target=u?p.target:e,k.withComponent=function(e){var t=a.componentId,n=r(a,["componentId"]),i=t&&"".concat(t,"-").concat(H(e)?e:$(q(e)));return st(e,o(o({},n),{attrs:E,componentId:i}),c)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=u?function(e){var t,o;void 0===e&&(e={});for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];try{for(var s=n(r),a=s.next();!a.done;a=s.next())ue(e,a.value,!0)}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}return e}({},p.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(D(w,b),k.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var i=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(i,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={}}}}(w,b)),k.toString=function(){return".".concat(k.styledComponentId)},f&&ae(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}function at(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var ct=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function lt(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];if(Je(n)||le(n)){var i=n;return ct(Ke(at(R,e([i],t(o),!1))))}var s=n;return 0===o.length&&1===s.length&&"string"==typeof s[0]?s:ct(Ke(at(s,o)))}function ut(n,r,i){if(void 0===i&&(i=j),!r)throw he(1,r);var s=function(o){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];return n(r,i,lt.apply(void 0,e([o],t(s),!1)))};return s.attrs=function(e){return ut(n,r,o(o({},i),{attrs:Array.prototype.concat(i.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,r,o(o({},i),e))},s}var pt=function(e){return ut(st,e)},dt=pt;x.forEach((function(e){dt[e]=pt(e)}));var ht=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Qe(e),Re.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,o){var r=o(Ke(this.rules,t,n,o).join(""),""),i=this.componentId+e;n.insertRules(i,i,r)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,o){e>2&&Re.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)},e}();function ft(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var c=lt.apply(void 0,e([n],t(r),!1)),u="sc-global-".concat(Y(JSON.stringify(c))),p=new ht(c,u);"production"!==process.env.NODE_ENV&&D(u);var d=function(e){var t=Me(),n=Fe(),o=l(nt),r=a(t.allocateGSInstance(u)).current;return"production"!==process.env.NODE_ENV&&s.Children.count(e.children)&&console.warn("The global style component ".concat(u," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&c.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&h(r,e,t,o,n),f((function(){if(!t.server)return h(r,e,t,o,n),function(){return p.removeStyles(r,t)}}),[r,e,t,o,n]),null};function h(e,t,n,r,i){if(p.isStatic)p.renderStyles(e,P,n,i);else{var s=o(o({},t),{theme:T(t,r,d.defaultProps)});p.renderStyles(e,s,n,i)}}return s.memo(d)}function yt(n){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var i=lt.apply(void 0,e([n],t(o),!1)).join(""),s=Y(i);return new Le(s,i)}function mt(e){var t=s.forwardRef((function(t,n){var r=T(t,s.useContext(nt),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===r&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(q(e),'"')),s.createElement(e,o({},t,{theme:r,ref:n}))}));return t.displayName="WithTheme(".concat(q(e),")"),ae(t,e)}var vt=function(){return l(nt)},gt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=_e(),o=[n&&'nonce="'.concat(n,'"'),"".concat(N,'="true"'),"".concat("data-styled-version",'="').concat(_,'"')].filter(Boolean).join(" ");return"<style ".concat(o,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw he(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw he(2);var n=((t={})[N]="",t["data-styled-version"]=_,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=_e();return r&&(n.nonce=r),[s.createElement("style",o({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Re({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw he(2);return s.createElement(Ge,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw he(3)},e}(),St={StyleSheet:Re,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&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||(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{gt as ServerStyleSheet,Ve as StyleSheetConsumer,ke as StyleSheetContext,Ge as StyleSheetManager,ot as ThemeConsumer,nt as ThemeContext,rt as ThemeProvider,St as __PRIVATE__,ft as createGlobalStyle,lt as css,dt as default,ce as isStyledComponent,yt as keyframes,vt as useTheme,_ as version,mt 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("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),c=i(n),u=i(r),l=i(s),p="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d="6.0.0-alpha.2",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),f={},y=/invalid hook call/i,m=new Set,v=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];y.test(t)?(a=!1,m.delete(s)):i.apply(void 0,e.__spreadArray([t],e.__read(n),!1))},n.useRef(),a&&!m.has(s)&&(console.warn(s),m.add(s))}catch(e){y.test(e.message)&&m.delete(s)}finally{console.error=i}}},g=Object.freeze([]),S=Object.freeze({});function _(e,t,n){return void 0===n&&(n=S),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"],b=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function N(e){return e.replace(b,"-").replace(E,"")}var C=/(a)(d)/gi,A=function(e){return String.fromCharCode(e+(e>25?39:97))};function P(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=A(t%52)+n;return(A(t%52)+n).replace(C,"$1-$2")}var I,x=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},O=function(e){return x(5381,e)};function D(e){return P(O(e)>>>0)}function R(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function T(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var j="function"==typeof Symbol&&Symbol.for,V=j?Symbol.for("react.memo"):60115,k=j?Symbol.for("react.forward_ref"):60112,M={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},B=((I={})[k]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I[V]=z,I);function G(e){return("type"in(t=e)&&t.type.$$typeof)===V?z:"$$typeof"in e?B[e.$$typeof]:M;var t}var F=Object.defineProperty,L=Object.getOwnPropertyNames,q=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,W=Object.prototype;function U(e,t,n){if("string"!=typeof t){if(W){var r=H(t);r&&r!==W&&U(e,r,n)}var o=L(t);q&&(o=o.concat(q(t)));for(var s=G(e),i=G(t),a=0;a<o.length;++a){var c=o[a];if(!(c in $||n&&n[c]||i&&c in i||s&&c in s)){var u=Y(t,c);try{F(e,c,u)}catch(e){}}}}return e}function J(e){return"object"==typeof e&&"styledComponentId"in e}function Z(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){if(void 0===n&&(n=!1),!n&&!Z(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=X(e[r],t[r]);else if(Z(t))for(var r in t)e[r]=X(e[r],t[r]);return e}var K="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 Q(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function ee(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(Q.apply(void 0,e.__spreadArray([K[t]],e.__read(n),!1)).trim())}var te=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ee(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}var i=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var a=t.length;s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)}else this.tag.insertRule(i,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),ne=new Map,re=new Map,oe=1,se=function(e){if(ne.has(e))return ne.get(e);for(;re.has(oe);)oe++;var t=oe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ee(16,"".concat(t));return ne.set(e,t),re.set(t,e),t},ie=("style[".concat(p,"][").concat("data-styled-version",'="').concat(d,'"]'),new RegExp("^".concat(p,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return re.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(p,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r});function ae(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ce=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(p))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(p,"active"),r.setAttribute("data-styled-version",d);var i=ae();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},ue=function(){function e(e){var t=this.element=ce(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ee(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),le=function(){function e(e){var t=this.element=ce(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),pe=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),de={isServer:!0,useCSSOMInjection:!h},he=function(){function t(t,n,r){void 0===t&&(t=S),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},de),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,this.server}return t.registerId=function(e){return se(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,r=e.target;return t?new pe(r):n?new ue(r):new le(r)}(this.options),new te(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(se(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(se(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(se(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return ie(this)},t}(),fe=/^\s*\/\/.*$/gm,ye=[":","[",".","#"];function me(e){var t,n,r,s,i=void 0===e?S:e,a=i.options,c=void 0===a?S:a,u=i.plugins,l=void 0===u?g:u,p=function(e,r,o){return 0===r&&ye.includes(o[n.length])||o.match(s)?e:".".concat(t)},d=function(e){if(e.type===o.RULESET&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(r,p)}},h=function(e,i,a,u){void 0===i&&(i=""),void 0===a&&(a=""),void 0===u&&(u="&");var p=e.replace(fe,"");t=u,n=i,r=new RegExp("\\".concat(n,"\\b"),"g"),s=new RegExp("(\\".concat(n,"\\b){2,}"));var h=l.slice();return(c.prefix||void 0===c.prefix)&&h.unshift(o.prefixer),h.push(d,o.stringify),o.serialize(o.compile(a||i?"".concat(a," ").concat(i," { ").concat(p," }"):p),o.middleware(h))};return h.hash=l.length?l.reduce((function(e,t){return t.name||ee(15),x(e,t.name)}),5381).toString():"",h}var ve=c.default.createContext(void 0),ge=ve.Consumer,Se=c.default.createContext(void 0);Se.Consumer;var _e=new he,we=me();function be(){return n.useContext(ve)||_e}function Ee(){return n.useContext(Se)||we}function Ne(t){var r=e.__read(n.useState(t.stylisPlugins),2),o=r[0],s=r[1],i=be(),a=n.useMemo((function(){var e=i;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),l=n.useMemo((function(){return me({options:{prefix:!t.disableVendorPrefixes},plugins:o})}),[t.disableVendorPrefixes,o]);return n.useEffect((function(){u.default(o,t.stylisPlugins)||s(t.stylisPlugins)}),[t.stylisPlugins]),c.default.createElement(ve.Provider,{value:a},c.default.createElement(Se.Provider,{value:l},"production"!==process.env.NODE_ENV?c.default.Children.only(t.children):t.children))}var Ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=we);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw ee(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=we),this.name+e.hash},e}(),Ae=/([A-Z])/,Pe=/([A-Z])/g,Ie=/^ms-/,xe=function(e){return"-".concat(e.toLowerCase())};function Oe(e){return Ae.test(e)?e.replace(Pe,xe).replace(Ie,"-ms-"):e}function De(e){return"function"==typeof e}var Re=function(e){return null==e||!1===e||""===e},Te=function(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!Re(t[i])&&(Array.isArray(t[i])&&t[i].isCss||De(t[i])?s.push("".concat(Oe(i),":"),t[i],";"):Z(t[i])?s.push.apply(s,e.__spreadArray([],e.__read(Te(t[i],i)),!1)):s.push("".concat(Oe(i),": ").concat((r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.default?String(o).trim():"".concat(o,"px")),";")));return n?e.__spreadArray(e.__spreadArray(["".concat(n," {")],e.__read(s),!1),["}"],!1):s};function je(t,n,r,o){if(Array.isArray(t)){for(var s=[],i=0,a=t.length,c=void 0;i<a;i+=1)""!==(c=je(t[i],n,r,o))&&(Array.isArray(c)?s.push.apply(s,e.__spreadArray([],e.__read(c),!1)):s.push(c));return s}if(Re(t))return"";if(J(t))return".".concat(t.styledComponentId);if(De(t)){if("function"!=typeof(l=t)||l.prototype&&l.prototype.isReactComponent||!n)return t;var u=t;return c=u(n),"production"===process.env.NODE_ENV||"object"!=typeof c||Array.isArray(c)||c instanceof Ce||Z(c)||console.error("".concat(R(u)," 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.")),je(c,n,r,o)}var l;return t instanceof Ce?r?(t.inject(r,o),t.getName(o)):t:Z(t)?Te(t):t.toString()}function Ve(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(De(n)&&!J(n))return!1}return!0}var ke=O(d),Me=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ve(e),this.componentId=t,this.baseHash=x(ke,t),this.baseStyle=n,he.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=je(this.rules,e,t,n).join(""),i=P(x(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,".".concat(i),void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=x(this.baseHash,n.hash),l="",p=0;p<c;p++){var d=this.rules[p];if("string"==typeof d)l+=d,"production"!==process.env.NODE_ENV&&(u=x(u,d+p));else if(d){var h=je(d,e,t,n),f=Array.isArray(h)?h.join(""):h;u=x(u,f+p),l+=f}}if(l){var y=P(u>>>0);if(!t.hasNameForId(r,y)){var m=n(l,".".concat(y),void 0,r);t.insertRules(r,y,m)}o.push(y)}}return o.join(" ")},e}(),$e=c.default.createContext(void 0),ze=$e.Consumer,Be={};function Ge(t,r,o){var s=J(t),i=t,u=!T(t),l=r.attrs,p=void 0===l?g:l,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":N(e);Be[n]=(Be[n]||0)+1;var r="".concat(n,"-").concat(D(d+n+Be[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):h,y=r.displayName,m=void 0===y?function(e){return T(e)?"styled.".concat(e):"Styled(".concat(R(e),")")}(t):y,b=r.displayName&&r.componentId?"".concat(N(r.displayName),"-").concat(r.componentId):r.componentId||f,E=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,C=r.shouldForwardProp;if(s&&i.shouldForwardProp){var A=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;C=function(e,t,n){return A(e,t,n)&&P(e,t,n)}}else C=A}var I=new Me(o,b,s?i.componentStyle:void 0),x=I.isStatic&&0===p.length;function O(t,r){return function(t,r,o,s){var i=t.attrs,c=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,p=t.shouldForwardProp,d=t.styledComponentId,h=t.target;"production"!==process.env.NODE_ENV&&n.useDebugValue(d);var f=_(r,n.useContext($e),u),y=e.__read(function(t,n,r){void 0===t&&(t=S);var o=e.__assign(e.__assign({},n),{theme:t}),s={};return r.forEach((function(e){var t,n,r,i="function"==typeof e?e(o):e;for(t in i)o[t]=s[t]="className"===t?(n=s[t],r=i[t],n&&r?"".concat(n," ").concat(r):n||r):i[t]})),[o,s]}(f||S,r,i),2),m=y[0],v=y[1],g=function(e,t,r,o){var s=be(),i=Ee(),a=t?e.generateAndInjectStyles(S,s,i):e.generateAndInjectStyles(r,s,i);return"production"!==process.env.NODE_ENV&&n.useDebugValue(a),"production"!==process.env.NODE_ENV&&!t&&o&&o(a),a}(c,s,m,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),b=o,E=v.$as||r.$as||v.as||r.as||h,N=T(E),C=v!==r?e.__assign(e.__assign({},r),v):r,A={};for(var P in C)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?A.as=C[P]:(p?p(P,a.default,E):!N||a.default(P))&&(A[P]=C[P]));return r.style&&v.style!==r.style&&(A.style=e.__assign(e.__assign({},r.style),v.style)),A[N&&-1===w.indexOf(E)?"class":"className"]=l.concat(d,g!==d?g:null,r.className,v.className).filter(Boolean).join(" "),A.ref=b,n.createElement(E,A)}(j,t,r,x)}O.displayName=m;var j=c.default.forwardRef(O);return j.attrs=E,j.componentStyle=I,j.displayName=m,j.shouldForwardProp=C,j.foldedComponentIds=s?i.foldedComponentIds.concat(i.styledComponentId):g,j.styledComponentId=b,j.target=s?i.target:t,j.withComponent=function(t){var n=r.componentId,s=e.__rest(r,["componentId"]),i=n&&"".concat(n,"-").concat(T(t)?t:N(R(t)));return Ge(t,e.__assign(e.__assign({},s),{attrs:E,componentId:i}),o)},Object.defineProperty(j,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=s?function(t){var n,r;void 0===t&&(t={});for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];try{for(var i=e.__values(o),a=i.next();!a.done;a=i.next())X(t,a.value,!0)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t}({},i.defaultProps,t):t}}),"production"!==process.env.NODE_ENV&&(v(m,b),j.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,b)),j.toString=function(){return".".concat(j.styledComponentId)},u&&U(j,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),j}function Fe(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var Le=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function qe(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(De(t)||Z(t)){var o=t;return Le(je(Fe(g,e.__spreadArray([o],e.__read(n),!1))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?s:Le(je(Fe(s,n)))}function Ye(t,n,r){if(void 0===r&&(r=S),!n)throw ee(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,qe.apply(void 0,e.__spreadArray([o],e.__read(s),!1)))};return o.attrs=function(o){return Ye(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ye(t,n,e.__assign(e.__assign({},r),o))},o}var He=function(e){return Ye(Ge,e)},We=He;w.forEach((function(e){We[e]=He(e)}));var Ue=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ve(e),he.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(je(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&he.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),Je=/^\s*<\/[a-z]/i,Ze=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ae(),r=[n&&'nonce="'.concat(n,'"'),"".concat(p,'="true"'),"".concat("data-styled-version",'="').concat(d,'"')].filter(Boolean).join(" ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ee(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ee(2);var r=((n={})[p]="",n["data-styled-version"]=d,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ae();return o&&(r.nonce=o),[c.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new he({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ee(2);return c.default.createElement(Ne,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){if(this.sealed)throw ee(2);this.seal();var t=require("stream").Transform,n=e,r=this.instance,o=this._emitSheetCSS,s=new t({transform:function(e,t,n){var s=e.toString(),i=o();if(r.clearTag(),Je.test(s)){var a=s.indexOf(">")+1,c=s.slice(0,a),u=s.slice(a);this.push(c+i+u)}else this.push(i+s);n()}});return n.on("error",(function(e){s.emit("error",e)})),n.pipe(s)},t}(),Xe={StyleSheet:he,mainSheet:_e};"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=Ze,exports.StyleSheetConsumer=ge,exports.StyleSheetContext=ve,exports.StyleSheetManager=Ne,exports.ThemeConsumer=ze,exports.ThemeContext=$e,exports.ThemeProvider=function(t){var r=n.useContext($e),o=n.useMemo((function(){return function(t,n){if(!t)throw ee(14);if(De(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ee(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ee(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)}),[t.theme,r]);return t.children?c.default.createElement($e.Provider,{value:o},t.children):null},exports.__PRIVATE__=Xe,exports.createGlobalStyle=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=qe.apply(void 0,e.__spreadArray([t],e.__read(r),!1)),i="sc-global-".concat(D(JSON.stringify(s))),a=new Ue(s,i);"production"!==process.env.NODE_ENV&&v(i);var u=function(e){var t=be(),r=Ee(),o=n.useContext($e),a=n.useRef(t.allocateGSInstance(i)).current;return"production"!==process.env.NODE_ENV&&c.default.Children.count(e.children)&&console.warn("The global style component ".concat(i," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&s.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&l(a,e,t,o,r),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,f,r,s);else{var i=e.__assign(e.__assign({},n),{theme:_(n,o,u.defaultProps)});a.renderStyles(t,i,r,s)}}return c.default.memo(u)},exports.css=qe,exports.default=We,exports.isStyledComponent=J,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=qe.apply(void 0,e.__spreadArray([t],e.__read(n),!1)).join(""),s=D(o);return new Ce(s,o)},exports.useTheme=function(){return n.useContext($e)},exports.version=d,exports.withTheme=function(t){var n=c.default.forwardRef((function(n,r){var o=_(n,c.default.useContext($e),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(R(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))}));return n.displayName="WithTheme(".concat(R(t),")"),U(n,t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(t),c=i(n),u=i(r),l=i(s),p="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d="6.0.0-alpha.3",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),f={},y=/invalid hook call/i,m=new Set,v=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];y.test(t)?(a=!1,m.delete(s)):i.apply(void 0,e.__spreadArray([t],e.__read(n),!1))},n.useRef(),a&&!m.has(s)&&(console.warn(s),m.add(s))}catch(e){y.test(e.message)&&m.delete(s)}finally{console.error=i}}},g=Object.freeze([]),S=Object.freeze({});function _(e,t,n){return void 0===n&&(n=S),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"],b=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function N(e){return e.replace(b,"-").replace(E,"")}var C=/(a)(d)/gi,A=function(e){return String.fromCharCode(e+(e>25?39:97))};function P(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=A(t%52)+n;return(A(t%52)+n).replace(C,"$1-$2")}var I,x=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},O=function(e){return x(5381,e)};function D(e){return P(O(e)>>>0)}function R(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function T(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var j="function"==typeof Symbol&&Symbol.for,V=j?Symbol.for("react.memo"):60115,k=j?Symbol.for("react.forward_ref"):60112,M={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},B=((I={})[k]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I[V]=z,I);function G(e){return("type"in(t=e)&&t.type.$$typeof)===V?z:"$$typeof"in e?B[e.$$typeof]:M;var t}var F=Object.defineProperty,L=Object.getOwnPropertyNames,q=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,W=Object.prototype;function U(e,t,n){if("string"!=typeof t){if(W){var r=H(t);r&&r!==W&&U(e,r,n)}var o=L(t);q&&(o=o.concat(q(t)));for(var s=G(e),i=G(t),a=0;a<o.length;++a){var c=o[a];if(!(c in $||n&&n[c]||i&&c in i||s&&c in s)){var u=Y(t,c);try{F(e,c,u)}catch(e){}}}}return e}function J(e){return"object"==typeof e&&"styledComponentId"in e}function Z(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){if(void 0===n&&(n=!1),!n&&!Z(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=X(e[r],t[r]);else if(Z(t))for(var r in t)e[r]=X(e[r],t[r]);return e}var K="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 Q(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function ee(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(Q.apply(void 0,e.__spreadArray([K[t]],e.__read(n),!1)).trim())}var te=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ee(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}var i=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var a=t.length;s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)}else this.tag.insertRule(i,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),ne=new Map,re=new Map,oe=1,se=function(e){if(ne.has(e))return ne.get(e);for(;re.has(oe);)oe++;var t=oe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ee(16,"".concat(t));return ne.set(e,t),re.set(t,e),t},ie=("style[".concat(p,"][").concat("data-styled-version",'="').concat(d,'"]'),new RegExp("^".concat(p,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return re.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(p,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r});function ae(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ce=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(p))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(p,"active"),r.setAttribute("data-styled-version",d);var i=ae();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},ue=function(){function e(e){var t=this.element=ce(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ee(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),le=function(){function e(e){var t=this.element=ce(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),pe=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),de={isServer:!0,useCSSOMInjection:!h},he=function(){function t(t,n,r){void 0===t&&(t=S),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},de),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,this.server}return t.registerId=function(e){return se(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,r=e.target;return t?new pe(r):n?new ue(r):new le(r)}(this.options),new te(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(se(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(se(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(se(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return ie(this)},t}(),fe=/^\s*\/\/.*$/gm,ye=[":","[",".","#"];function me(e){var t,n,r,s,i=void 0===e?S:e,a=i.options,c=void 0===a?S:a,u=i.plugins,l=void 0===u?g:u,p=function(e,r,o){return 0===r&&ye.includes(o[n.length])||o.match(s)?e:".".concat(t)},d=function(e){if(e.type===o.RULESET&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(r,p)}},h=function(e,i,a,u){void 0===i&&(i=""),void 0===a&&(a=""),void 0===u&&(u="&");var p=e.replace(fe,"");t=u,n=i,r=new RegExp("\\".concat(n,"\\b"),"g"),s=new RegExp("(\\".concat(n,"\\b){2,}"));var h=l.slice();return(c.prefix||void 0===c.prefix)&&h.unshift(o.prefixer),h.push(d,o.stringify),o.serialize(o.compile(a||i?"".concat(a," ").concat(i," { ").concat(p," }"):p),o.middleware(h))};return h.hash=l.length?l.reduce((function(e,t){return t.name||ee(15),x(e,t.name)}),5381).toString():"",h}var ve=c.default.createContext(void 0),ge=ve.Consumer,Se=c.default.createContext(void 0);Se.Consumer;var _e=new he,we=me();function be(){return n.useContext(ve)||_e}function Ee(){return n.useContext(Se)||we}function Ne(t){var r=e.__read(n.useState(t.stylisPlugins),2),o=r[0],s=r[1],i=be(),a=n.useMemo((function(){var e=i;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),l=n.useMemo((function(){return me({options:{prefix:!t.disableVendorPrefixes},plugins:o})}),[t.disableVendorPrefixes,o]);return n.useEffect((function(){u.default(o,t.stylisPlugins)||s(t.stylisPlugins)}),[t.stylisPlugins]),c.default.createElement(ve.Provider,{value:a},c.default.createElement(Se.Provider,{value:l},"production"!==process.env.NODE_ENV?c.default.Children.only(t.children):t.children))}var Ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=we);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw ee(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=we),this.name+e.hash},e}(),Ae=/([A-Z])/,Pe=/([A-Z])/g,Ie=/^ms-/,xe=function(e){return"-".concat(e.toLowerCase())};function Oe(e){return Ae.test(e)?e.replace(Pe,xe).replace(Ie,"-ms-"):e}function De(e){return"function"==typeof e}var Re=function(e){return null==e||!1===e||""===e},Te=function(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!Re(t[i])&&(Array.isArray(t[i])&&t[i].isCss||De(t[i])?s.push("".concat(Oe(i),":"),t[i],";"):Z(t[i])?s.push.apply(s,e.__spreadArray([],e.__read(Te(t[i],i)),!1)):s.push("".concat(Oe(i),": ").concat((r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.default?String(o).trim():"".concat(o,"px")),";")));return n?e.__spreadArray(e.__spreadArray(["".concat(n," {")],e.__read(s),!1),["}"],!1):s};function je(t,n,r,o){if(Array.isArray(t)){for(var s=[],i=0,a=t.length,c=void 0;i<a;i+=1)""!==(c=je(t[i],n,r,o))&&(Array.isArray(c)?s.push.apply(s,e.__spreadArray([],e.__read(c),!1)):s.push(c));return s}if(Re(t))return"";if(J(t))return".".concat(t.styledComponentId);if(De(t)){if("function"!=typeof(l=t)||l.prototype&&l.prototype.isReactComponent||!n)return t;var u=t;return c=u(n),"production"===process.env.NODE_ENV||"object"!=typeof c||Array.isArray(c)||c instanceof Ce||Z(c)||console.error("".concat(R(u)," 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.")),je(c,n,r,o)}var l;return t instanceof Ce?r?(t.inject(r,o),t.getName(o)):t:Z(t)?Te(t):t.toString()}function Ve(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(De(n)&&!J(n))return!1}return!0}var ke=O(d),Me=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ve(e),this.componentId=t,this.baseHash=x(ke,t),this.baseStyle=n,he.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=je(this.rules,e,t,n).join(""),i=P(x(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,".".concat(i),void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=x(this.baseHash,n.hash),l="",p=0;p<c;p++){var d=this.rules[p];if("string"==typeof d)l+=d,"production"!==process.env.NODE_ENV&&(u=x(u,d+p));else if(d){var h=je(d,e,t,n),f=Array.isArray(h)?h.join(""):h;u=x(u,f+p),l+=f}}if(l){var y=P(u>>>0);if(!t.hasNameForId(r,y)){var m=n(l,".".concat(y),void 0,r);t.insertRules(r,y,m)}o.push(y)}}return o.join(" ")},e}(),$e=c.default.createContext(void 0),ze=$e.Consumer,Be={};function Ge(t,r,o){var s=J(t),i=t,u=!T(t),l=r.attrs,p=void 0===l?g:l,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":N(e);Be[n]=(Be[n]||0)+1;var r="".concat(n,"-").concat(D(d+n+Be[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):h,y=r.displayName,m=void 0===y?function(e){return T(e)?"styled.".concat(e):"Styled(".concat(R(e),")")}(t):y,b=r.displayName&&r.componentId?"".concat(N(r.displayName),"-").concat(r.componentId):r.componentId||f,E=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,C=r.shouldForwardProp;if(s&&i.shouldForwardProp){var A=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;C=function(e,t,n){return A(e,t,n)&&P(e,t,n)}}else C=A}var I=new Me(o,b,s?i.componentStyle:void 0),x=I.isStatic&&0===p.length;function O(t,r){return function(t,r,o,s){var i=t.attrs,c=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,p=t.shouldForwardProp,d=t.styledComponentId,h=t.target;"production"!==process.env.NODE_ENV&&n.useDebugValue(d);var f=_(r,n.useContext($e),u),y=e.__read(function(t,n,r){void 0===t&&(t=S);var o=e.__assign(e.__assign({},n),{theme:t}),s={};return r.forEach((function(e){var t,n,r,i="function"==typeof e?e(o):e;for(t in i)o[t]=s[t]="className"===t?(n=s[t],r=i[t],n&&r?"".concat(n," ").concat(r):n||r):i[t]})),[o,s]}(f||S,r,i),2),m=y[0],v=y[1],g=function(e,t,r,o){var s=be(),i=Ee(),a=t?e.generateAndInjectStyles(S,s,i):e.generateAndInjectStyles(r,s,i);return"production"!==process.env.NODE_ENV&&n.useDebugValue(a),"production"!==process.env.NODE_ENV&&!t&&o&&o(a),a}(c,s,m,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),b=o,E=v.$as||r.$as||v.as||r.as||h,N=T(E),C=v!==r?e.__assign(e.__assign({},r),v):r,A={};for(var P in C)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?A.as=C[P]:(p?p(P,a.default,E):!N||a.default(P))&&(A[P]=C[P]));return r.style&&v.style!==r.style&&(A.style=e.__assign(e.__assign({},r.style),v.style)),A[N&&-1===w.indexOf(E)?"class":"className"]=l.concat(d,g!==d?g:null,r.className,v.className).filter(Boolean).join(" "),A.ref=b,n.createElement(E,A)}(j,t,r,x)}O.displayName=m;var j=c.default.forwardRef(O);return j.attrs=E,j.componentStyle=I,j.displayName=m,j.shouldForwardProp=C,j.foldedComponentIds=s?i.foldedComponentIds.concat(i.styledComponentId):g,j.styledComponentId=b,j.target=s?i.target:t,j.withComponent=function(t){var n=r.componentId,s=e.__rest(r,["componentId"]),i=n&&"".concat(n,"-").concat(T(t)?t:N(R(t)));return Ge(t,e.__assign(e.__assign({},s),{attrs:E,componentId:i}),o)},Object.defineProperty(j,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=s?function(t){var n,r;void 0===t&&(t={});for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];try{for(var i=e.__values(o),a=i.next();!a.done;a=i.next())X(t,a.value,!0)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t}({},i.defaultProps,t):t}}),"production"!==process.env.NODE_ENV&&(v(m,b),j.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(m,b)),j.toString=function(){return".".concat(j.styledComponentId)},u&&U(j,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),j}function Fe(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var Le=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function qe(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(De(t)||Z(t)){var o=t;return Le(je(Fe(g,e.__spreadArray([o],e.__read(n),!1))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?s:Le(je(Fe(s,n)))}function Ye(t,n,r){if(void 0===r&&(r=S),!n)throw ee(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,qe.apply(void 0,e.__spreadArray([o],e.__read(s),!1)))};return o.attrs=function(o){return Ye(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ye(t,n,e.__assign(e.__assign({},r),o))},o}var He=function(e){return Ye(Ge,e)},We=He;w.forEach((function(e){We[e]=He(e)}));var Ue=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ve(e),he.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(je(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&he.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),Je=/^\s*<\/[a-z]/i,Ze=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ae(),r=[n&&'nonce="'.concat(n,'"'),"".concat(p,'="true"'),"".concat("data-styled-version",'="').concat(d,'"')].filter(Boolean).join(" ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ee(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ee(2);var r=((n={})[p]="",n["data-styled-version"]=d,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ae();return o&&(r.nonce=o),[c.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new he({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ee(2);return c.default.createElement(Ne,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){if(this.sealed)throw ee(2);this.seal();var t=require("stream").Transform,n=e,r=this.instance,o=this._emitSheetCSS,s=new t({transform:function(e,t,n){var s=e.toString(),i=o();if(r.clearTag(),Je.test(s)){var a=s.indexOf(">")+1,c=s.slice(0,a),u=s.slice(a);this.push(c+i+u)}else this.push(i+s);n()}});return n.on("error",(function(e){s.emit("error",e)})),n.pipe(s)},t}(),Xe={StyleSheet:he,mainSheet:_e};"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=Ze,exports.StyleSheetConsumer=ge,exports.StyleSheetContext=ve,exports.StyleSheetManager=Ne,exports.ThemeConsumer=ze,exports.ThemeContext=$e,exports.ThemeProvider=function(t){var r=n.useContext($e),o=n.useMemo((function(){return function(t,n){if(!t)throw ee(14);if(De(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ee(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ee(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)}),[t.theme,r]);return t.children?c.default.createElement($e.Provider,{value:o},t.children):null},exports.__PRIVATE__=Xe,exports.createGlobalStyle=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=qe.apply(void 0,e.__spreadArray([t],e.__read(r),!1)),i="sc-global-".concat(D(JSON.stringify(s))),a=new Ue(s,i);"production"!==process.env.NODE_ENV&&v(i);var u=function(e){var t=be(),r=Ee(),o=n.useContext($e),a=n.useRef(t.allocateGSInstance(i)).current;return"production"!==process.env.NODE_ENV&&c.default.Children.count(e.children)&&console.warn("The global style component ".concat(i," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&s.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&l(a,e,t,o,r),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,f,r,s);else{var i=e.__assign(e.__assign({},n),{theme:_(n,o,u.defaultProps)});a.renderStyles(t,i,r,s)}}return c.default.memo(u)},exports.css=qe,exports.default=We,exports.isStyledComponent=J,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=qe.apply(void 0,e.__spreadArray([t],e.__read(n),!1)).join(""),s=D(o);return new Ce(s,o)},exports.useTheme=function(){return n.useContext($e)},exports.version=d,exports.withTheme=function(t){var n=c.default.forwardRef((function(n,r){var o=_(n,c.default.useContext($e),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(R(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))}));return n.displayName="WithTheme(".concat(R(t),")"),U(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.cjs.js.map
|