@chromatic-com/storybook 0.0.124

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.
@@ -0,0 +1,292 @@
1
+ import { addons, types, useStorybookState, useChannel, useAddonState, useStorybookApi, useGlobals, useGlobalTypes } from '@storybook/manager-api';
2
+ import c, { createContext, useState, useEffect, useCallback, useRef, useReducer, useMemo, useContext } from 'react';
3
+ import { Avatar, animation, Spinner, Icon, Link as Link$1, ListItem, Input } from '@storybook/design-system';
4
+ import { styled, color, css, keyframes } from '@storybook/theming';
5
+ import { Link, Button, IconButton, Icons, Badge, Code, WithTooltip, TooltipNote, Loader, TooltipLinkList } from '@storybook/components';
6
+ import { Client, mapExchange, fetchExchange, Provider, useQuery, useClient, useMutation } from 'urql';
7
+ import { authExchange } from '@urql/exchange-auth';
8
+ import { v4 } from 'uuid';
9
+ import { z } from 'zod';
10
+ import { dedent } from 'ts-dedent';
11
+ import { filesize } from 'filesize';
12
+ import { formatDistance } from 'date-fns';
13
+ import Qt from 'pluralize';
14
+
15
+ var {CHROMATIC_INDEX_URL:pi,CHROMATIC_BASE_URL:at=pi||"https://www.chromatic.com",CHROMATIC_API_URL:jn=`${at}/api`}=process.env,x="chromaui/addon-visual-tests",ge=`${x}/panel`,Un=`${x}/sidebarTop`,$n=`${x}/sidebarBottom`,ht=`${x}/access-token/${at}`,Hn=`${x}/gitInfo`,bt=`${x}/gitInfoError`,Vn=`${x}/projectInfo`,st=`${x}/isOutdated`,Ct=`${x}/startBuild`,zn=`${x}/stopBuild`,kt=`${x}/localBuildProgress`;var E=styled.div({containerType:"size",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"},({hidden:e})=>e&&{display:"none"}),M=styled.div(({grow:e,last:t,theme:n})=>({flexGrow:e?1:"auto",borderBottom:t?"none":`1px solid ${n.appBorderColor}`})),ci=styled.div({display:"flex",flexDirection:"row",margin:15},({header:e,theme:t})=>e&&{margin:0,padding:15,borderBottom:`1px solid ${t.appBorderColor}`,"@container (min-width: 800px)":{height:40,alignItems:"center",justifyContent:"space-between",padding:"5px 15px"}}),vt=styled(ci)({alignItems:"center",height:40,margin:"0 10px"}),ae=styled.div({display:"flex",flexDirection:"column",alignItems:"center"},({push:e})=>e&&{marginLeft:"auto"}),te=styled.div(({theme:e})=>({lineHeight:"18px",color:`${e.color.defaultText}99`,b:{color:e.color.defaultText},code:{fontSize:e.typography.size.s1,border:`1px solid ${e.appBorderColor}`,borderRadius:3,padding:"0 3px"},small:{fontSize:e.typography.size.s1},span:{whiteSpace:"nowrap"},svg:{verticalAlign:"top"},"@container (min-width: 800px)":{br:{verticalAlign:"top",display:"inline-block",content:"''",background:e.appBorderColor,width:1,height:"100%",margin:"0 6px"}}}));function He(e){function t(R,oe){return R>>>oe|R<<32-oe}for(var n,r,o=Math.pow,i=o(2,32),s="",a=[],d=8*e.length,l=He.h=He.h||[],p=He.k=He.k||[],u=p.length,m={},f=2;u<64;f++)if(!m[f]){for(n=0;n<313;n+=f)m[n]=f;l[u]=o(f,.5)*i|0,p[u++]=o(f,1/3)*i|0;}for(e+="\x80";e.length%64-56;)e+="\0";for(n=0;n<e.length;n++){if((r=e.charCodeAt(n))>>8)return;a[n>>2]|=r<<(3-n)%4*8;}for(a[a.length]=d/i|0,a[a.length]=d,r=0;r<a.length;){var S=a.slice(r,r+=16),b=l;for(l=l.slice(0,8),n=0;n<64;n++){var v=S[n-15],h=S[n-2],B=l[0],g=l[4],U=l[7]+(t(g,6)^t(g,11)^t(g,25))+(g&l[5]^~g&l[6])+p[n]+(S[n]=n<16?S[n]:S[n-16]+(t(v,7)^t(v,18)^v>>>3)+S[n-7]+(t(h,17)^t(h,19)^h>>>10)|0);(l=[U+((t(B,2)^t(B,13)^t(B,22))+(B&l[1]^B&l[2]^l[1]&l[2]))|0].concat(l))[4]=l[4]+U|0;}for(n=0;n<8;n++)l[n]=l[n]+b[n]|0;}for(n=0;n<8;n++)for(r=3;r+1;r--){var J=l[n]>>8*r&255;s+=(J<16?0:"")+J.toString(16);}return s}var mi=e=>new Uint8Array(e).reduce((t,n)=>t+String.fromCharCode(n),""),fi=e=>window.btoa(Array.isArray(e)?mi(e):e),Wn=e=>fi(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),gi=e=>Array.from(e.match(/.{1,2}/g)??[],t=>parseInt(t,16)),yi=()=>Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10),Zn=e=>Object.entries(e).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"),Si=({error:e})=>e==="authorization_pending",hi=({error_description:e})=>e==="Not OAuth beta user",Gn=async e=>{let t=Wn(yi()),n=Wn(gi(He(t))),r=await fetch(`${at}/authorize`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:Zn({client_id:"chromaui:addon-visual-tests",code_challenge:n})}),{device_code:o,user_code:i,verification_uri_complete:s,expires_in:a,interval:d}=await r.json(),l=e?s.replace("https://www",`https://${e}`):s;return {expires:Date.now()+a*1e3,interval:d*1e3,user_code:i,device_code:o,verifier:t,verificationUrl:l}},Qn=async({expires:e,device_code:t,verifier:n})=>{if(Date.now()>=e)throw new Error("Token exchange expired, please restart sign in.");try{let o=await(await fetch(`${at}/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:Zn({client_id:"chromaui:addon-visual-tests",grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:t,code_verifier:n,scope:"user:read account:read project:read project:write"})})).json();if(Si(o))throw new Error("You have not authorized the Visual Tests addon for Chromatic, please try again");if(o.access_token)return o.access_token;if(hi(o))return alert("You must be a beta user to use this addon at this time."),null;throw new Error}catch(r){throw console.warn(r),r}};function Bt(){let e=useStorybookApi(),{addNotification:t}=e;return useCallback((n,r)=>{t({id:`${x}/error`,content:{headline:n,subHeadline:r.toString()},icon:{name:"failed",color:color.negative},link:void 0});},[t])}var Ti=styled(Link)({"&&":{fontSize:"13px",lineHeight:"18px",position:"absolute",top:10,left:10}}),Ve=({onClick:e,children:t})=>c.createElement(Ti,{secondary:!0,isButton:!0,onClick:e},t);var A=styled.div(({theme:e})=>({background:e.background.app,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:10}));var L=styled.h1({margin:0,fontSize:"1em",fontWeight:"bold"});var ze=e=>c.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M2.7591 7.0955C2.77741 7.19005 2.82317 7.28033 2.89639 7.35355L8.39639 12.8536C8.59166 13.0488 8.90824 13.0488 9.1035 12.8536C9.29876 12.6583 9.29876 12.3417 9.1035 12.1464L3.95705 7L9.1035 1.85355C9.29876 1.65829 9.29876 1.34171 9.1035 1.14645C8.90824 0.951184 8.59166 0.951184 8.39639 1.14645L2.8969 6.64594C2.77486 6.76798 2.72859 6.93792 2.7591 7.0955Z"}));var xt=e=>c.createElement("svg",{width:"58",height:"53",viewBox:"0 0 58 53",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("g",{filter:"url(#filter0_dd_304_317890)"},c.createElement("rect",{x:"6",y:"2",width:"40",height:"40",rx:"8",fill:"#FF4785",shapeRendering:"crispEdges"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5005 11.0555C16.8471 11.0963 16.3455 11.6508 16.37 12.3051L17.1135 32.1151C17.137 32.7426 17.6379 33.2471 18.2651 33.2753L34.3716 33.9987C34.3896 33.9995 34.4077 33.9999 34.4257 33.9999C35.0921 33.9999 35.6324 33.4597 35.6324 32.7932V11.2067C35.6324 11.1816 35.6316 11.1565 35.63 11.1314C35.5885 10.4663 35.0156 9.96082 34.3505 10.0024L33.0259 10.0853L33.1227 12.8548C33.1261 12.9541 33.0484 13.0375 32.949 13.041C32.9065 13.0424 32.8648 13.0288 32.8314 13.0025L31.939 12.2995L30.8825 13.1009C30.8033 13.161 30.6904 13.1455 30.6303 13.0663C30.605 13.033 30.5921 12.9919 30.5939 12.9501L30.707 10.2302L17.5005 11.0555ZM31.221 19.1936C30.7965 19.5234 27.6343 19.7484 27.6343 19.2789C27.7011 17.4876 26.8991 17.409 26.4536 17.409C26.0303 17.409 25.3174 17.537 25.3174 18.4966C25.3174 19.4746 26.3592 20.0267 27.582 20.6747C29.3191 21.5952 31.4215 22.7093 31.4215 25.5128C31.4215 28.1998 29.2383 29.6842 26.4536 29.6842C23.5797 29.6842 21.0683 28.5215 21.352 24.4904C21.4633 24.0171 25.1169 24.1296 25.1169 24.4904C25.0723 26.1538 25.4511 26.6431 26.409 26.6431C27.1442 26.6431 27.4783 26.2379 27.4783 25.5554C27.4783 24.5227 26.3929 23.9133 25.1442 23.2122C23.4534 22.2629 21.4633 21.1456 21.4633 18.5819C21.4633 16.0229 23.2233 14.3168 26.3645 14.3168C29.5056 14.3168 31.221 15.9967 31.221 19.1936Z",fill:"white"})),c.createElement("circle",{cx:"46",cy:"22",r:"2.5",fill:"white",stroke:"#FF4785"}),c.createElement("path",{d:"M57.8536 22.3536C58.0488 22.1583 58.0488 21.8417 57.8536 21.6464L54.6716 18.4645C54.4763 18.2692 54.1597 18.2692 53.9645 18.4645C53.7692 18.6597 53.7692 18.9763 53.9645 19.1716L56.7929 22L53.9645 24.8284C53.7692 25.0237 53.7692 25.3403 53.9645 25.5355C54.1597 25.7308 54.4763 25.7308 54.6716 25.5355L57.8536 22.3536ZM48.5 22.5H57.5V21.5H48.5V22.5Z",fill:"#FF4785"}),c.createElement("defs",null,c.createElement("filter",{id:"filter0_dd_304_317890",x:"0",y:"0",width:"52",height:"53",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:"5"}),c.createElement("feGaussianBlur",{stdDeviation:"3"}),c.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"}),c.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_304_317890"}),c.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:"1"}),c.createElement("feGaussianBlur",{stdDeviation:"1.5"}),c.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),c.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_304_317890",result:"effect2_dropShadow_304_317890"}),c.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_304_317890",result:"shape"}))));var xe=e=>c.createElement("svg",{width:"52",height:"53",viewBox:"0 0 52 53",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("g",{filter:"url(#filter0_dd_304_317945)"},c.createElement("g",{clipPath:"url(#clip0_304_317945)"},c.createElement("rect",{x:"6",y:"2",width:"40",height:"40",rx:"8",fill:"#288041"}),c.createElement("g",{clipPath:"url(#clip1_304_317945)"},c.createElement("rect",{x:"14.75",y:"10.75",width:"22.5",height:"22.5",rx:"2",fill:"#215D31"}),c.createElement("rect",{x:"20.6104",y:"20.1591",width:"20.1485",height:"20.1485",transform:"rotate(45 20.6104 20.1591)",fill:"#93D4A5"}),c.createElement("rect",{x:"30.9502",y:"16.59",width:"20.1485",height:"20.1485",transform:"rotate(45 30.9502 16.59)",fill:"#93D4A5"}),c.createElement("circle",{cx:"20.435",cy:"16.2246",r:"2.45455",fill:"#93D4A5"})),c.createElement("rect",{x:"7.05469",y:"3",width:"53.75",height:"32.25",transform:"rotate(45 7.05469 3)",fill:"#67B47C"}),c.createElement("g",{clipPath:"url(#clip2_304_317945)"},c.createElement("g",{clipPath:"url(#clip3_304_317945)"},c.createElement("rect",{x:"14.75",y:"10.75",width:"22.5",height:"22.5",rx:"2",fill:"#2B733F"}),c.createElement("rect",{x:"21.3604",y:"21.6592",width:"20.1485",height:"20.1485",transform:"rotate(45 21.3604 21.6592)",fill:"#A9E0B8"}),c.createElement("rect",{x:"32.2012",y:"18.5908",width:"20.1485",height:"20.1485",transform:"rotate(45 32.2012 18.5908)",fill:"#A9E0B8"}),c.createElement("circle",{cx:"21.685",cy:"17.9746",r:"2.45455",fill:"#A9E0B8"}))))),c.createElement("defs",null,c.createElement("filter",{id:"filter0_dd_304_317945",x:"0",y:"0",width:"52",height:"53",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:"5"}),c.createElement("feGaussianBlur",{stdDeviation:"3"}),c.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),c.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"}),c.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_304_317945"}),c.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:"1"}),c.createElement("feGaussianBlur",{stdDeviation:"1.5"}),c.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),c.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),c.createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_304_317945",result:"effect2_dropShadow_304_317945"}),c.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_304_317945",result:"shape"})),c.createElement("clipPath",{id:"clip0_304_317945"},c.createElement("rect",{x:"6",y:"2",width:"40",height:"40",rx:"8",fill:"white"})),c.createElement("clipPath",{id:"clip1_304_317945"},c.createElement("rect",{x:"14.75",y:"10.75",width:"22.5",height:"22.5",rx:"2",fill:"white"})),c.createElement("clipPath",{id:"clip2_304_317945"},c.createElement("rect",{width:"60.7428",height:"29.9046",fill:"white",transform:"translate(7.20801 3.17212) rotate(45)"})),c.createElement("clipPath",{id:"clip3_304_317945"},c.createElement("rect",{x:"14.75",y:"10.75",width:"22.5",height:"22.5",rx:"2",fill:"white"}))));var _i=styled.div(({theme:e})=>({position:"relative","&& input":{color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px"}})),Ni=styled.div(({theme:e})=>({pointerEvents:"none",position:"absolute",top:0,left:40,right:0,zIndex:2,overflow:"hidden",height:40,display:"flex",alignItems:"center",lineHeight:"20px",color:e.input.color||"inherit",span:{opacity:0}})),Ai=({value:e,placeholder:t,suffix:n})=>c.createElement(Ni,null,c.createElement("span",null,e||t),c.createElement("b",null,n)),Kn=({id:e,value:t,placeholder:n,suffix:r,...o})=>c.createElement(_i,null,c.createElement(Input,{id:e,hideLabel:!0,label:"",value:t,placeholder:n,crossOrigin:void 0,enterKeyHint:void 0,...o}),c.createElement(Ai,{value:t,placeholder:n,suffix:r}));var _=styled.p({color:color.mediumdark,margin:"8px 0",lineHeight:"18px",textAlign:"center",textWrap:"balance"});var Ei=styled.form({position:"relative",display:"flex",flexDirection:"column",width:"100%",maxWidth:300,margin:10}),Mi=styled(Button)({"&&":{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:4,borderBottomRightRadius:4}}),er=({onBack:e,onSignIn:t})=>{let[n,r]=useState(""),[o,i]=useState(null),s=useCallback(d=>{let l=d.target.value.replace(/[^a-z0-9-]/g,"");r(l),i(null);},[]),a=useCallback(d=>{d.preventDefault(),n?t(n):i("Please enter a subdomain");},[n,t]);return c.createElement(A,null,c.createElement(Ve,{onClick:e},c.createElement(ze,null),"Back"),c.createElement("div",null,c.createElement(xt,null),c.createElement(xe,null)),c.createElement(L,null,"Sign in with SSO"),c.createElement(_,null,"Enter your team's Chromatic URL."),c.createElement(Ei,{onSubmit:a},c.createElement(Kn,{autoFocus:!0,icon:"users",value:n,placeholder:"yourteam",suffix:".chromatic.com",onChange:s,id:"subdomain-input",stackLevel:"top",error:o,errorTooltipPlacement:"top"}),c.createElement(Mi,{type:"submit",secondary:!0},"Continue")))};var $=styled(Button)({"&&":{display:"inline-flex",borderRadius:4,fontSize:"13px",lineHeight:"14px",padding:"9px 12px",alignItems:"center","@container (min-width: 800px)":{padding:"8px 10px"},svg:{marginRight:6}}},({link:e,theme:t})=>e&&css({"&&":{padding:2,fontWeight:"normal",color:t.color.defaultText,opacity:.5,"&:hover, &:focus":{opacity:1},"&:focus:not(:active)":{outline:`1px solid ${t.color.secondary}`}}}),({tertiary:e})=>e&&css({"&&:hover":{boxShadow:"none"}}),({belowText:e})=>e&&{marginTop:7});var K=styled.div(e=>({display:"flex",flexDirection:"column",gap:15,alignItems:e.alignItems??"center",textAlign:e.textAlign??"center"}));var nr=({onBack:e,onSignIn:t,onSignInWithSSO:n})=>c.createElement(A,null,e&&c.createElement(Ve,{onClick:e},c.createElement(ze,null),"Back"),c.createElement(K,{alignItems:"center",textAlign:"center"},c.createElement("div",null,c.createElement(xt,null),c.createElement(xe,null),c.createElement(L,null,"Sign in to begin visual testing"),c.createElement(_,null,"Pinpoint bugs instantly by connecting with cloud browsers that run visual tests in parallel.")),c.createElement($,{secondary:!0,onClick:()=>t()},"Sign in with Chromatic"),c.createElement($,{link:!0,onClick:()=>n()},"Sign into Chromatic with SSO")));function Le(e,t){return t}var rr={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"StatusTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"story"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"storyId"}}]}}]}}]},or={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"LastBuildOnBranchTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}}]}}]},ir={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"LastBuildOnBranchBuildFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Build"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"committedAt"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"StartedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"testsForStatus"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1000"}},{kind:"Argument",name:{kind:"Name",value:"statuses"},value:{kind:"Variable",name:{kind:"Name",value:"testStatuses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StatusTestFields"}}]}}]}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"LastBuildOnBranchTestFields"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompletedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",alias:{kind:"Name",value:"testsForStatus"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1000"}},{kind:"Argument",name:{kind:"Name",value:"statuses"},value:{kind:"Variable",name:{kind:"Name",value:"testStatuses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StatusTestFields"}}]}}]}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"LastBuildOnBranchTestFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"StatusTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"story"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"storyId"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LastBuildOnBranchTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}}]}}]},ar={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"StoryTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"comparisons"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"browser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"captureDiff"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"diffImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}},{kind:"Field",name:{kind:"Name",value:"focusImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"headCapture"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"captureImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}},{kind:"Field",name:{kind:"Name",value:"captureError"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"kind"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorInteractionFailure"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorJSError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorFailedJS"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"baseCapture"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"captureImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"mode"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"globals"}}]}},{kind:"Field",name:{kind:"Name",value:"story"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"storyId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"component"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]},sr={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SelectedBuildFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Build"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"number"}},{kind:"Field",name:{kind:"Name",value:"branch"}},{kind:"Field",name:{kind:"Name",value:"commit"}},{kind:"Field",name:{kind:"Name",value:"committedAt"}},{kind:"Field",name:{kind:"Name",value:"uncommittedHash"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"StartedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startedAt"}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StoryTestFields"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompletedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startedAt"}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StoryTestFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"StoryTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"comparisons"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"browser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"captureDiff"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"diffImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}},{kind:"Field",name:{kind:"Name",value:"focusImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"headCapture"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"captureImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}},{kind:"Field",name:{kind:"Name",value:"captureError"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"kind"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorInteractionFailure"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorJSError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorFailedJS"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"baseCapture"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"captureImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"mode"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"globals"}}]}},{kind:"Field",name:{kind:"Name",value:"story"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"storyId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"component"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]},lr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VisualTestsProjectCountQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"projectCount"}},{kind:"Field",name:{kind:"Name",value:"accounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newProjectUrl"}}]}}]}}]}}]},dr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SelectProjectsQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatarUrl"}},{kind:"Field",name:{kind:"Name",value:"newProjectUrl"}},{kind:"Field",name:{kind:"Name",value:"projects"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"lastBuild"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"branch"}},{kind:"Field",name:{kind:"Name",value:"number"}}]}}]}}]}}]}}]}}]},ur={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ProjectQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"projectId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"project"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"projectId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"lastBuild"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"branch"}},{kind:"Field",name:{kind:"Name",value:"number"}}]}}]}}]}}]},pr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AddonVisualTestsBuild"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"projectId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"branch"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"gitUserEmailHash"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"repositoryOwnerName"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"storyId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"testStatuses"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TestStatus"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"selectedBuildId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"hasSelectedBuildId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"project"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"projectId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",alias:{kind:"Name",value:"lastBuildOnBranch"},name:{kind:"Name",value:"lastBuild"},arguments:[{kind:"Argument",name:{kind:"Name",value:"branches"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"branch"}}]}},{kind:"Argument",name:{kind:"Name",value:"repositoryOwnerName"},value:{kind:"Variable",name:{kind:"Name",value:"repositoryOwnerName"}}},{kind:"Argument",name:{kind:"Name",value:"localBuilds"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"localBuildEmailHash"},value:{kind:"Variable",name:{kind:"Name",value:"gitUserEmailHash"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"LastBuildOnBranchBuildFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SelectedBuildFields"},directives:[{kind:"Directive",name:{kind:"Name",value:"skip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"hasSelectedBuildId"}}}]}]}]}}]}},{kind:"Field",alias:{kind:"Name",value:"selectedBuild"},name:{kind:"Name",value:"build"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"selectedBuildId"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"hasSelectedBuildId"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SelectedBuildFields"}}]}},{kind:"Field",name:{kind:"Name",value:"viewer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"projectMembership"},arguments:[{kind:"Argument",name:{kind:"Name",value:"projectId"},value:{kind:"Variable",name:{kind:"Name",value:"projectId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"userCanReview"},name:{kind:"Name",value:"meetsAccessLevel"},arguments:[{kind:"Argument",name:{kind:"Name",value:"minimumAccessLevel"},value:{kind:"EnumValue",value:"REVIEWER"}}]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"StatusTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"story"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"storyId"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LastBuildOnBranchTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"StoryTestFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Test"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"webUrl"}},{kind:"Field",name:{kind:"Name",value:"comparisons"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"browser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"captureDiff"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"diffImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}},{kind:"Field",name:{kind:"Name",value:"focusImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"headCapture"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"captureImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}},{kind:"Field",name:{kind:"Name",value:"captureError"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"kind"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorInteractionFailure"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorJSError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CaptureErrorFailedJS"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"baseCapture"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"captureImage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"signed"},value:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"imageUrl"}},{kind:"Field",name:{kind:"Name",value:"imageWidth"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"mode"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"globals"}}]}},{kind:"Field",name:{kind:"Name",value:"story"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"storyId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"component"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"LastBuildOnBranchBuildFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Build"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"committedAt"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"StartedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"testsForStatus"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1000"}},{kind:"Argument",name:{kind:"Name",value:"statuses"},value:{kind:"Variable",name:{kind:"Name",value:"testStatuses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StatusTestFields"}}]}}]}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"LastBuildOnBranchTestFields"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompletedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",alias:{kind:"Name",value:"testsForStatus"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1000"}},{kind:"Argument",name:{kind:"Name",value:"statuses"},value:{kind:"Variable",name:{kind:"Name",value:"testStatuses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StatusTestFields"}}]}}]}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"LastBuildOnBranchTestFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"SelectedBuildFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Build"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"number"}},{kind:"Field",name:{kind:"Name",value:"branch"}},{kind:"Field",name:{kind:"Name",value:"commit"}},{kind:"Field",name:{kind:"Name",value:"committedAt"}},{kind:"Field",name:{kind:"Name",value:"uncommittedHash"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"StartedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startedAt"}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StoryTestFields"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CompletedBuild"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startedAt"}},{kind:"Field",alias:{kind:"Name",value:"testsForStory"},name:{kind:"Name",value:"tests"},arguments:[{kind:"Argument",name:{kind:"Name",value:"storyId"},value:{kind:"Variable",name:{kind:"Name",value:"storyId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StoryTestFields"}}]}}]}}]}}]}}]},cr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReviewTest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ReviewTestInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewTest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatedTests"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BuildSupersededError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"build"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TestUnreviewableError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"test"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]}}]};var Hi={"\n query VisualTestsProjectCountQuery {\n viewer {\n projectCount\n accounts {\n newProjectUrl\n }\n }\n }\n":lr,"\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n":dr,"\n query ProjectQuery($projectId: ID!) {\n project(id: $projectId) {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n":ur,"\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n":pr,"\n fragment LastBuildOnBranchBuildFields on Build {\n __typename\n id\n status\n committedAt\n ... on StartedBuild {\n testsForStatus: tests(first: 1000, statuses: $testStatuses) {\n nodes {\n ...StatusTestFields\n }\n }\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...LastBuildOnBranchTestFields\n }\n }\n }\n ... on CompletedBuild {\n result\n testsForStatus: tests(first: 1000, statuses: $testStatuses) {\n nodes {\n ...StatusTestFields\n }\n }\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...LastBuildOnBranchTestFields\n }\n }\n }\n }\n":ir,"\n fragment SelectedBuildFields on Build {\n __typename\n id\n number\n branch\n commit\n committedAt\n uncommittedHash\n status\n ... on StartedBuild {\n startedAt\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...StoryTestFields\n }\n }\n }\n ... on CompletedBuild {\n startedAt\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...StoryTestFields\n }\n }\n }\n }\n":sr,"\n fragment StatusTestFields on Test {\n id\n status\n story {\n storyId\n }\n }\n":rr,"\n fragment LastBuildOnBranchTestFields on Test {\n status\n }\n":or,"\n fragment StoryTestFields on Test {\n id\n status\n result\n webUrl\n comparisons {\n id\n result\n browser {\n id\n key\n name\n version\n }\n captureDiff {\n diffImage(signed: true) {\n imageUrl\n imageWidth\n }\n focusImage(signed: true) {\n imageUrl\n imageWidth\n }\n }\n headCapture {\n captureImage(signed: true) {\n imageUrl\n imageWidth\n }\n captureError {\n kind\n ... on CaptureErrorInteractionFailure {\n error\n }\n ... on CaptureErrorJSError {\n error\n }\n ... on CaptureErrorFailedJS {\n error\n }\n }\n }\n baseCapture {\n captureImage(signed: true) {\n imageUrl\n imageWidth\n }\n }\n }\n mode {\n name\n globals\n }\n story {\n storyId\n name\n component {\n name\n }\n }\n }\n":ar,"\n mutation ReviewTest($input: ReviewTestInput!) {\n reviewTest(input: $input) {\n updatedTests {\n id\n status\n }\n userErrors {\n ... on UserError {\n __typename\n message\n }\n ... on BuildSupersededError {\n build {\n id\n }\n }\n ... on TestUnreviewableError {\n test {\n id\n }\n }\n }\n }\n }\n":cr};function q(e){return Hi[e]??{}}var pe,lt,Tt=e=>{try{let{exp:t}=e?JSON.parse(atob(e.split(".")[1])):{exp:null};pe=e,lt=t;}catch{pe=null,lt=null;}pe?localStorage.setItem(ht,pe):localStorage.removeItem(ht);};Tt(localStorage.getItem(ht));var Ft=()=>{let[{token:e},t]=useAddonState(`${x}/accessToken`,{token:pe}),n=c.useCallback(r=>{Tt(r),t({token:pe});},[t]);return [e,n]},Ji=v4(),on=e=>({headers:{Accept:"*/*",...e&&{Authorization:`Bearer ${e}`},"X-Chromatic-Session-ID":Ji}}),Ge=new Client({url:jn,exchanges:[mapExchange({onResult(e){e.data?.viewer===null&&Tt(null);}}),authExchange(async e=>({addAuthToOperation(t){return pe?e.appendHeaders(t,{Authorization:`Bearer ${pe}`}):t},didAuthError:t=>t.response.status===401||t.graphQLErrors.some(n=>n.message.includes("Must login")),async refreshAuth(){Tt(null);},willAuthError(){if(!pe)return !0;try{if(!lt){let{exp:t}=JSON.parse(atob(pe.split(".")[1]));lt=t;}return Date.now()/1e3>(lt||0)}catch{return !0}}})),fetchExchange],fetchOptions:on()});var Yi=z.union([z.object({message:z.literal("login")}),z.object({message:z.literal("grant"),denied:z.boolean()}),z.object({message:z.literal("createdProject"),projectId:z.string()})]),It=e=>{let t=useRef(),n=useRef();return useEffect(()=>{let r=({origin:o,data:i})=>{if(o===n.current){let s;try{s=Yi.parse(i);}catch{return}e?.(s);}};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[e]),[useCallback(r=>{if(window.innerWidth>800&&window.innerHeight>800){let d=(window.innerWidth-800)/2+window.screenLeft,p=`scrollbars=yes,width=800,height=800,top=${(window.innerHeight-800)/2+window.screenTop},left=${d}`;t.current=window.open(r,"chromatic-dialog",p),t.current?.focus();}else t.current=window.open(r,"_blank");let{origin:a}=new URL(r);n.current=a;},[]),useCallback(()=>t.current?.close(),[])]};var ta=styled.ol(({theme:e})=>({display:"inline-flex",listStyle:"none",margin:8,padding:0,gap:5,"li:not(:empty)":{display:"flex",alignItems:"center",justifyContent:"center",border:`1px dashed ${e.input.border}`,borderRadius:4,width:28,height:32}})),na=q(`
16
+ query VisualTestsProjectCountQuery {
17
+ viewer {
18
+ projectCount
19
+ accounts {
20
+ newProjectUrl
21
+ }
22
+ }
23
+ }
24
+ `),gr=({onBack:e,hasProjectId:t,setAccessToken:n,setCreatedProjectId:r,exchangeParameters:o})=>{let i=useClient(),s=Bt(),{user_code:a,verificationUrl:d}=o,l=useRef(),p=useRef(),u=useRef(),m=useCallback(async b=>{if(b.message==="login"&&p.current?.(d),b.message==="grant")try{let v=await Qn(o);if(!v)throw new Error("Failed to fetch an access token");l.current=v;let h=on(v),{data:B}=await i.query(na,{},{fetchOptions:h});if(!B?.viewer)throw new Error("Failed to fetch initial project list");if(B.viewer.projectCount>0||t)n(l.current),u.current?.();else {if(!B.viewer.accounts[0])throw new Error("User has no accounts!");if(!B.viewer.accounts[0].newProjectUrl)throw new Error("Unexpected missing project URL");p.current?.(B.viewer.accounts[0].newProjectUrl);}}catch(v){s("Login Error",v);}b.message==="createdProject"&&(l.current?(n(l.current),r(`Project:${b.projectId}`),u.current?.()):s("Unexpected missing access token",new Error));},[d,o,i,t,n,s,r]),[f,S]=It(m);return p.current=f,u.current=S,c.createElement(A,null,c.createElement(Ve,{onClick:e},c.createElement(ze,null),"Back"),c.createElement(K,null,c.createElement("div",null,c.createElement(L,null,"Verify your account"),c.createElement(_,null,"Enter this verification code on Chromatic to grant access to your published Storybooks."),c.createElement(ta,null,a?.split("").map((b,v)=>c.createElement("li",{key:`${v}-${b}`},b.replace(/[^A-Z0-9]/,""))))),c.createElement($,{secondary:!0,onClick:()=>f(d)},"Go to Chromatic")))};var yr=({onNext:e})=>c.createElement(A,null,c.createElement(K,null,c.createElement("div",null,c.createElement(xe,null),c.createElement(L,null,"Visual tests"),c.createElement(_,null,"Catch bugs in UI appearance automatically. Compare image snapshots to detect visual changes.")),c.createElement($,{secondary:!0,onClick:e},"Enable")));var hr=({setAccessToken:e,setCreatedProjectId:t,hasProjectId:n})=>{let[r,o]=useState(n?"signin":"welcome"),[i,s]=useState(),a=Bt(),d=useCallback(async l=>{try{s(await Gn(l)),o("verify");}catch(p){a("Sign in Error",p);}},[a]);if(r==="welcome"&&!n)return c.createElement(yr,{onNext:()=>o("signin")});if(r==="signin"||r==="welcome"&&n)return c.createElement(nr,{...n?{}:{onBack:()=>o("welcome")},onSignIn:d,onSignInWithSSO:()=>o("subdomain")});if(r==="subdomain")return c.createElement(er,{onBack:()=>o("signin"),onSignIn:d});if(r==="verify"){if(!i)throw new Error("Expected to have a `exchangeParameters` if at `verify` step");return c.createElement(gr,{onBack:()=>o("signin"),hasProjectId:n,setAccessToken:e,setCreatedProjectId:t,exchangeParameters:i})}return null};var aa=(e,t)=>t&&{positive:{color:e.color.positiveText},warning:{color:e.color.warningText}}[t]||{},H=styled(IconButton)(({active:e,secondary:t,theme:n})=>({display:"inline-flex",alignItems:"center",verticalAlign:"top",gap:6,margin:0,color:e||t?n.color.secondary:`${n.color.defaultText}99`,fontWeight:"normal","& > svg":{width:"auto"}}),({active:e,status:t,theme:n})=>!e&&aa(n,t),({active:e,theme:t})=>{let n=t.background.content===t.color.lightest,r=n?"rgb(241,248,255)":"rgb(28,37,45)",o=n?"rgb(229,243,255)":"rgb(29,44,56)";return {"--bg-color":e?r:t.background.content,"&:hover":{"--bg-color":o}}});var ua=styled.div({"& > div":{minWidth:120}}),Se=({children:e,links:t,note:n,...r})=>{let[o,i]=c.useState(!1),s=c.createElement(WithTooltip,{closeOnOutsideClick:!0,closeOnTriggerHidden:!0,onVisibleChange:a=>i(a),tooltip:({onHide:a})=>c.createElement(ua,null,c.createElement(TooltipLinkList,{links:t.map(d=>({...d,onClick:(...l)=>(a(),d.onClick?.(...l))}))})),trigger:"click",...r},typeof e=="function"?e(o):c.createElement(H,{active:o},e));return n?c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:n}),trigger:"hover",hasChrome:!1},s):s};var _t=({setAccessToken:e})=>c.createElement(Se,{placement:"top",links:[{id:"logout",title:"Log out",icon:"user",onClick:()=>e(null)},{id:"learn",title:"Learn about this addon",icon:"question",href:"https://www.chromatic.com/docs/visual-testing-addon"}]},c.createElement(Icons,{icon:"ellipsis"}));var Y=({setAccessToken:e,render:t})=>{let n=c.createElement(_t,{setAccessToken:e});return c.createElement(M,{last:!0},c.createElement(vt,null,t?t({menu:n}):c.createElement(c.Fragment,null,c.createElement(ae,{push:!0}),c.createElement(ae,null,n))))};var fa=styled(M)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",borderRadius:e.appBorderRadius,background:e.color.lightest,padding:15,flex:1,boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 2px 5px 0px rgba(0, 0, 0, 0.05)"})),ga=styled(_)(({theme:e})=>({marginLeft:14,flex:1,textAlign:"left",color:e.color.darker})),vr=({gitInfoError:e,setAccessToken:t})=>c.createElement(E,null,c.createElement(M,{grow:!0},c.createElement(A,null,c.createElement(K,null,c.createElement("div",null,c.createElement(xe,null),c.createElement(L,null,"Visual tests"),c.createElement(_,null,"Catch bugs in UI appearance automatically. Compare image snapshots to detect visual changes.")),c.createElement(fa,null,c.createElement(Icon,{icon:"lock"}),c.createElement(ga,null,c.createElement("b",null,"Git not detected"),c.createElement("br",null),"This addon requires Git to associate test results with commits and branches.")),c.createElement(Link$1,{target:"_new",href:"https://www.chromatic.com/docs/visual-testing-addon/",withArrow:!0},"Visual tests requirements")))),c.createElement(Y,{setAccessToken:t}));var Ca=styled(Icons)(({theme:e})=>({width:40,height:40,padding:10,background:e.color.positive,borderRadius:"100%",color:"white"})),ka=q(`
25
+ query ProjectQuery($projectId: ID!) {
26
+ project(id: $projectId) {
27
+ id
28
+ name
29
+ webUrl
30
+ lastBuild {
31
+ branch
32
+ number
33
+ }
34
+ }
35
+ }
36
+ `),Br=({projectId:e,configFile:t,goToNext:n,setAccessToken:r})=>{let[{data:o,fetching:i,error:s}]=useQuery({query:ka,variables:{projectId:e}});return c.createElement(E,null,c.createElement(M,{grow:!0},c.createElement(A,null,c.createElement(K,null,i&&c.createElement("p",null,"Loading..."),s&&c.createElement("p",null,s.message),o?.project&&c.createElement(K,null,c.createElement(Ca,{icon:"check"}),c.createElement(L,null,"Project linked!"),c.createElement(te,{style:{maxWidth:380}},"The ",c.createElement("code",null,"projectId")," for ",o.project.name," has been added to this project's ",c.createElement("code",null,t),". This will be used to sync with Chromatic. Please commit this change to continue using this addon."),c.createElement($,{secondary:!0,onClick:()=>n()},"Catch a UI change"),c.createElement(te,null,"Why do we need a project ID?"," ",c.createElement(Link,{href:"https://www.chromatic.com/docs/cli"},"Learn More \xBB")))))),c.createElement(Y,{setAccessToken:r,render:({menu:a})=>c.createElement(c.Fragment,null,c.createElement(ae,null,o?.project?.lastBuild&&c.createElement(te,{style:{marginLeft:5}},"Last build: ",o.project.lastBuild.number," on branch"," ",o.project.lastBuild.branch)),c.createElement(ae,{push:!0},a))}))};var Ta="https://www.chromatic.com/docs/addon-visual-tests#configure";function xr({projectId:e,configFile:t,setAccessToken:n}){return c.createElement(E,null,c.createElement(M,{grow:!0},c.createElement(A,null,c.createElement(_,null,c.createElement(L,null,"Add the Project ID to your Chromatic config"),"The ",c.createElement("code",null,"projectId")," will be used to reference prior tests. Please commit this change to continue using this addon. The file should be saved at"," ",c.createElement("code",null,t),"."),c.createElement(Code,null,dedent`
37
+ {
38
+ "projectId": "${e}",
39
+ }
40
+ `),c.createElement(_,null,"What is this for?"," ",c.createElement(Link,{withArrow:!0,target:"_new",href:Ta},"Learn more")))),c.createElement(Y,{setAccessToken:n}))}var Aa=q(`
41
+ query SelectProjectsQuery {
42
+ viewer {
43
+ accounts {
44
+ id
45
+ name
46
+ avatarUrl
47
+ newProjectUrl
48
+ projects {
49
+ id
50
+ name
51
+ webUrl
52
+ lastBuild {
53
+ branch
54
+ number
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ `),_r=({createdProjectId:e,setCreatedProjectId:t,onUpdateProject:n,setAccessToken:r})=>{let o=c.useCallback(async i=>{await n(i);},[n]);return c.createElement(Ma,{createdProjectId:e,setCreatedProjectId:t,onSelectProjectId:o,setAccessToken:r})},Ir=styled.div`
61
+ font-size: ${({theme:e})=>e.typography.size.s1}px;
62
+ font-weight: ${({theme:e})=>e.typography.weight.bold};
63
+ color: ${({theme:e})=>e.color.dark};
64
+ background-color: inherit;
65
+ padding: 9px 15px;
66
+ border-bottom: 1px solid ${({theme:e})=>e.color.mediumlight};
67
+ `,La=styled.div`
68
+ flex: 1;
69
+ background-color: white;
70
+ display: flex;
71
+ flex-direction: column;
72
+ `,Pa=styled.div`
73
+ flex: 1;
74
+ background-color: ${({theme:e})=>e.color.lighter};
75
+ display: flex;
76
+ flex-direction: column;
77
+ `,Da=styled.div`
78
+ background: ${({theme:e})=>e.color.lightest};
79
+ border-radius: 5px;
80
+ border: 1px solid ${({theme:e})=>e.color.mediumlight};
81
+ height: 260px;
82
+ width: 420px;
83
+ overflow: hidden;
84
+ text-align: left;
85
+ position: relative;
86
+ display: flex;
87
+ margin: 10px;
88
+ `,wr=styled.div({height:"100%",overflowY:"auto"}),Ea=styled(Avatar)`
89
+ margin-right: 10px;
90
+ `;function Ma({createdProjectId:e,setCreatedProjectId:t,onSelectProjectId:n,setAccessToken:r}){let[{data:o,fetching:i,error:s},a]=useQuery({query:Aa});useEffect(()=>{let g=setInterval(a,5e3);return ()=>clearInterval(g)},[a]);let[d,l]=useState(),p=o?.viewer?.accounts.find(g=>g.id===d),u=c.useCallback(g=>{l(g.id);},[l]);c.useEffect(()=>{!d&&o?.viewer?.accounts&&u(o.viewer.accounts[0]);},[o,d,u]);let[m,f]=useState(!1),S=c.useCallback(g=>{f(!0),n(g.id);let U=setTimeout(()=>{f(!1);},1e3);return ()=>clearTimeout(U)},[n,f]),b=useCallback(async g=>{g.message==="createdProject"&&(a(),t(g.projectId));},[a,t]),[v,h]=It(b),B=e&&p?.projects?.find(g=>g?.id.endsWith(e));return useEffect(()=>{B&&(h(),S(B));},[B,S,h]),c.createElement(E,null,c.createElement(M,{grow:!0},c.createElement(A,null,c.createElement(K,null,!o&&i&&c.createElement("p",null,"Loading..."),s&&c.createElement("p",null,s.message),o?.viewer?.accounts&&c.createElement(c.Fragment,null,c.createElement(L,null,"Select a Project"),c.createElement(te,null,"Baselines will be used with this project."),c.createElement(Da,null,c.createElement(La,null,c.createElement(Ir,null,"Accounts"),c.createElement(wr,{"data-testid":"left-list"},o.viewer.accounts?.map(g=>c.createElement(ListItem,{key:g.id,title:g.name,left:c.createElement(Ea,{src:g.avatarUrl??void 0,size:"tiny"}),onClick:()=>u(g),active:d===g.id})))),c.createElement(Pa,null,c.createElement(Ir,null,"Projects"),c.createElement(wr,{"data-testid":"right-list"},p?.projects?.map(g=>g&&c.createElement(ListItem,{appearance:"secondary",key:g.id,title:g.name,right:c.createElement(Icons,{icon:"add","aria-label":g.name}),onClick:()=>S(g),disabled:m})),p&&c.createElement(ListItem,{title:c.createElement(Link,{isButton:!0,withArrow:!0,onClick:()=>{if(!p?.newProjectUrl)throw new Error("Unexpected missing `newProjectUrl` on account");v(p.newProjectUrl);}},"Create project")})))))))),c.createElement(Y,{setAccessToken:r}))}var he=(e,t)=>{let n=useContext(e);if(n==null)throw new Error(`Missing context value for ${t}`);return n};var Lr={settingsVisible:!1,warningsVisible:!1,baselineImageVisible:!1,focusVisible:!1,diffVisible:!1},dt=e=>(t,n)=>({...t,[e]:typeof n=="boolean"?n:!t[e]}),$a={toggleDiff:dt("diffVisible"),toggleFocus:dt("focusVisible"),toggleSettings:dt("settingsVisible"),toggleWarnings:dt("warningsVisible"),toggleBaselineImage:dt("baselineImageVisible")},Ha=(e,t)=>$a[t.type](e,t.payload),Pr=createContext(Lr),Dr=createContext(()=>{}),qe=()=>he(Pr,"Controls"),Te=()=>{let e=he(Dr,"ControlsDispatch");return useMemo(()=>({toggleDiff:t=>e({type:"toggleDiff",payload:t}),toggleFocus:t=>e({type:"toggleFocus",payload:t}),toggleSettings:t=>e({type:"toggleSettings",payload:t}),toggleWarnings:t=>e({type:"toggleWarnings",payload:t}),toggleBaselineImage:t=>e({type:"toggleBaselineImage",payload:t})}),[e])},Er=({children:e,initialState:t=Lr})=>{let[n,r]=useReducer(Ha,t);return c.createElement(Pr.Provider,{value:n},c.createElement(Dr.Provider,{value:r},e))};var dn={["PENDING"]:"warn",["FAILED"]:"error",["DENIED"]:"error",["BROKEN"]:"error"},ln=[null,"unknown","pending","success","warn","error"];function Va(e,t){return ln[Math.max(ln.indexOf(e),ln.indexOf(t))]}function Mr(e){let t={};return e.forEach(r=>{!r.story||!r.status||(t[r.story.storyId]=Va(dn[r.status]||null,t[r.story.storyId]));}),Object.fromEntries(Object.entries(t).map(([r,o])=>[r,o&&{status:o,title:"Visual Tests",description:"Chromatic Visual Tests"}]))}function Or(e,{shouldSwitchToLastBuildOnBranch:t,lastBuildOnBranchId:n,storyId:r}){if(!t)return e?{...e,storyId:r}:void 0;if(!n)throw new Error("Impossible state");return {buildId:n,storyId:r}}var jr=[void 0,"EQUAL","FIXED","ADDED","CHANGED","REMOVED","CAPTURE_ERROR","SYSTEM_ERROR"],Me=([e,...t])=>t.reduce((n,r)=>jr.indexOf(r)>jr.indexOf(n)?r:n,e);function za(e){return (e["FAILED"]??0)>0?"FAILED":(e["IN_PROGRESS"]??0)>0?"IN_PROGRESS":(e["BROKEN"]??0)>0?"BROKEN":(e["DENIED"]??0)>0?"DENIED":(e["PENDING"]??0)>0?"PENDING":(e["ACCEPTED"]??0)>0?"ACCEPTED":"PASSED"}function Ke(e){let{statusCounts:t,isInProgress:n,changeCount:r,brokenCount:o,resultsByBrowser:i,resultsByMode:s,modesByName:a}=e.reduce((u,m)=>(u.statusCounts[m.status]=(u.statusCounts[m.status]||0)+1,m.status==="IN_PROGRESS"&&(u.isInProgress=!0),m.result&&["CHANGED","ADDED"].includes(m.result)&&(u.changeCount+=1),m.result&&["CAPTURE_ERROR","SYSTEM_ERROR"].includes(m.result)&&(u.brokenCount+=1),m.comparisons?.forEach(({browser:f,result:S})=>{u.resultsByBrowser[f.id]=Me([S??void 0,u.resultsByBrowser[f.id]]);}),m.comparisons?.forEach(({result:f})=>{u.resultsByMode[m.mode.name]=Me([f??void 0,u.resultsByMode[m.mode.name]]);}),u.modesByName[m.mode.name]=m.mode,u),{statusCounts:{},isInProgress:!1,changeCount:0,brokenCount:0,resultsByBrowser:{},resultsByMode:{},modesByName:{}}),d=e.length?Object.fromEntries(e[0].comparisons.map(u=>[u.browser.id,u.browser])):{},l=Object.entries(i).map(([u,m])=>({browser:d[u],result:m})),p=Object.entries(s).map(([u,m])=>({mode:a[u],result:m}));return {status:za(t),isInProgress:n,changeCount:r,brokenCount:o,browserResults:l,modeResults:p}}var Ga=e=>{try{return [useGlobals()[0][e],useGlobalTypes()[e]]}catch{return [null,null]}};function Vr(e){let[t,n]=Ga("theme"),[r,o]=useState(()=>(e.find(({status:m})=>m!=="PASSED")||e[0])?.comparisons[0]?.browser.id),[i,s]=useState(()=>{let u=e.filter(({status:S})=>S!=="PASSED"),m=u.length?u:e;return (m.find(({mode:S})=>S.globals.theme===t)||m[0])?.mode.name}),a=useCallback(({id:u})=>o(u),[]),d=useCallback(({name:u})=>s(u),[]),l=e.find(({mode:u})=>u.name===i)||e[0],p=l?.comparisons.find(({browser:u})=>u.id===r)||l?.comparisons[0];return {modeOrder:n?.toolbar?.items?.map(u=>u.title),selectedTest:l,selectedComparison:p,onSelectBrowser:a,onSelectMode:d}}var zr=q(`
91
+ query AddonVisualTestsBuild(
92
+ $projectId: ID!
93
+ $branch: String!
94
+ $gitUserEmailHash: String!
95
+ $repositoryOwnerName: String
96
+ $storyId: String!
97
+ $testStatuses: [TestStatus!]!
98
+ $selectedBuildId: ID!
99
+ $hasSelectedBuildId: Boolean!
100
+ ) {
101
+ project(id: $projectId) {
102
+ name
103
+ lastBuildOnBranch: lastBuild(
104
+ branches: [$branch]
105
+ repositoryOwnerName: $repositoryOwnerName
106
+ localBuilds: { localBuildEmailHash: $gitUserEmailHash }
107
+ ) {
108
+ ...LastBuildOnBranchBuildFields
109
+ ...SelectedBuildFields @skip(if: $hasSelectedBuildId)
110
+ }
111
+ }
112
+ selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {
113
+ ...SelectedBuildFields
114
+ }
115
+ viewer {
116
+ projectMembership(projectId: $projectId) {
117
+ userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)
118
+ }
119
+ }
120
+ }
121
+ `),Wr=q(`
122
+ fragment LastBuildOnBranchBuildFields on Build {
123
+ __typename
124
+ id
125
+ status
126
+ committedAt
127
+ ... on StartedBuild {
128
+ testsForStatus: tests(first: 1000, statuses: $testStatuses) {
129
+ nodes {
130
+ ...StatusTestFields
131
+ }
132
+ }
133
+ testsForStory: tests(storyId: $storyId) {
134
+ nodes {
135
+ ...LastBuildOnBranchTestFields
136
+ }
137
+ }
138
+ }
139
+ ... on CompletedBuild {
140
+ result
141
+ testsForStatus: tests(first: 1000, statuses: $testStatuses) {
142
+ nodes {
143
+ ...StatusTestFields
144
+ }
145
+ }
146
+ testsForStory: tests(storyId: $storyId) {
147
+ nodes {
148
+ ...LastBuildOnBranchTestFields
149
+ }
150
+ }
151
+ }
152
+ }
153
+ `),Zr=q(`
154
+ fragment SelectedBuildFields on Build {
155
+ __typename
156
+ id
157
+ number
158
+ branch
159
+ commit
160
+ committedAt
161
+ uncommittedHash
162
+ status
163
+ ... on StartedBuild {
164
+ startedAt
165
+ testsForStory: tests(storyId: $storyId) {
166
+ nodes {
167
+ ...StoryTestFields
168
+ }
169
+ }
170
+ }
171
+ ... on CompletedBuild {
172
+ startedAt
173
+ testsForStory: tests(storyId: $storyId) {
174
+ nodes {
175
+ ...StoryTestFields
176
+ }
177
+ }
178
+ }
179
+ }
180
+ `),Gr=q(`
181
+ fragment StatusTestFields on Test {
182
+ id
183
+ status
184
+ story {
185
+ storyId
186
+ }
187
+ }
188
+ `),Qr=q(`
189
+ fragment LastBuildOnBranchTestFields on Test {
190
+ status
191
+ }
192
+ `),qr=q(`
193
+ fragment StoryTestFields on Test {
194
+ id
195
+ status
196
+ result
197
+ webUrl
198
+ comparisons {
199
+ id
200
+ result
201
+ browser {
202
+ id
203
+ key
204
+ name
205
+ version
206
+ }
207
+ captureDiff {
208
+ diffImage(signed: true) {
209
+ imageUrl
210
+ imageWidth
211
+ }
212
+ focusImage(signed: true) {
213
+ imageUrl
214
+ imageWidth
215
+ }
216
+ }
217
+ headCapture {
218
+ captureImage(signed: true) {
219
+ imageUrl
220
+ imageWidth
221
+ }
222
+ captureError {
223
+ kind
224
+ ... on CaptureErrorInteractionFailure {
225
+ error
226
+ }
227
+ ... on CaptureErrorJSError {
228
+ error
229
+ }
230
+ ... on CaptureErrorFailedJS {
231
+ error
232
+ }
233
+ }
234
+ }
235
+ baseCapture {
236
+ captureImage(signed: true) {
237
+ imageUrl
238
+ imageWidth
239
+ }
240
+ }
241
+ }
242
+ mode {
243
+ name
244
+ globals
245
+ }
246
+ story {
247
+ storyId
248
+ name
249
+ component {
250
+ name
251
+ }
252
+ }
253
+ }
254
+ `),Jr=q(`
255
+ mutation ReviewTest($input: ReviewTestInput!) {
256
+ reviewTest(input: $input) {
257
+ updatedTests {
258
+ id
259
+ status
260
+ }
261
+ userErrors {
262
+ ... on UserError {
263
+ __typename
264
+ message
265
+ }
266
+ ... on BuildSupersededError {
267
+ build {
268
+ id
269
+ }
270
+ }
271
+ ... on TestUnreviewableError {
272
+ test {
273
+ id
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ `);var Rr=({projectId:e,storyId:t,gitInfo:n,selectedBuildInfo:r})=>{let[{data:o,error:i,operation:s},a]=useQuery({query:zr,variables:{projectId:e,storyId:t,testStatuses:Object.keys(dn),branch:n.branch||"",...n.slug?{repositoryOwnerName:n.slug.split("/",1)[0]}:{},gitUserEmailHash:n.userEmailHash,selectedBuildId:r?.buildId||"",hasSelectedBuildId:!!r}});useEffect(()=>{let b=setInterval(a,5e3);return ()=>clearInterval(b)},[a]);let d=s&&t&&s.variables.storyId!==t,l=Le(Wr,o?.project?.lastBuildOnBranch),p=[...Le(Qr,l&&"testsForStory"in l&&l.testsForStory?l.testsForStory.nodes:[])],u=l?.committedAt>n.committedAt,m=!!l&&!u,f=!!l&&p.every(b=>b.status!=="IN_PROGRESS"),S=Le(Zr,o?.selectedBuild??(f?o?.project?.lastBuildOnBranch:void 0));return {hasData:!!o&&!d,hasProject:!!o?.project,hasSelectedBuild:S?.branch===n.branch,lastBuildOnBranch:l,lastBuildOnBranchIsNewer:u,lastBuildOnBranchIsReady:f,lastBuildOnBranchIsSelectable:m,selectedBuild:S,selectedBuildMatchesGit:S?.branch===n.branch&&S?.commit===n.commit&&S?.uncommittedHash===n.uncommittedHash,rerunQuery:a,queryError:i,userCanReview:!!o?.viewer?.projectMembership?.userCanReview}},un=createContext(null),eo=createContext(null),to=()=>he(un,"Build"),Nt=()=>{let{selectedBuild:e}=he(un,"Build");if(!e)throw new Error("No selectedBuild on Build context");return e},Ie=()=>he(eo,"Story"),no=({children:e,watchState:t=null})=>{let n=!!t?.selectedBuild&&"testsForStory"in t.selectedBuild,r=t?.selectedBuild&&"testsForStory"in t.selectedBuild&&t.selectedBuild.testsForStory?.nodes,o=[...Le(qr,r||[])],i=Ke(o),{toggleDiff:s}=Te();return useEffect(()=>s(i.changeCount>0),[s,i.changeCount]),c.createElement(un.Provider,{value:useMemo(()=>t,[JSON.stringify(t)])},c.createElement(eo.Provider,{value:{hasTests:n,tests:o,summary:i,...Vr(o)}},e))};var At=["initialize","build","upload","verify","snapshot"],Lt={initialize:{key:"initialize",emoji:"\u{1F680}",renderName:()=>"Initialize build",renderProgress:()=>"Initializing build",renderComplete:()=>"Initialized",estimateDuration:2e3},build:{key:"build",emoji:"\u{1F3D7}",renderName:()=>"Build Storybook",renderProgress:()=>"Building your Storybook...",renderComplete:()=>"Storybook built",estimateDuration:3e4},upload:{key:"upload",emoji:"\u{1F4E1}",renderName:()=>"Publish your Storybook",renderProgress:({stepProgress:e})=>{let{numerator:t,denominator:n}=e.upload;if(!n||!t)return "Uploading files";let{value:r,exponent:o}=filesize(n,{output:"object",round:1}),{value:i,symbol:s}=filesize(t,{exponent:o,output:"object",round:1});return `Uploading files (${i}/${r} ${s})`},renderComplete:()=>"Publish complete",estimateDuration:3e4},verify:{key:"verify",emoji:"\u{1F50D}",renderName:()=>"Verify your Storybook",renderProgress:()=>"Verifying contents...",renderComplete:()=>"Storybook verified",estimateDuration:1e4},snapshot:{key:"snapshot",emoji:"\u{1F4F8}",renderName:()=>"Run visual tests",renderProgress:({stepProgress:e})=>{let{numerator:t,denominator:n}=e.snapshot;return n?`Running visual tests (${t}/${n})`:"Running visual tests"},renderComplete:()=>"Tested your stories",estimateDuration:6e4},aborted:{key:"aborted",emoji:"\u270B",renderName:()=>"Build canceled",renderProgress:()=>"Build canceled",renderComplete:()=>"Build canceled",estimateDuration:0},complete:{key:"complete",emoji:"\u{1F389}",renderName:()=>"Visual tests completed!",renderProgress:()=>"Visual tests completed!",renderComplete:()=>"Visual tests completed!",estimateDuration:0},error:{key:"error",emoji:"\u{1F6A8}",renderName:()=>"Build failed",renderProgress:()=>"Build failed",renderComplete:()=>"Build failed",estimateDuration:0}};({buildProgressPercentage:0,currentStep:At[0],stepProgress:Object.fromEntries(At.map(e=>[e,{}]))});var Ye=({localBuildProgress:e,withEmoji:t=!1})=>{let{emoji:n,renderProgress:r}=Lt[e.currentStep],o=r(e);return c.createElement("span",null,t&&n," ",o)};var io=styled.div(({status:e,theme:t})=>({display:"inline-block",width:6,height:6,borderRadius:"50%",background:e&&{["IN_PROGRESS"]:"transparent",["PASSED"]:t.color.positive,["PENDING"]:t.color.gold,["ACCEPTED"]:t.color.positive,["DENIED"]:t.color.positive,["BROKEN"]:t.color.negative,["FAILED"]:t.color.negative,["EQUAL"]:t.color.positive,["FIXED"]:t.color.positive,["ADDED"]:t.color.gold,["CHANGED"]:t.color.gold,["REMOVED"]:t.color.gold,["CAPTURE_ERROR"]:t.color.negative,["SYSTEM_ERROR"]:t.color.negative,notification:t.color.secondary}[e]}),({overlay:e,theme:t})=>e&&css({position:"absolute",top:-1,right:-2,width:7,height:7,border:"1px solid rgba(0, 0, 0, 0.1)",boxShadow:`0 0 0 2px var(--bg-color, ${t.background.content})`,boxSizing:"border-box"})),Pt=({status:e})=>c.createElement(io,{status:e}),Ya=styled.div({position:"relative",display:"inline-flex",justifyContent:"center","img, svg":{verticalAlign:"top"}}),Xe=({status:e,children:t})=>c.createElement(Ya,null,t,c.createElement(io,{overlay:!0,status:e}));var ao=styled.div(({theme:e})=>({width:220,padding:3,color:e.color.defaultText,"& > div":{margin:7}})),Et=styled.div(({theme:e})=>({height:5,background:e.background.hoverable,borderRadius:1})),gn=styled(Et)(({theme:e})=>({background:e.color.secondary,transition:"width 3s ease-out"})),es=keyframes({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),mn=styled.svg(({progress:e,theme:t})=>({position:"absolute",width:"24px!important",height:"24px!important",transform:"rotate(-90deg)",color:t.color.secondary,circle:{r:"10",cx:"12",cy:"12",fill:"transparent",stroke:e?"currentColor":t.background.hoverable,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:Math.PI*20}}),({spinner:e,theme:t})=>e&&{animation:`${es} 1s linear infinite`,circle:{stroke:`${t.color.secondary}33`}}),fn=styled(H)(({theme:e})=>({position:"relative",overflow:"visible",color:e.textMutedColor,marginTop:0,zIndex:1})),so=({isOutdated:e=!1,isRunning:t=!1,localBuildProgress:n,startBuild:r,stopBuild:o})=>{if(t&&n){let{buildProgressPercentage:i}=n;return c.createElement(WithTooltip,{trigger:"hover",tooltip:c.createElement(ao,null,c.createElement("div",null,c.createElement(Ye,{localBuildProgress:n,withEmoji:!0})),c.createElement(Et,null,typeof i=="number"&&c.createElement(gn,{style:{width:`${i}%`}})))},c.createElement(fn,{"aria-label":"Stop tests",onClick:()=>o()},c.createElement(Icons,{icon:"stopalt",style:{width:10}}),c.createElement(mn,{xmlns:"http://www.w3.org/2000/svg"},c.createElement("circle",null)),c.createElement(mn,{xmlns:"http://www.w3.org/2000/svg",spinner:!0},c.createElement("circle",{strokeDashoffset:Math.PI*20*(1-i/100)})),typeof i=="number"&&c.createElement(mn,{xmlns:"http://www.w3.org/2000/svg",progress:!0},c.createElement("circle",{strokeDashoffset:Math.PI*20*(1-i/100)}))))}return e?c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:"Code changes detected; click to run tests"}),trigger:"hover",hasChrome:!1},c.createElement(fn,{"aria-label":"Run tests",onClick:()=>r()},c.createElement(Xe,{status:"notification"},c.createElement(Icons,{icon:"play"})))):c.createElement(WithTooltip,{trigger:"click",closeOnOutsideClick:!0,tooltip:c.createElement(ao,null,c.createElement("div",null,"No code changes detected. Rerun tests to take new snapshots."),c.createElement(H,{onClick:()=>r(),"aria-label":"Rerun tests"},c.createElement(Icons,{icon:"sync"}),"Rerun tests"))},c.createElement(fn,{"aria-label":"Run tests"},c.createElement(Icons,{icon:"play"})))};var ns=styled(_)({display:"flex",flexDirection:"column",gap:10,width:200});function Ot({localBuildProgress:e}){return c.createElement(ns,{as:"div",style:{display:"flex",flexDirection:"column",gap:10,width:200}},c.createElement(Et,null,typeof e.buildProgressPercentage=="number"&&c.createElement(gn,{style:{width:`${e.buildProgressPercentage}%`}})),c.createElement(Ye,{localBuildProgress:e}))}var lo=styled.div(({theme:e})=>({background:e.background.app,borderBottom:`1px solid ${e.appBorderColor}`,padding:"10px 15px",lineHeight:"20px",color:e.color.defaultText}));var ds=keyframes({from:{transform:"rotate(0deg)"},to:{transform:"rotate(359deg)"}}),uo=styled.button(({isWarning:e,onClick:t,theme:n})=>{let r=n.base==="dark"?"#2e271a":n.background.warning;return {position:"relative",display:"flex",width:"100%",lineHeight:"20px",padding:"5px 7px 5px 15px",justifyContent:"space-between",alignItems:"center",background:e?r:n.background.app,border:"none",borderBottom:`1px solid ${n.appBorderColor}`,color:n.color.defaultText,cursor:t?"pointer":"default",textAlign:"left","& > *":{zIndex:1},code:{fontFamily:n.typography.fonts.mono,fontSize:n.typography.size.s1}}}),po=styled.div(({isWarning:e,percentage:t,theme:n})=>{let r=n.base==="dark"?"#43361f":"#FFE6B1";return {display:"block",position:"absolute",top:"0",height:"100%",left:"0",width:`${t}%`,transition:"width 3s ease-out",backgroundColor:e?r:n.background.hoverable,pointerEvents:"none",zIndex:0}}),jt=styled.div({padding:"5px 0"}),us=styled.div(({expanded:e,theme:t})=>({display:"grid",gridTemplateRows:e?"1fr":"0fr",background:t.background.app,borderBottom:e?`1px solid ${t.appBorderColor}`:"none",transition:"grid-template-rows 150ms ease-out"})),ps=styled.div({whiteSpace:"nowrap",overflow:"hidden"}),cs=styled.div(({isCurrent:e,isFailed:t,isPending:n,theme:r})=>({display:"flex",flexDirection:"row",gap:8,opacity:n?.7:1,color:t?r.color.negativeText:"inherit",fontWeight:e||t?"bold":"normal",fontFamily:"Menlo, monospace",fontSize:"12px",lineHeight:"24px",margin:"0 15px","&:first-of-type":{marginTop:10},"&:last-of-type":{marginBottom:10}})),ms=styled(Icons)({width:10,marginRight:8},({icon:e})=>e==="sync"&&css({animation:`${ds} 1s linear infinite`})),fs=({localBuildProgress:e,expanded:t=!1})=>{let n=useRef({});useEffect(()=>{n.current[e.currentStep]={...e};},[e]);let r=["aborted","error"].includes(e.currentStep),o=At.map(i=>{let{startedAt:s,completedAt:a}=e.stepProgress[i],d=!!s&&!a,l=d&&r,p=!s,u={...Lt[i],isCurrent:d,isFailed:l,isPending:p};return l?{...u,icon:"failed",renderLabel:u.renderProgress}:d?{...u,icon:"sync",renderLabel:u.renderProgress}:p?{...u,icon:"arrowright",renderLabel:u.renderName}:{...u,icon:"check",renderLabel:u.renderComplete}});return c.createElement(us,{expanded:t},c.createElement(ps,null,o.map(({icon:i,isCurrent:s,isFailed:a,isPending:d,key:l,renderLabel:p})=>c.createElement(cs,{isCurrent:s,isFailed:a,isPending:d,key:l},c.createElement("div",null,c.createElement(ms,{icon:i}),p(n.current[l]||e))))))},co=({branch:e,dismissBuildError:t,localBuildProgress:n,lastBuildOnBranchInProgress:r,switchToLastBuildOnBranch:o})=>{let[i,s]=c.useState(!1),a=()=>{s(!i);};if(n){let l=["aborted","error"].includes(n.currentStep);return c.createElement(c.Fragment,null,c.createElement(uo,{as:l?"div":"button",onClick:l?void 0:a,isWarning:l},c.createElement(po,{percentage:n.buildProgressPercentage,isWarning:l}),c.createElement(jt,null,c.createElement(Ye,{localBuildProgress:n,withEmoji:!0})),l?c.createElement(H,{onClick:t},c.createElement(Icons,{icon:"close"})):c.createElement(H,{as:"div"},c.createElement(Icons,{icon:i?"collapse":"expandalt"}))),c.createElement(fs,{localBuildProgress:n,expanded:i||l}))}function d(){return o?r?c.createElement(jt,null,"Reviewing is disabled because there's a newer build in progress on main. This can happen when a build runs in CI."):c.createElement(jt,null,"There's a newer snapshot with changes."," ",c.createElement(Link,{withArrow:!0,onClick:o},"Switch to newer snapshot")):c.createElement(jt,null,"Reviewing is disabled because there's a newer build on ",c.createElement("code",null,e),".")}return c.createElement(uo,{onClick:o},c.createElement(po,{percentage:100}),d())};var Ut=styled.div({display:"flex",flexDirection:"column"}),pt=styled.div(({theme:e})=>({padding:15,lineHeight:"18px",borderBottom:`1px solid ${e.appBorderColor}`,p:{margin:"10px 0","&:last-of-type":{marginBottom:0}},dl:{display:"grid",gridTemplateColumns:"auto 1fr",gap:10,margin:"10px 0 0 0"},dt:{color:e.color.mediumdark,fontWeight:700},dd:{marginLeft:0},"button + button":{marginLeft:10}})),ct=styled.div({display:"flex",fontWeight:"bold",marginBottom:15}),hn=styled(Icons)(({theme:e})=>({width:12,height:12,margin:"3px 6px",verticalAlign:"top",color:e.color.mediumdark})),mt=styled(Icons)({width:14,height:14,margin:"2px 6px 2px 0",verticalAlign:"top"}),$t=styled(Icons)({marginLeft:"auto"}),Ht=styled(H)({margin:-5,marginLeft:"auto"});var mo=({onClose:e})=>c.createElement(Ut,null,c.createElement(pt,null,c.createElement(ct,null,"Render settings",c.createElement(hn,{icon:"info"}),c.createElement(Ht,{onClick:e},c.createElement($t,{icon:"close","aria-label":"Close"}))),c.createElement("p",null,c.createElement(mt,{icon:"timer"}),"Delay: 300ms"),c.createElement("p",null,c.createElement(mt,{icon:"stop"}),"Animation pause: End"),c.createElement("p",null,c.createElement(mt,{icon:"contrast"}),"Threshold: 0.2"),c.createElement("p",null,c.createElement(mt,{icon:"paragraph"}),"Anti-alias: Included")),c.createElement(pt,null,c.createElement(ct,null,"Bounding box",c.createElement(hn,{icon:"info"})),c.createElement("dl",null,c.createElement("dt",null,"Width:"),c.createElement("dd",null,"Fill viewport"),c.createElement("dt",null,"Height:"),c.createElement("dd",null,"Hug contents"))));var go={isReviewing:!1,userCanReview:!1,buildIsReviewable:!1,acceptTest:(e,t="SPEC")=>Promise.resolve(),unacceptTest:(e,t="SPEC")=>Promise.resolve()},yo=createContext(go),Vt=()=>he(yo,"ReviewTest"),So=({children:e,watchState:t=go})=>c.createElement(yo.Provider,{value:t},e);var hs=styled.div(({theme:e})=>({position:"relative",display:"flex",background:"transparent",overflow:"hidden",margin:2,img:{maxWidth:"100%",transition:"filter 0.1s ease-in-out"},"img[data-overlay]":{position:"absolute",opacity:.7,pointerEvents:"none"},div:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",margin:"30px 15px",color:e.color.mediumdark,p:{maxWidth:380,textAlign:"center"},svg:{width:28,height:28}},"& > svg":{position:"absolute",left:"calc(50% - 14px)",top:"calc(50% - 14px)",width:28,height:28,color:e.color.lightest,opacity:0,transition:"opacity 0.1s ease-in-out",pointerEvents:"none"}}),({href:e})=>e&&{display:"inline-flex","&:hover":{"& > svg":{opacity:1},img:{filter:"brightness(85%)"}}}),bo=({componentName:e,storyName:t,testUrl:n,comparisonResult:r,latestImage:o,baselineImage:i,baselineImageVisible:s,diffImage:a,focusImage:d,diffVisible:l,focusVisible:p,...u})=>{let m=!!o&&!!a&&r==="CHANGED",f=r==="CAPTURE_ERROR",S=m&&!!d,b=m?{as:"a",href:n,target:"_blank"}:{},v=m&&l,h=S&&p;return c.createElement(hs,{...u,...b},o&&c.createElement("img",{alt:`Latest snapshot for the '${t}' story of the '${e}' component`,src:o.imageUrl,style:{opacity:v&&!h?.7:1,display:s?"none":"block"}}),i&&c.createElement("img",{alt:`Baseline snapshot for the '${t}' story of the '${e}' component`,src:i.imageUrl,style:{opacity:v&&!h?.7:1,display:s?"block":"none"}}),m&&c.createElement("img",{alt:"","data-overlay":"diff",src:a.imageUrl,style:{maxWidth:`${a.imageWidth/o.imageWidth*100}%`,opacity:v?1:0}}),S&&c.createElement("img",{alt:"","data-overlay":"focus",src:d.imageUrl,style:{maxWidth:`${d.imageWidth/o.imageWidth*100}%`,opacity:h?1:0}}),m&&c.createElement(Icons,{icon:"sharealt"}),f&&!o&&c.createElement("div",null,c.createElement(Icons,{icon:"photo"}),c.createElement(_,null,"A snapshot couldn\u2019t be captured. This often occurs when a story has a code error. Confirm that this story successfully renders in your local Storybook and run the build again.")))};var zt=styled(Icons)({width:10,height:10});var Co=e=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M5.06982 9.68493L7.99484 4.63927L14.5786 4.62406C14.5252 4.52043 14.4696 4.41742 14.4109 4.31532C12.372 0.768556 7.84405 -0.453864 4.29726 1.58495C3.24614 2.1892 2.39921 3.01211 1.78076 3.96327L5.06982 9.68493Z",fill:"#DB4437"}),c.createElement("path",{d:"M10.9276 9.68457L5.09539 9.6743L1.79036 3.98022C1.72727 4.07822 1.66591 4.17795 1.60682 4.27985C-0.445348 7.81892 0.759985 12.3515 4.29905 14.4037C5.34791 15.0118 6.48403 15.3338 7.617 15.3939L10.9276 9.68457Z",fill:"#0F9D58"}),c.createElement("path",{d:"M7.98649 4.61194L10.9032 9.66241L7.63525 15.3778C7.75167 15.3833 7.86871 15.3863 7.98649 15.3863C12.0775 15.3863 15.3939 12.0699 15.3939 7.97893C15.3939 6.76648 15.1025 5.62211 14.5861 4.61194L7.98649 4.61194Z",fill:"#FFCD40"}),c.createElement("path",{d:"M8.01367 4.6366V6.40005L14.613 4.6366H8.01367Z",fill:"url(#paint0_radial_466_21161)"}),c.createElement("path",{d:"M1.78198 4.00098L6.60102 8.8192L5.09764 9.687L1.78198 4.00098Z",fill:"url(#paint1_radial_466_21161)"}),c.createElement("path",{d:"M7.6626 15.4017L9.42689 8.81921L10.9303 9.68702L7.6626 15.4017Z",fill:"url(#paint2_radial_466_21161)"}),c.createElement("ellipse",{cx:"8.01347",cy:"8.00358",rx:"3.36699",ry:"3.36699",fill:"#F1F1F1"}),c.createElement("ellipse",{cx:"8.01367",cy:"8.00354",rx:"2.69361",ry:"2.6936",fill:"#4285F4"}),c.createElement("defs",null,c.createElement("radialGradient",{id:"paint0_radial_466_21161",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.69229 4.63226) scale(7.07721 1.89116)"},c.createElement("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),c.createElement("stop",{offset:"1",stopColor:"#3E2723",stopOpacity:"0.01"})),c.createElement("radialGradient",{id:"paint1_radial_466_21161",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1.77445 4.00677) scale(6.56938 7.75127)"},c.createElement("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),c.createElement("stop",{offset:"1",stopColor:"#3E2723",stopOpacity:"0.01"})),c.createElement("radialGradient",{id:"paint2_radial_466_21161",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.00025 8.01489) scale(7.39644 14.8995)"},c.createElement("stop",{stopColor:"#263238",stopOpacity:"0.2"}),c.createElement("stop",{offset:"1",stopColor:"#263238",stopOpacity:"0.01"}))));var ko=e=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("circle",{cx:"8.00009",cy:"7.99997",r:"7.7037",fill:"url(#paint0_linear_466_21186)"}),c.createElement("ellipse",{cx:"8.00094",cy:"8.00094",rx:"7.06173",ry:"7.06173",fill:"url(#paint1_radial_466_21186)"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.07134 1.36353C8.03043 1.36353 7.99727 1.39669 7.99727 1.4376V2.56469C7.99727 2.6056 8.03043 2.63877 8.07134 2.63877C8.11225 2.63877 8.14542 2.6056 8.14542 2.56469V1.4376C8.14542 1.39669 8.11225 1.36353 8.07134 1.36353ZM8.07134 14.7792C8.11225 14.7792 8.14542 14.746 8.14542 14.7051V13.578C8.14542 13.5371 8.11225 13.5039 8.07134 13.5039C8.03043 13.5039 7.99727 13.5371 7.99727 13.578V14.7051C7.99727 14.746 8.03043 14.7792 8.07134 14.7792ZM8.64883 1.46214C8.65292 1.42143 8.68923 1.39175 8.72994 1.39584C8.77064 1.39993 8.80032 1.43625 8.79623 1.47695L8.74793 1.95766C8.74384 1.99836 8.70752 2.02804 8.66682 2.02395C8.62612 2.01986 8.59643 1.98355 8.60052 1.94284L8.64883 1.46214ZM7.41372 14.7468C7.45442 14.7509 7.49074 14.7213 7.49483 14.6806L7.54313 14.1998C7.54722 14.1591 7.51754 14.1228 7.47683 14.1187C7.43613 14.1146 7.39982 14.1443 7.39573 14.185L7.34742 14.6657C7.34333 14.7064 7.37301 14.7428 7.41372 14.7468ZM14.7051 7.99727C14.746 7.99727 14.7792 8.03043 14.7792 8.07134C14.7792 8.11225 14.746 8.14542 14.7051 8.14542H13.578C13.5371 8.14542 13.5039 8.11225 13.5039 8.07134C13.5039 8.03043 13.5371 7.99727 13.578 7.99727H14.7051ZM1.36353 8.07134C1.36353 8.11225 1.39669 8.14542 1.4376 8.14542H2.56469C2.6056 8.14542 2.63877 8.11225 2.63877 8.07134C2.63877 8.03043 2.6056 7.99727 2.56469 7.99727H1.4376C1.39669 7.99727 1.36353 8.03043 1.36353 8.07134ZM14.6806 8.64883C14.7213 8.65292 14.7509 8.68923 14.7468 8.72994C14.7428 8.77064 14.7064 8.80032 14.6657 8.79623L14.185 8.74793C14.1443 8.74384 14.1146 8.70752 14.1187 8.66682C14.1228 8.62612 14.1591 8.59643 14.1998 8.60052L14.6806 8.64883ZM1.39584 7.41372C1.39175 7.45442 1.42143 7.49074 1.46214 7.49483L1.94284 7.54313C1.98355 7.54722 2.01986 7.51754 2.02395 7.47683C2.02804 7.43613 1.99836 7.39982 1.95766 7.39573L1.47695 7.34742C1.43625 7.34333 1.39993 7.37301 1.39584 7.41372ZM12.7097 3.3282C12.7387 3.29927 12.7856 3.29927 12.8145 3.3282C12.8434 3.35713 12.8434 3.40403 12.8145 3.43296L12.0175 4.22994C11.9886 4.25887 11.9417 4.25887 11.9127 4.22994C11.8838 4.20101 11.8838 4.15411 11.9127 4.12518L12.7097 3.3282ZM3.3282 12.8145C3.35713 12.8434 3.40403 12.8434 3.43296 12.8145L4.22994 12.0175C4.25887 11.9886 4.25887 11.9417 4.22994 11.9127C4.20101 11.8838 4.15411 11.8838 4.12518 11.9127L3.3282 12.7097C3.29927 12.7387 3.29927 12.7856 3.3282 12.8145ZM13.1523 3.80568C13.1839 3.77973 13.2306 3.78433 13.2566 3.81595C13.2825 3.84757 13.2779 3.89425 13.2463 3.9202L12.8729 4.22664C12.8413 4.2526 12.7946 4.248 12.7686 4.21638C12.7427 4.18475 12.7473 4.13808 12.7789 4.11212L13.1523 3.80568ZM2.88614 12.3267C2.91209 12.3584 2.95876 12.363 2.99039 12.337L3.36378 12.0306C3.3954 12.0046 3.4 11.9579 3.37404 11.9263C3.34809 11.8947 3.30142 11.8901 3.26979 11.916L2.8964 12.2225C2.86478 12.2484 2.86018 12.2951 2.88614 12.3267ZM12.8145 12.7097C12.8434 12.7387 12.8434 12.7856 12.8145 12.8145C12.7856 12.8434 12.7387 12.8434 12.7097 12.8145L11.9127 12.0175C11.8838 11.9886 11.8838 11.9417 11.9127 11.9127C11.9417 11.8838 11.9886 11.8838 12.0175 11.9127L12.8145 12.7097ZM3.3282 3.3282C3.29927 3.35713 3.29927 3.40403 3.3282 3.43296L4.12518 4.22994C4.15411 4.25887 4.20101 4.25887 4.22994 4.22994C4.25887 4.20101 4.25887 4.15411 4.22994 4.12518L3.43296 3.3282C3.40403 3.29927 3.35713 3.29927 3.3282 3.3282ZM12.337 13.1523C12.363 13.1839 12.3584 13.2306 12.3267 13.2566C12.2951 13.2825 12.2484 13.2779 12.2225 13.2463L11.916 12.8729C11.8901 12.8413 11.8947 12.7946 11.9263 12.7686C11.9579 12.7427 12.0046 12.7473 12.0306 12.7789L12.337 13.1523ZM3.81595 2.88614C3.78433 2.91209 3.77973 2.95876 3.80568 2.99039L4.11212 3.36378C4.13808 3.3954 4.18475 3.4 4.21638 3.37404C4.248 3.34809 4.2526 3.30142 4.22664 3.26979L3.9202 2.8964C3.89425 2.86478 3.84757 2.86018 3.81595 2.88614ZM10.5415 1.91422C10.5572 1.87643 10.6005 1.85848 10.6383 1.87413C10.6761 1.88979 10.6941 1.93312 10.6784 1.97092L10.2471 3.01221C10.2314 3.05 10.1881 3.06795 10.1503 3.05229C10.1125 3.03664 10.0946 2.99331 10.1102 2.95551L10.5415 1.91422ZM5.50437 14.2686C5.54216 14.2842 5.58549 14.2663 5.60115 14.2285L6.03247 13.1872C6.04813 13.1494 6.03018 13.1061 5.99238 13.0904C5.95459 13.0747 5.91126 13.0927 5.8956 13.1305L5.46428 14.1718C5.44862 14.2096 5.46657 14.2529 5.50437 14.2686ZM11.1332 2.18598C11.1524 2.1499 11.1973 2.13628 11.2334 2.15557C11.2695 2.17486 11.2831 2.21974 11.2638 2.25582L11.0361 2.68183C11.0168 2.7179 10.9719 2.73152 10.9358 2.71223C10.8998 2.69295 10.8861 2.64806 10.9054 2.61199L11.1332 2.18598ZM4.90931 13.9871C4.94539 14.0064 4.99027 13.9928 5.00955 13.9567L5.23726 13.5307C5.25654 13.4946 5.24293 13.4497 5.20685 13.4305C5.17077 13.4112 5.12589 13.4248 5.1066 13.4609L4.8789 13.8869C4.85961 13.923 4.87323 13.9678 4.90931 13.9871ZM14.2285 10.5415C14.2663 10.5572 14.2842 10.6005 14.2686 10.6383C14.2529 10.6761 14.2096 10.6941 14.1718 10.6784L13.1305 10.2471C13.0927 10.2314 13.0747 10.1881 13.0904 10.1503C13.1061 10.1125 13.1494 10.0946 13.1872 10.1102L14.2285 10.5415ZM1.87412 5.50437C1.85846 5.54216 1.87641 5.58549 1.91421 5.60115L2.95551 6.03247C2.99331 6.04813 3.03664 6.03018 3.05229 5.99238C3.06795 5.95459 3.05 5.91126 3.0122 5.8956L1.9709 5.46428C1.9331 5.44862 1.88977 5.46657 1.87412 5.50437ZM13.9567 11.1332C13.9928 11.1524 14.0064 11.1973 13.9871 11.2334C13.9678 11.2695 13.923 11.2831 13.8869 11.2638L13.4609 11.0361C13.4248 11.0168 13.4112 10.9719 13.4305 10.9358C13.4497 10.8998 13.4946 10.8861 13.5307 10.9054L13.9567 11.1332ZM2.15557 4.90929C2.13628 4.94537 2.1499 4.99025 2.18598 5.00954L2.61199 5.23726C2.64806 5.25654 2.69295 5.24293 2.71223 5.20685C2.73152 5.17077 2.7179 5.12589 2.68183 5.1066L2.25582 4.87888C2.21974 4.8596 2.17486 4.87321 2.15557 4.90929ZM14.1718 5.46428C14.2096 5.44862 14.2529 5.46657 14.2686 5.50437C14.2842 5.54216 14.2663 5.58549 14.2285 5.60115L13.1872 6.03247C13.1494 6.04813 13.1061 6.03018 13.0904 5.99238C13.0747 5.95459 13.0927 5.91126 13.1305 5.8956L14.1718 5.46428ZM1.87413 10.6383C1.88979 10.6761 1.93312 10.6941 1.97092 10.6784L3.01221 10.2471C3.05 10.2314 3.06795 10.1881 3.05229 10.1503C3.03664 10.1125 2.99331 10.0946 2.95551 10.1102L1.91422 10.5415C1.87643 10.5572 1.85848 10.6005 1.87413 10.6383ZM14.3979 6.07477C14.4371 6.0629 14.4785 6.08501 14.4903 6.12416C14.5022 6.1633 14.4801 6.20467 14.441 6.21654L13.9787 6.35677C13.9396 6.36864 13.8982 6.34654 13.8863 6.30739C13.8744 6.26824 13.8965 6.22688 13.9357 6.215L14.3979 6.07477ZM1.65237 10.0185C1.66425 10.0577 1.70561 10.0798 1.74476 10.0679L2.20699 9.92769C2.24614 9.91581 2.26825 9.87445 2.25637 9.8353C2.2445 9.79615 2.20313 9.77404 2.16399 9.78592L1.70175 9.92615C1.6626 9.93802 1.64049 9.97939 1.65237 10.0185ZM10.6383 14.2686C10.6005 14.2842 10.5572 14.2663 10.5415 14.2285L10.1102 13.1872C10.0946 13.1494 10.1125 13.1061 10.1503 13.0904C10.1881 13.0747 10.2314 13.0927 10.2471 13.1305L10.6784 14.1718C10.6941 14.2096 10.6761 14.2529 10.6383 14.2686ZM5.50437 1.87413C5.46657 1.88979 5.44862 1.93312 5.46428 1.97092L5.8956 3.01221C5.91126 3.05 5.95459 3.06795 5.99238 3.05229C6.03018 3.03664 6.04813 2.99331 6.03247 2.95551L5.60115 1.91422C5.58549 1.87643 5.54216 1.85848 5.50437 1.87413ZM10.0679 14.3979C10.0798 14.4371 10.0577 14.4785 10.0185 14.4903C9.97939 14.5022 9.93802 14.4801 9.92615 14.441L9.78592 13.9787C9.77404 13.9396 9.79615 13.8982 9.8353 13.8863C9.87445 13.8744 9.91581 13.8965 9.92769 13.9357L10.0679 14.3979ZM6.12417 1.65237C6.08502 1.66424 6.06291 1.70561 6.07479 1.74475L6.215 2.20699C6.22688 2.24614 6.26824 2.26825 6.30739 2.25637C6.34654 2.2445 6.36864 2.20314 6.35677 2.16399L6.21656 1.70175C6.20468 1.6626 6.16332 1.64049 6.12417 1.65237ZM9.29287 1.55062C9.30085 1.5105 9.33985 1.48444 9.37997 1.49242C9.4201 1.5004 9.44615 1.5394 9.43817 1.57952L9.21829 2.68496C9.21031 2.72508 9.17131 2.75114 9.13119 2.74316C9.09107 2.73518 9.06501 2.69618 9.07299 2.65606L9.29287 1.55062ZM6.76272 14.6503C6.80284 14.6583 6.84184 14.6322 6.84982 14.5921L7.0697 13.4866C7.07768 13.4465 7.05162 13.4075 7.0115 13.3995C6.97137 13.3916 6.93238 13.4176 6.9244 13.4577L6.70452 14.5632C6.69654 14.6033 6.72259 14.6423 6.76272 14.6503ZM9.92615 1.70175C9.93802 1.6626 9.97939 1.64049 10.0185 1.65237C10.0577 1.66425 10.0798 1.70561 10.0679 1.74476L9.92769 2.20699C9.91581 2.24614 9.87445 2.26825 9.8353 2.25637C9.79615 2.2445 9.77404 2.20313 9.78592 2.16399L9.92615 1.70175ZM6.12417 14.4903C6.16332 14.5022 6.20469 14.4801 6.21656 14.441L6.35677 13.9787C6.36864 13.9396 6.34653 13.8982 6.30739 13.8863C6.26824 13.8744 6.22687 13.8965 6.215 13.9357L6.07479 14.398C6.06291 14.4371 6.08502 14.4785 6.12417 14.4903ZM14.5921 9.29287C14.6322 9.30085 14.6583 9.33985 14.6503 9.37997C14.6423 9.4201 14.6033 9.44615 14.5632 9.43817L13.4577 9.21829C13.4176 9.21031 13.3916 9.17131 13.3995 9.13119C13.4075 9.09107 13.4465 9.06501 13.4866 9.07299L14.5921 9.29287ZM1.49242 6.76272C1.48444 6.80284 1.5105 6.84184 1.55062 6.84982L2.65606 7.0697C2.69618 7.07768 2.73518 7.05162 2.74316 7.0115C2.75114 6.97137 2.72508 6.93238 2.68496 6.9244L1.57952 6.70452C1.5394 6.69654 1.5004 6.72259 1.49242 6.76272ZM14.441 9.92615C14.4801 9.93802 14.5022 9.97939 14.4903 10.0185C14.4785 10.0577 14.4371 10.0798 14.3979 10.0679L13.9357 9.92769C13.8965 9.91581 13.8744 9.87445 13.8863 9.8353C13.8982 9.79615 13.9396 9.77404 13.9787 9.78592L14.441 9.92615ZM1.65237 6.12415C1.64049 6.1633 1.6626 6.20467 1.70175 6.21654L2.16399 6.35677C2.20313 6.36864 2.2445 6.34654 2.25637 6.30739C2.26825 6.26824 2.24614 6.22688 2.20699 6.215L1.74476 6.07477C1.70561 6.0629 1.66425 6.08501 1.65237 6.12415ZM13.5459 4.32424C13.58 4.30151 13.626 4.31066 13.6487 4.34468C13.6714 4.37869 13.6623 4.42469 13.6282 4.44742L12.6911 5.0736C12.6571 5.09633 12.6111 5.08718 12.5884 5.05317C12.5656 5.01915 12.5748 4.97315 12.6088 4.95042L13.5459 4.32424ZM2.494 11.798C2.51673 11.832 2.56273 11.8412 2.59675 11.8184L3.53389 11.1923C3.56791 11.1695 3.57706 11.1235 3.55433 11.0895C3.5316 11.0555 3.4856 11.0464 3.45159 11.0691L2.51444 11.6953C2.48043 11.718 2.47128 11.764 2.494 11.798ZM13.8869 4.87888C13.923 4.8596 13.9678 4.87321 13.9871 4.90929C14.0064 4.94537 13.9928 4.99025 13.9567 5.00954L13.5307 5.23726C13.4946 5.25654 13.4497 5.24293 13.4305 5.20685C13.4112 5.17077 13.4248 5.12589 13.4609 5.1066L13.8869 4.87888ZM2.15557 11.2334C2.17486 11.2695 2.21974 11.2831 2.25582 11.2638L2.68183 11.0361C2.7179 11.0168 2.73152 10.9719 2.71223 10.9358C2.69295 10.8998 2.64806 10.8861 2.61199 10.9054L2.18598 11.1332C2.1499 11.1524 2.13628 11.1973 2.15557 11.2334ZM11.8184 13.5459C11.8412 13.58 11.832 13.626 11.798 13.6487C11.764 13.6714 11.718 13.6623 11.6953 13.6282L11.0691 12.6911C11.0464 12.6571 11.0555 12.6111 11.0895 12.5884C11.1235 12.5656 11.1695 12.5748 11.1923 12.6088L11.8184 13.5459ZM4.34468 2.494C4.31066 2.51673 4.30151 2.56273 4.32424 2.59675L4.95042 3.53389C4.97315 3.56791 5.01915 3.57706 5.05317 3.55433C5.08718 3.5316 5.09633 3.4856 5.0736 3.45159L4.44742 2.51444C4.42469 2.48043 4.37869 2.47128 4.34468 2.494ZM11.2638 13.8869C11.2831 13.923 11.2695 13.9678 11.2334 13.9871C11.1973 14.0064 11.1524 13.9928 11.1331 13.9567L10.9054 13.5307C10.8861 13.4946 10.8998 13.4497 10.9358 13.4305C10.9719 13.4112 11.0168 13.4248 11.0361 13.4609L11.2638 13.8869ZM4.90931 2.15557C4.87323 2.17485 4.85961 2.21974 4.8789 2.25581L5.1066 2.68182C5.12589 2.7179 5.17077 2.73152 5.20685 2.71223C5.24293 2.69295 5.25654 2.64807 5.23726 2.61199L5.00955 2.18598C4.99027 2.1499 4.94539 2.13628 4.90931 2.15557ZM11.6953 2.51444C11.718 2.48043 11.764 2.47128 11.798 2.494C11.832 2.51673 11.8412 2.56273 11.8184 2.59675L11.1923 3.53389C11.1695 3.56791 11.1235 3.57706 11.0895 3.55433C11.0555 3.5316 11.0464 3.4856 11.0691 3.45159L11.6953 2.51444ZM4.34468 13.6487C4.37869 13.6714 4.42469 13.6623 4.44742 13.6282L5.0736 12.6911C5.09633 12.6571 5.08718 12.6111 5.05317 12.5884C5.01915 12.5656 4.97315 12.5748 4.95042 12.6088L4.32424 13.5459C4.30151 13.58 4.31066 13.626 4.34468 13.6487ZM12.2225 2.8964C12.2484 2.86478 12.2951 2.86018 12.3267 2.88614C12.3584 2.91209 12.363 2.95876 12.337 2.99039L12.0306 3.36378C12.0046 3.3954 11.9579 3.4 11.9263 3.37404C11.8947 3.34809 11.8901 3.30142 11.916 3.26979L12.2225 2.8964ZM3.81595 13.2566C3.84757 13.2825 3.89425 13.2779 3.9202 13.2463L4.22664 12.8729C4.2526 12.8413 4.248 12.7946 4.21638 12.7686C4.18475 12.7427 4.13808 12.7473 4.11212 12.7789L3.80568 13.1523C3.77973 13.1839 3.78433 13.2306 3.81595 13.2566ZM13.6282 11.6953C13.6623 11.718 13.6714 11.764 13.6487 11.798C13.626 11.832 13.58 11.8412 13.5459 11.8184L12.6088 11.1923C12.5748 11.1695 12.5656 11.1235 12.5884 11.0895C12.6111 11.0555 12.6571 11.0464 12.6911 11.0691L13.6282 11.6953ZM2.494 4.34468C2.47128 4.37869 2.48043 4.42469 2.51444 4.44742L3.45159 5.0736C3.4856 5.09633 3.5316 5.08718 3.55433 5.05317C3.57706 5.01915 3.56791 4.97315 3.53389 4.95042L2.59675 4.32424C2.56273 4.30151 2.51673 4.31066 2.494 4.34468ZM13.2463 12.2225C13.2779 12.2484 13.2825 12.2951 13.2566 12.3267C13.2306 12.3584 13.1839 12.363 13.1523 12.337L12.7789 12.0306C12.7473 12.0046 12.7427 11.9579 12.7686 11.9263C12.7946 11.8947 12.8413 11.8901 12.8729 11.916L13.2463 12.2225ZM2.88614 3.81595C2.86018 3.84757 2.86478 3.89425 2.8964 3.9202L3.26979 4.22664C3.30142 4.2526 3.34809 4.248 3.37404 4.21638C3.4 4.18475 3.3954 4.13808 3.36378 4.11212L2.99039 3.80568C2.95876 3.77973 2.91209 3.78433 2.88614 3.81595ZM14.5632 6.70452C14.6033 6.69654 14.6423 6.72259 14.6503 6.76272C14.6583 6.80284 14.6322 6.84184 14.5921 6.84982L13.4866 7.0697C13.4465 7.07768 13.4075 7.05162 13.3995 7.0115C13.3916 6.97137 13.4176 6.93238 13.4577 6.9244L14.5632 6.70452ZM1.49242 9.37997C1.5004 9.4201 1.5394 9.44615 1.57952 9.43817L2.68496 9.21829C2.72508 9.21031 2.75114 9.17131 2.74316 9.13119C2.73518 9.09107 2.69618 9.06501 2.65606 9.07299L1.55062 9.29287C1.5105 9.30085 1.48444 9.33985 1.49242 9.37997ZM14.6657 7.34742C14.7064 7.34333 14.7428 7.37301 14.7468 7.41372C14.7509 7.45442 14.7213 7.49074 14.6806 7.49483L14.1998 7.54313C14.1591 7.54722 14.1228 7.51754 14.1187 7.47683C14.1146 7.43613 14.1443 7.39982 14.185 7.39573L14.6657 7.34742ZM1.39584 8.72994C1.39993 8.77064 1.43625 8.80032 1.47695 8.79623L1.95766 8.74793C1.99836 8.74384 2.02804 8.70752 2.02395 8.66682C2.01986 8.62612 1.98355 8.59643 1.94284 8.60052L1.46214 8.64883C1.42143 8.65292 1.39175 8.68923 1.39584 8.72994ZM9.43817 14.5632C9.44615 14.6033 9.4201 14.6423 9.37997 14.6503C9.33985 14.6583 9.30085 14.6322 9.29287 14.5921L9.07299 13.4866C9.06501 13.4465 9.09107 13.4075 9.13119 13.3995C9.17131 13.3916 9.21031 13.4176 9.21829 13.4577L9.43817 14.5632ZM6.76272 1.49242C6.72259 1.5004 6.69654 1.5394 6.70452 1.57952L6.9244 2.68496C6.93238 2.72508 6.97137 2.75114 7.0115 2.74316C7.05162 2.73518 7.07768 2.69618 7.0697 2.65606L6.84982 1.55062C6.84184 1.5105 6.80284 1.48444 6.76272 1.49242ZM8.79623 14.6657C8.80032 14.7064 8.77064 14.7428 8.72994 14.7468C8.68923 14.7509 8.65292 14.7213 8.64883 14.6806L8.60052 14.1998C8.59643 14.1591 8.62612 14.1228 8.66682 14.1187C8.70752 14.1146 8.74384 14.1443 8.74793 14.185L8.79623 14.6657ZM7.41372 1.39584C7.37301 1.39993 7.34333 1.43625 7.34742 1.47695L7.39573 1.95766C7.39982 1.99836 7.43613 2.02804 7.47683 2.02395C7.51754 2.01986 7.54722 1.98355 7.54313 1.94284L7.49483 1.46214C7.49074 1.42143 7.45442 1.39175 7.41372 1.39584Z",fill:"#DDDDDD"}),c.createElement("path",{d:"M3.14941 12.8505L7.29562 7.28674L7.99989 7.99218L3.14941 12.8505Z",fill:"#DDDDDD"}),c.createElement("path",{d:"M7.28662 7.29574L12.8504 3.14954L7.99204 8.00002L7.28662 7.29574Z",fill:"#EE4444"}),c.createElement("path",{d:"M12.8505 3.14954L8.70427 8.71332L8 8.00789L12.8505 3.14954Z",fill:"#CC0000"}),c.createElement("path",{d:"M3.14941 12.8505L8.7132 8.70427L8.00777 8L3.14941 12.8505Z",fill:"#AAAAAA"}),c.createElement("defs",null,c.createElement("linearGradient",{id:"paint0_linear_466_21186",x1:"0.300303",y1:"0.300951",x2:"0.300303",y2:"15.7084",gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#F8F8F8"}),c.createElement("stop",{offset:"1",stopColor:"#CCCCCC"})),c.createElement("radialGradient",{id:"paint1_radial_466_21186",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.00216 8.0046) scale(7.06173)"},c.createElement("stop",{stopColor:"#00F0FF"}),c.createElement("stop",{offset:"1",stopColor:"#0070E0"}))));var vo=e=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M14.9596 5.19849C14.6332 4.41337 13.9721 3.56574 13.453 3.29783C13.8755 4.12612 14.12 4.95699 14.2134 5.57708C14.2134 5.5783 14.2139 5.58133 14.2149 5.58958C13.3657 3.47293 11.9257 2.61943 10.7499 0.761053C10.6905 0.667084 10.631 0.572865 10.573 0.473553C10.5434 0.422834 10.5159 0.371004 10.4903 0.318178C10.4414 0.223861 10.4038 0.124166 10.378 0.0211155C10.3782 0.0162369 10.3765 0.0114673 10.3734 0.00774353C10.3702 0.0040198 10.3658 0.00161108 10.3609 0.000990505C10.3563 -0.000330168 10.3515 -0.000330168 10.3468 0.000990505C10.3458 0.0013655 10.3442 0.00258425 10.3431 0.00302175C10.3414 0.003678 10.3393 0.005178 10.3376 0.00614675C10.3384 0.00502175 10.3402 0.0024905 10.3407 0.00189675C8.45416 1.10677 7.81416 3.15068 7.75535 4.17327C7.00199 4.22506 6.28171 4.50262 5.68841 4.96977C5.62629 4.9173 5.56135 4.86827 5.49388 4.8229C5.3227 4.22402 5.31543 3.59017 5.47282 2.98752C4.70132 3.3388 4.10126 3.89408 3.66501 4.3844H3.66154C3.36382 4.0073 3.38482 2.76337 3.40179 2.50365C3.39822 2.48755 3.17969 2.61708 3.15107 2.63662C2.88835 2.82414 2.64275 3.03454 2.41713 3.26537C2.16039 3.52573 1.92581 3.80705 1.71582 4.1064C1.71582 4.10677 1.7156 4.10721 1.71547 4.10758C1.71547 4.10718 1.71569 4.10677 1.71582 4.1064C1.23289 4.79075 0.890387 5.56404 0.7081 6.38155C0.704506 6.39783 0.701475 6.41471 0.697975 6.43112C0.68385 6.49724 0.632975 6.82799 0.624068 6.89987C0.623381 6.9054 0.623068 6.91071 0.622412 6.91624C0.556638 7.2582 0.515905 7.60451 0.500537 7.9524C0.500537 7.96521 0.499756 7.9779 0.499756 7.99074C0.499881 12.138 3.86238 15.5 8.01001 15.5C11.7245 15.5 14.8088 12.8035 15.4126 9.26152C15.4253 9.1654 15.4355 9.06877 15.4467 8.9718C15.596 7.68399 15.4301 6.3304 14.9596 5.19849ZM6.30351 11.0764C6.33863 11.0932 6.37163 11.1116 6.40769 11.1276C6.40919 11.1287 6.41126 11.1298 6.41279 11.1308C6.37608 11.1132 6.33965 11.0951 6.30351 11.0764ZM14.2155 5.59143L14.2145 5.58415C14.2149 5.5868 14.2153 5.58958 14.2158 5.59224L14.2155 5.59143Z",fill:"url(#paint0_linear_466_21172)"}),c.createElement("path",{d:"M14.9598 5.19851C14.6334 4.41338 13.9723 3.56576 13.4532 3.29785C13.8757 4.12613 14.1202 4.95701 14.2136 5.5771C14.2136 5.57529 14.214 5.5786 14.2148 5.58416C14.2151 5.58682 14.2156 5.5896 14.216 5.59226C14.9246 7.5132 14.5386 9.46657 13.9823 10.6602C13.1217 12.5071 11.0381 14.3999 7.77678 14.3076C4.25319 14.2078 1.149 11.5934 0.569531 8.16904C0.463937 7.62904 0.569531 7.35485 0.622656 6.91641C0.557938 7.25441 0.533281 7.35204 0.500781 7.95257C0.500781 7.96538 0.5 7.97807 0.5 7.99091C0.500063 12.138 3.86256 15.5 8.01019 15.5C11.7247 15.5 14.8089 12.8035 15.4128 9.26154C15.4255 9.16541 15.4357 9.06879 15.4469 8.97182C15.5962 7.68401 15.4303 6.33041 14.9598 5.19851Z",fill:"url(#paint1_radial_466_21172)"}),c.createElement("path",{d:"M14.9598 5.19851C14.6334 4.41338 13.9723 3.56576 13.4532 3.29785C13.8757 4.12613 14.1202 4.95701 14.2136 5.5771C14.2136 5.57529 14.214 5.5786 14.2148 5.58416C14.2151 5.58682 14.2156 5.5896 14.216 5.59226C14.9246 7.5132 14.5386 9.46657 13.9823 10.6602C13.1217 12.5071 11.0381 14.3999 7.77678 14.3076C4.25319 14.2078 1.149 11.5934 0.569531 8.16904C0.463937 7.62904 0.569531 7.35485 0.622656 6.91641C0.557938 7.25441 0.533281 7.35204 0.500781 7.95257C0.500781 7.96538 0.5 7.97807 0.5 7.99091C0.500063 12.138 3.86256 15.5 8.01019 15.5C11.7247 15.5 14.8089 12.8035 15.4128 9.26154C15.4255 9.16541 15.4357 9.06879 15.4469 8.97182C15.5962 7.68401 15.4303 6.33041 14.9598 5.19851Z",fill:"url(#paint2_radial_466_21172)"}),c.createElement("path",{d:"M11.3101 6.08127C11.3265 6.09277 11.3413 6.10421 11.3567 6.11564C11.1683 5.78113 10.9336 5.47487 10.6596 5.20589C8.32502 2.87164 10.0474 0.144581 10.3379 0.00608106C10.3387 0.00495606 10.3405 0.0024248 10.341 0.00183105C8.45443 1.10671 7.81443 3.15061 7.75562 4.17321C7.84312 4.16714 7.93037 4.1598 8.01943 4.1598C9.42727 4.1598 10.6535 4.93386 11.3101 6.08127Z",fill:"url(#paint3_radial_466_21172)"}),c.createElement("path",{d:"M8.02405 6.54735C8.01177 6.73417 7.35173 7.37838 7.12092 7.37838C4.98533 7.37838 4.63867 8.6701 4.63867 8.6701C4.73327 9.75792 5.49058 10.6537 6.40777 11.1277C6.44961 11.1493 6.49195 11.1689 6.53433 11.1882C6.60698 11.2203 6.68054 11.2504 6.75492 11.2784C7.0694 11.3897 7.39881 11.4532 7.73214 11.4668C11.4753 11.6424 12.2005 6.99201 9.49917 5.64157C10.191 5.52126 10.909 5.79948 11.31 6.08117C10.6534 4.93385 9.4272 4.15979 8.01939 4.15979C7.93033 4.15979 7.84311 4.16713 7.75558 4.1732C7.00222 4.22499 6.28194 4.50255 5.68864 4.9697C5.80314 5.06657 5.93239 5.19607 6.2047 5.46432C6.71414 5.96642 8.02127 6.48635 8.02405 6.54735Z",fill:"url(#paint4_radial_466_21172)"}),c.createElement("path",{d:"M8.02405 6.54735C8.01177 6.73417 7.35173 7.37838 7.12092 7.37838C4.98533 7.37838 4.63867 8.6701 4.63867 8.6701C4.73327 9.75792 5.49058 10.6537 6.40777 11.1277C6.44961 11.1493 6.49195 11.1689 6.53433 11.1882C6.60698 11.2203 6.68054 11.2504 6.75492 11.2784C7.0694 11.3897 7.39881 11.4532 7.73214 11.4668C11.4753 11.6424 12.2005 6.99201 9.49917 5.64157C10.191 5.52126 10.909 5.79948 11.31 6.08117C10.6534 4.93385 9.4272 4.15979 8.01939 4.15979C7.93033 4.15979 7.84311 4.16713 7.75558 4.1732C7.00222 4.22499 6.28194 4.50255 5.68864 4.9697C5.80314 5.06657 5.93239 5.19607 6.2047 5.46432C6.71414 5.96642 8.02127 6.48635 8.02405 6.54735Z",fill:"url(#paint5_radial_466_21172)"}),c.createElement("path",{d:"M5.3385 4.71992C5.39081 4.75366 5.4427 4.78804 5.49416 4.82305C5.32298 4.22417 5.31571 3.59032 5.4731 2.98767C4.7016 3.33895 4.10153 3.89423 3.66528 4.38455C3.70138 4.38351 4.79072 4.36392 5.3385 4.71992Z",fill:"url(#paint6_radial_466_21172)"}),c.createElement("path",{d:"M0.569399 8.16902C1.14887 11.5933 4.25305 14.2078 7.77665 14.3076C11.0379 14.3999 13.1216 12.507 13.9821 10.6602C14.5384 9.46646 14.9245 7.51333 14.2159 5.59224L14.2156 5.59142L14.2146 5.58414C14.2138 5.57858 14.2134 5.57527 14.2135 5.57708C14.2135 5.5783 14.214 5.58133 14.215 5.58958C14.4813 7.32899 13.5965 9.01408 12.2134 10.1535L12.2092 10.1632C9.51406 12.3577 6.93502 11.4872 6.41284 11.1309C6.37613 11.1133 6.33967 11.0951 6.30346 11.0765C4.73215 10.3255 4.08302 8.89402 4.22221 7.66633C2.89543 7.66633 2.44302 6.5473 2.44302 6.5473C2.44302 6.5473 3.63424 5.69796 5.20421 6.43664C6.65827 7.1208 8.02384 6.54736 8.02399 6.5473C8.02121 6.4863 6.71409 5.96636 6.20452 5.4643C5.93224 5.19605 5.80296 5.06671 5.68846 4.96967C5.62634 4.91721 5.5614 4.86817 5.49393 4.8228C5.44241 4.78788 5.39052 4.7535 5.33827 4.71967C4.79052 4.36367 3.70115 4.38327 3.66505 4.38421H3.66159C3.36387 4.00711 3.38487 2.76317 3.40184 2.50346C3.39827 2.48736 3.17974 2.61689 3.15112 2.63642C2.8884 2.82395 2.6428 3.03435 2.41718 3.26517C2.16043 3.5256 1.92585 3.80698 1.71587 4.10639C1.71587 4.10677 1.71565 4.10721 1.71552 4.10758C1.71552 4.10717 1.71574 4.10677 1.71587 4.10639C1.23294 4.79075 0.890436 5.56403 0.708149 6.38155C0.704555 6.39783 0.437836 7.56411 0.569399 8.16902Z",fill:"url(#paint7_radial_466_21172)"}),c.createElement("path",{d:"M10.6595 5.2058C10.9335 5.47478 11.1682 5.78104 11.3566 6.11555C11.398 6.14662 11.4366 6.17759 11.4694 6.2078C13.172 7.77655 12.2799 9.9953 12.2134 10.1534C13.5965 9.01405 14.4813 7.32896 14.215 5.58955C13.3657 3.47293 11.9258 2.61943 10.7499 0.761053C10.6905 0.667084 10.631 0.572866 10.573 0.473553C10.5435 0.422834 10.5159 0.371004 10.4903 0.318178C10.4415 0.223861 10.4038 0.124166 10.3781 0.0211155C10.3782 0.0162369 10.3766 0.0114673 10.3734 0.00774353C10.3703 0.0040198 10.3658 0.00161108 10.361 0.000990505C10.3564 -0.000330168 10.3515 -0.000330168 10.3469 0.000990505C10.3458 0.0013655 10.3443 0.00258425 10.3431 0.00302176C10.3415 0.003678 10.3394 0.00517801 10.3376 0.00614676C10.0473 0.144522 8.32493 2.87158 10.6595 5.2058Z",fill:"url(#paint8_radial_466_21172)"}),c.createElement("path",{d:"M11.4694 6.20779C11.4366 6.17757 11.398 6.1466 11.3566 6.11554C11.3413 6.10404 11.3263 6.0926 11.31 6.08117C10.909 5.79948 10.1909 5.52126 9.49912 5.64157C12.2004 6.99201 11.4752 11.6424 7.73209 11.4668C7.39876 11.4532 7.06935 11.3897 6.75487 11.2784C6.6805 11.2504 6.60694 11.2203 6.53428 11.1882C6.4919 11.1689 6.44956 11.1493 6.40771 11.1277C6.40921 11.1287 6.41128 11.1299 6.41281 11.1308C6.935 11.4871 9.51403 12.3576 12.2092 10.1631L12.2133 10.1534C12.2799 9.99542 13.1719 7.77657 11.4694 6.20779Z",fill:"url(#paint9_radial_466_21172)"}),c.createElement("path",{d:"M4.63871 8.67006C4.63871 8.67006 4.98537 7.37834 7.12096 7.37834C7.35183 7.37834 8.01187 6.73412 8.02408 6.54731C8.0363 6.36049 6.65846 7.12081 5.2043 6.43665C3.63433 5.69796 2.44312 6.54731 2.44312 6.54731C2.44312 6.54731 2.89552 7.66634 4.2223 7.66634C4.08315 8.89402 4.73227 10.3257 6.30355 11.0765C6.33868 11.0932 6.37168 11.1116 6.40774 11.1277C5.49062 10.6537 4.7333 9.75787 4.63871 8.67006Z",fill:"url(#paint10_radial_466_21172)"}),c.createElement("path",{d:"M14.9597 5.19849C14.6333 4.41337 13.9722 3.56574 13.4531 3.29783C13.8756 4.12612 14.1201 4.95699 14.2136 5.57708C14.2136 5.5783 14.214 5.58133 14.215 5.58958C13.3658 3.47293 11.9258 2.61943 10.75 0.761053C10.6906 0.667084 10.6311 0.572865 10.5731 0.473553C10.5436 0.422834 10.516 0.371004 10.4904 0.318178C10.4416 0.223861 10.4039 0.124166 10.3781 0.0211155C10.3783 0.0162369 10.3767 0.0114673 10.3735 0.00774353C10.3703 0.0040198 10.3659 0.00161108 10.3611 0.000990505C10.3565 -0.000330168 10.3516 -0.000330168 10.347 0.000990505C10.3459 0.0013655 10.3443 0.00258425 10.3432 0.00302175C10.3416 0.003678 10.3395 0.005178 10.3377 0.00614675C10.3386 0.00502175 10.3403 0.0024905 10.3408 0.00189675C8.45428 1.10677 7.81428 3.15068 7.75547 4.17327C7.84297 4.16721 7.93022 4.15987 8.01928 4.15987C9.42719 4.15987 10.6534 4.93393 11.3099 6.08124C10.9089 5.79955 10.1908 5.52133 9.49906 5.64165C12.2003 6.99208 11.4752 11.6425 7.73203 11.4669C7.3987 11.4533 7.06929 11.3898 6.75481 11.2784C6.68044 11.2505 6.60688 11.2204 6.53422 11.1882C6.49184 11.1689 6.4495 11.1494 6.40766 11.1278C6.40916 11.1288 6.41122 11.13 6.41275 11.1309C6.37605 11.1132 6.33958 11.0951 6.30337 11.0764C6.3385 11.0932 6.3715 11.1116 6.40756 11.1276C5.49038 10.6536 4.73306 9.75786 4.63847 8.67005C4.63847 8.67005 4.98513 7.37833 7.12072 7.37833C7.35159 7.37833 8.01162 6.73412 8.02384 6.5473C8.02106 6.4863 6.71394 5.96637 6.20437 5.4643C5.93209 5.19605 5.80281 5.06671 5.68831 4.96968C5.62619 4.91721 5.56125 4.86818 5.49378 4.8228C5.3226 4.22393 5.31533 3.59008 5.47272 2.98743C4.70122 3.33871 4.10116 3.89399 3.66491 4.3843H3.66144C3.36372 4.00721 3.38472 2.76327 3.40169 2.50355C3.39812 2.48746 3.17959 2.61699 3.15097 2.63652C2.88825 2.82404 2.64265 3.03445 2.41703 3.26527C2.16036 3.52567 1.92585 3.80702 1.71594 4.1064C1.71594 4.10677 1.71572 4.10721 1.71559 4.10758C1.71559 4.10718 1.71581 4.10677 1.71594 4.1064C1.23301 4.79075 0.890506 5.56404 0.708219 6.38155C0.704625 6.39783 0.701594 6.41471 0.698094 6.43112C0.683969 6.49724 0.620406 6.83277 0.611531 6.90474C0.610844 6.91027 0.612187 6.89924 0.611531 6.90474C0.553567 7.25147 0.516583 7.60137 0.500781 7.95255C0.500781 7.96537 0.5 7.97805 0.5 7.9909C0.5 12.138 3.8625 15.5 8.01012 15.5C11.7247 15.5 14.8089 12.8035 15.4127 9.26152C15.4254 9.1654 15.4356 9.06877 15.4468 8.9718C15.5961 7.68399 15.4302 6.3304 14.9597 5.19849ZM14.2147 5.58415C14.2151 5.5868 14.2155 5.58958 14.2159 5.59224L14.2157 5.59143L14.2147 5.58415Z",fill:"url(#paint11_linear_466_21172)"}),c.createElement("defs",null,c.createElement("linearGradient",{id:"paint0_linear_466_21172",x1:"13.5874",y1:"2.40249",x2:"1.52839",y2:"14.0351",gradientUnits:"userSpaceOnUse"},c.createElement("stop",{offset:"0.05",stopColor:"#FFF44F"}),c.createElement("stop",{offset:"0.37",stopColor:"#FF980E"}),c.createElement("stop",{offset:"0.53",stopColor:"#FF3647"}),c.createElement("stop",{offset:"0.7",stopColor:"#E31587"})),c.createElement("radialGradient",{id:"paint1_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.8936 1.72781) scale(15.3601 15.6187)"},c.createElement("stop",{offset:"0.13",stopColor:"#FFBD4F"}),c.createElement("stop",{offset:"0.28",stopColor:"#FF980E"}),c.createElement("stop",{offset:"0.47",stopColor:"#FF3750"}),c.createElement("stop",{offset:"0.78",stopColor:"#EB0878"}),c.createElement("stop",{offset:"0.86",stopColor:"#E50080"})),c.createElement("radialGradient",{id:"paint2_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(6.43979 8.1787) scale(15.7441 15.6187)"},c.createElement("stop",{offset:"0.3",stopColor:"#960E18"}),c.createElement("stop",{offset:"0.35",stopColor:"#B11927",stopOpacity:"0.74"}),c.createElement("stop",{offset:"0.43",stopColor:"#DB293D",stopOpacity:"0.34"}),c.createElement("stop",{offset:"0.5",stopColor:"#F5334B",stopOpacity:"0.09"}),c.createElement("stop",{offset:"0.53",stopColor:"#FF3750",stopOpacity:"0"})),c.createElement("radialGradient",{id:"paint3_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.48415 -0.731827) scale(5.04157 8.55934)"},c.createElement("stop",{offset:"0.13",stopColor:"#FFF44F"}),c.createElement("stop",{offset:"0.53",stopColor:"#FF980E"})),c.createElement("radialGradient",{id:"paint4_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(6.15707 12.2109) scale(6.67134 7.31187)"},c.createElement("stop",{offset:"0.35",stopColor:"#3A8EE6"}),c.createElement("stop",{offset:"0.67",stopColor:"#9059FF"}),c.createElement("stop",{offset:"1",stopColor:"#C139E6"})),c.createElement("radialGradient",{id:"paint5_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.29699 6.57271) scale(3.54248 4.314)"},c.createElement("stop",{offset:"0.21",stopColor:"#9059FF",stopOpacity:"0"}),c.createElement("stop",{offset:"0.97",stopColor:"#6E008B",stopOpacity:"0.6"})),c.createElement("radialGradient",{id:"paint6_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.50592 1.1523) scale(5.30374 5.32259)"},c.createElement("stop",{offset:"0.1",stopColor:"#FFE226"}),c.createElement("stop",{offset:"0.79",stopColor:"#FF7139"})),c.createElement("radialGradient",{id:"paint7_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3495 -2.33951) scale(25.3212 21.2557)"},c.createElement("stop",{offset:"0.11",stopColor:"#FFF44F"}),c.createElement("stop",{offset:"0.46",stopColor:"#FF980E"}),c.createElement("stop",{offset:"0.72",stopColor:"#FF3647"}),c.createElement("stop",{offset:"0.9",stopColor:"#E31587"})),c.createElement("radialGradient",{id:"paint8_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(2.94576 4.67997) rotate(77.3946) scale(8.03354 34.7519)"},c.createElement("stop",{stopColor:"#FFF44F"}),c.createElement("stop",{offset:"0.3",stopColor:"#FF980E"}),c.createElement("stop",{offset:"0.57",stopColor:"#FF3647"}),c.createElement("stop",{offset:"0.74",stopColor:"#E31587"})),c.createElement("radialGradient",{id:"paint9_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.56027 3.06659) scale(14.5381 14.2827)"},c.createElement("stop",{offset:"0.14",stopColor:"#FFF44F"}),c.createElement("stop",{offset:"0.48",stopColor:"#FF980E"}),c.createElement("stop",{offset:"0.66",stopColor:"#FF3647"}),c.createElement("stop",{offset:"0.9",stopColor:"#E31587"})),c.createElement("radialGradient",{id:"paint10_radial_466_21172",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(11.3337 3.90193) scale(17.4743 15.6328)"},c.createElement("stop",{offset:"0.09",stopColor:"#FFF44F"}),c.createElement("stop",{offset:"0.63",stopColor:"#FF980E"})),c.createElement("linearGradient",{id:"paint11_linear_466_21172",x1:"12.5",y1:"2.16999",x2:"2.85701",y2:"12.7061",gradientUnits:"userSpaceOnUse"},c.createElement("stop",{offset:"0.17",stopColor:"#FFF44F",stopOpacity:"0.8"}),c.createElement("stop",{offset:"0.6",stopColor:"#FFF44F",stopOpacity:"0"}))));var Bo=e=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("circle",{cx:"8.00009",cy:"7.99997",r:"7.7037",fill:"url(#paint0_linear_466_21186)"}),c.createElement("ellipse",{cx:"8.00094",cy:"8.00094",rx:"7.06173",ry:"7.06173",fill:"url(#paint1_radial_466_21186)"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.07134 1.36353C8.03043 1.36353 7.99727 1.39669 7.99727 1.4376V2.56469C7.99727 2.6056 8.03043 2.63877 8.07134 2.63877C8.11225 2.63877 8.14542 2.6056 8.14542 2.56469V1.4376C8.14542 1.39669 8.11225 1.36353 8.07134 1.36353ZM8.07134 14.7792C8.11225 14.7792 8.14542 14.746 8.14542 14.7051V13.578C8.14542 13.5371 8.11225 13.5039 8.07134 13.5039C8.03043 13.5039 7.99727 13.5371 7.99727 13.578V14.7051C7.99727 14.746 8.03043 14.7792 8.07134 14.7792ZM8.64883 1.46214C8.65292 1.42143 8.68923 1.39175 8.72994 1.39584C8.77064 1.39993 8.80032 1.43625 8.79623 1.47695L8.74793 1.95766C8.74384 1.99836 8.70752 2.02804 8.66682 2.02395C8.62612 2.01986 8.59643 1.98355 8.60052 1.94284L8.64883 1.46214ZM7.41372 14.7468C7.45442 14.7509 7.49074 14.7213 7.49483 14.6806L7.54313 14.1998C7.54722 14.1591 7.51754 14.1228 7.47683 14.1187C7.43613 14.1146 7.39982 14.1443 7.39573 14.185L7.34742 14.6657C7.34333 14.7064 7.37301 14.7428 7.41372 14.7468ZM14.7051 7.99727C14.746 7.99727 14.7792 8.03043 14.7792 8.07134C14.7792 8.11225 14.746 8.14542 14.7051 8.14542H13.578C13.5371 8.14542 13.5039 8.11225 13.5039 8.07134C13.5039 8.03043 13.5371 7.99727 13.578 7.99727H14.7051ZM1.36353 8.07134C1.36353 8.11225 1.39669 8.14542 1.4376 8.14542H2.56469C2.6056 8.14542 2.63877 8.11225 2.63877 8.07134C2.63877 8.03043 2.6056 7.99727 2.56469 7.99727H1.4376C1.39669 7.99727 1.36353 8.03043 1.36353 8.07134ZM14.6806 8.64883C14.7213 8.65292 14.7509 8.68923 14.7468 8.72994C14.7428 8.77064 14.7064 8.80032 14.6657 8.79623L14.185 8.74793C14.1443 8.74384 14.1146 8.70752 14.1187 8.66682C14.1228 8.62612 14.1591 8.59643 14.1998 8.60052L14.6806 8.64883ZM1.39584 7.41372C1.39175 7.45442 1.42143 7.49074 1.46214 7.49483L1.94284 7.54313C1.98355 7.54722 2.01986 7.51754 2.02395 7.47683C2.02804 7.43613 1.99836 7.39982 1.95766 7.39573L1.47695 7.34742C1.43625 7.34333 1.39993 7.37301 1.39584 7.41372ZM12.7097 3.3282C12.7387 3.29927 12.7856 3.29927 12.8145 3.3282C12.8434 3.35713 12.8434 3.40403 12.8145 3.43296L12.0175 4.22994C11.9886 4.25887 11.9417 4.25887 11.9127 4.22994C11.8838 4.20101 11.8838 4.15411 11.9127 4.12518L12.7097 3.3282ZM3.3282 12.8145C3.35713 12.8434 3.40403 12.8434 3.43296 12.8145L4.22994 12.0175C4.25887 11.9886 4.25887 11.9417 4.22994 11.9127C4.20101 11.8838 4.15411 11.8838 4.12518 11.9127L3.3282 12.7097C3.29927 12.7387 3.29927 12.7856 3.3282 12.8145ZM13.1523 3.80568C13.1839 3.77973 13.2306 3.78433 13.2566 3.81595C13.2825 3.84757 13.2779 3.89425 13.2463 3.9202L12.8729 4.22664C12.8413 4.2526 12.7946 4.248 12.7686 4.21638C12.7427 4.18475 12.7473 4.13808 12.7789 4.11212L13.1523 3.80568ZM2.88614 12.3267C2.91209 12.3584 2.95876 12.363 2.99039 12.337L3.36378 12.0306C3.3954 12.0046 3.4 11.9579 3.37404 11.9263C3.34809 11.8947 3.30142 11.8901 3.26979 11.916L2.8964 12.2225C2.86478 12.2484 2.86018 12.2951 2.88614 12.3267ZM12.8145 12.7097C12.8434 12.7387 12.8434 12.7856 12.8145 12.8145C12.7856 12.8434 12.7387 12.8434 12.7097 12.8145L11.9127 12.0175C11.8838 11.9886 11.8838 11.9417 11.9127 11.9127C11.9417 11.8838 11.9886 11.8838 12.0175 11.9127L12.8145 12.7097ZM3.3282 3.3282C3.29927 3.35713 3.29927 3.40403 3.3282 3.43296L4.12518 4.22994C4.15411 4.25887 4.20101 4.25887 4.22994 4.22994C4.25887 4.20101 4.25887 4.15411 4.22994 4.12518L3.43296 3.3282C3.40403 3.29927 3.35713 3.29927 3.3282 3.3282ZM12.337 13.1523C12.363 13.1839 12.3584 13.2306 12.3267 13.2566C12.2951 13.2825 12.2484 13.2779 12.2225 13.2463L11.916 12.8729C11.8901 12.8413 11.8947 12.7946 11.9263 12.7686C11.9579 12.7427 12.0046 12.7473 12.0306 12.7789L12.337 13.1523ZM3.81595 2.88614C3.78433 2.91209 3.77973 2.95876 3.80568 2.99039L4.11212 3.36378C4.13808 3.3954 4.18475 3.4 4.21638 3.37404C4.248 3.34809 4.2526 3.30142 4.22664 3.26979L3.9202 2.8964C3.89425 2.86478 3.84757 2.86018 3.81595 2.88614ZM10.5415 1.91422C10.5572 1.87643 10.6005 1.85848 10.6383 1.87413C10.6761 1.88979 10.6941 1.93312 10.6784 1.97092L10.2471 3.01221C10.2314 3.05 10.1881 3.06795 10.1503 3.05229C10.1125 3.03664 10.0946 2.99331 10.1102 2.95551L10.5415 1.91422ZM5.50437 14.2686C5.54216 14.2842 5.58549 14.2663 5.60115 14.2285L6.03247 13.1872C6.04813 13.1494 6.03018 13.1061 5.99238 13.0904C5.95459 13.0747 5.91126 13.0927 5.8956 13.1305L5.46428 14.1718C5.44862 14.2096 5.46657 14.2529 5.50437 14.2686ZM11.1332 2.18598C11.1524 2.1499 11.1973 2.13628 11.2334 2.15557C11.2695 2.17486 11.2831 2.21974 11.2638 2.25582L11.0361 2.68183C11.0168 2.7179 10.9719 2.73152 10.9358 2.71223C10.8998 2.69295 10.8861 2.64806 10.9054 2.61199L11.1332 2.18598ZM4.90931 13.9871C4.94539 14.0064 4.99027 13.9928 5.00955 13.9567L5.23726 13.5307C5.25654 13.4946 5.24293 13.4497 5.20685 13.4305C5.17077 13.4112 5.12589 13.4248 5.1066 13.4609L4.8789 13.8869C4.85961 13.923 4.87323 13.9678 4.90931 13.9871ZM14.2285 10.5415C14.2663 10.5572 14.2842 10.6005 14.2686 10.6383C14.2529 10.6761 14.2096 10.6941 14.1718 10.6784L13.1305 10.2471C13.0927 10.2314 13.0747 10.1881 13.0904 10.1503C13.1061 10.1125 13.1494 10.0946 13.1872 10.1102L14.2285 10.5415ZM1.87412 5.50437C1.85846 5.54216 1.87641 5.58549 1.91421 5.60115L2.95551 6.03247C2.99331 6.04813 3.03664 6.03018 3.05229 5.99238C3.06795 5.95459 3.05 5.91126 3.0122 5.8956L1.9709 5.46428C1.9331 5.44862 1.88977 5.46657 1.87412 5.50437ZM13.9567 11.1332C13.9928 11.1524 14.0064 11.1973 13.9871 11.2334C13.9678 11.2695 13.923 11.2831 13.8869 11.2638L13.4609 11.0361C13.4248 11.0168 13.4112 10.9719 13.4305 10.9358C13.4497 10.8998 13.4946 10.8861 13.5307 10.9054L13.9567 11.1332ZM2.15557 4.90929C2.13628 4.94537 2.1499 4.99025 2.18598 5.00954L2.61199 5.23726C2.64806 5.25654 2.69295 5.24293 2.71223 5.20685C2.73152 5.17077 2.7179 5.12589 2.68183 5.1066L2.25582 4.87888C2.21974 4.8596 2.17486 4.87321 2.15557 4.90929ZM14.1718 5.46428C14.2096 5.44862 14.2529 5.46657 14.2686 5.50437C14.2842 5.54216 14.2663 5.58549 14.2285 5.60115L13.1872 6.03247C13.1494 6.04813 13.1061 6.03018 13.0904 5.99238C13.0747 5.95459 13.0927 5.91126 13.1305 5.8956L14.1718 5.46428ZM1.87413 10.6383C1.88979 10.6761 1.93312 10.6941 1.97092 10.6784L3.01221 10.2471C3.05 10.2314 3.06795 10.1881 3.05229 10.1503C3.03664 10.1125 2.99331 10.0946 2.95551 10.1102L1.91422 10.5415C1.87643 10.5572 1.85848 10.6005 1.87413 10.6383ZM14.3979 6.07477C14.4371 6.0629 14.4785 6.08501 14.4903 6.12416C14.5022 6.1633 14.4801 6.20467 14.441 6.21654L13.9787 6.35677C13.9396 6.36864 13.8982 6.34654 13.8863 6.30739C13.8744 6.26824 13.8965 6.22688 13.9357 6.215L14.3979 6.07477ZM1.65237 10.0185C1.66425 10.0577 1.70561 10.0798 1.74476 10.0679L2.20699 9.92769C2.24614 9.91581 2.26825 9.87445 2.25637 9.8353C2.2445 9.79615 2.20313 9.77404 2.16399 9.78592L1.70175 9.92615C1.6626 9.93802 1.64049 9.97939 1.65237 10.0185ZM10.6383 14.2686C10.6005 14.2842 10.5572 14.2663 10.5415 14.2285L10.1102 13.1872C10.0946 13.1494 10.1125 13.1061 10.1503 13.0904C10.1881 13.0747 10.2314 13.0927 10.2471 13.1305L10.6784 14.1718C10.6941 14.2096 10.6761 14.2529 10.6383 14.2686ZM5.50437 1.87413C5.46657 1.88979 5.44862 1.93312 5.46428 1.97092L5.8956 3.01221C5.91126 3.05 5.95459 3.06795 5.99238 3.05229C6.03018 3.03664 6.04813 2.99331 6.03247 2.95551L5.60115 1.91422C5.58549 1.87643 5.54216 1.85848 5.50437 1.87413ZM10.0679 14.3979C10.0798 14.4371 10.0577 14.4785 10.0185 14.4903C9.97939 14.5022 9.93802 14.4801 9.92615 14.441L9.78592 13.9787C9.77404 13.9396 9.79615 13.8982 9.8353 13.8863C9.87445 13.8744 9.91581 13.8965 9.92769 13.9357L10.0679 14.3979ZM6.12417 1.65237C6.08502 1.66424 6.06291 1.70561 6.07479 1.74475L6.215 2.20699C6.22688 2.24614 6.26824 2.26825 6.30739 2.25637C6.34654 2.2445 6.36864 2.20314 6.35677 2.16399L6.21656 1.70175C6.20468 1.6626 6.16332 1.64049 6.12417 1.65237ZM9.29287 1.55062C9.30085 1.5105 9.33985 1.48444 9.37997 1.49242C9.4201 1.5004 9.44615 1.5394 9.43817 1.57952L9.21829 2.68496C9.21031 2.72508 9.17131 2.75114 9.13119 2.74316C9.09107 2.73518 9.06501 2.69618 9.07299 2.65606L9.29287 1.55062ZM6.76272 14.6503C6.80284 14.6583 6.84184 14.6322 6.84982 14.5921L7.0697 13.4866C7.07768 13.4465 7.05162 13.4075 7.0115 13.3995C6.97137 13.3916 6.93238 13.4176 6.9244 13.4577L6.70452 14.5632C6.69654 14.6033 6.72259 14.6423 6.76272 14.6503ZM9.92615 1.70175C9.93802 1.6626 9.97939 1.64049 10.0185 1.65237C10.0577 1.66425 10.0798 1.70561 10.0679 1.74476L9.92769 2.20699C9.91581 2.24614 9.87445 2.26825 9.8353 2.25637C9.79615 2.2445 9.77404 2.20313 9.78592 2.16399L9.92615 1.70175ZM6.12417 14.4903C6.16332 14.5022 6.20469 14.4801 6.21656 14.441L6.35677 13.9787C6.36864 13.9396 6.34653 13.8982 6.30739 13.8863C6.26824 13.8744 6.22687 13.8965 6.215 13.9357L6.07479 14.398C6.06291 14.4371 6.08502 14.4785 6.12417 14.4903ZM14.5921 9.29287C14.6322 9.30085 14.6583 9.33985 14.6503 9.37997C14.6423 9.4201 14.6033 9.44615 14.5632 9.43817L13.4577 9.21829C13.4176 9.21031 13.3916 9.17131 13.3995 9.13119C13.4075 9.09107 13.4465 9.06501 13.4866 9.07299L14.5921 9.29287ZM1.49242 6.76272C1.48444 6.80284 1.5105 6.84184 1.55062 6.84982L2.65606 7.0697C2.69618 7.07768 2.73518 7.05162 2.74316 7.0115C2.75114 6.97137 2.72508 6.93238 2.68496 6.9244L1.57952 6.70452C1.5394 6.69654 1.5004 6.72259 1.49242 6.76272ZM14.441 9.92615C14.4801 9.93802 14.5022 9.97939 14.4903 10.0185C14.4785 10.0577 14.4371 10.0798 14.3979 10.0679L13.9357 9.92769C13.8965 9.91581 13.8744 9.87445 13.8863 9.8353C13.8982 9.79615 13.9396 9.77404 13.9787 9.78592L14.441 9.92615ZM1.65237 6.12415C1.64049 6.1633 1.6626 6.20467 1.70175 6.21654L2.16399 6.35677C2.20313 6.36864 2.2445 6.34654 2.25637 6.30739C2.26825 6.26824 2.24614 6.22688 2.20699 6.215L1.74476 6.07477C1.70561 6.0629 1.66425 6.08501 1.65237 6.12415ZM13.5459 4.32424C13.58 4.30151 13.626 4.31066 13.6487 4.34468C13.6714 4.37869 13.6623 4.42469 13.6282 4.44742L12.6911 5.0736C12.6571 5.09633 12.6111 5.08718 12.5884 5.05317C12.5656 5.01915 12.5748 4.97315 12.6088 4.95042L13.5459 4.32424ZM2.494 11.798C2.51673 11.832 2.56273 11.8412 2.59675 11.8184L3.53389 11.1923C3.56791 11.1695 3.57706 11.1235 3.55433 11.0895C3.5316 11.0555 3.4856 11.0464 3.45159 11.0691L2.51444 11.6953C2.48043 11.718 2.47128 11.764 2.494 11.798ZM13.8869 4.87888C13.923 4.8596 13.9678 4.87321 13.9871 4.90929C14.0064 4.94537 13.9928 4.99025 13.9567 5.00954L13.5307 5.23726C13.4946 5.25654 13.4497 5.24293 13.4305 5.20685C13.4112 5.17077 13.4248 5.12589 13.4609 5.1066L13.8869 4.87888ZM2.15557 11.2334C2.17486 11.2695 2.21974 11.2831 2.25582 11.2638L2.68183 11.0361C2.7179 11.0168 2.73152 10.9719 2.71223 10.9358C2.69295 10.8998 2.64806 10.8861 2.61199 10.9054L2.18598 11.1332C2.1499 11.1524 2.13628 11.1973 2.15557 11.2334ZM11.8184 13.5459C11.8412 13.58 11.832 13.626 11.798 13.6487C11.764 13.6714 11.718 13.6623 11.6953 13.6282L11.0691 12.6911C11.0464 12.6571 11.0555 12.6111 11.0895 12.5884C11.1235 12.5656 11.1695 12.5748 11.1923 12.6088L11.8184 13.5459ZM4.34468 2.494C4.31066 2.51673 4.30151 2.56273 4.32424 2.59675L4.95042 3.53389C4.97315 3.56791 5.01915 3.57706 5.05317 3.55433C5.08718 3.5316 5.09633 3.4856 5.0736 3.45159L4.44742 2.51444C4.42469 2.48043 4.37869 2.47128 4.34468 2.494ZM11.2638 13.8869C11.2831 13.923 11.2695 13.9678 11.2334 13.9871C11.1973 14.0064 11.1524 13.9928 11.1331 13.9567L10.9054 13.5307C10.8861 13.4946 10.8998 13.4497 10.9358 13.4305C10.9719 13.4112 11.0168 13.4248 11.0361 13.4609L11.2638 13.8869ZM4.90931 2.15557C4.87323 2.17485 4.85961 2.21974 4.8789 2.25581L5.1066 2.68182C5.12589 2.7179 5.17077 2.73152 5.20685 2.71223C5.24293 2.69295 5.25654 2.64807 5.23726 2.61199L5.00955 2.18598C4.99027 2.1499 4.94539 2.13628 4.90931 2.15557ZM11.6953 2.51444C11.718 2.48043 11.764 2.47128 11.798 2.494C11.832 2.51673 11.8412 2.56273 11.8184 2.59675L11.1923 3.53389C11.1695 3.56791 11.1235 3.57706 11.0895 3.55433C11.0555 3.5316 11.0464 3.4856 11.0691 3.45159L11.6953 2.51444ZM4.34468 13.6487C4.37869 13.6714 4.42469 13.6623 4.44742 13.6282L5.0736 12.6911C5.09633 12.6571 5.08718 12.6111 5.05317 12.5884C5.01915 12.5656 4.97315 12.5748 4.95042 12.6088L4.32424 13.5459C4.30151 13.58 4.31066 13.626 4.34468 13.6487ZM12.2225 2.8964C12.2484 2.86478 12.2951 2.86018 12.3267 2.88614C12.3584 2.91209 12.363 2.95876 12.337 2.99039L12.0306 3.36378C12.0046 3.3954 11.9579 3.4 11.9263 3.37404C11.8947 3.34809 11.8901 3.30142 11.916 3.26979L12.2225 2.8964ZM3.81595 13.2566C3.84757 13.2825 3.89425 13.2779 3.9202 13.2463L4.22664 12.8729C4.2526 12.8413 4.248 12.7946 4.21638 12.7686C4.18475 12.7427 4.13808 12.7473 4.11212 12.7789L3.80568 13.1523C3.77973 13.1839 3.78433 13.2306 3.81595 13.2566ZM13.6282 11.6953C13.6623 11.718 13.6714 11.764 13.6487 11.798C13.626 11.832 13.58 11.8412 13.5459 11.8184L12.6088 11.1923C12.5748 11.1695 12.5656 11.1235 12.5884 11.0895C12.6111 11.0555 12.6571 11.0464 12.6911 11.0691L13.6282 11.6953ZM2.494 4.34468C2.47128 4.37869 2.48043 4.42469 2.51444 4.44742L3.45159 5.0736C3.4856 5.09633 3.5316 5.08718 3.55433 5.05317C3.57706 5.01915 3.56791 4.97315 3.53389 4.95042L2.59675 4.32424C2.56273 4.30151 2.51673 4.31066 2.494 4.34468ZM13.2463 12.2225C13.2779 12.2484 13.2825 12.2951 13.2566 12.3267C13.2306 12.3584 13.1839 12.363 13.1523 12.337L12.7789 12.0306C12.7473 12.0046 12.7427 11.9579 12.7686 11.9263C12.7946 11.8947 12.8413 11.8901 12.8729 11.916L13.2463 12.2225ZM2.88614 3.81595C2.86018 3.84757 2.86478 3.89425 2.8964 3.9202L3.26979 4.22664C3.30142 4.2526 3.34809 4.248 3.37404 4.21638C3.4 4.18475 3.3954 4.13808 3.36378 4.11212L2.99039 3.80568C2.95876 3.77973 2.91209 3.78433 2.88614 3.81595ZM14.5632 6.70452C14.6033 6.69654 14.6423 6.72259 14.6503 6.76272C14.6583 6.80284 14.6322 6.84184 14.5921 6.84982L13.4866 7.0697C13.4465 7.07768 13.4075 7.05162 13.3995 7.0115C13.3916 6.97137 13.4176 6.93238 13.4577 6.9244L14.5632 6.70452ZM1.49242 9.37997C1.5004 9.4201 1.5394 9.44615 1.57952 9.43817L2.68496 9.21829C2.72508 9.21031 2.75114 9.17131 2.74316 9.13119C2.73518 9.09107 2.69618 9.06501 2.65606 9.07299L1.55062 9.29287C1.5105 9.30085 1.48444 9.33985 1.49242 9.37997ZM14.6657 7.34742C14.7064 7.34333 14.7428 7.37301 14.7468 7.41372C14.7509 7.45442 14.7213 7.49074 14.6806 7.49483L14.1998 7.54313C14.1591 7.54722 14.1228 7.51754 14.1187 7.47683C14.1146 7.43613 14.1443 7.39982 14.185 7.39573L14.6657 7.34742ZM1.39584 8.72994C1.39993 8.77064 1.43625 8.80032 1.47695 8.79623L1.95766 8.74793C1.99836 8.74384 2.02804 8.70752 2.02395 8.66682C2.01986 8.62612 1.98355 8.59643 1.94284 8.60052L1.46214 8.64883C1.42143 8.65292 1.39175 8.68923 1.39584 8.72994ZM9.43817 14.5632C9.44615 14.6033 9.4201 14.6423 9.37997 14.6503C9.33985 14.6583 9.30085 14.6322 9.29287 14.5921L9.07299 13.4866C9.06501 13.4465 9.09107 13.4075 9.13119 13.3995C9.17131 13.3916 9.21031 13.4176 9.21829 13.4577L9.43817 14.5632ZM6.76272 1.49242C6.72259 1.5004 6.69654 1.5394 6.70452 1.57952L6.9244 2.68496C6.93238 2.72508 6.97137 2.75114 7.0115 2.74316C7.05162 2.73518 7.07768 2.69618 7.0697 2.65606L6.84982 1.55062C6.84184 1.5105 6.80284 1.48444 6.76272 1.49242ZM8.79623 14.6657C8.80032 14.7064 8.77064 14.7428 8.72994 14.7468C8.68923 14.7509 8.65292 14.7213 8.64883 14.6806L8.60052 14.1998C8.59643 14.1591 8.62612 14.1228 8.66682 14.1187C8.70752 14.1146 8.74384 14.1443 8.74793 14.185L8.79623 14.6657ZM7.41372 1.39584C7.37301 1.39993 7.34333 1.43625 7.34742 1.47695L7.39573 1.95766C7.39982 1.99836 7.43613 2.02804 7.47683 2.02395C7.51754 2.01986 7.54722 1.98355 7.54313 1.94284L7.49483 1.46214C7.49074 1.42143 7.45442 1.39175 7.41372 1.39584Z",fill:"#DDDDDD"}),c.createElement("path",{d:"M3.14941 12.8505L7.29562 7.28674L7.99989 7.99218L3.14941 12.8505Z",fill:"#DDDDDD"}),c.createElement("path",{d:"M7.28662 7.29574L12.8504 3.14954L7.99204 8.00002L7.28662 7.29574Z",fill:"#EE4444"}),c.createElement("path",{d:"M12.8505 3.14954L8.70427 8.71332L8 8.00789L12.8505 3.14954Z",fill:"#CC0000"}),c.createElement("path",{d:"M3.14941 12.8505L8.7132 8.70427L8.00777 8L3.14941 12.8505Z",fill:"#AAAAAA"}),c.createElement("defs",null,c.createElement("linearGradient",{id:"paint0_linear_466_21186",x1:"0.300303",y1:"0.300951",x2:"0.300303",y2:"15.7084",gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#F8F8F8"}),c.createElement("stop",{offset:"1",stopColor:"#CCCCCC"})),c.createElement("radialGradient",{id:"paint1_radial_466_21186",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.00216 8.0046) scale(7.06173)"},c.createElement("stop",{stopColor:"#00F0FF"}),c.createElement("stop",{offset:"1",stopColor:"#0070E0"}))));var xo={["CHROME"]:c.createElement(Co,{alt:"Chrome"}),["FIREFOX"]:c.createElement(vo,{alt:"Firefox"}),["SAFARI"]:c.createElement(Bo,{alt:"Safari"}),["EDGE"]:c.createElement(ko,{alt:"Edge"})},Bs=styled.div(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:6,height:16,margin:"6px 7px",color:`${e.color.defaultText}99`,svg:{verticalAlign:"top"}})),To=styled.span({display:"none","@container (min-width: 300px)":{display:"inline-block"}}),Io=({isAccepted:e,selectedBrowser:t,browserResults:n,onSelectBrowser:r})=>{let o=Me(n.map(({result:a})=>a));if(!o)return null;let i=xo[t.key];!e&&o!=="EQUAL"&&(i=c.createElement(Xe,{status:o},i));let s=n.length>1&&n.map(({browser:a,result:d})=>({active:t===a,id:a.id,onClick:()=>r(a),right:!e&&d!=="EQUAL"&&c.createElement(Pt,{status:d}),icon:xo[a.key],title:a.name}));return c.createElement(WithTooltip,{key:t.key,hasChrome:!1,placement:"top",trigger:"hover",tooltip:c.createElement(TooltipNote,{note:s?"Switch browser":`Tested in ${n[0].browser.name}`})},s?c.createElement(Se,{placement:"bottom",links:s},i,c.createElement(To,null,t.name),c.createElement(zt,{icon:"arrowdown"})):c.createElement(Bs,null,i,c.createElement(To,null,t.name)))};var Is=styled.div(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:6,height:14,margin:"7px 7px",color:`${e.color.defaultText}99`,svg:{verticalAlign:"top"}})),wo=styled.span({display:"none","@container (min-width: 300px)":{display:"inline-block"}}),No=({isAccepted:e,modeOrder:t,modeResults:n,onSelectMode:r,selectedMode:o})=>{let i=Me(n.map(({result:d})=>d));if(!i)return null;let s=c.createElement(Icon,{icon:"diamond"});!e&&i!=="EQUAL"&&(s=c.createElement(Xe,{status:i},s));let a=n.length>1&&n.map(({mode:d,result:l})=>({id:d.name,title:d.name,right:!e&&l!=="EQUAL"&&c.createElement(Pt,{status:l}),onClick:()=>r(d),active:o.name===d.name})).sort((d,l)=>{if(!t)return 0;let p=t.indexOf(d.title),u=t.indexOf(l.title);return p!==-1&&u!==-1?p-u:0});return c.createElement(WithTooltip,{key:o.name,hasChrome:!1,placement:"top",trigger:"hover",tooltip:c.createElement(TooltipNote,{note:a?"Switch mode":`View mode: ${n[0].mode.name}`})},a?c.createElement(Se,{placement:"bottom",links:a},s,c.createElement(wo,null,o.name),c.createElement(zt,{icon:"arrowdown"})):c.createElement(Is,null,s,c.createElement(wo,null,o.name)))};var bn=({setAccessToken:e})=>{let t=Ie(),{browserResults:n,modeResults:r}=t.summary;return c.createElement(M,{last:!0},c.createElement(vt,null,r.length>0&&c.createElement(No,{isAccepted:t.summary.status==="ACCEPTED",modeOrder:t.modeOrder,selectedMode:t.selectedTest.mode,modeResults:r,onSelectMode:t.onSelectMode}),n.length>0&&c.createElement(Io,{isAccepted:t.summary.status==="ACCEPTED",selectedBrowser:t.selectedComparison.browser,browserResults:n,onSelectBrowser:t.onSelectBrowser}),c.createElement(ae,{push:!0},c.createElement(_t,{setAccessToken:e}))))};function et(){return et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},et.apply(this,arguments)}function Cn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ce(e,t)}function kn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ce(e,t);}function ft(e){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ft(e)}function vn(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Bn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return !1;if(typeof Proxy=="function")return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return !1}}function tt(e,t,n){return Bn()?tt=Reflect.construct.bind():tt=function(o,i,s){var a=[null];a.push.apply(a,i);var d=Function.bind.apply(o,a),l=new d;return s&&Ce(l,s.prototype),l},tt.apply(null,arguments)}function gt(e){var t=typeof Map=="function"?new Map:void 0;return gt=function(r){if(r===null||!vn(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,o);}function o(){return tt(r,arguments,ft(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Ce(o,r)},gt(e)}var fe=function(e){kn(t,e);function t(n){var r;r=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this;return Cn(r)}return t}(gt(Error));function xn(e){return Math.round(e*255)}function ws(e,t,n){return xn(e)+","+xn(t)+","+xn(n)}function yt(e,t,n,r){if(r===void 0&&(r=ws),t===0)return r(n,n,n);var o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*t,s=i*(1-Math.abs(o%2-1)),a=0,d=0,l=0;o>=0&&o<1?(a=i,d=s):o>=1&&o<2?(a=s,d=i):o>=2&&o<3?(d=i,l=s):o>=3&&o<4?(d=s,l=i):o>=4&&o<5?(a=s,l=i):o>=5&&o<6&&(a=i,l=s);var p=n-i/2,u=a+p,m=d+p,f=l+p;return r(u,m,f)}var Ao={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function _s(e){if(typeof e!="string")return e;var t=e.toLowerCase();return Ao[t]?"#"+Ao[t]:e}var Ns=/^#[a-fA-F0-9]{6}$/,As=/^#[a-fA-F0-9]{8}$/,Ls=/^#[a-fA-F0-9]{3}$/,Ps=/^#[a-fA-F0-9]{4}$/,Tn=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,Ds=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,Es=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Ms=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Lo(e){if(typeof e!="string")throw new fe(3);var t=_s(e);if(t.match(Ns))return {red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(As)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return {red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(Ls))return {red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Ps)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return {red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=Tn.exec(t);if(o)return {red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var i=Ds.exec(t.substring(0,50));if(i)return {red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])>1?parseFloat(""+i[4])/100:parseFloat(""+i[4])};var s=Es.exec(t);if(s){var a=parseInt(""+s[1],10),d=parseInt(""+s[2],10)/100,l=parseInt(""+s[3],10)/100,p="rgb("+yt(a,d,l)+")",u=Tn.exec(p);if(!u)throw new fe(4,t,p);return {red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10)}}var m=Ms.exec(t.substring(0,50));if(m){var f=parseInt(""+m[1],10),S=parseInt(""+m[2],10)/100,b=parseInt(""+m[3],10)/100,v="rgb("+yt(f,S,b)+")",h=Tn.exec(v);if(!h)throw new fe(4,t,v);return {red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+m[4])>1?parseFloat(""+m[4])/100:parseFloat(""+m[4])}}throw new fe(5)}function Os(e){var t=e.red/255,n=e.green/255,r=e.blue/255,o=Math.max(t,n,r),i=Math.min(t,n,r),s=(o+i)/2;if(o===i)return e.alpha!==void 0?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var a,d=o-i,l=s>.5?d/(2-o-i):d/(o+i);switch(o){case t:a=(n-r)/d+(n<r?6:0);break;case n:a=(r-t)/d+2;break;default:a=(t-n)/d+4;break}return a*=60,e.alpha!==void 0?{hue:a,saturation:l,lightness:s,alpha:e.alpha}:{hue:a,saturation:l,lightness:s}}function Po(e){return Os(Lo(e))}var js=function(t){return t.length===7&&t[1]===t[2]&&t[3]===t[4]&&t[5]===t[6]?"#"+t[1]+t[3]+t[5]:t},In=js;function Ue(e){var t=e.toString(16);return t.length===1?"0"+t:t}function Fn(e){return Ue(Math.round(e*255))}function Us(e,t,n){return In("#"+Fn(e)+Fn(t)+Fn(n))}function Wt(e,t,n){return yt(e,t,n,Us)}function $s(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Wt(e,t,n);if(typeof e=="object"&&t===void 0&&n===void 0)return Wt(e.hue,e.saturation,e.lightness);throw new fe(1)}function Hs(e,t,n,r){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&typeof r=="number")return r>=1?Wt(e,t,n):"rgba("+yt(e,t,n)+","+r+")";if(typeof e=="object"&&t===void 0&&n===void 0&&r===void 0)return e.alpha>=1?Wt(e.hue,e.saturation,e.lightness):"rgba("+yt(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new fe(2)}function wn(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return In("#"+Ue(e)+Ue(t)+Ue(n));if(typeof e=="object"&&t===void 0&&n===void 0)return In("#"+Ue(e.red)+Ue(e.green)+Ue(e.blue));throw new fe(6)}function Vs(e,t,n,r){if(typeof e=="string"&&typeof t=="number"){var o=Lo(e);return "rgba("+o.red+","+o.green+","+o.blue+","+t+")"}else {if(typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&typeof r=="number")return r>=1?wn(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if(typeof e=="object"&&t===void 0&&n===void 0&&r===void 0)return e.alpha>=1?wn(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new fe(7)}var zs=function(t){return typeof t.red=="number"&&typeof t.green=="number"&&typeof t.blue=="number"&&(typeof t.alpha!="number"||typeof t.alpha>"u")},Ws=function(t){return typeof t.red=="number"&&typeof t.green=="number"&&typeof t.blue=="number"&&typeof t.alpha=="number"},Zs=function(t){return typeof t.hue=="number"&&typeof t.saturation=="number"&&typeof t.lightness=="number"&&(typeof t.alpha!="number"||typeof t.alpha>"u")},Gs=function(t){return typeof t.hue=="number"&&typeof t.saturation=="number"&&typeof t.lightness=="number"&&typeof t.alpha=="number"};function Do(e){if(typeof e!="object")throw new fe(8);if(Ws(e))return Vs(e);if(zs(e))return wn(e);if(Gs(e))return Hs(e);if(Zs(e))return $s(e);throw new fe(8)}function Eo(e,t,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length>=t?e.apply(this,o):Eo(e,t,o)}}function Mo(e){return Eo(e,e.length,[])}function Oo(e,t,n){return Math.max(e,Math.min(t,n))}function Qs(e,t){if(t==="transparent")return t;var n=Po(t);return Do(et({},n,{lightness:Oo(0,1,n.lightness-parseFloat(e))}))}var qs=Mo(Qs),nt=qs;function Js(e,t){if(t==="transparent")return t;var n=Po(t);return Do(et({},n,{lightness:Oo(0,1,n.lightness+parseFloat(e))}))}var Ks=Mo(Js),Zt=Ks;var Ys=({theme:e,secondary:t,status:n})=>t?{color:e.color.defaultText,backgroundColor:e.background.app,borderColor:e.base==="dark"?e.color.darker:e.color.medium,"&:hover":{color:e.color.defaultText,backgroundColor:nt(.03,e.background.app)}}:n==="positive"?{color:e.color.positiveText,backgroundColor:e.background.positive,borderColor:Zt(.5,e.color.positiveText),"&:hover":{color:e.color.positiveText,backgroundColor:nt(.05,e.background.positive)}}:n==="warning"?{color:e.color.warningText,backgroundColor:e.background.warning,borderColor:Zt(.5,e.color.warningText),"&:hover":{color:e.color.warningText,backgroundColor:nt(.05,e.background.warning)}}:{color:e.color.lightest,backgroundColor:e.color.secondary,borderWidth:0,borderColor:e.base==="dark"?nt(.1,e.color.secondary):Zt(.2,e.color.secondary),"&:hover":{color:e.color.lightest,backgroundColor:nt(.05,e.color.secondary)}},rt=styled(H)(({containsIcon:e})=>({border:"1px solid transparent",fontWeight:700,padding:e?"8px 6px":8,transition:"background-color 150ms","@container (min-width: 300px)":{height:32,width:e?32:"auto",padding:e?"9px 8px":9},"@container (min-width: 800px)":{height:28,width:e?28:"auto",padding:e?"8px 6px":8}}),Ys,({side:e})=>({...e==="left"&&{borderRightWidth:1,borderTopRightRadius:0,borderBottomRightRadius:0},...e==="right"&&{borderLeftWidth:0,borderTopLeftRadius:0,borderBottomLeftRadius:0}})),_n=styled.div({display:"flex",flexDirection:"row"});var{rotate360:tl}=animation,ot=styled.div(({theme:e})=>({width:12,height:12,margin:"3px 6px",verticalAlign:"top",display:"inline-block",animation:`${tl} 0.7s linear infinite`,border:"2px solid transparent",borderLeftColor:e.base==="dark"?"#58faf9":"#00aaff",borderBottomColor:"#25ccfd",borderRightColor:e.base==="dark"?"#00aaff":"#58faf9",borderRadius:"100%",transform:"translate3d(0, 0, 0)"}),({parentComponent:e})=>e&&css({margin:e==="IconButton"?1:0,borderWidth:1,borderLeftColor:"currentcolor",borderBottomColor:"currentcolor",borderRightColor:"currentcolor"}));var Gt=styled.div(({theme:e,width:t=14,height:n=14,marginLeft:r=7,marginRight:o=8})=>({display:"inline-block",backgroundColor:e.appBorderColor,borderRadius:3,animation:`${e.animation.glow} 1.5s ease-in-out infinite`,height:n,width:t,margin:7,marginLeft:r,marginRight:o}));var rl=styled.div(({theme:e})=>({gridArea:"label",margin:"8px 15px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:6,span:{display:"none","@container (min-width: 300px)":{display:"initial"}},"@container (min-width: 800px)":{borderLeft:`1px solid ${e.appBorderColor}`,paddingLeft:10,marginLeft:0}})),Uo=styled.div({gridArea:"controls",margin:"8px 15px",display:"flex",alignItems:"center",justifyContent:"flex-end",gap:6,"@container (min-width: 800px)":{margin:8}}),ol=styled.div(({theme:e})=>({gridArea:"actions",marginRight:15,display:"flex",alignItems:"center",justifyContent:"flex-end",gap:6,"@container (min-width: 300px)":{margin:"8px 15px"},"@container (min-width: 800px)":{borderLeft:`1px solid ${e.appBorderColor}`,paddingLeft:8,marginLeft:0}})),$o=({isOutdated:e,startDevBuild:t})=>{let{baselineImageVisible:n,diffVisible:r,focusVisible:o}=qe(),{toggleBaselineImage:i,toggleDiff:s,toggleFocus:a}=Te(),{selectedTest:d,selectedComparison:l,summary:p}=Ie(),{changeCount:u,isInProgress:m}=p,{isReviewing:f,buildIsReviewable:S,userCanReview:b,acceptTest:v,unacceptTest:h}=Vt();if(m)return c.createElement(Uo,null,c.createElement(Gt,null),c.createElement(Gt,null),c.createElement(Gt,null));let B=u>0&&d.status!=="ACCEPTED",g=u>0&&d.status==="ACCEPTED";return c.createElement(c.Fragment,null,c.createElement(rl,null,c.createElement(te,null,c.createElement("b",null,n?"Baseline":"Latest",c.createElement("span",null," snapshot")))),c.createElement(Uo,null,l?.result==="CHANGED"&&c.createElement(c.Fragment,null,c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:n?"Show latest snapshot":"Show baseline snapshot"}),trigger:"hover",hasChrome:!1},c.createElement(H,{"aria-label":n?"Show latest snapshot":"Show baseline snapshot",onClick:()=>i()},c.createElement(Icons,{icon:"transfer"}),"Switch")),c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:o?"Hide spotlight":"Show spotlight"}),trigger:"hover",hasChrome:!1},c.createElement(H,{active:o,"aria-label":o?"Hide spotlight":"Show spotlight",onClick:()=>a(!o)},c.createElement(Icons,{icon:"location"}))),c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:r?"Hide diff":"Show diff"}),trigger:"hover",hasChrome:!1},c.createElement(H,{active:r,"aria-label":r?"Hide diff":"Show diff",onClick:()=>s(!r)},c.createElement(Icons,{icon:"contrast"}))))),(B||g)&&c.createElement(ol,null,b&&S&&B&&c.createElement(_n,null,c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:"Accept this story"}),trigger:"hover",hasChrome:!1},c.createElement(rt,{disabled:f,"aria-label":"Accept this story",onClick:()=>v(d.id,"SPEC"),side:"left"},"Accept")),c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:"Batch accept options"}),trigger:"hover",hasChrome:!1},c.createElement(Se,{placement:"bottom",links:[{id:"acceptComponent",title:"Accept component",center:"Accept all unreviewed changes for this component",onClick:()=>v(d.id,"COMPONENT"),disabled:f,loading:f},{id:"acceptBuild",title:"Accept entire build",center:"Accept all unreviewed changes for every story in the Storybook",onClick:()=>v(d.id,"BUILD"),disabled:f,loading:f}]},U=>c.createElement(rt,{containsIcon:!0,active:U,disabled:f,"aria-label":"Batch accept options",side:"right"},f?c.createElement(ot,{parentComponent:"IconButton"}):c.createElement(Icons,{icon:"batchaccept"}))))),b&&S&&g&&c.createElement(_n,null,c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:"Unaccept this story"}),trigger:"hover",hasChrome:!1},c.createElement(rt,{disabled:f,"aria-label":"Unaccept this story",onClick:()=>h(d.id,"SPEC"),side:"left",status:"positive"},c.createElement(Icons,{icon:"undo"}),"Unaccept")),c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:"Batch unaccept options"}),trigger:"hover",hasChrome:!1},c.createElement(Se,{placement:"bottom",links:[{id:"unacceptComponent",title:"Unaccept component",center:"Unaccept all unreviewed changes for this component",onClick:()=>h(d.id,"COMPONENT"),disabled:f,loading:f},{id:"unacceptBuild",title:"Unaccept entire build",center:"Unaccept all unreviewed changes for every story in the Storybook",onClick:()=>h(d.id,"BUILD"),disabled:f,loading:f}]},U=>c.createElement(rt,{containsIcon:!0,active:U,disabled:f,"aria-label":"Batch unaccept options",side:"right",status:"positive"},f?c.createElement(ot,{parentComponent:"IconButton"}):c.createElement(Icons,{icon:"batchaccept"}))))),!(b&&S)&&c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:"Reviewing disabled"}),trigger:"hover",hasChrome:!1},c.createElement(H,{as:"span"},c.createElement(Icons,{icon:"lock"}))),c.createElement(WithTooltip,{tooltip:c.createElement(TooltipNote,{note:e?"Run new tests":"Rerun tests"}),trigger:"hover",hasChrome:!1},c.createElement(rt,{containsIcon:!0,secondary:!0,"aria-label":e?"Run new tests":"Rerun tests",onClick:()=>t()},c.createElement(Icons,{icon:e?"play":"sync"})))))};var Vo=e=>c.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"3px 6px",verticalAlign:"top"},...e},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6C12 9.31371 9.31371 12 6 12C2.68629 12 0 9.31371 0 6C0 2.68629 2.68629 0 6 0C9.31371 0 12 2.68629 12 6ZM5.57143 6.85714C5.57143 7.09384 5.76331 7.28571 6 7.28571C6.23669 7.28571 6.42857 7.09384 6.42857 6.85714L6.42857 3.42857C6.42857 3.19188 6.23669 3 6 3C5.76331 3 5.57143 3.19188 5.57143 3.42857V6.85714ZM5.35714 8.78572C5.35714 8.43067 5.64496 8.14286 6 8.14286C6.35504 8.14286 6.64286 8.43067 6.64286 8.78571C6.64286 9.14075 6.35504 9.42857 6 9.42857C5.64496 9.42857 5.35714 9.14075 5.35714 8.78572Z",fill:"#73828C"}));var zo=styled(Icons)(({icon:e,theme:t})=>({width:12,height:12,margin:"3px 3px 3px 6px",verticalAlign:"top",color:{passed:t.color.positive,changed:t.color.warning,failed:t.color.negative}[e]}));var qt=styled.div(({theme:e})=>({gridArea:"info",display:"flex",justifySelf:"start",justifyContent:"center",flexDirection:"column",margin:15,lineHeight:"18px",color:`${e.color.defaultText}99`,b:{color:`${e.color.defaultText}`},small:{fontSize:e.typography.size.s1},"@container (min-width: 800px)":{margin:"6px 10px 6px 15px",alignItems:"center",flexDirection:"row",small:{fontSize:"inherit"},"[data-hidden-large]":{display:"none"},"& > span:first-of-type":{display:"inline-flex",alignItems:"center",height:24,marginRight:6}}})),ul=styled.div({gridArea:"actions",display:"flex",justifySelf:"end",justifyContent:"center",alignItems:"start",margin:15,"@container (min-width: 800px)":{margin:"6px 15px 6px 0"}}),Zo=({isStarting:e,tests:t,startedAt:n,startDevBuild:r,isBuildFailed:o,shouldSwitchToLastBuildOnBranch:i,switchToLastBuildOnBranch:s})=>{let{status:a,isInProgress:d,changeCount:l,brokenCount:p,modeResults:u,browserResults:m}=Ke(t??[]),f=!e&&n&&formatDistance(new Date(n),new Date,{addSuffix:!0}),S=e||d,b=o||a==="FAILED",v=b||a==="BROKEN",h=v&&!S,B=S&&!b,g;return b?g=c.createElement(qt,null,c.createElement("span",null,c.createElement("b",null,"Build failed"),c.createElement(Vo,null)),c.createElement("small",null,c.createElement("span",null,"An infrastructure error occured"))):S?g=c.createElement(qt,null,c.createElement("span",null,c.createElement("b",null,"Running tests..."),c.createElement(ot,null)),c.createElement("small",null,c.createElement("span",null,"Test in progress..."))):i?g=c.createElement(qt,null,c.createElement("span",null,c.createElement("b",null,c.createElement(Link,{isButton:!0,onClick:s},"View latest snapshot"))),c.createElement("span",null,"Newer test results are available for this story")):g=c.createElement(qt,null,c.createElement("span",null,c.createElement("b",null,l?`${Qt("change",l,!0)}${a==="ACCEPTED"?" accepted":""}`:"No changes",p?`, ${Qt("error",p,!0)}`:null),c.createElement(zo,{icon:p?"failed":a==="PENDING"?"changed":"passed"})),c.createElement("small",null,u.length>0&&c.createElement("span",{"data-hidden-large":!0},Qt("mode",u.length,!0),", ",Qt("browser",m.length,!0)),u.length>0&&c.createElement("span",{"data-hidden-large":!0}," \u2022 "),d&&c.createElement("span",null,"Test in progress..."),!d&&n&&c.createElement("span",{title:new Date(n).toUTCString()},"Ran ",f))),c.createElement(c.Fragment,null,g,h&&c.createElement(ul,null,c.createElement($,{small:!0,secondary:!0,onClick:r,disabled:B},B?c.createElement(ot,{parentComponent:"Button",style:{marginRight:6}}):c.createElement(Icons,{icon:"play"}),v?"Rerun":"Run"," tests")))};var Go=styled.div(({theme:e})=>({display:"grid",gridTemplateAreas:`
280
+ "info info"
281
+ "actions actions"
282
+ "label controls"
283
+ `,gridTemplateColumns:"1fr fit-content(50%)",gridTemplateRows:"auto auto 40px",borderBottom:`1px solid ${e.appBorderColor}`,"@container (min-width: 300px)":{gridTemplateAreas:`
284
+ "info actions"
285
+ "label controls"
286
+ `,gridTemplateColumns:"1fr auto",gridTemplateRows:"auto 40px"},"@container (min-width: 800px)":{gridTemplateAreas:'"info label controls actions"',gridTemplateColumns:"auto 1fr auto auto",gridTemplateRows:"40px"}})),Qo=styled.div(({theme:e})=>({display:"grid",gridTemplateAreas:`
287
+ "header"
288
+ "main"
289
+ "footer"
290
+ `,gridTemplateColumns:"1fr",gridTemplateRows:"auto 1fr auto",height:"100%","&[hidden]":{display:"none"}})),qo=styled.div(({theme:e})=>({gridArea:"header",position:"sticky",zIndex:1,top:0,background:e.background.content,"@container (min-width: 800px)":{background:e.background.app}})),cl=styled.div(({theme:e})=>({gridArea:"main",overflowY:"auto",maxHeight:"100%"})),Jo=styled.div(({theme:e})=>({gridArea:"footer",position:"sticky",zIndex:1,bottom:0,borderTop:`1px solid ${e.appBorderColor}`,background:e.background.content})),ml=styled.div(({children:e,theme:t})=>({display:"flex",alignItems:"center",border:`0px solid ${t.appBorderColor}`,borderTopWidth:1,borderBottomWidth:e?1:0,height:e?40:0,padding:e?"0 15px":0})),fl=styled.div(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,color:e.color.defaultText,lineHeight:"18px",padding:15,whiteSpace:"pre-wrap",wordBreak:"break-word"})),Ln=styled.div(({theme:e})=>({background:e.background.warning,padding:"10px",lineHeight:"18px",position:"relative"})),Pn=styled(te)(({theme:e})=>({color:e.color.darkest})),Ko=({isOutdated:e,isStarting:t,startDevBuild:n,isBuildFailed:r,shouldSwitchToLastBuildOnBranch:o,switchToLastBuildOnBranch:i,setAccessToken:s,hidden:a,storyId:d})=>{let{baselineImageVisible:l,diffVisible:p,focusVisible:u}=qe(),{toggleBaselineImage:m,toggleSettings:f,toggleWarnings:S}=Te(),b=Nt(),v="startedAt"in b&&b.startedAt,h=Ie(),{tests:B}=h,g=c.useRef(d),U=c.useRef(h.selectedComparison?.id),J=c.useRef(b.id);c.useEffect(()=>{(g.current!==d||U.current!==h.selectedComparison?.id||J.current!==b.id)&&(m(!1),f(!1),S(!1)),U.current=h.selectedComparison?.id,g.current=d,J.current=b.id;},[b.id,d,h,m,f,S]);let R=c.createElement(Zo,{tests:B,startedAt:v,isStarting:t,startDevBuild:n,isBuildFailed:r,shouldSwitchToLastBuildOnBranch:o,switchToLastBuildOnBranch:i});if(t||!B.length)return c.createElement(Qo,{hidden:a},c.createElement(qo,null,c.createElement(Go,null,R)),c.createElement(Jo,null,c.createElement(bn,{setAccessToken:s})));let oe=Ke(B),{isInProgress:ee}=oe,{selectedTest:ie,selectedComparison:W}=h,_e=B.every(({result:nn,status:rn})=>nn==="ADDED"&&rn!=="ACCEPTED"),Ne=!_e&&ie.result==="ADDED"&&ie.status!=="ACCEPTED",ue=!_e&&W.result==="ADDED"&&ie.result!=="ADDED"&&ie.status!=="ACCEPTED",Ae=W?.headCapture?.captureError&&"error"in W?.headCapture?.captureError&&W?.headCapture?.captureError?.error;return c.createElement(Qo,{hidden:a},c.createElement(qo,null,c.createElement(Go,null,R,c.createElement($o,{isOutdated:e,startDevBuild:n}))),c.createElement(cl,null,ee&&c.createElement(Loader,null),!ee&&_e&&c.createElement(Ln,null,c.createElement(Pn,null,"New story found. Accept this snapshot as a test baseline."," ",c.createElement(Link$1,{href:"https://www.chromatic.com/docs/branching-and-baselines"},"Learn More \xBB"))),!ee&&Ne&&c.createElement(Ln,null,c.createElement(Pn,null,"New mode found. Accept this snapshot as a test baseline."," ",c.createElement(Link$1,{href:"https://www.chromatic.com/docs/branching-and-baselines"},"Learn More \xBB"))),!ee&&ue&&c.createElement(Ln,null,c.createElement(Pn,null,"New browser found. Accept this snapshot as a test baseline."," ",c.createElement(Link$1,{href:"https://www.chromatic.com/docs/branching-and-baselines"},"Learn More \xBB"))),!ee&&W&&c.createElement(bo,{key:W.id,componentName:ie.story?.component?.name,storyName:ie.story?.name,testUrl:ie.webUrl,comparisonResult:W.result??void 0,latestImage:W.headCapture?.captureImage??void 0,baselineImage:W.baseCapture?.captureImage??void 0,baselineImageVisible:l,diffImage:W.captureDiff?.diffImage??void 0,focusImage:W.captureDiff?.focusImage??void 0,diffVisible:p,focusVisible:u}),!ee&&Ae&&c.createElement(c.Fragment,null,c.createElement(ml,null,c.createElement("b",null,"Error stack trace")),c.createElement(fl,null,Ae.stack||Ae.message))),c.createElement(Jo,null,c.createElement(bn,{setAccessToken:s,...oe})))};var Yo=styled(Badge)({padding:"4px 8px",margin:"0 6px"});var Ro=({onClose:e})=>c.createElement(Ut,null,c.createElement(pt,null,c.createElement(ct,null,"Warnings",c.createElement(Yo,{status:"warning"},"2"),c.createElement(Ht,{onClick:e},c.createElement($t,{icon:"close","aria-label":"Close"}))),c.createElement("p",null,"It\u2019s essential that your components and stories render in a consistent fashion to prevent false positives. Two issues detected in this story may cause false positives."),c.createElement("p",null,c.createElement($,{outline:!0},c.createElement(Icons,{icon:"document"}),"Docs"),c.createElement($,{outline:!0},c.createElement(Icons,{icon:"support"}),"Get support"))));styled.div(({theme:e})=>({color:e.color.warning,background:e.background.warning,padding:"10px",lineHeight:"18px",position:"relative"}));var ei=({branch:e,dismissBuildError:t,isOutdated:n,localBuildProgress:r,switchToLastBuildOnBranch:o,startDevBuild:i,storyId:s,setAccessToken:a})=>{let{settingsVisible:d,warningsVisible:l}=qe(),{toggleSettings:p,toggleWarnings:u}=Te(),{lastBuildOnBranch:m,lastBuildOnBranchIsReady:f,lastBuildOnBranchIsSelectable:S}=to(),b=Nt(),v=Ie(),{buildIsReviewable:h,userCanReview:B}=Vt(),g=!!r&&r.currentStep!=="complete",U=!h&&f&&S&&!!o,J=m?.status==="IN_PROGRESS",R=g||!h&&!U,oe=r&&r?.buildId===m?.id,ee=R&&c.createElement(co,{branch:e,dismissBuildError:t,localBuildProgress:oe||g?r:void 0,lastBuildOnBranchInProgress:J,switchToLastBuildOnBranch:o}),ie=v?.hasTests&&v?.tests.length===0,W=b.id!==`Build:${r?.buildId}`;if(ie)return c.createElement(E,null,c.createElement(M,{grow:!0},c.createElement(A,null,c.createElement(L,null,"New story found"),c.createElement(_,null,"Take an image snapshot of this story to save its \u201Clast known good state\u201D as a test baseline. This unlocks visual regression testing so you can see exactly what has changed down to the pixel."),r&&W?c.createElement(Ot,{localBuildProgress:r}):c.createElement(c.Fragment,null,c.createElement("br",null),c.createElement($,{belowText:!0,small:!0,secondary:!0,onClick:()=>i(),disabled:g},"Create visual test")))),c.createElement(Y,{setAccessToken:a}));if(!!v?.tests?.find(rn=>rn.result==="SKIPPED"))return c.createElement(E,null,ee,c.createElement(M,{grow:!0},c.createElement(A,null,c.createElement(L,null,"This story was skipped"),c.createElement(_,null,"If you would like to resume testing it, comment out or remove `parameters.chromatic.disableSnapshot = true` from the CSF file."),c.createElement($,{belowText:!0,small:!0,tertiary:!0,containsIcon:!0,target:"_new",isLink:!0,href:"https://www.chromatic.com/docs/ignoring-elements#ignore-stories"},c.createElement(Icons,{icon:"document"}),"View Docs"))),c.createElement(Y,{setAccessToken:a}));let{status:Ne}=b,ue=["ANNOUNCED","PUBLISHED","PREPARED"].includes(Ne),Ae=Ne==="FAILED",nn=Ne==="PENDING"&&(!B||!h);return c.createElement(E,null,ee,!ee&&nn&&c.createElement(lo,null,B?c.createElement(c.Fragment,null,"Reviewing is disabled because there's a newer build on ",e,"."):c.createElement(c.Fragment,null,"You do not have permission to accept changes."," ",c.createElement(Link,{href:"https://www.chromatic.com/docs/collaborators#roles",target:"_blank",withArrow:!0},"Learn about roles"))),c.createElement(M,{grow:!0,last:!0,hidden:d||l},c.createElement(Ko,{hidden:d||l,isOutdated:n,isStarting:ue,startDevBuild:i,isBuildFailed:Ae,shouldSwitchToLastBuildOnBranch:U,switchToLastBuildOnBranch:o,selectedBuild:b,setAccessToken:a,storyId:s})),c.createElement(M,{grow:!0,last:!0,hidden:!d},c.createElement(mo,{onClose:()=>p(!1)})),c.createElement(M,{grow:!0,last:!0,hidden:!l},c.createElement(Ro,{onClose:()=>u(!1)})))};var Bl="https://www.chromatic.com/docs/setup/#troubleshooting",xl=styled.div(({theme:e})=>({display:"block",minWidth:"80%",color:e.color.darker,background:"#FFF5CF",border:"1px solid #E69D0033",borderRadius:"2px",padding:"15px 20px",margin:"10px 10px 18px 10px"})),ti=({queryError:e,hasData:t,hasProject:n,hasSelectedBuild:r,startDevBuild:o,localBuildProgress:i,branch:s,setAccessToken:a})=>{let d=()=>{let p=c.createElement($,{small:!0,secondary:!0,onClick:o},c.createElement(Icons,{icon:"play"}),"Take snapshots");if(!i)return c.createElement(c.Fragment,null,c.createElement("br",null),p);if(i.currentStep==="error"){let u=Array.isArray(i.originalError)?i.originalError[0]:i.originalError;return c.createElement(c.Fragment,null,c.createElement(xl,null,c.createElement("b",null,"Build failed:")," ",c.createElement("code",null,u?.message||"Unknown Error")," ",c.createElement(Link,{target:"_new",href:Bl,withArrow:!0},"Learn more")),p)}return c.createElement(Ot,{localBuildProgress:i})};return c.createElement(E,null,c.createElement(M,{grow:!0},(()=>e?.networkError?c.createElement(A,null,c.createElement(L,null,"Network error"),c.createElement(_,null,e.networkError.message),c.createElement("br",null),c.createElement(Link,{isButton:!0,onClick:()=>a(null),withArrow:!0},"Log out")):e?.graphQLErrors?.length?c.createElement(A,null,c.createElement(L,null,e.graphQLErrors[0].message),c.createElement(_,null,e.graphQLErrors[0].extensions.code==="FORBIDDEN"?"You may have insufficient permissions. Try logging out and back in again.":"Try logging out or clear your browser's local storage."),c.createElement("br",null),c.createElement(Link,{isButton:!0,onClick:()=>a(null),withArrow:!0},"Log out")):t?n?r?null:c.createElement(A,null,c.createElement(L,null,"Create a test baseline"),c.createElement(_,null,'Take an image snapshot of each story to save their "last known good state" as test baselines.'),d()):c.createElement(A,null,c.createElement(L,null,"Project not found"),c.createElement(_,null,"You may not have access to this project or it may not exist."),c.createElement("br",null),c.createElement(Link,{isButton:!0,onClick:()=>a(null),withArrow:!0},"Switch account")):c.createElement(Loader,null))()),c.createElement(Y,{setAccessToken:a,render:({menu:p})=>c.createElement(c.Fragment,null,c.createElement(ae,null,t&&!e&&n&&c.createElement(te,{style:{marginLeft:5}},"Waiting for build on ",s)),c.createElement(ae,{push:!0},p))}))};var wl=e=>Object.fromEntries(Object.entries(e).map(([t])=>[t,null])),_l=({buildIsReviewable:e,userCanReview:t,onReviewSuccess:n,onReviewError:r})=>{let[{fetching:o},i]=useMutation(Jr),s=useCallback(async l=>{try{if(!e)throw new Error("Build is not reviewable");if(!t)throw new Error("No permission to review tests");let{error:p}=await i({input:l});if(p)throw p;n?.(l);}catch(p){r?.(p,l);}},[n,r,i,e,t]),a=useCallback((l,p="SPEC")=>s({status:"ACCEPTED",testId:l,batch:p}),[s]),d=useCallback((l,p="SPEC")=>s({status:"PENDING",testId:l,batch:p}),[s]);return {isReviewing:o,acceptTest:a,unacceptTest:d,buildIsReviewable:e,userCanReview:t}},Nl=({isOutdated:e,selectedBuildInfo:t,setSelectedBuildInfo:n,dismissBuildError:r,localBuildProgress:o,startDevBuild:i,setAccessToken:s,setOutdated:a,updateBuildStatus:d,projectId:l,gitInfo:p,storyId:u})=>{let{addNotification:m}=useStorybookApi(),f=Rr({projectId:l,storyId:u,gitInfo:p,selectedBuildInfo:t}),{hasData:S,hasProject:b,hasSelectedBuild:v,lastBuildOnBranch:h,lastBuildOnBranchIsReady:B,lastBuildOnBranchIsSelectable:g,selectedBuild:U,selectedBuildMatchesGit:J,queryError:R,rerunQuery:oe,userCanReview:ee}=f,ie=_l({buildIsReviewable:!!U&&U.id===h?.id,userCanReview:ee,onReviewSuccess:oe,onReviewError:(ue,Ae)=>{ue instanceof Error&&m({id:"chromatic/errorAccepting",link:void 0,content:{headline:`Failed to ${Ae.status==="ACCEPTED"?"accept":"unaccept"} changes`,subHeadline:ue.message},icon:{name:"cross",color:"red"}});}});useEffect(()=>a(!J),[J,a]);let W=h&&"testsForStatus"in h&&h.testsForStatus?.nodes&&Le(Gr,h.testsForStatus.nodes),_e=g&&Mr(W||[]);useEffect(()=>{d(ue=>({...wl(ue),..._e}));},[JSON.stringify(_e),d]),useEffect(()=>{n(ue=>Or(ue,{shouldSwitchToLastBuildOnBranch:g&&B,lastBuildOnBranchId:h?.id,storyId:u}));},[g,B,h?.id,n,u]);let Ne=useCallback(()=>h?.id&&g&&n({buildId:h.id,storyId:u}),[n,g,h?.id,u]);return !U||!v||!S||R?c.createElement(ti,{queryError:R,hasData:S,hasProject:b,hasSelectedBuild:v,startDevBuild:i,localBuildProgress:o,branch:p.branch,setAccessToken:s}):c.createElement(So,{watchState:ie},c.createElement(no,{watchState:f},c.createElement(ei,{branch:p.branch,dismissBuildError:r,isOutdated:e,localBuildProgress:o,...g&&{switchToLastBuildOnBranch:Ne},startDevBuild:i,setAccessToken:s,storyId:u})))},ni=e=>{let[t,n]=useState();return c.createElement(Nl,{selectedBuildInfo:t,setSelectedBuildInfo:n,...e})};var ri="experimental_useSharedState_getValue",Yt="experimental_useSharedState_setValue",En=new Map,it=class{constructor(t){this.channel=t,this.listeners=[],this.state={},this.channel.on(Yt,(n,r,o)=>{this.state?.[n]?.index>=o||(this.state[n]={index:o,value:r});}),this.channel.on(ri,n=>{let r=this.state[n]?.index??0,o=this.state[n]?.value;this.channel.emit(Yt,n,o,r);});}get(t){return this.state[t]||this.channel.emit(ri,t),this.state[t]?.value}set(t,n){let r=(this.state[t]?.index??0)+1;this.state[t]={index:r,value:n},this.channel.emit(Yt,t,n,r);}static subscribe(t,n){let r=En.get(t)||new it(n);return En.has(t)||(En.set(t,r),r.channel.on(Yt,(o,i)=>{o===t&&r.listeners.forEach(s=>s(i));})),{get value(){return r.get(t)},set value(o){r.set(t,o);},on(o,i){if(o!=="change")throw new Error("unsupported event");r.listeners.push(i);},off(o,i){if(o!=="change")throw new Error("unsupported event");let s=r.listeners.indexOf(i);s>=0&&r.listeners.splice(s,1);}}}};function re(e){let t=useStorybookApi().getChannel();if(!t)throw new Error("Channel not available");let n=useRef(it.subscribe(e,t)),[r,o]=useState(n.current.value);return useEffect(()=>{let i=n.current;return i.on("change",o),()=>i.off("change",o)},[n]),[r,useCallback(i=>{o(i),n.current.value=i;},[])]}var Xt=()=>{let[e,t]=re(Vn),[n,r]=useState(!1),o=useCallback(d=>{r(!1),t({projectId:d});},[t]),{projectId:i,written:s,configFile:a}=e||{};return {loading:!e,projectId:i,configFile:a,updateProject:o,projectUpdatingFailed:!n&&s===!1,projectIdUpdated:!n&&s===!0,clearProjectIdUpdated:()=>r(!0)}};var oi=({active:e,api:t})=>{let[n,r]=Ft(),{storyId:o}=useStorybookState(),[i]=re(Hn),[s]=re(bt),[a]=re(st),[d,l]=re(kt),[,p]=re(st),u=useChannel({}),m=useCallback(oe=>t.experimental_updateStatus(x,oe),[t]),{loading:f,projectId:S,configFile:b,updateProject:v,projectUpdatingFailed:h,projectIdUpdated:B,clearProjectIdUpdated:g}=Xt(),[U,J]=useState();if(s)return console.error(s),c.createElement(Provider,{key:ge,value:Ge},c.createElement(E,{hidden:!e},c.createElement(vr,{gitInfoError:s,setAccessToken:r})));if(!n)return c.createElement(Provider,{key:ge,value:Ge},c.createElement(E,{hidden:!e},c.createElement(hr,{key:ge,setAccessToken:r,setCreatedProjectId:J,hasProjectId:!!S})));if(f||!i)return e?c.createElement(Spinner,null):null;if(!S)return c.createElement(Provider,{key:ge,value:Ge},c.createElement(E,{hidden:!e},c.createElement(_r,{createdProjectId:U,setCreatedProjectId:J,onUpdateProject:v,setAccessToken:r})));if(h){if(!b)throw new Error("Missing config file after configuration failure");return c.createElement(E,{hidden:!e},c.createElement(xr,{projectId:S,configFile:b,setAccessToken:r}))}if(B){if(!b)throw new Error("Missing config file after configuration success");return c.createElement(Provider,{key:ge,value:Ge},c.createElement(E,{hidden:!e},c.createElement(Br,{projectId:S,configFile:b,goToNext:g,setAccessToken:r})))}let R=i.branch===d?.branch;return c.createElement(Provider,{key:ge,value:Ge},c.createElement(E,{hidden:!e},c.createElement(Er,null,c.createElement(ni,{dismissBuildError:()=>l(void 0),isOutdated:!!a,localBuildProgress:R?d:void 0,startDevBuild:()=>u(Ct,{accessToken:n}),setAccessToken:r,setOutdated:p,updateBuildStatus:m,projectId:S,gitInfo:i,storyId:o}))))};var ql=styled(Badge)(({theme:e})=>({padding:"4px 8px",fontSize:e.typography.size.s1})),Jl=styled(H)({"&:hover [data-badge], [data-badge=true]":{background:"#E3F3FF",borderColor:"rgba(2, 113, 182, 0.1)",color:"#0271B6"}},({active:e,theme:t})=>!e&&css({"&:hover":{color:t.color.defaultText}})),ai=c.memo(function({count:t,onEnable:n,onDisable:r}){let[o,i]=useState(!1),s=()=>{i(!o),o?r():n();};return useEffect(()=>()=>r(),[r]),c.createElement(Jl,{active:o,onClick:s},c.createElement(ql,{status:"warning","data-badge":o},t),c.createElement("span",null,Qt("Change",t)))});var Xl=()=>!0,Rl=({status:e})=>e?.[x]?.status==="warn",li=({api:e})=>{let t=useCallback(()=>e.experimental_setFilter(x,Rl),[e]),n=useCallback(()=>e.experimental_setFilter(x,Xl),[e]),{status:r}=useStorybookState(),o=Object.values(r).filter(i=>i[x]?.status==="warn");return o.length?c.createElement(ai,{count:o.length,onEnable:t,onDisable:n}):null};var ui=({api:e})=>{let{addNotification:t,clearNotification:n}=e,{projectId:r}=Xt(),[o]=Ft(),i=!!o,[s]=re(st),[a]=re(kt),d=!!a&&!["aborted","complete","error"].includes(a.currentStep),[l]=re(bt),p=useRef(a?.currentStep);useEffect(()=>{a?.currentStep!==p.current&&(p.current=a?.currentStep,a?.currentStep==="initialize"&&(t({id:`${x}/build-initialize`,content:{headline:"Build started",subHeadline:"Check the Storybook process on the command line for more details."},icon:{name:"passed",color:color.positive},link:void 0}),setTimeout(()=>n(`${x}/build-initialize`),1e4)),a?.currentStep==="aborted"&&(t({id:`${x}/build-aborted`,content:{headline:"Build canceled",subHeadline:"Aborted by user."},icon:{name:"failed",color:color.negative},link:void 0}),setTimeout(()=>n(`${x}/build-aborted`),1e4)),a?.currentStep==="complete"&&(t({id:`${x}/build-complete`,content:{headline:"Build complete",subHeadline:a.errorCount?`Encountered ${Qt("component error",a.errorCount,!0)}`:a.changeCount?`Found ${Qt("change",a.changeCount,!0)}`:"No visual changes detected"},icon:{name:"passed",color:color.positive},link:void 0}),setTimeout(()=>n(`${x}/build-complete`),1e4)),a?.currentStep==="error"&&t({id:`${x}/build-error`,content:{headline:"Build error",subHeadline:"Check the Storybook process on the command line for more details."},icon:{name:"failed",color:color.negative},link:void 0}));},[t,n,a?.currentStep,a?.errorCount,a?.changeCount]);let u=useChannel({}),m=()=>u(Ct,{accessToken:o}),f=()=>u(zn);return !r||i===!1||l?null:c.createElement(so,{isOutdated:s,isRunning:d,localBuildProgress:a,startBuild:m,stopBuild:f})};addons.register(x,e=>{addons.add(ge,{type:types.PANEL,title:"Visual Tests",match:({viewMode:t})=>t==="story",render:({active:t})=>c.createElement(oi,{active:!!t,api:e})}),addons.add(Un,{type:types.experimental_SIDEBAR_TOP,render:()=>c.createElement(ui,{api:e})}),addons.add($n,{type:types.experimental_SIDEBAR_BOTTOM,render:()=>c.createElement(li,{api:e})});});
291
+ //# sourceMappingURL=out.js.map
292
+ //# sourceMappingURL=manager.mjs.map