styled-components
Advanced tools
Comparing version 6.0.0-beta.11 to 6.0.0-beta.12
@@ -6,7 +6,7 @@ import React from 'react'; | ||
*/ | ||
declare type OptionalIntersection<A, B> = { | ||
type OptionalIntersection<A, B> = { | ||
[K in Extract<keyof A, keyof B>]?: A[K]; | ||
}; | ||
declare type AttrsResult<T extends Attrs> = T extends (...args: any) => infer P ? P : T; | ||
declare type ExtractAttrsTarget<R extends Runtime, P extends ExecutionProps, DefaultTarget extends StyledTarget<R>> = P['as'] extends KnownTarget ? P['as'] : DefaultTarget; | ||
type AttrsResult<T extends Attrs> = T extends (...args: any) => infer P ? P : T; | ||
type ExtractAttrsTarget<R extends Runtime, P extends ExecutionProps, DefaultTarget extends StyledTarget<R>> = P['as'] extends KnownTarget ? P['as'] : DefaultTarget; | ||
/** | ||
@@ -18,3 +18,3 @@ * If attrs type is a function (no type provided, inferring from usage), extract the return value | ||
*/ | ||
declare type PropsSatisfiedByAttrs<T extends Attrs, Props extends object, Result extends ExecutionProps = AttrsResult<T>> = Omit<Props, keyof Result> & OptionalIntersection<Props, Result> & Partial<Omit<Result, keyof Props | 'as'>>; | ||
type PropsSatisfiedByAttrs<T extends Attrs, Props extends object, Result extends ExecutionProps = AttrsResult<T>> = Omit<Props, keyof Result> & OptionalIntersection<Props, Result> & Partial<Omit<Result, keyof Props | 'as'>>; | ||
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = object, OuterStatics extends object = object, RuntimeInjectedProps extends ExecutionProps = object> { | ||
@@ -21,0 +21,0 @@ <Props extends object = object, Statics extends object = object>(initialStyles: Styles<OuterProps & RuntimeInjectedProps & Props>, ...interpolations: Interpolation<OuterProps & RuntimeInjectedProps & Props>[]): // @ts-expect-error KnownTarget is a subset of StyledTarget<R> |
import React from 'react'; | ||
import { AnyComponent, ExecutionProps } from '../types'; | ||
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "type" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "type" | "getDefaultProps" | "mixins" | "name" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; }; | ||
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "type" | "defaultProps" | "displayName" | "$$typeof" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "type" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "getDefaultProps" | "mixins" | "name" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; }; |
import React from 'react'; | ||
import StyleSheet from '../sheet'; | ||
import { ShouldForwardProp, Stringifier } from '../types'; | ||
export declare type IStyleSheetContext = { | ||
export type IStyleSheetContext = { | ||
shouldForwardProp?: ShouldForwardProp<'web'>; | ||
@@ -10,3 +10,3 @@ styleSheet?: StyleSheet; | ||
export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>; | ||
export declare type IStylisContext = Stringifier | void; | ||
export type IStylisContext = Stringifier | void; | ||
export declare const StylisContext: React.Context<IStylisContext>; | ||
@@ -19,3 +19,3 @@ export declare const StylisConsumer: React.Consumer<IStylisContext>; | ||
export declare function useStylis(): Stringifier; | ||
export declare type IStyleSheetManager = React.PropsWithChildren<{ | ||
export type IStyleSheetManager = React.PropsWithChildren<{ | ||
/** | ||
@@ -22,0 +22,0 @@ * If desired, you can pass this prop to disable "speedy" insertion mode, which |
@@ -27,5 +27,5 @@ import React from 'react'; | ||
} | ||
declare type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme; | ||
declare type ThemeArgument = DefaultTheme | ThemeFn; | ||
declare type Props = { | ||
type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme; | ||
type ThemeArgument = DefaultTheme | ThemeFn; | ||
type Props = { | ||
children?: React.ReactNode; | ||
@@ -32,0 +32,0 @@ theme: ThemeArgument; |
import { GroupedTag, Sheet, SheetOptions } from './types'; | ||
declare type SheetConstructorArgs = { | ||
type SheetConstructorArgs = { | ||
isServer?: boolean; | ||
@@ -7,6 +7,6 @@ useCSSOMInjection?: boolean; | ||
}; | ||
declare type GlobalStylesAllocationMap = { | ||
type GlobalStylesAllocationMap = { | ||
[key: string]: number; | ||
}; | ||
declare type NamesAllocationMap = Map<string, Set<string>>; | ||
type NamesAllocationMap = Map<string, Set<string>>; | ||
/** Contains the main stylesheet logic for stringification and caching */ | ||
@@ -13,0 +13,0 @@ export default class StyleSheet implements Sheet { |
@@ -17,3 +17,3 @@ /** CSSStyleSheet-like Tag abstraction for CSS rules */ | ||
} | ||
export declare type SheetOptions = { | ||
export type SheetOptions = { | ||
isServer: boolean; | ||
@@ -20,0 +20,0 @@ target?: HTMLElement; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";var t="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",r="active",n="data-styled-version",o="6.0.0-beta.11",s="/*!sc*/\n",a="undefined"!=typeof window&&"HTMLElement"in window,i=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),c={},u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Object.freeze([]),p=Object.freeze({});function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var d=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,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw h(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}var a=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var i=t.length;s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)}else this.tag.insertRule(a,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,a=n;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(s);return t},e}(),v=new Map,g=new Map,m=1,y=function(e){if(v.has(e))return v.get(e);for(;g.has(m);)m++;var t=m++;return v.set(e,t),g.set(t,e),t},S=function(e,t){v.set(e,t),g.set(t,e)},b="style[".concat(t,"][").concat(n,'="').concat(o,'"]'),w=new RegExp("^".concat(t,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),C=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},x=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(s),o=[],a=0,i=n.length;a<i;a++){var c=n[a].trim();if(c){var u=c.match(w);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(S(f,l),C(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}};function I(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var P=function(e){var s=document.head,a=e||s,i=document.createElement("style"),c=function(e){for(var r=e.childNodes,n=r.length;n>=0;n--){var o=r[n];if(o&&1===o.nodeType&&o.hasAttribute(t))return o}}(a),u=void 0!==c?c.nextSibling:null;i.setAttribute(t,r),i.setAttribute(n,o);var l=I();return l&&i.setAttribute("nonce",l),a.insertBefore(i,u),i},A=function(){function e(e){var t=this.element=P(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw h(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}(),E=function(){function e(e){var t=this.element=P(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=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}(),R=a,$={isServer:!a,useCSSOMInjection:!i},j=function(){function e(e,n,o){void 0===e&&(e=p),void 0===n&&(n={}),this.options=u(u({},$),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&a&&R&&(R=!1,function(e){for(var n=document.querySelectorAll(b),o=0,s=n.length;o<s;o++){var a=n[o];a&&a.getAttribute(t)!==r&&(x(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}return e.registerId=function(e){return y(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(u(u({},this.options),t),this.gs,r&&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.useCSSOMInjection,r=e.target;return e.isServer?new _(r):t?new A(r):new E(r)}(this.options),new d(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(y(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(y(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(y(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var r=e.getTag(),n=r.length,o="",a=function(n){var a=function(e){return g.get(e)}(n);if(void 0===a)return"continue";var i=e.names.get(a),c=r.getGroup(n);if(void 0===i||0===c.length)return"continue";var u="".concat(t,".g").concat(n,'[id="').concat(a,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(c).concat(u,'{content:"').concat(l,'"}').concat(s)},i=0;i<n;i++)a(i);return o}(this)},e}(),O="-ms-",k="-moz-",N="-webkit-",T="comm",D="rule",z="decl",F="@keyframes",G=Math.abs,B=String.fromCharCode,M=Object.assign;function L(e){return e.trim()}function W(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,r){return e.replace(t,r)}function H(e,t){return e.indexOf(t)}function q(e,t){return 0|e.charCodeAt(t)}function V(e,t,r){return e.slice(t,r)}function U(e){return e.length}function Z(e){return e.length}function J(e,t){return t.push(e),e}var K=1,Q=1,X=0,ee=0,te=0,re="";function ne(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:K,column:Q,length:a,return:""}}function oe(e,t){return M(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function se(){return te=ee<X?q(re,ee++):0,Q++,10===te&&(Q=1,K++),te}function ae(){return q(re,ee)}function ie(){return ee}function ce(e,t){return V(re,e,t)}function ue(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function le(e){return L(ce(ee-1,he(91===e?e+2:40===e?e+1:e)))}function fe(e){for(;(te=ae())&&te<33;)se();return ue(e)>2||ue(te)>3?"":" "}function pe(e,t){for(;--t&&se()&&!(te<48||te>102||te>57&&te<65||te>70&&te<97););return ce(e,ie()+(t<6&&32==ae()&&32==se()))}function he(e){for(;se();)switch(te){case e:return ee;case 34:case 39:34!==e&&39!==e&&he(te);break;case 40:41===e&&he(e);break;case 92:se()}return ee}function de(e,t){for(;se()&&e+te!==57&&(e+te!==84||47!==ae()););return"/*"+ce(t,ee-1)+"*"+B(47===e?e:se())}function ve(e){for(;!ue(ae());)se();return ce(e,ee)}function ge(e){return function(e){return re="",e}(me("",null,null,null,[""],e=function(e){return K=Q=1,X=U(re=e),ee=0,[]}(e),0,[0],e))}function me(e,t,r,n,o,s,a,i,c){for(var u=0,l=0,f=a,p=0,h=0,d=0,v=1,g=1,m=1,y=0,S="",b=o,w=s,C=n,x=S;g;)switch(d=y,y=se()){case 40:if(108!=d&&58==q(x,f-1)){-1!=H(x+=Y(le(y),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:x+=le(y);break;case 9:case 10:case 13:case 32:x+=fe(d);break;case 92:x+=pe(ie()-1,7);continue;case 47:switch(ae()){case 42:case 47:J(Se(de(se(),ie()),t,r),c);break;default:x+="/"}break;case 123*v:i[u++]=U(x)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:h>0&&U(x)-f&&J(h>32?be(x+";",n,r,f-1):be(Y(x," ","")+";",n,r,f-2),c);break;case 59:x+=";";default:if(J(C=ye(x,t,r,u,l,o,i,S,b=[],w=[],f),s),123===y)if(0===l)me(x,t,C,C,b,s,f,i,w);else switch(99===p&&110===q(x,3)?100:p){case 100:case 109:case 115:me(e,C,C,n&&J(ye(e,C,C,0,0,o,i,S,o,b=[],f),w),o,w,f,i,n?b:w);break;default:me(x,C,C,C,[""],w,0,i,w)}}u=l=h=0,v=m=1,S=x="",f=a;break;case 58:f=1+U(x),h=d;default:if(v<1)if(123==y)--v;else if(125==y&&0==v++&&125==(te=ee>0?q(re,--ee):0,Q--,10===te&&(Q=1,K--),te))continue;switch(x+=B(y),y*v){case 38:m=l>0?1:(x+="\f",-1);break;case 44:i[u++]=(U(x)-1)*m,m=1;break;case 64:45===ae()&&(x+=le(se())),p=ae(),l=f=U(S=x+=ve(ie())),y++;break;case 45:45===d&&2==U(x)&&(v=0)}}return s}function ye(e,t,r,n,o,s,a,i,c,u,l){for(var f=o-1,p=0===o?s:[""],h=Z(p),d=0,v=0,g=0;d<n;++d)for(var m=0,y=V(e,f+1,f=G(v=a[d])),S=e;m<h;++m)(S=L(v>0?p[m]+" "+y:Y(y,/&\f/g,p[m])))&&(c[g++]=S);return ne(e,t,r,0===o?D:i,c,u,l)}function Se(e,t,r){return ne(e,t,r,T,B(te),V(e,2,-2),0)}function be(e,t,r,n){return ne(e,t,r,z,V(e,0,n),V(e,n+1,-1),n)}function we(e,t,r){switch(function(e,t){return 45^q(e,0)?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 4789:return k+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+k+e+O+e+e;case 5936:switch(q(e,t+11)){case 114:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return N+e+O+e+e;case 6165:return N+e+O+"flex-"+e+e;case 5187:return N+e+Y(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+O+"flex-$1$2")+e;case 5443:return N+e+O+"flex-item-"+Y(e,/flex-|-self/g,"")+(W(e,/flex-|baseline/)?"":O+"grid-row-"+Y(e,/flex-|-self/g,""))+e;case 4675:return N+e+O+"flex-line-pack"+Y(e,/align-content|flex-|-self/g,"")+e;case 5548:return N+e+O+Y(e,"shrink","negative")+e;case 5292:return N+e+O+Y(e,"basis","preferred-size")+e;case 6060:return N+"box-"+Y(e,"-grow","")+N+e+O+Y(e,"grow","positive")+e;case 4554:return N+Y(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4200:if(!W(e,/flex-|baseline/))return O+"grid-column-align"+V(e,t)+e;break;case 2592:case 3360:return O+Y(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,W(e.props,/grid-\w+-end/)})?~H(e+(r=r[t].value),"span")?e:O+Y(e,"-start","")+e+O+"grid-row-span:"+(~H(r,"span")?W(r,/\d+/):+W(r,/\d+/)-+W(e,/\d+/))+";":O+Y(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return W(e.props,/grid-\w+-start/)})?e:O+Y(Y(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(U(e)-1-t>6)switch(q(e,t+1)){case 109:if(45!==q(e,t+4))break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+k+(108==q(e,t+3)?"$3":"$2-$3"))+e;case 115:return~H(e,"stretch")?we(Y(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Y(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return O+r+":"+n+i+(o?O+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===q(e,t+6))return Y(e,":",":"+N)+e;break;case 6444:switch(q(e,45===q(e,14)?18:11)){case 120:return Y(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+N+(45===q(e,14)?"inline-":"")+"box$3$1"+N+"$2$3$1"+O+"$2box$3")+e;case 100:return Y(e,":",":"+O)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Y(e,"scroll-","scroll-snap-")+e}return e}function Ce(e,t){for(var r="",n=Z(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function xe(e,t,r,n){switch(e.type){case"@import":case z:return e.return=e.return||e.value;case T:return"";case F:return e.return=e.value+"{"+Ce(e.children,n)+"}";case D:e.value=e.props.join(",")}return U(r=Ce(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ie(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case z:return void(e.return=we(e.value,e.length,r));case F:return Ce([oe(e,{value:Y(e.value,"@","@"+N)})],n);case D:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(W(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ce([oe(e,{props:[Y(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ce([oe(e,{props:[Y(t,/:(plac\w+)/,":"+N+"input-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,":-moz-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,O+"input-$1")]})],n)}return""})}}var Pe=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ae=function(e){return Pe(5381,e)},Ee=/^\s*\/\/.*$/gm,_e=[":","[",".","#"];function Re(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&(e.children=Re(e.children,t)),e})}function $e(e){var t,r,n,o,s=void 0===e?p:e,a=s.options,i=void 0===a?p:a,c=s.plugins,u=void 0===c?f:c,l=function(e,n,s){return 0===n&&_e.includes(s[r.length])||s.match(o)?e:".".concat(t)},d=function(e){if(e.type===D&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(n,l)}},v=function(e,s,a,c){void 0===s&&(s=""),void 0===a&&(a=""),void 0===c&&(c="&");var l=e.replace(Ee,"");t=c,r=s,n=new RegExp("\\".concat(r,"\\b"),"g"),o=new RegExp("(\\".concat(r,"\\b){2,}"));var f=u.slice();(i.prefix||void 0===i.prefix)&&f.unshift(Ie),f.push(d,xe);var p,h,v=ge(a||s?"".concat(a," ").concat(s," { ").concat(l," }"):l);return i.namespace&&(v=Re(v,i.namespace)),p=v,h=function(e){var t=Z(e);return function(r,n,o,s){for(var a="",i=0;i<t;i++)a+=e[i](r,n,o,s)||"";return a}}(f),p.map(function(e,t){return h(e,t,p,h)}).filter(Boolean)};return v.hash=u.length?u.reduce(function(e,t){return t.name||h(15),Pe(e,t.name)},5381).toString():"",v}var je=e.createContext({shouldForwardProp:void 0,styleSheet:void 0}),Oe=je.Consumer,ke=e.createContext(void 0),Ne=new j,Te=$e();function De(){return e.useContext(je).styleSheet||Ne}function ze(){return e.useContext(ke)||Te}function Fe(t){var r=e.useState(t.stylisPlugins),n=r[0],o=r[1],s=De(),a=e.useMemo(function(){var e=s;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]),i=e.useMemo(function(){return $e({options:{namespace:t.namespace,prefix:!t.disableVendorPrefixes},plugins:n})},[t.disableVendorPrefixes,t.namespace,n]);return e.useEffect(function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var u=s[c];if(!i(u))return!1;if(!1===(o=void 0)||void 0===o&&e[u]!==t[u])return!1}return!0})(n,t.stylisPlugins)||o(t.stylisPlugins)},[t.stylisPlugins]),e.createElement(je.Provider,{value:{shouldForwardProp:t.shouldForwardProp,styleSheet:a}},e.createElement(ke.Provider,{value:i},t.children))}var Ge=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Te);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){throw h(12,String(r.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Te),this.name+e.hash},e}(),Be={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Me(e){return e.displayName||e.name||"Component"}var Le=/[A-Z]/,We=/[A-Z]/g,Ye=/^ms-/,He=function(e){return"-".concat(e.toLowerCase())};function qe(e){return Le.test(e)&&!e.startsWith("--")?e.replace(We,He).replace(Ye,"-ms-"):e}function Ve(e){return"function"==typeof e}function Ue(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 Ze(e){return"object"==typeof e&&"styledComponentId"in e}var Je=function(e){return null==e||!1===e||""===e},Ke=function(e,t){var r,n=[];for(var o in e)e.hasOwnProperty(o)&&!Je(e[o])&&(Array.isArray(e[o])&&e[o].isCss||Ve(e[o])?n.push("".concat(qe(o),":"),e[o],";"):Ue(e[o])?n.push.apply(n,Ke(e[o],o)):n.push("".concat(qe(o),": ").concat(null==(r=e[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in Be?String(r).trim():"".concat(r,"px"),";")));return t?l(l(["".concat(t," {")],n,!0),["}"],!1):n};function Qe(e,t,r,n){if(Array.isArray(e)){for(var o=[],s=0,a=e.length,i=void 0;s<a;s+=1)0!==(i=Qe(e[s],t,r,n)).length&&o.push.apply(o,i);return o}return Je(e)?[]:Ze(e)?[".".concat(e.styledComponentId)]:Ve(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?[e]:Qe(i=e(t),t,r,n):e instanceof Ge?r?(e.inject(r,n),[e.getName(n)]):[e]:Ue(e)?Ke(e):[e.toString()];var c}function Xe(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ve(r)&&!Ze(r))return!1}return!0}var et=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Xe(e),j.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(Qe(this.rules,t,r,n).join(""),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&j.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),tt=e.createContext(void 0),rt=tt.Consumer;function nt(e,t,r){return void 0===r&&(r=p),e.theme!==r.theme&&e.theme||t||r.theme}var ot=/(a)(d)/gi,st=function(e){return String.fromCharCode(e+(e>25?39:97))};function at(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=st(t%52)+r;return(st(t%52)+r).replace(ot,"$1-$2")}function it(e){return at(Ae(e)>>>0)}function ct(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var ut,lt=function(e){return Object.assign(e,{isCss:!0})};function ft(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ve(e)||Ue(e)){var n=e;return lt(Qe(ct(f,l([n],t,!0))))}var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?Qe(o):lt(Qe(ct(o,t)))}var pt="function"==typeof Symbol&&Symbol.for,ht=pt?Symbol.for("react.memo"):60115,dt=pt?Symbol.for("react.forward_ref"):60112,vt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yt=((ut={})[dt]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ut[ht]=mt,ut);function St(e){return("type"in(t=e)&&t.type.$$typeof)===ht?mt:"$$typeof"in e?yt[e.$$typeof]:vt;var t}var bt=Object.defineProperty,wt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,xt=Object.getOwnPropertyDescriptor,It=Object.getPrototypeOf,Pt=Object.prototype;function At(e,t,r){if("string"!=typeof t){if(Pt){var n=It(t);n&&n!==Pt&&At(e,n,r)}var o=wt(t);Ct&&(o=o.concat(Ct(t)));for(var s=St(e),a=St(t),i=0;i<o.length;++i){var c=o[i];if(!(c in gt||r&&r[c]||a&&c in a||s&&c in s)){var u=xt(t,c);try{bt(e,c,u)}catch(e){}}}}return e}var Et=function(){function r(){var r=this;this._emitSheetCSS=function(){var e=r.instance.toString(),s=I(),a=[s&&'nonce="'.concat(s,'"'),"".concat(t,'="true"'),"".concat(n,'="').concat(o,'"')].filter(Boolean).join(" ");return"<style ".concat(a,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw h(2);return r._emitSheetCSS()},this.getStyleElement=function(){var s;if(r.sealed)throw h(2);var a=((s={})[t]="",s[n]=o,s.dangerouslySetInnerHTML={__html:r.instance.toString()},s),i=I();return i&&(a.nonce=i),[e.createElement("style",u({},a,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new j({isServer:!0}),this.sealed=!1}return r.prototype.collectStyles=function(t){if(this.sealed)throw h(2);return e.createElement(Fe,{sheet:this.instance},t)},r.prototype.interleaveWithNodeStream=function(e){throw h(3)},r}(),_t=/*#__PURE__*/Object.freeze({__proto__:null,createGlobalStyle:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=ft.apply(void 0,l([t],r,!1)),s="sc-global-".concat(it(JSON.stringify(o))),a=new et(o,s),i=function(t){var r=De(),n=ze(),o=e.useContext(tt),i=e.useRef(r.allocateGSInstance(s)).current;return r.server&&f(i,t,r,o,n),(e.useInsertionEffect||e.useLayoutEffect)(function(){if(!r.server)return f(i,t,r,o,n),function(){return a.removeStyles(i,r)}},[i,t,r,o,n]),null};function f(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,c,r,o);else{var s=u(u({},t),{theme:nt(t,n,i.defaultProps)});a.renderStyles(e,s,r,o)}}return e.memo(i)},css:ft,isStyledComponent:Ze,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=ft.apply(void 0,l([e],t,!1)).join(""),o=it(n);return new Ge(o,n)},ServerStyleSheet:Et,StyleSheetConsumer:Oe,StyleSheetContext:je,StyleSheetManager:Fe,ThemeConsumer:rt,ThemeContext:tt,ThemeProvider:function(t){var r=e.useContext(tt),n=e.useMemo(function(){return function(e,t){if(!e)throw h(14);if(Ve(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw h(8);return t?u(u({},t),e):e}(t.theme,r)},[t.theme,r]);return t.children?e.createElement(tt.Provider,{value:n},t.children):null},useTheme:function(){return e.useContext(tt)},version:o,withTheme:function(t){var r=e.forwardRef(function(r,n){var o=nt(r,e.useContext(tt),t.defaultProps);return e.createElement(t,u({},r,{theme:o,ref:n}))});return r.displayName="WithTheme(".concat(Me(t),")"),At(r,t)},__PRIVATE__:{StyleSheet:j,mainSheet:Ne}}),Rt=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],$t=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,jt=/(^-|-$)/g;function Ot(e){return e.replace($t,"-").replace(jt,"")}function kt(e){return"string"==typeof e&&!0}function Nt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function Tt(e,t,r){if(void 0===r&&(r=!1),!r&&!Ue(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Tt(e[n],t[n]);else if(Ue(t))for(var n in t)e[n]=Tt(e[n],t[n]);return e}var Dt=Ae(o),zt=function(){function e(e,t,r){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Xe(e),this.componentId=t,this.baseHash=Pe(Dt,t),this.baseStyle=r,j.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))this.names.push(this.staticRulesId);else{var o=Qe(this.rules,e,t,r).join(""),s=at(Pe(this.baseHash,o)>>>0);if(!t.hasNameForId(n,s)){var a=r(o,".".concat(s),void 0,n);t.insertRules(n,s,a)}this.names.push(s),this.staticRulesId=s}else{for(var i=this.rules.length,c=Pe(this.baseHash,r.hash),u="",l=0;l<i;l++){var f=this.rules[l];if("string"==typeof f)u+=f;else if(f){var p=Qe(f,e,t,r),h=Array.isArray(p)?p.join(""):p;c=Pe(c,h),u+=h}}if(u){var d=at(c>>>0);if(!t.hasNameForId(n,d)){var v=r(u,".".concat(d),void 0,n);t.insertRules(n,d,v)}this.names.push(d)}}return this.names.join(" ")},e}(),Ft={};function Gt(t,r,n){var s=Ze(t),a=t,i=!kt(t),c=r.attrs,l=void 0===c?f:c,h=r.componentId,d=void 0===h?function(e,t){var r="string"!=typeof e?"sc":Ot(e);Ft[r]=(Ft[r]||0)+1;var n="".concat(r,"-").concat(it(o+r+Ft[r]));return t?"".concat(t,"-").concat(n):n}(r.displayName,r.parentComponentId):h,v=r.displayName,g=void 0===v?function(e){return kt(e)?"styled.".concat(e):"Styled(".concat(Me(e),")")}(t):v,m=r.displayName&&r.componentId?"".concat(Ot(r.displayName),"-").concat(r.componentId):r.componentId||d,y=s&&a.attrs?a.attrs.concat(l).filter(Boolean):l,S=r.shouldForwardProp;if(s&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return b(e,t)&&w(e,t)}}else S=b}var C=new zt(n,m,s?a.componentStyle:void 0),x=C.isStatic&&0===l.length;function I(t,r){return function(t,r,n,o){var s=t.attrs,a=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,l=t.styledComponentId,f=t.target,h=e.useContext(je).shouldForwardProp,d=t.shouldForwardProp||h,v=nt(r,e.useContext(tt),i)||p,g=s.reduce(function(e,t){var r="function"==typeof t?t(e):t;for(var n in r)e[n]="className"===n?Nt(e[n],r[n]):"style"===n?u(u({},e[n]),r[n]):r[n];return e},u(u({},r),{theme:v})),m=function(e,t,r,n){var o=De(),s=ze();return e.generateAndInjectStyles(t?p:r,o,s)}(a,o,g),y=n,S=g.as||f,b=kt(S),w={};for(var C in g)void 0===g[C]||"$"===C[0]||"as"===C||"theme"===C||("forwardedAs"===C?w.as=g.forwardedAs:d&&!d(C,S)||(w[C]=g[C]));return w[b&&-1===Rt.indexOf(S)?"class":"className"]=c.concat(l,m!==l?m:"",g.className||"").filter(Boolean).join(" "),w.ref=y,e.createElement(S,w)}(P,t,r,x)}I.displayName=g;var P=e.forwardRef(I);return P.attrs=y,P.componentStyle=C,P.displayName=g,P.shouldForwardProp=S,P.foldedComponentIds=s?a.foldedComponentIds.concat(a.styledComponentId):f,P.styledComponentId=m,P.target=s?a.target:t,Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Tt(e,o[n],!0);return e}({},a.defaultProps,e):e}}),P.toString=function(){return".".concat(P.styledComponentId)},i&&At(P,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),P}function Bt(e,t,r){if(void 0===r&&(r=p),!t)throw h(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,ft.apply(void 0,l([n],o,!1)))};return n.attrs=function(n){return Bt(e,t,u(u({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Bt(e,t,u(u({},r),n))},n}var Mt=function(e){return Bt(Gt,e)},Lt=Mt;for(var Wt in Rt.forEach(function(e){Lt[e]=Mt(e)}),_t)Lt[Wt]=_t[Wt];return Lt}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";var t="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",r="active",n="data-styled-version",o="6.0.0-beta.12",s="/*!sc*/\n",a="undefined"!=typeof window&&"HTMLElement"in window,i=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),c={},u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Object.freeze([]),p=Object.freeze({});function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var d=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,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw h(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}var a=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var i=t.length;s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)}else this.tag.insertRule(a,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,a=n;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(s);return t},e}(),v=new Map,g=new Map,m=1,y=function(e){if(v.has(e))return v.get(e);for(;g.has(m);)m++;var t=m++;return v.set(e,t),g.set(t,e),t},S=function(e,t){v.set(e,t),g.set(t,e)},b="style[".concat(t,"][").concat(n,'="').concat(o,'"]'),w=new RegExp("^".concat(t,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),C=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},x=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(s),o=[],a=0,i=n.length;a<i;a++){var c=n[a].trim();if(c){var u=c.match(w);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(S(f,l),C(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}};function I(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var P=function(e){var s=document.head,a=e||s,i=document.createElement("style"),c=function(e){for(var r=e.childNodes,n=r.length;n>=0;n--){var o=r[n];if(o&&1===o.nodeType&&o.hasAttribute(t))return o}}(a),u=void 0!==c?c.nextSibling:null;i.setAttribute(t,r),i.setAttribute(n,o);var l=I();return l&&i.setAttribute("nonce",l),a.insertBefore(i,u),i},A=function(){function e(e){var t=this.element=P(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw h(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}(),E=function(){function e(e){var t=this.element=P(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=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}(),R=a,$={isServer:!a,useCSSOMInjection:!i},j=function(){function e(e,n,o){void 0===e&&(e=p),void 0===n&&(n={}),this.options=u(u({},$),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&a&&R&&(R=!1,function(e){for(var n=document.querySelectorAll(b),o=0,s=n.length;o<s;o++){var a=n[o];a&&a.getAttribute(t)!==r&&(x(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}return e.registerId=function(e){return y(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(u(u({},this.options),t),this.gs,r&&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.useCSSOMInjection,r=e.target;return e.isServer?new _(r):t?new A(r):new E(r)}(this.options),new d(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(y(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(y(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(y(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var r=e.getTag(),n=r.length,o="",a=function(n){var a=function(e){return g.get(e)}(n);if(void 0===a)return"continue";var i=e.names.get(a),c=r.getGroup(n);if(void 0===i||0===c.length)return"continue";var u="".concat(t,".g").concat(n,'[id="').concat(a,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(c).concat(u,'{content:"').concat(l,'"}').concat(s)},i=0;i<n;i++)a(i);return o}(this)},e}(),O="-ms-",k="-moz-",N="-webkit-",T="comm",D="rule",z="decl",F="@keyframes",G=Math.abs,B=String.fromCharCode,M=Object.assign;function L(e){return e.trim()}function W(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,r){return e.replace(t,r)}function H(e,t){return e.indexOf(t)}function q(e,t){return 0|e.charCodeAt(t)}function V(e,t,r){return e.slice(t,r)}function U(e){return e.length}function Z(e){return e.length}function J(e,t){return t.push(e),e}var K=1,Q=1,X=0,ee=0,te=0,re="";function ne(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:K,column:Q,length:a,return:""}}function oe(e,t){return M(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function se(){return te=ee<X?q(re,ee++):0,Q++,10===te&&(Q=1,K++),te}function ae(){return q(re,ee)}function ie(){return ee}function ce(e,t){return V(re,e,t)}function ue(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function le(e){return L(ce(ee-1,he(91===e?e+2:40===e?e+1:e)))}function fe(e){for(;(te=ae())&&te<33;)se();return ue(e)>2||ue(te)>3?"":" "}function pe(e,t){for(;--t&&se()&&!(te<48||te>102||te>57&&te<65||te>70&&te<97););return ce(e,ie()+(t<6&&32==ae()&&32==se()))}function he(e){for(;se();)switch(te){case e:return ee;case 34:case 39:34!==e&&39!==e&&he(te);break;case 40:41===e&&he(e);break;case 92:se()}return ee}function de(e,t){for(;se()&&e+te!==57&&(e+te!==84||47!==ae()););return"/*"+ce(t,ee-1)+"*"+B(47===e?e:se())}function ve(e){for(;!ue(ae());)se();return ce(e,ee)}function ge(e){return function(e){return re="",e}(me("",null,null,null,[""],e=function(e){return K=Q=1,X=U(re=e),ee=0,[]}(e),0,[0],e))}function me(e,t,r,n,o,s,a,i,c){for(var u=0,l=0,f=a,p=0,h=0,d=0,v=1,g=1,m=1,y=0,S="",b=o,w=s,C=n,x=S;g;)switch(d=y,y=se()){case 40:if(108!=d&&58==q(x,f-1)){-1!=H(x+=Y(le(y),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:x+=le(y);break;case 9:case 10:case 13:case 32:x+=fe(d);break;case 92:x+=pe(ie()-1,7);continue;case 47:switch(ae()){case 42:case 47:J(Se(de(se(),ie()),t,r),c);break;default:x+="/"}break;case 123*v:i[u++]=U(x)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:h>0&&U(x)-f&&J(h>32?be(x+";",n,r,f-1):be(Y(x," ","")+";",n,r,f-2),c);break;case 59:x+=";";default:if(J(C=ye(x,t,r,u,l,o,i,S,b=[],w=[],f),s),123===y)if(0===l)me(x,t,C,C,b,s,f,i,w);else switch(99===p&&110===q(x,3)?100:p){case 100:case 109:case 115:me(e,C,C,n&&J(ye(e,C,C,0,0,o,i,S,o,b=[],f),w),o,w,f,i,n?b:w);break;default:me(x,C,C,C,[""],w,0,i,w)}}u=l=h=0,v=m=1,S=x="",f=a;break;case 58:f=1+U(x),h=d;default:if(v<1)if(123==y)--v;else if(125==y&&0==v++&&125==(te=ee>0?q(re,--ee):0,Q--,10===te&&(Q=1,K--),te))continue;switch(x+=B(y),y*v){case 38:m=l>0?1:(x+="\f",-1);break;case 44:i[u++]=(U(x)-1)*m,m=1;break;case 64:45===ae()&&(x+=le(se())),p=ae(),l=f=U(S=x+=ve(ie())),y++;break;case 45:45===d&&2==U(x)&&(v=0)}}return s}function ye(e,t,r,n,o,s,a,i,c,u,l){for(var f=o-1,p=0===o?s:[""],h=Z(p),d=0,v=0,g=0;d<n;++d)for(var m=0,y=V(e,f+1,f=G(v=a[d])),S=e;m<h;++m)(S=L(v>0?p[m]+" "+y:Y(y,/&\f/g,p[m])))&&(c[g++]=S);return ne(e,t,r,0===o?D:i,c,u,l)}function Se(e,t,r){return ne(e,t,r,T,B(te),V(e,2,-2),0)}function be(e,t,r,n){return ne(e,t,r,z,V(e,0,n),V(e,n+1,-1),n)}function we(e,t,r){switch(function(e,t){return 45^q(e,0)?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 4789:return k+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+k+e+O+e+e;case 5936:switch(q(e,t+11)){case 114:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return N+e+O+e+e;case 6165:return N+e+O+"flex-"+e+e;case 5187:return N+e+Y(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+O+"flex-$1$2")+e;case 5443:return N+e+O+"flex-item-"+Y(e,/flex-|-self/g,"")+(W(e,/flex-|baseline/)?"":O+"grid-row-"+Y(e,/flex-|-self/g,""))+e;case 4675:return N+e+O+"flex-line-pack"+Y(e,/align-content|flex-|-self/g,"")+e;case 5548:return N+e+O+Y(e,"shrink","negative")+e;case 5292:return N+e+O+Y(e,"basis","preferred-size")+e;case 6060:return N+"box-"+Y(e,"-grow","")+N+e+O+Y(e,"grow","positive")+e;case 4554:return N+Y(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4200:if(!W(e,/flex-|baseline/))return O+"grid-column-align"+V(e,t)+e;break;case 2592:case 3360:return O+Y(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,W(e.props,/grid-\w+-end/)})?~H(e+(r=r[t].value),"span")?e:O+Y(e,"-start","")+e+O+"grid-row-span:"+(~H(r,"span")?W(r,/\d+/):+W(r,/\d+/)-+W(e,/\d+/))+";":O+Y(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return W(e.props,/grid-\w+-start/)})?e:O+Y(Y(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(U(e)-1-t>6)switch(q(e,t+1)){case 109:if(45!==q(e,t+4))break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+k+(108==q(e,t+3)?"$3":"$2-$3"))+e;case 115:return~H(e,"stretch")?we(Y(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Y(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return O+r+":"+n+i+(o?O+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===q(e,t+6))return Y(e,":",":"+N)+e;break;case 6444:switch(q(e,45===q(e,14)?18:11)){case 120:return Y(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+N+(45===q(e,14)?"inline-":"")+"box$3$1"+N+"$2$3$1"+O+"$2box$3")+e;case 100:return Y(e,":",":"+O)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Y(e,"scroll-","scroll-snap-")+e}return e}function Ce(e,t){for(var r="",n=Z(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function xe(e,t,r,n){switch(e.type){case"@import":case z:return e.return=e.return||e.value;case T:return"";case F:return e.return=e.value+"{"+Ce(e.children,n)+"}";case D:e.value=e.props.join(",")}return U(r=Ce(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ie(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case z:return void(e.return=we(e.value,e.length,r));case F:return Ce([oe(e,{value:Y(e.value,"@","@"+N)})],n);case D:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(W(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ce([oe(e,{props:[Y(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ce([oe(e,{props:[Y(t,/:(plac\w+)/,":"+N+"input-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,":-moz-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,O+"input-$1")]})],n)}return""})}}var Pe=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ae=function(e){return Pe(5381,e)},Ee=/^\s*\/\/.*$/gm,_e=[":","[",".","#"];function Re(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&(e.children=Re(e.children,t)),e})}function $e(e){var t,r,n,o,s=void 0===e?p:e,a=s.options,i=void 0===a?p:a,c=s.plugins,u=void 0===c?f:c,l=function(e,n,s){return 0===n&&_e.includes(s[r.length])||s.match(o)?e:".".concat(t)},d=function(e){if(e.type===D&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(n,l)}},v=function(e,s,a,c){void 0===s&&(s=""),void 0===a&&(a=""),void 0===c&&(c="&");var l=e.replace(Ee,"");t=c,r=s,n=new RegExp("\\".concat(r,"\\b"),"g"),o=new RegExp("(\\".concat(r,"\\b){2,}"));var f=u.slice();(i.prefix||void 0===i.prefix)&&f.unshift(Ie),f.push(d,xe);var p,h,v=ge(a||s?"".concat(a," ").concat(s," { ").concat(l," }"):l);return i.namespace&&(v=Re(v,i.namespace)),p=v,h=function(e){var t=Z(e);return function(r,n,o,s){for(var a="",i=0;i<t;i++)a+=e[i](r,n,o,s)||"";return a}}(f),p.map(function(e,t){return h(e,t,p,h)}).filter(Boolean)};return v.hash=u.length?u.reduce(function(e,t){return t.name||h(15),Pe(e,t.name)},5381).toString():"",v}var je=e.createContext({shouldForwardProp:void 0,styleSheet:void 0}),Oe=je.Consumer,ke=e.createContext(void 0),Ne=new j,Te=$e();function De(){return e.useContext(je).styleSheet||Ne}function ze(){return e.useContext(ke)||Te}function Fe(t){var r=e.useState(t.stylisPlugins),n=r[0],o=r[1],s=De(),a=e.useMemo(function(){var e=s;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]),i=e.useMemo(function(){return $e({options:{namespace:t.namespace,prefix:!t.disableVendorPrefixes},plugins:n})},[t.disableVendorPrefixes,t.namespace,n]);return e.useEffect(function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var u=s[c];if(!i(u))return!1;if(!1===(o=void 0)||void 0===o&&e[u]!==t[u])return!1}return!0})(n,t.stylisPlugins)||o(t.stylisPlugins)},[t.stylisPlugins]),e.createElement(je.Provider,{value:{shouldForwardProp:t.shouldForwardProp,styleSheet:a}},e.createElement(ke.Provider,{value:i},t.children))}var Ge=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Te);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){throw h(12,String(r.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Te),this.name+e.hash},e}(),Be={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Me(e){return e.displayName||e.name||"Component"}var Le=/[A-Z]/,We=/[A-Z]/g,Ye=/^ms-/,He=function(e){return"-".concat(e.toLowerCase())};function qe(e){return Le.test(e)&&!e.startsWith("--")?e.replace(We,He).replace(Ye,"-ms-"):e}function Ve(e){return"function"==typeof e}function Ue(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 Ze(e){return"object"==typeof e&&"styledComponentId"in e}var Je=function(e){return null==e||!1===e||""===e},Ke=function(e,t){var r,n=[];for(var o in e)e.hasOwnProperty(o)&&!Je(e[o])&&(Array.isArray(e[o])&&e[o].isCss||Ve(e[o])?n.push("".concat(qe(o),":"),e[o],";"):Ue(e[o])?n.push.apply(n,Ke(e[o],o)):n.push("".concat(qe(o),": ").concat(null==(r=e[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in Be?String(r).trim():"".concat(r,"px"),";")));return t?l(l(["".concat(t," {")],n,!0),["}"],!1):n};function Qe(e,t,r,n){if(Array.isArray(e)){for(var o=[],s=0,a=e.length,i=void 0;s<a;s+=1)0!==(i=Qe(e[s],t,r,n)).length&&o.push.apply(o,i);return o}return Je(e)?[]:Ze(e)?[".".concat(e.styledComponentId)]:Ve(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?[e]:Qe(i=e(t),t,r,n):e instanceof Ge?r?(e.inject(r,n),[e.getName(n)]):[e]:Ue(e)?Ke(e):[e.toString()];var c}function Xe(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ve(r)&&!Ze(r))return!1}return!0}var et=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Xe(e),j.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(Qe(this.rules,t,r,n).join(""),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&j.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),tt=e.createContext(void 0),rt=tt.Consumer;function nt(e,t,r){return void 0===r&&(r=p),e.theme!==r.theme&&e.theme||t||r.theme}var ot=/(a)(d)/gi,st=function(e){return String.fromCharCode(e+(e>25?39:97))};function at(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=st(t%52)+r;return(st(t%52)+r).replace(ot,"$1-$2")}function it(e){return at(Ae(e)>>>0)}function ct(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var ut,lt=function(e){return Object.assign(e,{isCss:!0})};function ft(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ve(e)||Ue(e)){var n=e;return lt(Qe(ct(f,l([n],t,!0))))}var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?Qe(o):lt(Qe(ct(o,t)))}var pt="function"==typeof Symbol&&Symbol.for,ht=pt?Symbol.for("react.memo"):60115,dt=pt?Symbol.for("react.forward_ref"):60112,vt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yt=((ut={})[dt]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ut[ht]=mt,ut);function St(e){return("type"in(t=e)&&t.type.$$typeof)===ht?mt:"$$typeof"in e?yt[e.$$typeof]:vt;var t}var bt=Object.defineProperty,wt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,xt=Object.getOwnPropertyDescriptor,It=Object.getPrototypeOf,Pt=Object.prototype;function At(e,t,r){if("string"!=typeof t){if(Pt){var n=It(t);n&&n!==Pt&&At(e,n,r)}var o=wt(t);Ct&&(o=o.concat(Ct(t)));for(var s=St(e),a=St(t),i=0;i<o.length;++i){var c=o[i];if(!(c in gt||r&&r[c]||a&&c in a||s&&c in s)){var u=xt(t,c);try{bt(e,c,u)}catch(e){}}}}return e}var Et=function(){function r(){var r=this;this._emitSheetCSS=function(){var e=r.instance.toString(),s=I(),a=[s&&'nonce="'.concat(s,'"'),"".concat(t,'="true"'),"".concat(n,'="').concat(o,'"')].filter(Boolean).join(" ");return"<style ".concat(a,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw h(2);return r._emitSheetCSS()},this.getStyleElement=function(){var s;if(r.sealed)throw h(2);var a=((s={})[t]="",s[n]=o,s.dangerouslySetInnerHTML={__html:r.instance.toString()},s),i=I();return i&&(a.nonce=i),[e.createElement("style",u({},a,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new j({isServer:!0}),this.sealed=!1}return r.prototype.collectStyles=function(t){if(this.sealed)throw h(2);return e.createElement(Fe,{sheet:this.instance},t)},r.prototype.interleaveWithNodeStream=function(e){throw h(3)},r}(),_t=/*#__PURE__*/Object.freeze({__proto__:null,ServerStyleSheet:Et,StyleSheetConsumer:Oe,StyleSheetContext:je,StyleSheetManager:Fe,ThemeConsumer:rt,ThemeContext:tt,ThemeProvider:function(t){var r=e.useContext(tt),n=e.useMemo(function(){return function(e,t){if(!e)throw h(14);if(Ve(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw h(8);return t?u(u({},t),e):e}(t.theme,r)},[t.theme,r]);return t.children?e.createElement(tt.Provider,{value:n},t.children):null},__PRIVATE__:{StyleSheet:j,mainSheet:Ne},createGlobalStyle:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=ft.apply(void 0,l([t],r,!1)),s="sc-global-".concat(it(JSON.stringify(o))),a=new et(o,s),i=function(t){var r=De(),n=ze(),o=e.useContext(tt),i=e.useRef(r.allocateGSInstance(s)).current;return r.server&&f(i,t,r,o,n),(e.useInsertionEffect||e.useLayoutEffect)(function(){if(!r.server)return f(i,t,r,o,n),function(){return a.removeStyles(i,r)}},[i,t,r,o,n]),null};function f(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,c,r,o);else{var s=u(u({},t),{theme:nt(t,n,i.defaultProps)});a.renderStyles(e,s,r,o)}}return e.memo(i)},css:ft,isStyledComponent:Ze,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=ft.apply(void 0,l([e],t,!1)).join(""),o=it(n);return new Ge(o,n)},useTheme:function(){return e.useContext(tt)},version:o,withTheme:function(t){var r=e.forwardRef(function(r,n){var o=nt(r,e.useContext(tt),t.defaultProps);return e.createElement(t,u({},r,{theme:o,ref:n}))});return r.displayName="WithTheme(".concat(Me(t),")"),At(r,t)}}),Rt=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],$t=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,jt=/(^-|-$)/g;function Ot(e){return e.replace($t,"-").replace(jt,"")}function kt(e){return"string"==typeof e&&!0}function Nt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function Tt(e,t,r){if(void 0===r&&(r=!1),!r&&!Ue(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Tt(e[n],t[n]);else if(Ue(t))for(var n in t)e[n]=Tt(e[n],t[n]);return e}var Dt=Ae(o),zt=function(){function e(e,t,r){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Xe(e),this.componentId=t,this.baseHash=Pe(Dt,t),this.baseStyle=r,j.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))this.names.push(this.staticRulesId);else{var o=Qe(this.rules,e,t,r).join(""),s=at(Pe(this.baseHash,o)>>>0);if(!t.hasNameForId(n,s)){var a=r(o,".".concat(s),void 0,n);t.insertRules(n,s,a)}this.names.push(s),this.staticRulesId=s}else{for(var i=this.rules.length,c=Pe(this.baseHash,r.hash),u="",l=0;l<i;l++){var f=this.rules[l];if("string"==typeof f)u+=f;else if(f){var p=Qe(f,e,t,r),h=Array.isArray(p)?p.join(""):p;c=Pe(c,h),u+=h}}if(u){var d=at(c>>>0);if(!t.hasNameForId(n,d)){var v=r(u,".".concat(d),void 0,n);t.insertRules(n,d,v)}this.names.push(d)}}return this.names.join(" ")},e}(),Ft={};function Gt(t,r,n){var s=Ze(t),a=t,i=!kt(t),c=r.attrs,l=void 0===c?f:c,h=r.componentId,d=void 0===h?function(e,t){var r="string"!=typeof e?"sc":Ot(e);Ft[r]=(Ft[r]||0)+1;var n="".concat(r,"-").concat(it(o+r+Ft[r]));return t?"".concat(t,"-").concat(n):n}(r.displayName,r.parentComponentId):h,v=r.displayName,g=void 0===v?function(e){return kt(e)?"styled.".concat(e):"Styled(".concat(Me(e),")")}(t):v,m=r.displayName&&r.componentId?"".concat(Ot(r.displayName),"-").concat(r.componentId):r.componentId||d,y=s&&a.attrs?a.attrs.concat(l).filter(Boolean):l,S=r.shouldForwardProp;if(s&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return b(e,t)&&w(e,t)}}else S=b}var C=new zt(n,m,s?a.componentStyle:void 0),x=C.isStatic&&0===l.length;function I(t,r){return function(t,r,n,o){var s=t.attrs,a=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,l=t.styledComponentId,f=t.target,h=e.useContext(je).shouldForwardProp,d=t.shouldForwardProp||h,v=nt(r,e.useContext(tt),i)||p,g=s.reduce(function(e,t){var r="function"==typeof t?t(e):t;for(var n in r)e[n]="className"===n?Nt(e[n],r[n]):"style"===n?u(u({},e[n]),r[n]):r[n];return e},u(u({},r),{theme:v})),m=function(e,t,r,n){var o=De(),s=ze();return e.generateAndInjectStyles(t?p:r,o,s)}(a,o,g),y=n,S=g.as||f,b=kt(S),w={};for(var C in g)void 0===g[C]||"$"===C[0]||"as"===C||"theme"===C||("forwardedAs"===C?w.as=g.forwardedAs:d&&!d(C,S)||(w[C]=g[C]));return w[b&&-1===Rt.indexOf(S)?"class":"className"]=c.concat(l,m!==l?m:"",g.className||"").filter(Boolean).join(" "),w.ref=y,e.createElement(S,w)}(P,t,r,x)}I.displayName=g;var P=e.forwardRef(I);return P.attrs=y,P.componentStyle=C,P.displayName=g,P.shouldForwardProp=S,P.foldedComponentIds=s?a.foldedComponentIds.concat(a.styledComponentId):f,P.styledComponentId=m,P.target=s?a.target:t,Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Tt(e,o[n],!0);return e}({},a.defaultProps,e):e}}),P.toString=function(){return".".concat(P.styledComponentId)},i&&At(P,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),P}function Bt(e,t,r){if(void 0===r&&(r=p),!t)throw h(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,ft.apply(void 0,l([n],o,!1)))};return n.attrs=function(n){return Bt(e,t,u(u({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Bt(e,t,u(u({},r),n))},n}var Mt=function(e){return Bt(Gt,e)},Lt=Mt;for(var Wt in Rt.forEach(function(e){Lt[e]=Mt(e)}),_t)Lt[Wt]=_t[Wt];return Lt}); | ||
//# sourceMappingURL=styled-components.min.js.map |
@@ -9,12 +9,12 @@ import React from 'react'; | ||
} | ||
export declare type OmitNever<T> = { | ||
export type OmitNever<T> = { | ||
[K in keyof T as T[K] extends never ? never : K]: T[K]; | ||
}; | ||
export declare type Runtime = 'web' | 'native'; | ||
export type Runtime = 'web' | 'native'; | ||
export { DefaultTheme }; | ||
export declare type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>; | ||
export declare type KnownTarget = keyof JSX.IntrinsicElements | AnyComponent; | ||
export declare type WebTarget = string | KnownTarget; | ||
export declare type NativeTarget = AnyComponent; | ||
export declare type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget; | ||
export type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>; | ||
export type KnownTarget = keyof JSX.IntrinsicElements | AnyComponent; | ||
export type WebTarget = string | KnownTarget; | ||
export type NativeTarget = AnyComponent; | ||
export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget; | ||
export interface StyledOptions<R extends Runtime, Props extends object> { | ||
@@ -27,3 +27,3 @@ attrs?: AttrsArg<Props>[]; | ||
} | ||
export declare type Dict<T> = { | ||
export type Dict<T> = { | ||
[key: string]: T; | ||
@@ -55,8 +55,8 @@ }; | ||
} | ||
export declare type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[]; | ||
export declare type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>); | ||
export declare type Attrs = object | ((...args: any) => object); | ||
export declare type RuleSet<Props extends object> = Interpolation<Props>[]; | ||
export declare type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>; | ||
export declare type NameGenerator = (hash: number) => string; | ||
export type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[]; | ||
export type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>); | ||
export type Attrs = object | ((...args: any) => object); | ||
export type RuleSet<Props extends object> = Interpolation<Props>[]; | ||
export type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>; | ||
export type NameGenerator = (hash: number) => string; | ||
export interface StyleSheet { | ||
@@ -73,3 +73,3 @@ create: Function; | ||
} | ||
export declare type FlattenerResult<Props extends object> = RuleSet<Props> | number | string | string[] | IStyledComponent<'web', any, any> | Keyframes; | ||
export type FlattenerResult<Props extends object> = RuleSet<Props> | number | string | string[] | IStyledComponent<'web', any, any> | Keyframes; | ||
export interface Stringifier { | ||
@@ -98,3 +98,3 @@ (css: string, selector?: string, prefix?: string, componentId?: string): string[]; | ||
*/ | ||
export declare type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<R>, P extends object> = Omit<E extends KnownTarget ? P & Omit<React.ComponentPropsWithRef<E>, keyof P> : P, 'as' | 'theme'> & { | ||
export type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<R>, P extends object> = Omit<E extends KnownTarget ? P & Omit<React.ComponentPropsWithRef<E>, keyof P> : P, 'as' | 'theme'> & { | ||
as?: P extends { | ||
@@ -111,3 +111,3 @@ as?: string | AnyComponent; | ||
*/ | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<object> { | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<P> { | ||
<E extends StyledTarget<R> = FallbackComponent>(props: PolymorphicComponentProps<R, E, P>): React.ReactElement | null; | ||
@@ -154,2 +154,2 @@ } | ||
*/ | ||
export declare type CSSProp = string | StyledObject<any> | StyleFunction<any>; | ||
export type CSSProp = string | StyledObject<any> | StyleFunction<any>; |
@@ -43,7 +43,7 @@ import React from 'react'; | ||
}; | ||
declare type OmniComponent = AnyComponent; | ||
declare type ExcludeList = { | ||
type OmniComponent = AnyComponent; | ||
type ExcludeList = { | ||
[key: string]: true; | ||
}; | ||
declare type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = { | ||
type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = { | ||
[key in Exclude<keyof S, S extends React.MemoExoticComponent<any> ? keyof typeof MEMO_STATICS | keyof C : S extends React.ForwardRefExoticComponent<any> ? keyof typeof FORWARD_REF_STATICS | keyof C : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C>]: S[key]; | ||
@@ -50,0 +50,0 @@ }; |
import { Middleware } from 'stylis'; | ||
import { Stringifier } from '../types'; | ||
export declare type ICreateStylisInstance = { | ||
export type ICreateStylisInstance = { | ||
options?: { | ||
@@ -5,0 +5,0 @@ namespace?: string; |
@@ -6,7 +6,7 @@ import React from 'react'; | ||
*/ | ||
declare type OptionalIntersection<A, B> = { | ||
type OptionalIntersection<A, B> = { | ||
[K in Extract<keyof A, keyof B>]?: A[K]; | ||
}; | ||
declare type AttrsResult<T extends Attrs> = T extends (...args: any) => infer P ? P : T; | ||
declare type ExtractAttrsTarget<R extends Runtime, P extends ExecutionProps, DefaultTarget extends StyledTarget<R>> = P['as'] extends KnownTarget ? P['as'] : DefaultTarget; | ||
type AttrsResult<T extends Attrs> = T extends (...args: any) => infer P ? P : T; | ||
type ExtractAttrsTarget<R extends Runtime, P extends ExecutionProps, DefaultTarget extends StyledTarget<R>> = P['as'] extends KnownTarget ? P['as'] : DefaultTarget; | ||
/** | ||
@@ -18,3 +18,3 @@ * If attrs type is a function (no type provided, inferring from usage), extract the return value | ||
*/ | ||
declare type PropsSatisfiedByAttrs<T extends Attrs, Props extends object, Result extends ExecutionProps = AttrsResult<T>> = Omit<Props, keyof Result> & OptionalIntersection<Props, Result> & Partial<Omit<Result, keyof Props | 'as'>>; | ||
type PropsSatisfiedByAttrs<T extends Attrs, Props extends object, Result extends ExecutionProps = AttrsResult<T>> = Omit<Props, keyof Result> & OptionalIntersection<Props, Result> & Partial<Omit<Result, keyof Props | 'as'>>; | ||
export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = object, OuterStatics extends object = object, RuntimeInjectedProps extends ExecutionProps = object> { | ||
@@ -21,0 +21,0 @@ <Props extends object = object, Statics extends object = object>(initialStyles: Styles<OuterProps & RuntimeInjectedProps & Props>, ...interpolations: Interpolation<OuterProps & RuntimeInjectedProps & Props>[]): // @ts-expect-error KnownTarget is a subset of StyledTarget<R> |
import React from 'react'; | ||
import { AnyComponent, ExecutionProps } from '../types'; | ||
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "type" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "type" | "getDefaultProps" | "mixins" | "name" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; }; | ||
export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "type" | "defaultProps" | "displayName" | "$$typeof" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "type" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "getDefaultProps" | "mixins" | "name" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; }; |
import React from 'react'; | ||
import StyleSheet from '../sheet'; | ||
import { ShouldForwardProp, Stringifier } from '../types'; | ||
export declare type IStyleSheetContext = { | ||
export type IStyleSheetContext = { | ||
shouldForwardProp?: ShouldForwardProp<'web'>; | ||
@@ -10,3 +10,3 @@ styleSheet?: StyleSheet; | ||
export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>; | ||
export declare type IStylisContext = Stringifier | void; | ||
export type IStylisContext = Stringifier | void; | ||
export declare const StylisContext: React.Context<IStylisContext>; | ||
@@ -19,3 +19,3 @@ export declare const StylisConsumer: React.Consumer<IStylisContext>; | ||
export declare function useStylis(): Stringifier; | ||
export declare type IStyleSheetManager = React.PropsWithChildren<{ | ||
export type IStyleSheetManager = React.PropsWithChildren<{ | ||
/** | ||
@@ -22,0 +22,0 @@ * If desired, you can pass this prop to disable "speedy" insertion mode, which |
@@ -27,5 +27,5 @@ import React from 'react'; | ||
} | ||
declare type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme; | ||
declare type ThemeArgument = DefaultTheme | ThemeFn; | ||
declare type Props = { | ||
type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme; | ||
type ThemeArgument = DefaultTheme | ThemeFn; | ||
type Props = { | ||
children?: React.ReactNode; | ||
@@ -32,0 +32,0 @@ theme: ThemeArgument; |
import { GroupedTag, Sheet, SheetOptions } from './types'; | ||
declare type SheetConstructorArgs = { | ||
type SheetConstructorArgs = { | ||
isServer?: boolean; | ||
@@ -7,6 +7,6 @@ useCSSOMInjection?: boolean; | ||
}; | ||
declare type GlobalStylesAllocationMap = { | ||
type GlobalStylesAllocationMap = { | ||
[key: string]: number; | ||
}; | ||
declare type NamesAllocationMap = Map<string, Set<string>>; | ||
type NamesAllocationMap = Map<string, Set<string>>; | ||
/** Contains the main stylesheet logic for stringification and caching */ | ||
@@ -13,0 +13,0 @@ export default class StyleSheet implements Sheet { |
@@ -17,3 +17,3 @@ /** CSSStyleSheet-like Tag abstraction for CSS rules */ | ||
} | ||
export declare type SheetOptions = { | ||
export type SheetOptions = { | ||
isServer: boolean; | ||
@@ -20,0 +20,0 @@ target?: HTMLElement; |
@@ -82,3 +82,3 @@ 'use strict'; | ||
var SC_ATTR_VERSION = 'data-styled-version'; | ||
var SC_VERSION = "6.0.0-beta.11"; | ||
var SC_VERSION = "6.0.0-beta.12"; | ||
var SPLITTER = '/*!sc*/\n'; | ||
@@ -85,0 +85,0 @@ var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; |
@@ -72,3 +72,3 @@ import { __spreadArray, __assign } from 'tslib'; | ||
var SC_ATTR_VERSION = 'data-styled-version'; | ||
var SC_VERSION = "6.0.0-beta.11"; | ||
var SC_VERSION = "6.0.0-beta.12"; | ||
var SPLITTER = '/*!sc*/\n'; | ||
@@ -75,0 +75,0 @@ var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; |
@@ -9,12 +9,12 @@ import React from 'react'; | ||
} | ||
export declare type OmitNever<T> = { | ||
export type OmitNever<T> = { | ||
[K in keyof T as T[K] extends never ? never : K]: T[K]; | ||
}; | ||
export declare type Runtime = 'web' | 'native'; | ||
export type Runtime = 'web' | 'native'; | ||
export { DefaultTheme }; | ||
export declare type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>; | ||
export declare type KnownTarget = keyof JSX.IntrinsicElements | AnyComponent; | ||
export declare type WebTarget = string | KnownTarget; | ||
export declare type NativeTarget = AnyComponent; | ||
export declare type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget; | ||
export type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>; | ||
export type KnownTarget = keyof JSX.IntrinsicElements | AnyComponent; | ||
export type WebTarget = string | KnownTarget; | ||
export type NativeTarget = AnyComponent; | ||
export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget; | ||
export interface StyledOptions<R extends Runtime, Props extends object> { | ||
@@ -27,3 +27,3 @@ attrs?: AttrsArg<Props>[]; | ||
} | ||
export declare type Dict<T> = { | ||
export type Dict<T> = { | ||
[key: string]: T; | ||
@@ -55,8 +55,8 @@ }; | ||
} | ||
export declare type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[]; | ||
export declare type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>); | ||
export declare type Attrs = object | ((...args: any) => object); | ||
export declare type RuleSet<Props extends object> = Interpolation<Props>[]; | ||
export declare type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>; | ||
export declare type NameGenerator = (hash: number) => string; | ||
export type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[]; | ||
export type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>); | ||
export type Attrs = object | ((...args: any) => object); | ||
export type RuleSet<Props extends object> = Interpolation<Props>[]; | ||
export type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>; | ||
export type NameGenerator = (hash: number) => string; | ||
export interface StyleSheet { | ||
@@ -73,3 +73,3 @@ create: Function; | ||
} | ||
export declare type FlattenerResult<Props extends object> = RuleSet<Props> | number | string | string[] | IStyledComponent<'web', any, any> | Keyframes; | ||
export type FlattenerResult<Props extends object> = RuleSet<Props> | number | string | string[] | IStyledComponent<'web', any, any> | Keyframes; | ||
export interface Stringifier { | ||
@@ -98,3 +98,3 @@ (css: string, selector?: string, prefix?: string, componentId?: string): string[]; | ||
*/ | ||
export declare type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<R>, P extends object> = Omit<E extends KnownTarget ? P & Omit<React.ComponentPropsWithRef<E>, keyof P> : P, 'as' | 'theme'> & { | ||
export type PolymorphicComponentProps<R extends Runtime, E extends StyledTarget<R>, P extends object> = Omit<E extends KnownTarget ? P & Omit<React.ComponentPropsWithRef<E>, keyof P> : P, 'as' | 'theme'> & { | ||
as?: P extends { | ||
@@ -111,3 +111,3 @@ as?: string | AnyComponent; | ||
*/ | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<object> { | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<P> { | ||
<E extends StyledTarget<R> = FallbackComponent>(props: PolymorphicComponentProps<R, E, P>): React.ReactElement | null; | ||
@@ -154,2 +154,2 @@ } | ||
*/ | ||
export declare type CSSProp = string | StyledObject<any> | StyleFunction<any>; | ||
export type CSSProp = string | StyledObject<any> | StyleFunction<any>; |
@@ -43,7 +43,7 @@ import React from 'react'; | ||
}; | ||
declare type OmniComponent = AnyComponent; | ||
declare type ExcludeList = { | ||
type OmniComponent = AnyComponent; | ||
type ExcludeList = { | ||
[key: string]: true; | ||
}; | ||
declare type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = { | ||
type NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = { | ||
[key in Exclude<keyof S, S extends React.MemoExoticComponent<any> ? keyof typeof MEMO_STATICS | keyof C : S extends React.ForwardRefExoticComponent<any> ? keyof typeof FORWARD_REF_STATICS | keyof C : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C>]: S[key]; | ||
@@ -50,0 +50,0 @@ }; |
import { Middleware } from 'stylis'; | ||
import { Stringifier } from '../types'; | ||
export declare type ICreateStylisInstance = { | ||
export type ICreateStylisInstance = { | ||
options?: { | ||
@@ -5,0 +5,0 @@ namespace?: string; |
{ | ||
"name": "styled-components", | ||
"version": "6.0.0-beta.11", | ||
"version": "6.0.0-beta.12", | ||
"description": "Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress", | ||
@@ -13,5 +13,14 @@ "types": "dist/index.d.ts", | ||
}, | ||
"sideEffects": [ | ||
"./src/base.js" | ||
], | ||
"sideEffects": false, | ||
"exports": { | ||
"types": "./dist/index.d.ts", | ||
"node": { | ||
"require": "./dist/styled-components.cjs.js", | ||
"import": "./dist/styled-components.esm.js", | ||
"default": "./dist/styled-components.cjs.js" | ||
}, | ||
"require": "./dist/styled-components.browser.cjs.js", | ||
"import": "./dist/styled-components.browser.esm.js", | ||
"default": "./dist/styled-components.browser.cjs.js" | ||
}, | ||
"scripts": { | ||
@@ -36,6 +45,4 @@ "generateErrors": "node scripts/generateErrorMap.js", | ||
"files": [ | ||
"CHANGELOG.md", | ||
"CODE_OF_CONDUCT.md", | ||
"CONTRIBUTING.md", | ||
"LICENSE", | ||
"README.md", | ||
"dist", | ||
@@ -62,4 +69,4 @@ "native", | ||
"dependencies": { | ||
"@babel/cli": "^7.20.7", | ||
"@babel/core": "^7.20.7", | ||
"@babel/cli": "^7.21.0", | ||
"@babel/core": "^7.21.0", | ||
"@babel/helper-module-imports": "^7.18.6", | ||
@@ -71,9 +78,9 @@ "@babel/plugin-external-helpers": "^7.18.6", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@babel/traverse": "^7.20.10", | ||
"@babel/preset-typescript": "^7.21.0", | ||
"@babel/traverse": "^7.21.2", | ||
"@emotion/unitless": "^0.8.0", | ||
"css-to-react-native": "^3.0.0", | ||
"css-to-react-native": "^3.2.0", | ||
"shallowequal": "^1.1.0", | ||
"stylis": "^4.1.3", | ||
"tslib": "^2.4.1" | ||
"tslib": "^2.5.0" | ||
}, | ||
@@ -103,9 +110,9 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/plugin-transform-flow-strip-types": "^7.19.0", | ||
"@rollup/plugin-typescript": "^10.0.1", | ||
"@babel/plugin-transform-flow-strip-types": "^7.21.0", | ||
"@rollup/plugin-typescript": "^11.0.0", | ||
"@types/babel-plugin-macros": "^2.8.4", | ||
"@types/enzyme": "^3.10.12", | ||
"@types/jest": "^29.2.4", | ||
"@types/jest": "^29.4.0", | ||
"@types/js-beautify": "^1.13.1", | ||
"@types/node": "^18.11.17", | ||
"@types/node": "^18.14.2", | ||
"@types/react": "^17.0.22", | ||
@@ -118,3 +125,3 @@ "@types/react-dom": "^17.0.9", | ||
"@types/stylis": "^4.0.2", | ||
"babel-jest": "^29.3.1", | ||
"babel-jest": "^29.4.3", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
@@ -125,8 +132,8 @@ "babel-plugin-macros": "^3.1.0", | ||
"bundlewatch": "^0.3.3", | ||
"jest": "^29.3.1", | ||
"jest-environment-jsdom": "^29.3.1", | ||
"jest": "^29.4.3", | ||
"jest-environment-jsdom": "^29.4.3", | ||
"jest-serializer-html": "^7.0.0", | ||
"jest-watch-typeahead": "^2.0.0", | ||
"jest-watch-typeahead": "^2.2.2", | ||
"js-beautify": "^1.14.7", | ||
"prettier": "^2.8.1", | ||
"prettier": "^2.8.4", | ||
"prop-types": "^15.8.1", | ||
@@ -138,3 +145,3 @@ "react": "^17.0.2", | ||
"react-test-renderer": "^17.0.2", | ||
"rollup": "^3.0.0", | ||
"rollup": "^3.18.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
@@ -147,3 +154,3 @@ "rollup-plugin-json": "^4.0.0", | ||
"stylis-plugin-rtl": "^2.1.1", | ||
"typescript": "^4.8.4", | ||
"typescript": "^4.9.5", | ||
"utility-types": "^3.10.0" | ||
@@ -150,0 +157,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2026915
Updated@babel/cli@^7.21.0
Updated@babel/core@^7.21.0
Updated@babel/traverse@^7.21.2
Updatedcss-to-react-native@^3.2.0
Updatedtslib@^2.5.0