@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.
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -0
- package/dist/manager.mjs +292 -0
- package/dist/manager.mjs.map +1 -0
- package/jest.config.js +5 -0
- package/package.json +161 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/manager.tsx","../src/constants.ts","../src/Panel.tsx","../src/components/layout.tsx","../src/screens/Authentication/Authentication.tsx","../src/utils/sha256.js","../src/utils/requestAccessToken.ts","../src/utils/useErrorNotification.ts","../src/screens/Authentication/SetSubdomain.tsx","../src/components/BackButton.tsx","../src/components/Container.tsx","../src/components/Heading.tsx","../src/components/icons/BackIcon.tsx","../src/components/icons/LinkIcon.tsx","../src/components/icons/VisualTestsIcon.tsx","../src/components/SuffixInput.tsx","../src/components/Text.tsx","../src/screens/Authentication/SignIn.tsx","../src/components/Button.tsx","../src/components/Stack.tsx","../src/screens/Authentication/Verify.tsx","../src/gql/fragment-masking.ts","../src/gql/graphql.ts","../src/gql/gql.ts","../src/utils/graphQLClient.tsx","../src/utils/useChromaticDialog.ts","../src/screens/Authentication/Welcome.tsx","../src/screens/GitNotFound/GitNotFound.tsx","../src/components/FooterSection.tsx","../src/components/FooterMenu.tsx","../src/components/TooltipMenu.tsx","../src/components/IconButton.tsx","../src/screens/LinkProject/LinkedProject.tsx","../src/screens/LinkProject/LinkingProjectFailed.tsx","../src/screens/LinkProject/LinkProject.tsx","../src/screens/VisualTests/ControlsContext.tsx","../src/utils/useRequiredContext.ts","../src/screens/VisualTests/VisualTests.tsx","../src/utils/testsToStatusUpdate.ts","../src/utils/updateSelectedBuildInfo.ts","../src/screens/VisualTests/BuildContext.tsx","../src/utils/aggregateResult.ts","../src/utils/summarizeTests.ts","../src/utils/useTests.ts","../src/screens/VisualTests/graphql.ts","../src/screens/VisualTests/BuildResults.tsx","../src/components/BuildProgressBarInline.tsx","../src/components/BuildProgressLabel.tsx","../src/buildSteps.ts","../src/components/SidebarTopButton.tsx","../src/components/StatusDot.tsx","../src/components/Eyebrow.tsx","../src/screens/VisualTests/BuildEyebrow.tsx","../src/screens/VisualTests/RenderSettings.tsx","../src/components/Accordions.tsx","../src/screens/VisualTests/ReviewTestContext.tsx","../src/screens/VisualTests/SnapshotComparison.tsx","../src/components/SnapshotImage.tsx","../src/screens/VisualTests/BuildResultsFooter.tsx","../src/components/BrowserSelector.tsx","../src/components/icons/ArrowIcon.tsx","../src/components/icons/ChromeIcon.tsx","../src/components/icons/EdgeIcon.tsx","../src/components/icons/FirefoxIcon.tsx","../src/components/icons/SafariIcon.tsx","../src/components/ModeSelector.tsx","../src/screens/VisualTests/SnapshotControls.tsx","../src/components/ActionButton.tsx","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@babel/runtime/helpers/esm/construct.js","../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/polished/dist/polished.esm.js","../src/components/icons/ProgressIcon.tsx","../src/components/Placeholder.tsx","../src/screens/VisualTests/StoryInfo.tsx","../src/components/icons/AlertIcon.tsx","../src/components/icons/StatusIcon.tsx","../src/screens/VisualTests/Warnings.tsx","../src/components/Badge.tsx","../src/screens/VisualTests/NoBuild.tsx","../src/utils/useProjectId.ts","../src/utils/useSharedState.ts","../src/utils/SharedState.ts","../src/SidebarBottom.tsx","../src/components/SidebarToggleButton.tsx","../src/SidebarTop.tsx"],"names":["addons","types","React","CHROMATIC_INDEX_URL","CHROMATIC_BASE_URL","CHROMATIC_API_URL","ADDON_ID","PANEL_ID","SIDEBAR_TOP_ID","SIDEBAR_BOTTOM_ID","ACCESS_TOKEN_KEY","DEV_BUILD_ID_KEY","GIT_INFO","GIT_INFO_ERROR","PROJECT_INFO","IS_OUTDATED","START_BUILD","STOP_BUILD","LOCAL_BUILD_PROGRESS","Spinner","useChannel","useStorybookState","useCallback","useState","styled","Sections","hidden","Section","grow","last","theme","Row","header","Bar","Col","push","Text","sha256","r","t","h","n","e","f","l","g","c","i","s","u","v","k","d","p","w","A","C","M","bytes","buf","acc","val","base64","base64URLEncode","hexStringToBytes","str","byte","seed","encodeParams","params","authorizationPending","error","betaUserAccessDenied","error_description","initiateSignin","subdomain","verifier","challenge","res","device_code","user_code","verification_uri_complete","expires_in","interval","verificationUrl","fetchAccessToken","expires","data","err","useStorybookApi","color","useErrorNotification","api","addNotification","headline","Button","Link","OpaqueLink","BackButton","onClick","children","Container","Heading","BackIcon","props","LinkIcon","VisualTestsIcon","Input","InputWrapper","SuffixWrapper","SuffixOverlay","value","placeholder","suffix","SuffixInput","id","Form","SubmitButton","SetSubdomain","onBack","onSignIn","setSubdomain","inputError","setInputError","handleChange","handleSubmit","BaseButton","css","link","tertiary","belowText","Stack","SignIn","onSignInWithSSO","useRef","useClient","getFragment","_documentNode","fragmentType","StatusTestFieldsFragmentDoc","LastBuildOnBranchTestFieldsFragmentDoc","LastBuildOnBranchBuildFieldsFragmentDoc","StoryTestFieldsFragmentDoc","SelectedBuildFieldsFragmentDoc","VisualTestsProjectCountQueryDocument","SelectProjectsQueryDocument","ProjectQueryDocument","AddonVisualTestsBuildDocument","ReviewTestDocument","documents","graphql","source","useAddonState","authExchange","Client","fetchExchange","mapExchange","Provider","uuid","currentToken","currentTokenExpiration","setCurrentToken","token","exp","useAccessToken","setTokenState","updateToken","newToken","sessionId","getFetchOptions","client","result","utils","operation","useEffect","z","dialogPayloadSchema","useChromaticDialog","handler","dialog","dialogOrigin","handleMessage","origin","parsed","url","left","options","Digits","ProjectCountQuery","Verify","hasProjectId","setAccessToken","setCreatedProjectId","exchangeParameters","onError","userCode","accessToken","openDialogRef","closeDialogRef","event","fetchOptions","openDialog","closeDialog","char","index","Welcome","onNext","Authentication","screen","setScreen","setExchangeParameters","initiateSignInAndMoveToVerify","Icon","Icons","TooltipLinkList","TooltipNote","WithTooltip","BaseIconButton","getStatusStyles","status","IconButton","active","secondary","isLightTheme","activeBg","hoverBg","Tooltip","TooltipMenu","links","note","setActive","menu","visible","onHide","args","FooterMenu","FooterSection","render","InfoSection","InfoSectionText","GitNotFound","gitInfoError","useQuery","CheckIcon","ProjectQuery","LinkedProject","projectId","configFile","goToNext","fetching","Code","dedent","configureDocsLink","LinkingProjectFailed","Avatar","ListItem","SelectProjectsQuery","LinkProject","createdProjectId","onUpdateProject","onSelectProjectId","selectedProjectId","SelectProject","ListHeading","Left","Right","ProjectPicker","List","RepositoryOwnerAvatar","rerunProjectsQuery","selectedAccountId","setSelectedAccountId","selectedAccount","a","onSelectAccount","account","isSelectingProject","setSelectingProject","handleSelectProject","project","timer","createdProject","createContext","useMemo","useReducer","useContext","useRequiredContext","context","name","initialControls","toggle","key","state","handlers","controlsReducer","action","ControlsContext","ControlsDispatchContext","useControlsState","useControlsDispatch","dispatch","ControlsProvider","initialState","useMutation","statusMap","statusOrder","chooseWorseStatus","oldStatus","testsToStatusUpdate","tests","storyIdToStatus","test","storyId","updateSelectedBuildInfo","oldSelectedBuildInfo","shouldSwitchToLastBuildOnBranch","lastBuildOnBranchId","resultOrder","aggregateResult","first","rest","pickStatus","statusCounts","summarizeTests","isInProgress","changeCount","brokenCount","resultsByBrowser","resultsByMode","modesByName","browser","browserInfoById","browserResults","modeResults","useGlobals","useGlobalTypes","useGlobalValue","useTests","themeType","selectedBrowserId","onSelectBrowserId","selectedModeName","onSelectModeName","changed","candidates","mode","onSelectBrowser","onSelectMode","selectedTest","selectedComparison","item","QueryBuild","FragmentLastBuildOnBranchBuildFields","FragmentSelectedBuildFields","FragmentStatusTestFields","FragmentLastBuildOnBranchTestFields","FragmentStoryTestFields","MutationReviewTest","useBuild","gitInfo","selectedBuildInfo","queryError","rerunQuery","storyDataIsStale","lastBuildOnBranch","lastBuildOnBranchStoryTests","lastBuildOnBranchIsNewer","lastBuildOnBranchIsSelectable","lastBuildOnBranchIsReady","selectedBuild","BuildContext","StoryContext","useBuildState","useSelectedBuildState","useSelectedStoryState","BuildProvider","watchState","hasTests","testsForStory","summary","toggleDiff","filesize","BUILD_STEP_ORDER","BUILD_STEP_CONFIG","stepProgress","numerator","denominator","total","exponent","progress","symbol","INITIAL_BUILD_PAYLOAD","step","BuildProgressLabel","localBuildProgress","withEmoji","emoji","renderProgress","label","keyframes","Dot","overlay","StatusDot","Wrapper","StatusDotWrapper","TooltipContent","ProgressTrack","ProgressBar","rotate","ProgressCircle","spinner","SidebarIconButton","SidebarTopButton","isOutdated","isRunning","startBuild","stopBuild","buildProgressPercentage","ProgressTextWrapper","BuildProgressInline","Eyebrow","spin","Header","isWarning","warningColor","percentage","Label","ExpandableDiv","expanded","StepDetails","StepDetail","isCurrent","isFailed","isPending","StepIcon","icon","BuildProgress","stepHistory","buildFailed","steps","startedAt","completedAt","config","renderLabel","BuildEyebrow","branch","dismissBuildError","lastBuildOnBranchInProgress","switchToLastBuildOnBranch","setExpanded","toggleExpanded","nextBuildMessage","Accordions","Accordion","InfoIcon","ItemIcon","CloseIcon","CloseButton","RenderSettings","onClose","testId","batch","ReviewTestContext","useReviewTestState","ReviewTestProvider","Loader","href","SnapshotImage","componentName","storyName","testUrl","comparisonResult","latestImage","baselineImage","baselineImageVisible","diffImage","focusImage","diffVisible","focusVisible","hasDiff","hasError","hasFocus","containerProps","showDiff","showFocus","ArrowIcon","ChromeIcon","EdgeIcon","FirefoxIcon","SafariIcon","browserIcons","IconWrapper","BrowserSelector","isAccepted","selectedBrowser","aggregate","ModeSelector","modeOrder","selectedMode","b","ia","ib","BuildResultsFooter","storyState","_extends","target","_assertThisInitialized","self","_setPrototypeOf","o","_inheritsLoose","subClass","superClass","_getPrototypeOf","_isNativeFunction","fn","_isNativeReflectConstruct","_construct","Parent","Class","Constructor","instance","_wrapNativeSuper","_cache","PolishedError","_Error","code","_this","_len2","_key2","colorToInt","convertToInt","red","green","blue","hslToRgb","hue","saturation","lightness","convert","huePrime","chroma","secondComponent","lightnessModification","finalRed","finalGreen","finalBlue","namedColorMap","nameToHex","normalizedColorName","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColor","alpha","_alpha","rgbMatched","rgbaMatched","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_hue","_saturation","_lightness","_rgbColorString","_hslRgbMatched","rgbToHsl","max","min","delta","parseToHsl","reduceHexValue","reduceHexValue$1","numberToHex","hex","colorToHex","convertToHex","hslToHex","hsl","hsla","rgb","rgba","firstValue","secondValue","thirdValue","fourthValue","rgbValue","isRgb","isRgba","isHsl","isHsla","toColorString","curried","length","combined","curry","guard","lowerBoundary","upperBoundary","darken","amount","hslColor","curriedDarken","curriedDarken$1","lighten","curriedLighten","curriedLighten$1","themeColors","ActionButton","containsIcon","side","ButtonGroup","animation","rotate360","ProgressIcon","parentComponent","Placeholder","width","height","marginLeft","marginRight","Controls","Actions","SnapshotControls","startDevBuild","toggleBaselineImage","toggleFocus","isReviewing","buildIsReviewable","userCanReview","acceptTest","unacceptTest","isAcceptable","isUnacceptable","formatDistance","pluralize","AlertIcon","StatusIcon","Info","StoryInfo","isStarting","isBuildFailed","startedAgo","isErrored","showButton","buttonInProgress","details","Grid","ParentGrid","HeaderSection","MainSection","Divider","StackTrace","Warning","WarningText","SnapshotComparison","toggleSettings","toggleWarnings","selectedStory","prevStoryIdRef","prevSelectedComparisonIdRef","prevSelectedBuildIdRef","storyInfo","testSummary","isNewStory","isNewMode","isNewBrowser","captureErrorData","BaseBadge","Badge","Warnings","BuildResults","settingsVisible","warningsVisible","isLocalBuildInProgress","showBuildStatus","localBuildProgressIsLastBuildOnBranch","buildStatus","isLocalBuildProgressOnSelectedBuild","isSelectedBuildStarting","isReviewLocked","buildFailureUrl","ErrorContainer","NoBuild","hasData","hasProject","hasSelectedBuild","getDetails","button","firstError","createEmptyStoryStatusUpdate","useReview","onReviewSuccess","onReviewError","runMutation","reviewTest","input","VisualTestsWithoutSelectedBuildId","setSelectedBuildInfo","setOutdated","updateBuildStatus","buildInfo","selectedBuildMatchesGit","reviewState","update","testsForStatus","statusUpdate","VisualTests","GET_VALUE","SET_VALUE","instances","SharedState","channel","sharedState","listener","newValue","callback","useSharedState","sharedStateRef","setState","useProjectId","projectInfo","setProjectInfo","clearUpdated","setClearUpdated","updateProject","newProjectId","written","Panel","setLocalBuildProgress","emit","projectInfoLoading","projectUpdatingFailed","projectIdUpdated","clearProjectIdUpdated","localBuildIsRightBranch","SidebarToggleButton","count","onEnable","onDisable","filter","setFilter","toggleFilter","filterNone","filterWarn","SidebarBottom","warnings","SidebarTop","clearNotification","isLoggedIn","lastStep","viewMode"],"mappings":"AAAA,OAAS,UAAAA,GAAQ,SAAAC,OAAa,yBAC9B,OAAOC,OAAW,QCDX,GAAM,CACX,oBAAAC,GACA,mBAAAC,GAAqBD,IAAuB,4BAC5C,kBAAAE,GAAoB,GAAGD,QACzB,EAAI,QAAQ,IAECE,EAAW,8BACXC,GAAW,GAAGD,UACdE,GAAiB,GAAGF,eACpBG,GAAoB,GAAGH,kBACvBI,GAAmB,GAAGJ,kBAAyBF,KAC/CO,GAAmB,GAAGL,iBAEtBM,GAAW,GAAGN,YACdO,GAAiB,GAAGP,iBACpBQ,GAAe,GAAGR,gBAClBS,GAAc,GAAGT,eACjBU,GAAc,GAAGV,eACjBW,GAAa,GAAGX,cAChBY,GAAuB,GAAGZ,uBCnBvC,OAAS,WAAAa,OAAe,2BAExB,OAAS,cAAAC,GAAY,qBAAAC,OAAyB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ACd,GAAI,GAAGvF,gBACP,QAAS,CACP,SAAU,cACV,YAAa,mEACf,EACA,KAAM,CACJ,KAAM,SACN,MAAOoF,GAAM,QACf,EAEA,KAAM,MACR,CAAC,EAEL,EAAG,CACDG,EACAspB,EACAzW,GAAoB,YACpBA,GAAoB,WACpBA,GAAoB,WACtB,CAAC,EAED,IAAMuV,EAAO7sB,GAAW,CAAC,CAAC,EACpB2Y,EAAa,IAAMkU,EAAKjtB,GAAa,CAAE,YAAAoL,CAAY,CAAC,EACpD4N,EAAY,IAAMiU,EAAKhtB,EAAU,EAEvC,MAAI,CAACqO,GAAa8f,IAAe,IAASngB,EACjC,KAIP/O,GAAA,cAAC0Z,GAAA,CACC,WAAYC,EACZ,UAAWC,EACX,mBAAoBpB,EACpB,WAAYqB,EACZ,UAAWC,EACb,CAEJ,E3FnIAha,GAAO,SAASM,EAAWsF,GAAQ,CACjC5F,GAAO,IAAIO,GAAU,CACnB,KAAMN,GAAM,MACZ,MAAO,eACP,MAAO,CAAC,CAAE,SAAAqvB,CAAS,IAAMA,IAAa,QACtC,OAAQ,CAAC,CAAE,OAAAzhB,CAAO,IAAM3N,GAAA,cAAC6tB,GAAA,CAAM,OAAQ,CAAC,CAAClgB,EAAQ,IAAKjI,EAAK,CAC7D,CAAC,EAED5F,GAAO,IAAIQ,GAAgB,CACzB,KAAMP,GAAM,yBACZ,OAAQ,IAAMC,GAAA,cAACgvB,GAAA,CAAW,IAAKtpB,EAAK,CACtC,CAAC,EAED5F,GAAO,IAAIS,GAAmB,CAC5B,KAAMR,GAAM,4BACZ,OAAQ,IAAMC,GAAA,cAAC8uB,GAAA,CAAc,IAAKppB,EAAK,CACzC,CAAC,CACH,CAAC","sourcesContent":["import { addons, types } from \"@storybook/manager-api\";\nimport React from \"react\";\n\nimport { ADDON_ID, PANEL_ID, SIDEBAR_BOTTOM_ID, SIDEBAR_TOP_ID } from \"./constants\";\nimport { Panel } from \"./Panel\";\nimport { SidebarBottom } from \"./SidebarBottom\";\nimport { SidebarTop } from \"./SidebarTop\";\n\naddons.register(ADDON_ID, (api) => {\n addons.add(PANEL_ID, {\n type: types.PANEL,\n title: \"Visual Tests\",\n match: ({ viewMode }) => viewMode === \"story\",\n render: ({ active }) => <Panel active={!!active} api={api} />,\n });\n\n addons.add(SIDEBAR_TOP_ID, {\n type: types.experimental_SIDEBAR_TOP,\n render: () => <SidebarTop api={api} />,\n });\n\n addons.add(SIDEBAR_BOTTOM_ID, {\n type: types.experimental_SIDEBAR_BOTTOM,\n render: () => <SidebarBottom api={api} />,\n });\n});\n","export const {\n CHROMATIC_INDEX_URL,\n CHROMATIC_BASE_URL = CHROMATIC_INDEX_URL || \"https://www.chromatic.com\",\n CHROMATIC_API_URL = `${CHROMATIC_BASE_URL}/api`,\n} = process.env;\n\nexport const ADDON_ID = \"chromaui/addon-visual-tests\";\nexport const PANEL_ID = `${ADDON_ID}/panel`;\nexport const SIDEBAR_TOP_ID = `${ADDON_ID}/sidebarTop`;\nexport const SIDEBAR_BOTTOM_ID = `${ADDON_ID}/sidebarBottom`;\nexport const ACCESS_TOKEN_KEY = `${ADDON_ID}/access-token/${CHROMATIC_BASE_URL}`;\nexport const DEV_BUILD_ID_KEY = `${ADDON_ID}/dev-build-id`;\n\nexport const GIT_INFO = `${ADDON_ID}/gitInfo`;\nexport const GIT_INFO_ERROR = `${ADDON_ID}/gitInfoError`;\nexport const PROJECT_INFO = `${ADDON_ID}/projectInfo`;\nexport const IS_OUTDATED = `${ADDON_ID}/isOutdated`;\nexport const START_BUILD = `${ADDON_ID}/startBuild`;\nexport const STOP_BUILD = `${ADDON_ID}/stopBuild`;\nexport const LOCAL_BUILD_PROGRESS = `${ADDON_ID}/localBuildProgress`;\n","import { Spinner } from \"@storybook/design-system\";\nimport type { API } from \"@storybook/manager-api\";\nimport { useChannel, useStorybookState } from \"@storybook/manager-api\";\nimport React, { useCallback, useState } from \"react\";\n\nimport { Sections } from \"./components/layout\";\nimport {\n ADDON_ID,\n GIT_INFO,\n GIT_INFO_ERROR,\n IS_OUTDATED,\n LOCAL_BUILD_PROGRESS,\n PANEL_ID,\n START_BUILD,\n} from \"./constants\";\nimport { Project } from \"./gql/graphql\";\nimport { Authentication } from \"./screens/Authentication/Authentication\";\nimport { GitNotFound } from \"./screens/GitNotFound/GitNotFound\";\nimport { LinkedProject } from \"./screens/LinkProject/LinkedProject\";\nimport { LinkingProjectFailed } from \"./screens/LinkProject/LinkingProjectFailed\";\nimport { LinkProject } from \"./screens/LinkProject/LinkProject\";\nimport { ControlsProvider } from \"./screens/VisualTests/ControlsContext\";\nimport { VisualTests } from \"./screens/VisualTests/VisualTests\";\nimport { GitInfoPayload, LocalBuildProgress, UpdateStatusFunction } from \"./types\";\nimport { client, Provider, useAccessToken } from \"./utils/graphQLClient\";\nimport { useProjectId } from \"./utils/useProjectId\";\nimport { useSharedState } from \"./utils/useSharedState\";\n\ninterface PanelProps {\n active: boolean;\n api: API;\n}\n\nexport const Panel = ({ active, api }: PanelProps) => {\n const [accessToken, setAccessToken] = useAccessToken();\n const { storyId } = useStorybookState();\n\n const [gitInfo] = useSharedState<GitInfoPayload>(GIT_INFO);\n const [gitInfoError] = useSharedState<Error>(GIT_INFO_ERROR);\n const [isOutdated] = useSharedState<boolean>(IS_OUTDATED);\n const [localBuildProgress, setLocalBuildProgress] =\n useSharedState<LocalBuildProgress>(LOCAL_BUILD_PROGRESS);\n const [, setOutdated] = useSharedState<boolean>(IS_OUTDATED);\n const emit = useChannel({});\n\n const updateBuildStatus = useCallback<UpdateStatusFunction>(\n (update) => api.experimental_updateStatus(ADDON_ID, update),\n [api]\n );\n const {\n loading: projectInfoLoading,\n projectId,\n configFile,\n updateProject,\n projectUpdatingFailed,\n projectIdUpdated,\n clearProjectIdUpdated,\n } = useProjectId();\n\n // If the user creates a project in a dialog (either during login or later, it get set here)\n const [createdProjectId, setCreatedProjectId] = useState<Project[\"id\"]>();\n\n if (gitInfoError) {\n // eslint-disable-next-line no-console\n console.error(gitInfoError);\n return (\n <Provider key={PANEL_ID} value={client}>\n <Sections hidden={!active}>\n <GitNotFound gitInfoError={gitInfoError} setAccessToken={setAccessToken} />\n </Sections>\n </Provider>\n );\n }\n\n // Render the Authentication flow if the user is not signed in.\n if (!accessToken) {\n return (\n <Provider key={PANEL_ID} value={client}>\n <Sections hidden={!active}>\n <Authentication\n key={PANEL_ID}\n setAccessToken={setAccessToken}\n setCreatedProjectId={setCreatedProjectId}\n hasProjectId={!!projectId}\n />\n </Sections>\n </Provider>\n );\n }\n\n // Momentarily wait on addonState (should be very fast)\n if (projectInfoLoading || !gitInfo) {\n return active ? <Spinner /> : null;\n }\n\n if (!projectId)\n return (\n <Provider key={PANEL_ID} value={client}>\n <Sections hidden={!active}>\n <LinkProject\n createdProjectId={createdProjectId}\n setCreatedProjectId={setCreatedProjectId}\n onUpdateProject={updateProject}\n setAccessToken={setAccessToken}\n />\n </Sections>\n </Provider>\n );\n\n if (projectUpdatingFailed) {\n // These should always be set when we get this error\n if (!configFile) {\n throw new Error(`Missing config file after configuration failure`);\n }\n\n return (\n <Sections hidden={!active}>\n <LinkingProjectFailed\n projectId={projectId}\n configFile={configFile}\n setAccessToken={setAccessToken}\n />\n </Sections>\n );\n }\n\n if (projectIdUpdated) {\n // This should always be set when we succeed\n if (!configFile) throw new Error(`Missing config file after configuration success`);\n\n return (\n <Provider key={PANEL_ID} value={client}>\n <Sections hidden={!active}>\n <LinkedProject\n projectId={projectId}\n configFile={configFile}\n goToNext={clearProjectIdUpdated}\n setAccessToken={setAccessToken}\n />\n </Sections>\n </Provider>\n );\n }\n\n const localBuildIsRightBranch = gitInfo.branch === localBuildProgress?.branch;\n return (\n <Provider key={PANEL_ID} value={client}>\n <Sections hidden={!active}>\n <ControlsProvider>\n <VisualTests\n dismissBuildError={() => setLocalBuildProgress(undefined)}\n isOutdated={!!isOutdated}\n localBuildProgress={localBuildIsRightBranch ? localBuildProgress : undefined}\n startDevBuild={() => emit(START_BUILD, { accessToken })}\n setAccessToken={setAccessToken}\n setOutdated={setOutdated}\n updateBuildStatus={updateBuildStatus}\n projectId={projectId}\n gitInfo={gitInfo}\n storyId={storyId}\n />\n </ControlsProvider>\n </Sections>\n </Provider>\n );\n};\n","import { styled } from \"@storybook/theming\";\n\nexport const Sections = styled.div<{ hidden?: boolean }>(\n {\n containerType: \"size\",\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n overflowY: \"auto\",\n },\n ({ hidden }) => hidden && { display: \"none\" }\n);\n\nexport const Section = styled.div<{ grow?: boolean; last?: boolean }>(({ grow, last, theme }) => ({\n flexGrow: grow ? 1 : \"auto\",\n borderBottom: last ? \"none\" : `1px solid ${theme.appBorderColor}`,\n}));\n\nexport const Row = styled.div<{ header?: boolean }>(\n {\n display: \"flex\",\n flexDirection: \"row\",\n margin: 15,\n },\n ({ header, theme }) =>\n header && {\n margin: 0,\n padding: 15,\n borderBottom: `1px solid ${theme.appBorderColor}`,\n\n \"@container (min-width: 800px)\": {\n height: 40,\n alignItems: \"center\",\n justifyContent: \"space-between\",\n padding: \"5px 15px\",\n },\n }\n);\n\nexport const Bar = styled(Row)({\n alignItems: \"center\",\n height: 40,\n margin: \"0 10px\",\n});\n\nexport const Col = styled.div<{ push?: boolean }>(\n {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n },\n ({ push }) => push && { marginLeft: \"auto\" }\n);\n\nexport const Text = styled.div(({ theme }) => ({\n lineHeight: \"18px\",\n color: `${theme.color.defaultText}99`,\n b: {\n color: theme.color.defaultText,\n },\n code: {\n fontSize: theme.typography.size.s1,\n border: `1px solid ${theme.appBorderColor}`,\n borderRadius: 3,\n padding: \"0 3px\",\n },\n small: {\n fontSize: theme.typography.size.s1,\n },\n span: {\n whiteSpace: \"nowrap\",\n },\n svg: {\n verticalAlign: \"top\",\n },\n \"@container (min-width: 800px)\": {\n br: {\n verticalAlign: \"top\",\n display: \"inline-block\",\n content: \"''\",\n background: theme.appBorderColor,\n width: 1,\n height: \"100%\",\n margin: \"0 6px\",\n },\n },\n}));\n","import React, { useCallback, useState } from \"react\";\n\nimport { Project } from \"../../gql/graphql\";\nimport { initiateSignin, TokenExchangeParameters } from \"../../utils/requestAccessToken\";\nimport { useErrorNotification } from \"../../utils/useErrorNotification\";\nimport { SetSubdomain } from \"./SetSubdomain\";\nimport { SignIn } from \"./SignIn\";\nimport { Verify } from \"./Verify\";\nimport { Welcome } from \"./Welcome\";\n\ninterface AuthenticationProps {\n setAccessToken: (token: string | null) => void;\n setCreatedProjectId: (projectId: Project[\"id\"]) => void;\n hasProjectId: boolean;\n}\n\ntype AuthenticationScreen = \"welcome\" | \"signin\" | \"subdomain\" | \"verify\";\n\nexport const Authentication = ({\n setAccessToken,\n setCreatedProjectId,\n hasProjectId,\n}: AuthenticationProps) => {\n const [screen, setScreen] = useState<AuthenticationScreen>(hasProjectId ? \"signin\" : \"welcome\");\n const [exchangeParameters, setExchangeParameters] = useState<TokenExchangeParameters>();\n const onError = useErrorNotification();\n\n const initiateSignInAndMoveToVerify = useCallback(\n async (subdomain?: string) => {\n try {\n setExchangeParameters(await initiateSignin(subdomain));\n setScreen(\"verify\");\n } catch (err: any) {\n onError(\"Sign in Error\", err);\n }\n },\n [onError]\n );\n\n if (screen === \"welcome\" && !hasProjectId) {\n return <Welcome onNext={() => setScreen(\"signin\")} />;\n }\n\n if (screen === \"signin\" || (screen === \"welcome\" && hasProjectId)) {\n return (\n <SignIn\n {...(!hasProjectId ? { onBack: () => setScreen(\"welcome\") } : {})}\n onSignIn={initiateSignInAndMoveToVerify}\n onSignInWithSSO={() => setScreen(\"subdomain\")}\n />\n );\n }\n\n if (screen === \"subdomain\") {\n return (\n <SetSubdomain onBack={() => setScreen(\"signin\")} onSignIn={initiateSignInAndMoveToVerify} />\n );\n }\n\n if (screen === \"verify\") {\n if (!exchangeParameters) {\n throw new Error(\"Expected to have a `exchangeParameters` if at `verify` step\");\n }\n return (\n <Verify\n onBack={() => setScreen(\"signin\")}\n hasProjectId={hasProjectId}\n setAccessToken={setAccessToken}\n setCreatedProjectId={setCreatedProjectId}\n exchangeParameters={exchangeParameters}\n />\n );\n }\n\n return null;\n};\n","export function sha256(r) { function t(r, t) { return r >>> t | r << 32 - t } for (var h, n, o = Math.pow, e = o(2, 32), f = \"\", a = [], l = 8 * r.length, g = sha256.h = sha256.h || [], c = sha256.k = sha256.k || [], i = c.length, s = {}, u = 2; i < 64; u++)if (!s[u]) { for (h = 0; h < 313; h += u)s[h] = u; g[i] = o(u, .5) * e | 0, c[i++] = o(u, 1 / 3) * e | 0 } for (r += \"\"; r.length % 64 - 56;)r += \"\\0\"; for (h = 0; h < r.length; h++) { if ((n = r.charCodeAt(h)) >> 8) return; a[h >> 2] |= n << (3 - h) % 4 * 8 } for (a[a.length] = l / e | 0, a[a.length] = l, n = 0; n < a.length;) { var v = a.slice(n, n += 16), k = g; for (g = g.slice(0, 8), h = 0; h < 64; h++) { var d = v[h - 15], p = v[h - 2], w = g[0], A = g[4], C = g[7] + (t(A, 6) ^ t(A, 11) ^ t(A, 25)) + (A & g[5] ^ ~A & g[6]) + c[h] + (v[h] = h < 16 ? v[h] : v[h - 16] + (t(d, 7) ^ t(d, 18) ^ d >>> 3) + v[h - 7] + (t(p, 17) ^ t(p, 19) ^ p >>> 10) | 0); (g = [C + ((t(w, 2) ^ t(w, 13) ^ t(w, 22)) + (w & g[1] ^ w & g[2] ^ g[1] & g[2])) | 0].concat(g))[4] = g[4] + C | 0 } for (h = 0; h < 8; h++)g[h] = g[h] + k[h] | 0 } for (h = 0; h < 8; h++)for (n = 3; n + 1; n--) { var M = g[h] >> 8 * n & 255; f += (M < 16 ? 0 : \"\") + M.toString(16) } return f }\n","import { CHROMATIC_BASE_URL } from \"../constants\";\n// @ts-expect-error File is in plain JS\nimport { sha256 } from \"./sha256\";\n\n// Details we exchange with the Chromatic OAuth server\nexport type TokenExchangeParameters = {\n expires: number;\n interval: number;\n user_code: string;\n device_code: string;\n verifier: string;\n verificationUrl: string;\n};\n\nconst bytes = (buf: number[]) =>\n new Uint8Array(buf).reduce((acc, val) => acc + String.fromCharCode(val), \"\");\n\nconst base64 = (val: any) => window.btoa(Array.isArray(val) ? bytes(val) : val);\n\nconst base64URLEncode = (val: any) =>\n base64(val).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n\nconst hexStringToBytes = (str: string) =>\n Array.from(str.match(/.{1,2}/g) ?? [], (byte) => parseInt(byte, 16));\n\nconst seed = () =>\n Math.random().toString(36).slice(2, 10) +\n Math.random().toString(36).slice(2, 10) +\n Math.random().toString(36).slice(2, 10) +\n Math.random().toString(36).slice(2, 10);\n\nconst encodeParams = (params: { [key: string]: any }) =>\n Object.entries(params)\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join(\"&\");\n\nconst authorizationPending = ({ error }: { error: string }) => error === \"authorization_pending\";\n\nconst betaUserAccessDenied = ({ error_description }: { error_description: string }) => {\n return error_description === \"Not OAuth beta user\";\n};\n\nexport const initiateSignin = async (subdomain?: string): Promise<TokenExchangeParameters> => {\n const verifier = base64URLEncode(seed());\n const challenge = base64URLEncode(hexStringToBytes(sha256(verifier)));\n\n const res = await fetch(`${CHROMATIC_BASE_URL}/authorize`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\",\n },\n body: encodeParams({\n client_id: \"chromaui:addon-visual-tests\",\n code_challenge: challenge,\n }),\n });\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { device_code, user_code, verification_uri_complete, expires_in, interval } =\n await res.json();\n\n const verificationUrl = subdomain\n ? verification_uri_complete.replace(\"https://www\", `https://${subdomain}`)\n : verification_uri_complete;\n\n return {\n expires: Date.now() + expires_in * 1000,\n interval: interval * 1000,\n user_code,\n device_code,\n verifier,\n verificationUrl,\n };\n};\n\nexport const fetchAccessToken = async ({\n expires,\n device_code,\n verifier,\n}: TokenExchangeParameters) => {\n if (Date.now() >= expires) {\n throw new Error(`Token exchange expired, please restart sign in.`);\n }\n\n try {\n const res = await fetch(`${CHROMATIC_BASE_URL}/token`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\" },\n body: encodeParams({\n client_id: \"chromaui:addon-visual-tests\",\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\",\n device_code,\n code_verifier: verifier,\n scope: \"user:read account:read project:read project:write\",\n }),\n });\n\n const data = await res.json();\n if (authorizationPending(data)) {\n throw new Error(\n `You have not authorized the Visual Tests addon for Chromatic, please try again`\n );\n } else if (data.access_token) {\n return data.access_token as string;\n } else if (betaUserAccessDenied(data)) {\n // eslint-disable-next-line no-alert\n alert(\"You must be a beta user to use this addon at this time.\");\n return null;\n }\n throw new Error();\n } catch (err: any) {\n // eslint-disable-next-line no-console\n console.warn(err);\n throw err;\n }\n};\n","import { useStorybookApi } from \"@storybook/manager-api\";\nimport { color } from \"@storybook/theming\";\nimport { useCallback } from \"react\";\n\nimport { ADDON_ID } from \"../constants\";\n\nexport function useErrorNotification() {\n const api = useStorybookApi();\n\n const { addNotification } = api;\n return useCallback(\n (headline: string, err: any) => {\n addNotification({\n id: `${ADDON_ID}/error`,\n content: {\n headline,\n subHeadline: err.toString(),\n },\n icon: {\n name: \"failed\",\n color: color.negative,\n },\n // @ts-expect-error SB needs a proper API for no link\n link: undefined,\n });\n },\n [addNotification]\n );\n}\n","import { Button } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React, { useCallback, useState } from \"react\";\n\nimport { BackButton } from \"../../components/BackButton\";\nimport { Container } from \"../../components/Container\";\nimport { Heading } from \"../../components/Heading\";\nimport { BackIcon } from \"../../components/icons/BackIcon\";\nimport { LinkIcon } from \"../../components/icons/LinkIcon\";\nimport { VisualTestsIcon } from \"../../components/icons/VisualTestsIcon\";\nimport { SuffixInput } from \"../../components/SuffixInput\";\nimport { Text } from \"../../components/Text\";\n\nconst Form = styled.form({\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n maxWidth: 300,\n margin: 10,\n});\n\nconst SubmitButton = styled(Button)({\n \"&&\": {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 4,\n borderBottomRightRadius: 4,\n },\n});\n\ninterface SetSubdomainProps {\n onBack: () => void;\n onSignIn: (subdomain: string) => void;\n}\n\nexport const SetSubdomain = ({ onBack, onSignIn }: SetSubdomainProps) => {\n const [subdomain, setSubdomain] = useState(\"\");\n const [inputError, setInputError] = useState<string | null>(null);\n\n const handleChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value.replace(/[^a-z0-9-]/g, \"\");\n setSubdomain(value);\n setInputError(null);\n }, []);\n\n const handleSubmit = useCallback(\n (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (subdomain) onSignIn(subdomain);\n else setInputError(\"Please enter a subdomain\");\n },\n [subdomain, onSignIn]\n );\n\n return (\n <Container>\n <BackButton onClick={onBack}>\n <BackIcon />\n Back\n </BackButton>\n <div>\n <LinkIcon />\n <VisualTestsIcon />\n </div>\n <Heading>Sign in with SSO</Heading>\n <Text>Enter your team's Chromatic URL.</Text>\n <Form onSubmit={handleSubmit}>\n <SuffixInput\n autoFocus\n icon=\"users\"\n value={subdomain}\n placeholder=\"yourteam\"\n suffix=\".chromatic.com\"\n onChange={handleChange}\n id=\"subdomain-input\"\n stackLevel=\"top\"\n error={inputError}\n errorTooltipPlacement=\"top\"\n />\n <SubmitButton type=\"submit\" secondary>\n Continue\n </SubmitButton>\n </Form>\n </Container>\n );\n};\n","import { Link } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nconst OpaqueLink = styled(Link)({\n \"&&\": {\n fontSize: \"13px\",\n lineHeight: \"18px\",\n position: \"absolute\",\n top: 10,\n left: 10,\n },\n});\n\nexport const BackButton = ({ onClick, children }: any) => (\n <OpaqueLink secondary isButton onClick={onClick}>\n {children}\n </OpaqueLink>\n);\n","import { styled } from \"@storybook/theming\";\n\nexport const Container = styled.div(({ theme }) => ({\n background: theme.background.app,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"100%\",\n padding: 10,\n}));\n","import { styled } from \"@storybook/theming\";\n\nexport const Heading = styled.h1({\n margin: 0,\n fontSize: \"1em\",\n fontWeight: \"bold\",\n});\n","import React from \"react\";\n\nexport const BackIcon = (props: any) => (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <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\" />\n </svg>\n);\n","import React from \"react\";\n\nexport const LinkIcon = (props: any) => (\n <svg\n width=\"58\"\n height=\"53\"\n viewBox=\"0 0 58 53\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g filter=\"url(#filter0_dd_304_317890)\">\n <rect x=\"6\" y=\"2\" width=\"40\" height=\"40\" rx=\"8\" fill=\"#FF4785\" shapeRendering=\"crispEdges\" />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"white\"\n />\n </g>\n <circle cx=\"46\" cy=\"22\" r=\"2.5\" fill=\"white\" stroke=\"#FF4785\" />\n <path\n 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\"\n fill=\"#FF4785\"\n />\n <defs>\n <filter\n id=\"filter0_dd_304_317890\"\n x=\"0\"\n y=\"0\"\n width=\"52\"\n height=\"53\"\n filterUnits=\"userSpaceOnUse\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"5\" />\n <feGaussianBlur stdDeviation=\"3\" />\n <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\" />\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_304_317890\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"1.5\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <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\" />\n <feBlend\n mode=\"normal\"\n in2=\"effect1_dropShadow_304_317890\"\n result=\"effect2_dropShadow_304_317890\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect2_dropShadow_304_317890\"\n result=\"shape\"\n />\n </filter>\n </defs>\n </svg>\n);\n","import React from \"react\";\n\nexport const VisualTestsIcon = (props: any) => (\n <svg\n width=\"52\"\n height=\"53\"\n viewBox=\"0 0 52 53\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g filter=\"url(#filter0_dd_304_317945)\">\n <g clipPath=\"url(#clip0_304_317945)\">\n <rect x=\"6\" y=\"2\" width=\"40\" height=\"40\" rx=\"8\" fill=\"#288041\" />\n <g clipPath=\"url(#clip1_304_317945)\">\n <rect x=\"14.75\" y=\"10.75\" width=\"22.5\" height=\"22.5\" rx=\"2\" fill=\"#215D31\" />\n <rect\n x=\"20.6104\"\n y=\"20.1591\"\n width=\"20.1485\"\n height=\"20.1485\"\n transform=\"rotate(45 20.6104 20.1591)\"\n fill=\"#93D4A5\"\n />\n <rect\n x=\"30.9502\"\n y=\"16.59\"\n width=\"20.1485\"\n height=\"20.1485\"\n transform=\"rotate(45 30.9502 16.59)\"\n fill=\"#93D4A5\"\n />\n <circle cx=\"20.435\" cy=\"16.2246\" r=\"2.45455\" fill=\"#93D4A5\" />\n </g>\n <rect\n x=\"7.05469\"\n y=\"3\"\n width=\"53.75\"\n height=\"32.25\"\n transform=\"rotate(45 7.05469 3)\"\n fill=\"#67B47C\"\n />\n <g clipPath=\"url(#clip2_304_317945)\">\n <g clipPath=\"url(#clip3_304_317945)\">\n <rect x=\"14.75\" y=\"10.75\" width=\"22.5\" height=\"22.5\" rx=\"2\" fill=\"#2B733F\" />\n <rect\n x=\"21.3604\"\n y=\"21.6592\"\n width=\"20.1485\"\n height=\"20.1485\"\n transform=\"rotate(45 21.3604 21.6592)\"\n fill=\"#A9E0B8\"\n />\n <rect\n x=\"32.2012\"\n y=\"18.5908\"\n width=\"20.1485\"\n height=\"20.1485\"\n transform=\"rotate(45 32.2012 18.5908)\"\n fill=\"#A9E0B8\"\n />\n <circle cx=\"21.685\" cy=\"17.9746\" r=\"2.45455\" fill=\"#A9E0B8\" />\n </g>\n </g>\n </g>\n </g>\n <defs>\n <filter\n id=\"filter0_dd_304_317945\"\n x=\"0\"\n y=\"0\"\n width=\"52\"\n height=\"53\"\n filterUnits=\"userSpaceOnUse\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"5\" />\n <feGaussianBlur stdDeviation=\"3\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <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\" />\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_304_317945\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feOffset dy=\"1\" />\n <feGaussianBlur stdDeviation=\"1.5\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <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\" />\n <feBlend\n mode=\"normal\"\n in2=\"effect1_dropShadow_304_317945\"\n result=\"effect2_dropShadow_304_317945\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect2_dropShadow_304_317945\"\n result=\"shape\"\n />\n </filter>\n <clipPath id=\"clip0_304_317945\">\n <rect x=\"6\" y=\"2\" width=\"40\" height=\"40\" rx=\"8\" fill=\"white\" />\n </clipPath>\n <clipPath id=\"clip1_304_317945\">\n <rect x=\"14.75\" y=\"10.75\" width=\"22.5\" height=\"22.5\" rx=\"2\" fill=\"white\" />\n </clipPath>\n <clipPath id=\"clip2_304_317945\">\n <rect\n width=\"60.7428\"\n height=\"29.9046\"\n fill=\"white\"\n transform=\"translate(7.20801 3.17212) rotate(45)\"\n />\n </clipPath>\n <clipPath id=\"clip3_304_317945\">\n <rect x=\"14.75\" y=\"10.75\" width=\"22.5\" height=\"22.5\" rx=\"2\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n);\n","import { Input } from \"@storybook/design-system\";\nimport { styled } from \"@storybook/theming\";\nimport React, { ComponentProps, ReactNode } from \"react\";\n\nconst InputWrapper = styled.div(({ theme }) => ({\n position: \"relative\",\n\n \"&& input\": {\n color: theme.input.color || \"inherit\",\n background: theme.input.background,\n boxShadow: `${theme.input.border} 0 0 0 1px inset`,\n borderRadius: theme.input.borderRadius,\n fontSize: theme.typography.size.s2 - 1,\n lineHeight: \"20px\",\n },\n}));\n\nconst SuffixWrapper = styled.div(({ theme }) => ({\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n left: 40,\n right: 0,\n zIndex: 2,\n overflow: \"hidden\",\n height: 40,\n display: \"flex\",\n alignItems: \"center\",\n lineHeight: \"20px\",\n color: theme.input.color || \"inherit\",\n\n span: {\n opacity: 0,\n },\n}));\n\nconst SuffixOverlay = ({\n value,\n placeholder,\n suffix,\n}: {\n value?: string;\n placeholder?: string;\n suffix: ReactNode;\n}) => (\n <SuffixWrapper>\n <span>{value || placeholder}</span>\n <b>{suffix}</b>\n </SuffixWrapper>\n);\n\ninterface SuffixInputProps\n extends Omit<ComponentProps<typeof Input>, \"label\" | \"crossOrigin\" | \"enterKeyHint\"> {\n suffix: string;\n}\n\nexport const SuffixInput = ({ id, value, placeholder, suffix, ...props }: SuffixInputProps) => {\n return (\n <InputWrapper>\n <Input\n id={id}\n hideLabel\n label=\"\"\n value={value}\n placeholder={placeholder}\n crossOrigin={undefined}\n enterKeyHint={undefined}\n {...props}\n />\n <SuffixOverlay value={value} placeholder={placeholder} suffix={suffix} />\n </InputWrapper>\n );\n};\n","import { color, styled } from \"@storybook/theming\";\n\nexport const Text = styled.p({\n color: color.mediumdark,\n margin: \"8px 0\",\n lineHeight: \"18px\",\n textAlign: \"center\",\n textWrap: \"balance\",\n});\n","import React from \"react\";\n\nimport { BackButton } from \"../../components/BackButton\";\nimport { Button } from \"../../components/Button\";\nimport { Container } from \"../../components/Container\";\nimport { Heading } from \"../../components/Heading\";\nimport { BackIcon } from \"../../components/icons/BackIcon\";\nimport { LinkIcon } from \"../../components/icons/LinkIcon\";\nimport { VisualTestsIcon } from \"../../components/icons/VisualTestsIcon\";\nimport { Stack } from \"../../components/Stack\";\nimport { Text } from \"../../components/Text\";\n\ninterface SignInProps {\n onBack?: () => void;\n onSignIn: () => void;\n onSignInWithSSO: () => void;\n}\n\nexport const SignIn = ({ onBack, onSignIn, onSignInWithSSO }: SignInProps) => (\n <Container>\n {onBack && (\n <BackButton onClick={onBack}>\n <BackIcon />\n Back\n </BackButton>\n )}\n <Stack alignItems=\"center\" textAlign=\"center\">\n <div>\n <LinkIcon />\n <VisualTestsIcon />\n <Heading>Sign in to begin visual testing</Heading>\n <Text>\n Pinpoint bugs instantly by connecting with cloud browsers that run visual tests in\n parallel.\n </Text>\n </div>\n <Button secondary onClick={() => onSignIn()}>\n Sign in with Chromatic\n </Button>\n <Button link onClick={() => onSignInWithSSO()}>\n Sign into Chromatic with SSO\n </Button>\n </Stack>\n </Container>\n);\n","import { Button as BaseButton } from \"@storybook/components\";\nimport { css, styled } from \"@storybook/theming\";\n\nexport const Button = styled(BaseButton)<{\n link?: boolean;\n tertiary?: boolean;\n belowText?: boolean;\n}>(\n {\n \"&&\": {\n display: \"inline-flex\",\n borderRadius: 4,\n fontSize: \"13px\",\n lineHeight: \"14px\",\n padding: \"9px 12px\",\n alignItems: \"center\",\n \"@container (min-width: 800px)\": {\n padding: \"8px 10px\",\n },\n svg: {\n marginRight: 6,\n },\n },\n },\n ({ link, theme }) =>\n link &&\n css({\n \"&&\": {\n padding: 2,\n fontWeight: \"normal\",\n color: theme.color.defaultText,\n opacity: 0.5,\n \"&:hover, &:focus\": {\n opacity: 1,\n },\n \"&:focus:not(:active)\": {\n outline: `1px solid ${theme.color.secondary}`,\n },\n },\n }),\n ({ tertiary }) =>\n tertiary &&\n css({\n \"&&:hover\": { boxShadow: \"none\" },\n }),\n ({ belowText }) => belowText && { marginTop: 7 }\n);\n","import type { CSSObject } from \"@storybook/theming\";\nimport { styled } from \"@storybook/theming\";\n\nexport const Stack = styled.div<Pick<CSSObject, \"alignItems\" | \"textAlign\">>((props) => ({\n display: \"flex\",\n flexDirection: \"column\",\n gap: 15,\n alignItems: props.alignItems ?? \"center\",\n textAlign: props.textAlign ?? \"center\",\n}));\n","import { styled } from \"@storybook/theming\";\nimport React, { useCallback, useRef } from \"react\";\nimport { useClient } from \"urql\";\n\nimport { BackButton } from \"../../components/BackButton\";\nimport { Button } from \"../../components/Button\";\nimport { Container } from \"../../components/Container\";\nimport { Heading } from \"../../components/Heading\";\nimport { BackIcon } from \"../../components/icons/BackIcon\";\nimport { Stack } from \"../../components/Stack\";\nimport { Text } from \"../../components/Text\";\nimport { graphql } from \"../../gql\";\nimport { Project } from \"../../gql/graphql\";\nimport { getFetchOptions } from \"../../utils/graphQLClient\";\nimport { fetchAccessToken, TokenExchangeParameters } from \"../../utils/requestAccessToken\";\nimport { DialogHandler, useChromaticDialog } from \"../../utils/useChromaticDialog\";\nimport { useErrorNotification } from \"../../utils/useErrorNotification\";\n\nconst Digits = styled.ol(({ theme }) => ({\n display: \"inline-flex\",\n listStyle: \"none\",\n margin: 8,\n padding: 0,\n gap: 5,\n\n \"li:not(:empty)\": {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: `1px dashed ${theme.input.border}`,\n borderRadius: 4,\n width: 28,\n height: 32,\n },\n}));\n\nconst ProjectCountQuery = graphql(/* GraphQL */ `\n query VisualTestsProjectCountQuery {\n viewer {\n projectCount\n accounts {\n newProjectUrl\n }\n }\n }\n`);\n\ninterface VerifyProps {\n onBack: () => void;\n hasProjectId: boolean;\n setAccessToken: (token: string) => void;\n setCreatedProjectId: (projectId: Project[\"id\"]) => void;\n exchangeParameters: TokenExchangeParameters;\n}\n\nexport const Verify = ({\n onBack,\n hasProjectId,\n setAccessToken,\n setCreatedProjectId,\n exchangeParameters,\n}: VerifyProps) => {\n const client = useClient();\n const onError = useErrorNotification();\n\n const { user_code: userCode, verificationUrl } = exchangeParameters;\n\n // Store the access token until we are ready to pass it to `setAccessToken` (at which point\n // the Panel will close the Authentication screen)\n const accessToken = useRef<string>();\n\n const openDialogRef = useRef<(url: string) => void>();\n const closeDialogRef = useRef<() => void>();\n const handler = useCallback<DialogHandler>(\n async (event) => {\n // If the user logs in as part of the grant process, don't close the dialog,\n // instead redirect us back to where we were trying to go.\n if (event.message === \"login\") {\n openDialogRef.current?.(verificationUrl);\n }\n\n if (event.message === \"grant\") {\n try {\n const token = await fetchAccessToken(exchangeParameters);\n if (!token) throw new Error(\"Failed to fetch an access token\");\n accessToken.current = token;\n\n // Override token for this query but don't store it yet until they've created a project\n const fetchOptions = getFetchOptions(token);\n const { data } = await client.query(ProjectCountQuery, {}, { fetchOptions });\n\n if (!data?.viewer) throw new Error(\"Failed to fetch initial project list\");\n\n // The user has projects to choose from (or the project is already selected),\n // so send them to pick one\n if (data.viewer.projectCount > 0 || hasProjectId) {\n setAccessToken(accessToken.current);\n closeDialogRef.current?.();\n } else {\n // The user has no projects, so we need to get them to create one, then close the dialog\n if (!data.viewer.accounts[0]) throw new Error(\"User has no accounts!\");\n if (!data.viewer.accounts[0].newProjectUrl) {\n throw new Error(\"Unexpected missing project URL\");\n }\n\n openDialogRef.current?.(data.viewer.accounts[0].newProjectUrl);\n }\n } catch (err) {\n onError(\"Login Error\", err);\n }\n }\n\n if (event.message === \"createdProject\") {\n if (!accessToken.current) {\n onError(\"Unexpected missing access token\", new Error());\n } else {\n setAccessToken(accessToken.current);\n setCreatedProjectId(`Project:${event.projectId}`);\n closeDialogRef.current?.();\n }\n }\n },\n [\n verificationUrl,\n exchangeParameters,\n client,\n hasProjectId,\n setAccessToken,\n onError,\n setCreatedProjectId,\n ]\n );\n const [openDialog, closeDialog] = useChromaticDialog(handler);\n openDialogRef.current = openDialog;\n closeDialogRef.current = closeDialog;\n\n return (\n <Container>\n <BackButton onClick={onBack}>\n <BackIcon />\n Back\n </BackButton>\n <Stack>\n <div>\n <Heading>Verify your account</Heading>\n <Text>\n Enter this verification code on Chromatic to grant access to your published Storybooks.\n </Text>\n <Digits>\n {userCode?.split(\"\").map((char: string, index: number) => (\n // eslint-disable-next-line react/no-array-index-key\n <li key={`${index}-${char}`}>{char.replace(/[^A-Z0-9]/, \"\")}</li>\n ))}\n </Digits>\n </div>\n <Button secondary onClick={() => openDialog(verificationUrl)}>\n Go to Chromatic\n </Button>\n </Stack>\n </Container>\n );\n};\n","import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';\nimport { FragmentDefinitionNode } from 'graphql';\nimport { Incremental } from './graphql';\n\n\nexport type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<\n infer TType,\n any\n>\n ? [TType] extends [{ ' $fragmentName'?: infer TKey }]\n ? TKey extends string\n ? { ' $fragmentRefs'?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function getFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>\n): TType;\n// return nullable if `fragmentType` is nullable\nexport function getFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function getFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n): ReadonlyArray<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function getFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined\n): ReadonlyArray<TType> | null | undefined;\nexport function getFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined\n): TType | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (queryNode as { __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> } }).__meta__\n ?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every(field => data && field in data);\n}\n","/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */\n DateTime: { input: any; output: any; }\n /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */\n JSONObject: { input: any; output: any; }\n /** A MongoDB ObjectId. */\n ObjID: { input: any; output: any; }\n /** A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt. */\n URL: { input: any; output: any; }\n};\n\nexport enum AccessLevel {\n Developer = 'DEVELOPER',\n None = 'NONE',\n Owner = 'OWNER',\n Reviewer = 'REVIEWER',\n Viewer = 'VIEWER'\n}\n\nexport type Account = Node & Temporal & {\n __typename?: 'Account';\n avatarUrl?: Maybe<Scalars['String']['output']>;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Is this a personal account? */\n isPersonal: Scalars['Boolean']['output'];\n /** Account name, typically the repository owner. */\n name: Scalars['String']['output'];\n newProjectUrl?: Maybe<Scalars['String']['output']>;\n projects?: Maybe<Array<Maybe<Project>>>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type AccountProjectsArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** A build that has been pre-announced but not published yet. */\nexport type AnnouncedBuild = Build & Node & Temporal & {\n __typename?: 'AnnouncedBuild';\n /** Git branch name, possibly prefixed with the owner name (in case of a forked repository). */\n branch: Scalars['String']['output'];\n /** Set of browsers against which the build was executed. */\n browsers: Array<BrowserInfo>;\n /** Git commit hash (unshortened). */\n commit: Scalars['String']['output'];\n /** Link to the commit details at the Git provider linked to the project. */\n commitUrl?: Maybe<Scalars['String']['output']>;\n /** When the commit was created in Git. */\n committedAt: Scalars['DateTime']['output'];\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Whether the build is limited to just representative stories due to insufficient snapshot quota. */\n isLimited: Scalars['Boolean']['output'];\n /** Whether there is a newer build on the same branch, and therefore this build can no longer be reviewed. */\n isSuperseded: Scalars['Boolean']['output'];\n /** Incremental build number. Infrastructure upgrade builds have the same number as the original build. */\n number: Scalars['Int']['output'];\n /** URL-safe Git repository identifier, consisting of the owner (organization or user) name and the repository name, separated by a slash (/). This is typically part of the Git repository URL. The value originates from the CLI runtime environment, not the linked Git provider / linked repository. */\n slug?: Maybe<Scalars['String']['output']>;\n /** Current (mutable) status of the build, which changes as the build progresses or changes are reviewed. */\n status: BuildStatus;\n /** Hash of uncommitted changes, or empty string for no changes. */\n uncommittedHash?: Maybe<Scalars['String']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport enum Browser {\n Chrome = 'CHROME',\n Edge = 'EDGE',\n Firefox = 'FIREFOX',\n Safari = 'SAFARI'\n}\n\nexport type BrowserInfo = {\n __typename?: 'BrowserInfo';\n /** Identifier for this browser. */\n id: Scalars['ID']['output'];\n /** Stable key for this browser. */\n key: Browser;\n /** Browser display name. */\n name: Scalars['String']['output'];\n /** Browser version. */\n version: Scalars['String']['output'];\n};\n\nexport type Build = {\n /** Git branch name, possibly prefixed with the owner name (in case of a forked repository). */\n branch: Scalars['String']['output'];\n /** Set of browsers against which the build was executed. */\n browsers: Array<BrowserInfo>;\n /** Git commit hash (unshortened). */\n commit: Scalars['String']['output'];\n /** Link to the commit details at the Git provider linked to the project. */\n commitUrl?: Maybe<Scalars['String']['output']>;\n /** When the commit was created in Git. */\n committedAt: Scalars['DateTime']['output'];\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Whether the build is limited to just representative stories due to insufficient snapshot quota. */\n isLimited: Scalars['Boolean']['output'];\n /** Whether there is a newer build on the same branch, and therefore this build can no longer be reviewed. */\n isSuperseded: Scalars['Boolean']['output'];\n /** Incremental build number. Infrastructure upgrade builds have the same number as the original build. */\n number: Scalars['Int']['output'];\n /** URL-safe Git repository identifier, consisting of the owner (organization or user) name and the repository name, separated by a slash (/). This is typically part of the Git repository URL. The value originates from the CLI runtime environment, not the linked Git provider / linked repository. */\n slug?: Maybe<Scalars['String']['output']>;\n /** Current (mutable) status of the build, which changes as the build progresses or changes are reviewed. */\n status: BuildStatus;\n /** Hash of uncommitted changes, or empty string for no changes. */\n uncommittedHash?: Maybe<Scalars['String']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport enum BuildResult {\n /** At least one test on the build had a (user) error. */\n CaptureError = 'CAPTURE_ERROR',\n /** The build successfully completed every test. */\n Success = 'SUCCESS',\n /** At least one test on the build had a system error. */\n SystemError = 'SYSTEM_ERROR',\n /** The build did not complete in time. */\n Timeout = 'TIMEOUT'\n}\n\nexport enum BuildStatus {\n /** All test changes were accepted. */\n Accepted = 'ACCEPTED',\n /** The build is announced but not yet published. */\n Announced = 'ANNOUNCED',\n /** There was a user (permanent) problem completing the build. */\n Broken = 'BROKEN',\n /** The build was cancelled before it could complete. */\n Cancelled = 'CANCELLED',\n /** At least one test change was denied. */\n Denied = 'DENIED',\n /** There was a system (temporary) problem completing the build. */\n Failed = 'FAILED',\n /** The build is awaiting a result. */\n InProgress = 'IN_PROGRESS',\n /** All tests passed without changes. */\n Passed = 'PASSED',\n /** At least one test has unaccepted changes. */\n Pending = 'PENDING',\n /** The build is ready for testing but not yet started. */\n Prepared = 'PREPARED',\n /** The build is published but not yet ready for testing. */\n Published = 'PUBLISHED'\n}\n\nexport type BuildSupersededError = UserError & {\n __typename?: 'BuildSupersededError';\n build: Build;\n message: Scalars['String']['output'];\n};\n\nexport type Capture = {\n __typename?: 'Capture';\n /** Metadata about the error if the capture failed. */\n captureError?: Maybe<CaptureError>;\n /** The screenshot capture image. Available if the capture was successful or was taken after an interaction error. */\n captureImage?: Maybe<CaptureImage>;\n /** The ID of the capture. */\n id: Scalars['ID']['output'];\n /** Capture regions (bounding boxes) to ignore while diffing. */\n ignoredRegions?: Maybe<Array<CaptureRegion>>;\n /** The result of the capture. */\n result: CaptureResult;\n};\n\n\nexport type CaptureCaptureImageArgs = {\n signed?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type CaptureDiff = {\n __typename?: 'CaptureDiff';\n /** The diff overlay image. Available if there are visual changes. */\n diffImage?: Maybe<CaptureOverlayImage>;\n /** The focus overlay image. Available if there are visual changes. */\n focusImage?: Maybe<CaptureOverlayImage>;\n /** The ID of the diff. */\n id: Scalars['ID']['output'];\n /** The result of comparing this capture against the baseline. */\n result: CaptureDiffResult;\n};\n\n\nexport type CaptureDiffDiffImageArgs = {\n signed?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type CaptureDiffFocusImageArgs = {\n signed?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport enum CaptureDiffResult {\n /** The two captures were found to have differences. */\n Changed = 'CHANGED',\n /** The two captures were found to be equal. */\n Equal = 'EQUAL',\n /** The diff failed due to a system error. */\n SystemError = 'SYSTEM_ERROR'\n}\n\nexport type CaptureError = {\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport type CaptureErrorComponentOffPage = CaptureError & {\n __typename?: 'CaptureErrorComponentOffPage';\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport type CaptureErrorFailedJs = CaptureError & {\n __typename?: 'CaptureErrorFailedJS';\n /** The original error that caused the capture to fail. Typically contains a name and message. */\n error: Scalars['JSONObject']['output'];\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport type CaptureErrorImageTooLarge = CaptureError & {\n __typename?: 'CaptureErrorImageTooLarge';\n /** The height of the image that was too large. */\n height: Scalars['Int']['output'];\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n /** The maximum number of pixels allowed for an image. */\n maxImagePixels: Scalars['Int']['output'];\n /** The width of the image that was too large. */\n width: Scalars['Int']['output'];\n};\n\nexport type CaptureErrorInteractionFailure = CaptureError & {\n __typename?: 'CaptureErrorInteractionFailure';\n /** The original error that caused the capture to fail. Typically contains a name and message. */\n error: Scalars['JSONObject']['output'];\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport type CaptureErrorJsError = CaptureError & {\n __typename?: 'CaptureErrorJSError';\n /** The original error that caused the capture to fail. Typically contains a name and message. */\n error: Scalars['JSONObject']['output'];\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport enum CaptureErrorKind {\n /** The component was rendered off screen. */\n ComponentOffPage = 'COMPONENT_OFF_PAGE',\n /** A JavaScript error occurred during capture. */\n FailedJs = 'FAILED_JS',\n /** The image was too large to capture. */\n ImageTooLarge = 'IMAGE_TOO_LARGE',\n /** An interaction failed to complete, or encountered an assertion error. */\n InteractionFailure = 'INTERACTION_FAILURE',\n /** A JavaScript error occurred during capture. */\n JsError = 'JS_ERROR',\n /** The page took too long to load. */\n NavigationTimeout = 'NAVIGATION_TIMEOUT',\n /** The page does not contain (valid) JavaScript. */\n NoJs = 'NO_JS',\n /** The story was not found. */\n StoryMissing = 'STORY_MISSING'\n}\n\nexport type CaptureErrorNavigationTimeout = CaptureError & {\n __typename?: 'CaptureErrorNavigationTimeout';\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n /** The maximum number of milliseconds allowed for a page to load. */\n navigationTimeoutMs: Scalars['Int']['output'];\n};\n\nexport type CaptureErrorNoJs = CaptureError & {\n __typename?: 'CaptureErrorNoJS';\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport type CaptureErrorStoryMissing = CaptureError & {\n __typename?: 'CaptureErrorStoryMissing';\n /** The ID of the capture error. */\n id: Scalars['ID']['output'];\n /** The kind of capture error. */\n kind: CaptureErrorKind;\n};\n\nexport type CaptureImage = Image & {\n __typename?: 'CaptureImage';\n /** Computed CSS background color of the captured HTML body. */\n backgroundColor?: Maybe<Scalars['String']['output']>;\n /** Pixel height of the image. */\n imageHeight: Scalars['Int']['output'];\n /** URL of the image. */\n imageUrl: Scalars['URL']['output'];\n /** Pixel width of the image. */\n imageWidth: Scalars['Int']['output'];\n /** Computed CSS text direction of the captured root element. */\n textDirection?: Maybe<Scalars['String']['output']>;\n /** URL of the thumbnail image. */\n thumbnailUrl: Scalars['URL']['output'];\n};\n\nexport type CaptureOverlayImage = Image & {\n __typename?: 'CaptureOverlayImage';\n /** Pixel height of the image. */\n imageHeight: Scalars['Int']['output'];\n /** URL of the image. */\n imageUrl: Scalars['URL']['output'];\n /** Pixel width of the image. */\n imageWidth: Scalars['Int']['output'];\n};\n\nexport type CaptureRegion = {\n __typename?: 'CaptureRegion';\n /** The height of the bounding box. */\n height: Scalars['Int']['output'];\n /** The ID of the capture region. */\n id: Scalars['String']['output'];\n /** The left offset of the bounding box. */\n left: Scalars['Int']['output'];\n /** The CSS selector used to find the element. */\n selector?: Maybe<Scalars['String']['output']>;\n /** The top offset of the bounding box. */\n top: Scalars['Int']['output'];\n /** The width of the bounding box. */\n width: Scalars['Int']['output'];\n};\n\nexport enum CaptureResult {\n /** The capture failed due to a problem with the story. */\n CaptureError = 'CAPTURE_ERROR',\n /** The capture succeeded an took a screenshot. */\n Success = 'SUCCESS',\n /** The capture failed due to a system error. */\n SystemError = 'SYSTEM_ERROR'\n}\n\nexport enum ComparisonResult {\n /** The head capture succeeded but there is no base capture. */\n Added = 'ADDED',\n /** The head capture failed because the story is broken. */\n CaptureError = 'CAPTURE_ERROR',\n /** The head and base captures succeeded but are different. */\n Changed = 'CHANGED',\n /** The head capture succeeded and was equal to the base capture. */\n Equal = 'EQUAL',\n /** The base capture had an error but the head capture succeeded. */\n Fixed = 'FIXED',\n /** There was a base capture, but no head capture. */\n Removed = 'REMOVED',\n /** Either the head capture or the diff failed due to a system error. */\n SystemError = 'SYSTEM_ERROR'\n}\n\n/** A build that has completed testing. */\nexport type CompletedBuild = Build & Node & Temporal & {\n __typename?: 'CompletedBuild';\n /** Git branch name, possibly prefixed with the owner name (in case of a forked repository). */\n branch: Scalars['String']['output'];\n /** Set of browsers against which the build was executed. */\n browsers: Array<BrowserInfo>;\n /** Git commit hash (unshortened). */\n commit: Scalars['String']['output'];\n /** Link to the commit details at the Git provider linked to the project. */\n commitUrl?: Maybe<Scalars['String']['output']>;\n /** When the commit was created in Git. */\n committedAt: Scalars['DateTime']['output'];\n /** When the build was completed in Chromatic. */\n completedAt: Scalars['DateTime']['output'];\n /** The number of components in the published Storybook, excluding docsOnly components. */\n componentCount: Scalars['Int']['output'];\n componentRepresentations?: Maybe<CompletedBuildComponentRepresentationConnection>;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** The number of docsOnly stories in the published Storybook */\n docsCount: Scalars['Int']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Whether the build is limited to just representative stories due to insufficient snapshot quota. */\n isLimited: Scalars['Boolean']['output'];\n /** Whether there is a newer build on the same branch, and therefore this build can no longer be reviewed. */\n isSuperseded: Scalars['Boolean']['output'];\n /** Link to the published Storybook's canvas (iframe.html). */\n isolatorUrl: Scalars['URL']['output'];\n /** Incremental build number. Infrastructure upgrade builds have the same number as the original build. */\n number: Scalars['Int']['output'];\n /** When the build was prepared for testing on Chromatic. */\n preparedAt: Scalars['DateTime']['output'];\n /** When the Storybook was published on Chromatic. */\n publishedAt: Scalars['DateTime']['output'];\n /** Final (immutable) result of the build / capture process. Only available once the build has completed. */\n result: BuildResult;\n /** URL-safe Git repository identifier, consisting of the owner (organization or user) name and the repository name, separated by a slash (/). This is typically part of the Git repository URL. The value originates from the CLI runtime environment, not the linked Git provider / linked repository. */\n slug?: Maybe<Scalars['String']['output']>;\n /** The number of stories in the published Storybook, excluding docsOnly stories. */\n specCount: Scalars['Int']['output'];\n /** When the build was started in Chromatic. */\n startedAt: Scalars['DateTime']['output'];\n /** Current (mutable) status of the build, which changes as the build progresses or changes are reviewed. */\n status: BuildStatus;\n /** Link to the published Storybook. */\n storybookUrl: Scalars['URL']['output'];\n /** Count the number of tests in the build. All provided filter arguments must match (AND). */\n testCount: Scalars['Int']['output'];\n tests?: Maybe<CompletedBuildTestConnection>;\n /** Hash of uncommitted changes, or empty string for no changes. */\n uncommittedHash?: Maybe<Scalars['String']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n /** Link to the build details on Chromatic. */\n webUrl: Scalars['URL']['output'];\n};\n\n\n/** A build that has completed testing. */\nexport type CompletedBuildComponentRepresentationsArgs = {\n after?: InputMaybe<Scalars['ID']['input']>;\n before?: InputMaybe<Scalars['ID']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n orderBy?: InputMaybe<CompletedBuildComponentRepresentationsOrder>;\n};\n\n\n/** A build that has completed testing. */\nexport type CompletedBuildTestCountArgs = {\n results?: InputMaybe<Array<TestResult>>;\n reviewable?: InputMaybe<Scalars['Boolean']['input']>;\n statuses?: InputMaybe<Array<TestStatus>>;\n};\n\n\n/** A build that has completed testing. */\nexport type CompletedBuildTestsArgs = {\n after?: InputMaybe<Scalars['ID']['input']>;\n before?: InputMaybe<Scalars['ID']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n orderBy?: InputMaybe<CompletedBuildTestsOrder>;\n statuses?: InputMaybe<Array<TestStatus>>;\n storyId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Connection to a list of CompletedBuildComponentRepresentation. */\nexport type CompletedBuildComponentRepresentationConnection = {\n __typename?: 'CompletedBuildComponentRepresentationConnection';\n /** List of edges for CompletedBuildComponentRepresentationConnection. */\n edges: Array<CompletedBuildComponentRepresentationEdge>;\n /** List of nodes for CompletedBuildComponentRepresentationConnection. */\n nodes: Array<ComponentRepresentation>;\n /** Pagination details for CompletedBuildComponentRepresentationConnection. */\n pageInfo: PageInfo;\n /** Total number of items for CompletedBuildComponentRepresentationConnection. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** The edge type for CompletedBuildComponentRepresentation. */\nexport type CompletedBuildComponentRepresentationEdge = {\n __typename?: 'CompletedBuildComponentRepresentationEdge';\n /** Cursor to this item. */\n cursor: Scalars['String']['output'];\n /** The item at the edge. */\n node: ComponentRepresentation;\n};\n\nexport type CompletedBuildComponentRepresentationsOrder = {\n direction: OrderDirection;\n field: CompletedBuildComponentRepresentationsOrderField;\n};\n\nexport enum CompletedBuildComponentRepresentationsOrderField {\n CreatedAt = 'createdAt',\n ResultOrder = 'resultOrder',\n StoryOrder = 'storyOrder',\n UpdatedAt = 'updatedAt'\n}\n\n/** Connection to a list of CompletedBuildTest. */\nexport type CompletedBuildTestConnection = {\n __typename?: 'CompletedBuildTestConnection';\n /** List of edges for CompletedBuildTestConnection. */\n edges: Array<CompletedBuildTestEdge>;\n /** List of nodes for CompletedBuildTestConnection. */\n nodes: Array<Test>;\n /** Pagination details for CompletedBuildTestConnection. */\n pageInfo: PageInfo;\n /** Total number of items for CompletedBuildTestConnection. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** The edge type for CompletedBuildTest. */\nexport type CompletedBuildTestEdge = {\n __typename?: 'CompletedBuildTestEdge';\n /** Cursor to this item. */\n cursor: Scalars['String']['output'];\n /** The item at the edge. */\n node: Test;\n};\n\nexport type CompletedBuildTestsOrder = {\n direction: OrderDirection;\n field: CompletedBuildTestsOrderField;\n};\n\nexport enum CompletedBuildTestsOrderField {\n CreatedAt = 'createdAt',\n ResultOrder = 'resultOrder',\n StoryOrder = 'storyOrder',\n UpdatedAt = 'updatedAt'\n}\n\nexport type Component = Node & Temporal & {\n __typename?: 'Component';\n /** Story metadata `id` (default export) or slugified version of `title`. */\n componentId: Scalars['String']['output'];\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** Same as componentId, but guaranteed to be unique within the project. */\n csfId?: Maybe<Scalars['String']['output']>;\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Display name of the component (last section of the title). */\n name: Scalars['String']['output'];\n /** Normalized hierarchy path, including component name as last item. */\n path: Array<Scalars['String']['output']>;\n representativeStory?: Maybe<Story>;\n stories?: Maybe<StoryConnection>;\n /** Title (hierarchy path) as specified on story metadata (default export) or autogenerated based on file path. */\n title: Scalars['String']['output'];\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type ComponentStoriesArgs = {\n after?: InputMaybe<Scalars['ID']['input']>;\n before?: InputMaybe<Scalars['ID']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n orderBy?: InputMaybe<StoriesOrder>;\n};\n\n/** Connection to a list of Component. */\nexport type ComponentConnection = {\n __typename?: 'ComponentConnection';\n /** List of edges for ComponentConnection. */\n edges: Array<ComponentEdge>;\n /** List of nodes for ComponentConnection. */\n nodes: Array<Component>;\n /** Pagination details for ComponentConnection. */\n pageInfo: PageInfo;\n /** Total number of items for ComponentConnection. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** The edge type for Component. */\nexport type ComponentEdge = {\n __typename?: 'ComponentEdge';\n /** Cursor to this item. */\n cursor: Scalars['String']['output'];\n /** The item at the edge. */\n node: Component;\n};\n\n/** Represents a component in a build. */\nexport type ComponentRepresentation = {\n __typename?: 'ComponentRepresentation';\n /** The component represented here. */\n component: Component;\n /** This test is the best representation of the first spec of the component on this build. */\n representativeTest: Test;\n};\n\nexport type ComponentsOrder = {\n direction: OrderDirection;\n field: ComponentsOrderField;\n};\n\nexport enum ComponentsOrderField {\n CreatedAt = 'createdAt',\n UpdatedAt = 'updatedAt'\n}\n\nexport type CreateFigmaMetadataInput = {\n key: Scalars['String']['input'];\n metadata: Scalars['JSONObject']['input'];\n url: Scalars['String']['input'];\n};\n\nexport type FigmaMetadata = Node & Temporal & {\n __typename?: 'FigmaMetadata';\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n key: Scalars['String']['output'];\n metadata: Scalars['JSONObject']['output'];\n owner?: Maybe<User>;\n project?: Maybe<Project>;\n story?: Maybe<Story>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n url?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Image = {\n /** Pixel height of the image. */\n imageHeight: Scalars['Int']['output'];\n /** URL of the image. */\n imageUrl: Scalars['URL']['output'];\n /** Pixel width of the image. */\n imageWidth: Scalars['Int']['output'];\n};\n\nexport type LocalBuildsSpecifierInput = {\n /** If set, only return builds with isLocalBuild set to this value */\n isLocalBuild?: InputMaybe<Scalars['Boolean']['input']>;\n /** If set, return all global builds, and only local builds from this email hash */\n localBuildEmailHash?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n bulkCreateFigmaMetadata: Array<FigmaMetadata>;\n bulkRemoveFigmaMetadata: Array<FigmaMetadata>;\n createFigmaMetadata?: Maybe<FigmaMetadata>;\n removeFigmaMetadata?: Maybe<FigmaMetadata>;\n reviewTest?: Maybe<ReviewTestPayload>;\n};\n\n\nexport type MutationBulkCreateFigmaMetadataArgs = {\n input: Array<CreateFigmaMetadataInput>;\n};\n\n\nexport type MutationBulkRemoveFigmaMetadataArgs = {\n ids: Array<Scalars['ID']['input']>;\n};\n\n\nexport type MutationCreateFigmaMetadataArgs = {\n key: Scalars['String']['input'];\n metadata: Scalars['JSONObject']['input'];\n url: Scalars['String']['input'];\n};\n\n\nexport type MutationRemoveFigmaMetadataArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationReviewTestArgs = {\n input: ReviewTestInput;\n};\n\nexport type Node = {\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n};\n\nexport enum OrderDirection {\n /** Ascending */\n Asc = 'ASC',\n /** Descending */\n Desc = 'DESC'\n}\n\n/** Information about pagination in a connection. */\nexport type PageInfo = {\n __typename?: 'PageInfo';\n /** When paginating forwards, the cursor to continue. */\n endCursor?: Maybe<Scalars['String']['output']>;\n /** When paginating forwards, are there more items? */\n hasNextPage: Scalars['Boolean']['output'];\n /** When paginating backwards, are there more items? */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** When paginating backwards, the cursor to continue. */\n startCursor?: Maybe<Scalars['String']['output']>;\n};\n\n/** A build that has been prepared for testing but not started yet. */\nexport type PreparedBuild = Build & Node & Temporal & {\n __typename?: 'PreparedBuild';\n /** Git branch name, possibly prefixed with the owner name (in case of a forked repository). */\n branch: Scalars['String']['output'];\n /** Set of browsers against which the build was executed. */\n browsers: Array<BrowserInfo>;\n /** Git commit hash (unshortened). */\n commit: Scalars['String']['output'];\n /** Link to the commit details at the Git provider linked to the project. */\n commitUrl?: Maybe<Scalars['String']['output']>;\n /** When the commit was created in Git. */\n committedAt: Scalars['DateTime']['output'];\n /** The number of components in the published Storybook, excluding docsOnly components. */\n componentCount: Scalars['Int']['output'];\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** The number of docsOnly stories in the published Storybook */\n docsCount: Scalars['Int']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Whether the build is limited to just representative stories due to insufficient snapshot quota. */\n isLimited: Scalars['Boolean']['output'];\n /** Whether there is a newer build on the same branch, and therefore this build can no longer be reviewed. */\n isSuperseded: Scalars['Boolean']['output'];\n /** Link to the published Storybook's canvas (iframe.html). */\n isolatorUrl: Scalars['URL']['output'];\n /** Incremental build number. Infrastructure upgrade builds have the same number as the original build. */\n number: Scalars['Int']['output'];\n /** When the build was prepared for testing on Chromatic. */\n preparedAt: Scalars['DateTime']['output'];\n /** When the Storybook was published on Chromatic. */\n publishedAt: Scalars['DateTime']['output'];\n /** URL-safe Git repository identifier, consisting of the owner (organization or user) name and the repository name, separated by a slash (/). This is typically part of the Git repository URL. The value originates from the CLI runtime environment, not the linked Git provider / linked repository. */\n slug?: Maybe<Scalars['String']['output']>;\n /** The number of stories in the published Storybook, excluding docsOnly stories. */\n specCount: Scalars['Int']['output'];\n /** Current (mutable) status of the build, which changes as the build progresses or changes are reviewed. */\n status: BuildStatus;\n /** Link to the published Storybook. */\n storybookUrl: Scalars['URL']['output'];\n /** Count the number of tests in the build. All provided filter arguments must match (AND). */\n testCount: Scalars['Int']['output'];\n tests?: Maybe<PreparedBuildTestConnection>;\n /** Hash of uncommitted changes, or empty string for no changes. */\n uncommittedHash?: Maybe<Scalars['String']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\n\n/** A build that has been prepared for testing but not started yet. */\nexport type PreparedBuildTestCountArgs = {\n results?: InputMaybe<Array<TestResult>>;\n reviewable?: InputMaybe<Scalars['Boolean']['input']>;\n statuses?: InputMaybe<Array<TestStatus>>;\n};\n\n\n/** A build that has been prepared for testing but not started yet. */\nexport type PreparedBuildTestsArgs = {\n after?: InputMaybe<Scalars['ID']['input']>;\n before?: InputMaybe<Scalars['ID']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n orderBy?: InputMaybe<PreparedBuildTestsOrder>;\n statuses?: InputMaybe<Array<TestStatus>>;\n storyId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Connection to a list of PreparedBuildTest. */\nexport type PreparedBuildTestConnection = {\n __typename?: 'PreparedBuildTestConnection';\n /** List of edges for PreparedBuildTestConnection. */\n edges: Array<PreparedBuildTestEdge>;\n /** List of nodes for PreparedBuildTestConnection. */\n nodes: Array<Test>;\n /** Pagination details for PreparedBuildTestConnection. */\n pageInfo: PageInfo;\n /** Total number of items for PreparedBuildTestConnection. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** The edge type for PreparedBuildTest. */\nexport type PreparedBuildTestEdge = {\n __typename?: 'PreparedBuildTestEdge';\n /** Cursor to this item. */\n cursor: Scalars['String']['output'];\n /** The item at the edge. */\n node: Test;\n};\n\nexport type PreparedBuildTestsOrder = {\n direction: OrderDirection;\n field: PreparedBuildTestsOrderField;\n};\n\nexport enum PreparedBuildTestsOrderField {\n CreatedAt = 'createdAt',\n ResultOrder = 'resultOrder',\n StoryOrder = 'storyOrder',\n UpdatedAt = 'updatedAt'\n}\n\nexport type Project = Node & Temporal & {\n __typename?: 'Project';\n /** List of branches for which builds exist in the project. */\n branchNames: Array<Scalars['String']['output']>;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** This token is the Figma OAuth2 accessToken of whichever user assigned their Figma credentials to the project. */\n figmaToken?: Maybe<Scalars['String']['output']>;\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Retrieve the last build for the project which matches the (optionally) provided filters. All filter arguments must match (AND). */\n lastBuild?: Maybe<Build>;\n /** Project name, typically the repository name. */\n name: Scalars['String']['output'];\n /** Project token to start builds with Chromatic CLI. */\n projectToken: Scalars['String']['output'];\n /** Account information which does not require the `account` scope. */\n publicAccountInfo: PublicAccountInfo;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n /** Link to the project on Chromatic. */\n webUrl: Scalars['URL']['output'];\n};\n\n\nexport type ProjectBranchNamesArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectLastBuildArgs = {\n branches?: InputMaybe<Array<Scalars['String']['input']>>;\n defaultBranch?: InputMaybe<Scalars['Boolean']['input']>;\n localBuilds?: InputMaybe<LocalBuildsSpecifierInput>;\n repositoryOwnerName?: InputMaybe<Scalars['String']['input']>;\n results?: InputMaybe<Array<BuildResult>>;\n slug?: InputMaybe<Scalars['String']['input']>;\n statuses?: InputMaybe<Array<BuildStatus>>;\n};\n\nexport type ProjectMembership = {\n __typename?: 'ProjectMembership';\n accessLevel: AccessLevel;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n meetsAccessLevel: Scalars['Boolean']['output'];\n project: Project;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n user?: Maybe<User>;\n};\n\n\nexport type ProjectMembershipMeetsAccessLevelArgs = {\n minimumAccessLevel: AccessLevel;\n};\n\nexport type PublicAccountInfo = {\n __typename?: 'PublicAccountInfo';\n /** Avatar URL of the repository owner or token holder. */\n avatarUrl?: Maybe<Scalars['URL']['output']>;\n /** Login name of the repository owner or token holder. */\n name: Scalars['String']['output'];\n};\n\n/** A build that has been published but not yet prepared for testing. */\nexport type PublishedBuild = Build & Node & Temporal & {\n __typename?: 'PublishedBuild';\n /** Git branch name, possibly prefixed with the owner name (in case of a forked repository). */\n branch: Scalars['String']['output'];\n /** Set of browsers against which the build was executed. */\n browsers: Array<BrowserInfo>;\n /** Git commit hash (unshortened). */\n commit: Scalars['String']['output'];\n /** Link to the commit details at the Git provider linked to the project. */\n commitUrl?: Maybe<Scalars['String']['output']>;\n /** When the commit was created in Git. */\n committedAt: Scalars['DateTime']['output'];\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Whether the build is limited to just representative stories due to insufficient snapshot quota. */\n isLimited: Scalars['Boolean']['output'];\n /** Whether there is a newer build on the same branch, and therefore this build can no longer be reviewed. */\n isSuperseded: Scalars['Boolean']['output'];\n /** Link to the published Storybook's canvas (iframe.html). */\n isolatorUrl: Scalars['URL']['output'];\n /** Incremental build number. Infrastructure upgrade builds have the same number as the original build. */\n number: Scalars['Int']['output'];\n /** When the Storybook was published on Chromatic. */\n publishedAt: Scalars['DateTime']['output'];\n /** URL-safe Git repository identifier, consisting of the owner (organization or user) name and the repository name, separated by a slash (/). This is typically part of the Git repository URL. The value originates from the CLI runtime environment, not the linked Git provider / linked repository. */\n slug?: Maybe<Scalars['String']['output']>;\n /** Current (mutable) status of the build, which changes as the build progresses or changes are reviewed. */\n status: BuildStatus;\n /** Link to the published Storybook. */\n storybookUrl: Scalars['URL']['output'];\n /** Hash of uncommitted changes, or empty string for no changes. */\n uncommittedHash?: Maybe<Scalars['String']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n account?: Maybe<Account>;\n build?: Maybe<Build>;\n bulkFigmaMetadata?: Maybe<Array<Maybe<FigmaMetadata>>>;\n figmaMetadata?: Maybe<FigmaMetadata>;\n figmaMetadataById?: Maybe<FigmaMetadata>;\n project?: Maybe<Project>;\n storybook?: Maybe<Storybook>;\n viewer?: Maybe<User>;\n};\n\n\nexport type QueryAccountArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryBuildArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryBulkFigmaMetadataArgs = {\n keys: Array<Scalars['String']['input']>;\n};\n\n\nexport type QueryFigmaMetadataArgs = {\n key?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryFigmaMetadataByIdArgs = {\n id: Scalars['ObjID']['input'];\n};\n\n\nexport type QueryProjectArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryStorybookArgs = {\n url: Scalars['URL']['input'];\n};\n\nexport enum ReviewTestBatch {\n Build = 'BUILD',\n Component = 'COMPONENT',\n Spec = 'SPEC'\n}\n\nexport type ReviewTestError = BuildSupersededError | TestNotFoundError | TestUnreviewableError;\n\nexport type ReviewTestInput = {\n /** Apply review to all tests for the same story, component, or the whole build. */\n batch?: InputMaybe<ReviewTestBatch>;\n /** The new status of the test. */\n status: ReviewTestInputStatus;\n /** The ID of the test to review. */\n testId: Scalars['ID']['input'];\n};\n\nexport enum ReviewTestInputStatus {\n /** Accept the changes on the test. */\n Accepted = 'ACCEPTED',\n /** Deny the changes on the test. */\n Denied = 'DENIED',\n /** Reset the test back to unreviewed. */\n Pending = 'PENDING'\n}\n\nexport type ReviewTestPayload = {\n __typename?: 'ReviewTestPayload';\n /** The test(s) that were updated, if succesful. */\n updatedTests?: Maybe<Array<Test>>;\n /** User errors preventing the test from being reviewed. Empty if successful. */\n userErrors: Array<ReviewTestError>;\n};\n\n/** A build that has started but not completed testing. */\nexport type StartedBuild = Build & Node & Temporal & {\n __typename?: 'StartedBuild';\n /** Git branch name, possibly prefixed with the owner name (in case of a forked repository). */\n branch: Scalars['String']['output'];\n /** Set of browsers against which the build was executed. */\n browsers: Array<BrowserInfo>;\n /** Git commit hash (unshortened). */\n commit: Scalars['String']['output'];\n /** Link to the commit details at the Git provider linked to the project. */\n commitUrl?: Maybe<Scalars['String']['output']>;\n /** When the commit was created in Git. */\n committedAt: Scalars['DateTime']['output'];\n /** The number of components in the published Storybook, excluding docsOnly components. */\n componentCount: Scalars['Int']['output'];\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** The number of docsOnly stories in the published Storybook */\n docsCount: Scalars['Int']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Whether the build is limited to just representative stories due to insufficient snapshot quota. */\n isLimited: Scalars['Boolean']['output'];\n /** Whether there is a newer build on the same branch, and therefore this build can no longer be reviewed. */\n isSuperseded: Scalars['Boolean']['output'];\n /** Link to the published Storybook's canvas (iframe.html). */\n isolatorUrl: Scalars['URL']['output'];\n /** Incremental build number. Infrastructure upgrade builds have the same number as the original build. */\n number: Scalars['Int']['output'];\n /** When the build was prepared for testing on Chromatic. */\n preparedAt: Scalars['DateTime']['output'];\n /** When the Storybook was published on Chromatic. */\n publishedAt: Scalars['DateTime']['output'];\n /** URL-safe Git repository identifier, consisting of the owner (organization or user) name and the repository name, separated by a slash (/). This is typically part of the Git repository URL. The value originates from the CLI runtime environment, not the linked Git provider / linked repository. */\n slug?: Maybe<Scalars['String']['output']>;\n /** The number of stories in the published Storybook, excluding docsOnly stories. */\n specCount: Scalars['Int']['output'];\n /** When the build was started in Chromatic. */\n startedAt: Scalars['DateTime']['output'];\n /** Current (mutable) status of the build, which changes as the build progresses or changes are reviewed. */\n status: BuildStatus;\n /** Link to the published Storybook. */\n storybookUrl: Scalars['URL']['output'];\n /** Count the number of tests in the build. All provided filter arguments must match (AND). */\n testCount: Scalars['Int']['output'];\n tests?: Maybe<StartedBuildTestConnection>;\n /** Hash of uncommitted changes, or empty string for no changes. */\n uncommittedHash?: Maybe<Scalars['String']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n /** Link to the build details on Chromatic. */\n webUrl: Scalars['URL']['output'];\n};\n\n\n/** A build that has started but not completed testing. */\nexport type StartedBuildTestCountArgs = {\n results?: InputMaybe<Array<TestResult>>;\n reviewable?: InputMaybe<Scalars['Boolean']['input']>;\n statuses?: InputMaybe<Array<TestStatus>>;\n};\n\n\n/** A build that has started but not completed testing. */\nexport type StartedBuildTestsArgs = {\n after?: InputMaybe<Scalars['ID']['input']>;\n before?: InputMaybe<Scalars['ID']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n orderBy?: InputMaybe<StartedBuildTestsOrder>;\n statuses?: InputMaybe<Array<TestStatus>>;\n storyId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Connection to a list of StartedBuildTest. */\nexport type StartedBuildTestConnection = {\n __typename?: 'StartedBuildTestConnection';\n /** List of edges for StartedBuildTestConnection. */\n edges: Array<StartedBuildTestEdge>;\n /** List of nodes for StartedBuildTestConnection. */\n nodes: Array<Test>;\n /** Pagination details for StartedBuildTestConnection. */\n pageInfo: PageInfo;\n /** Total number of items for StartedBuildTestConnection. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** The edge type for StartedBuildTest. */\nexport type StartedBuildTestEdge = {\n __typename?: 'StartedBuildTestEdge';\n /** Cursor to this item. */\n cursor: Scalars['String']['output'];\n /** The item at the edge. */\n node: Test;\n};\n\nexport type StartedBuildTestsOrder = {\n direction: OrderDirection;\n field: StartedBuildTestsOrderField;\n};\n\nexport enum StartedBuildTestsOrderField {\n CreatedAt = 'createdAt',\n ResultOrder = 'resultOrder',\n StoryOrder = 'storyOrder',\n UpdatedAt = 'updatedAt'\n}\n\nexport type StoriesOrder = {\n direction: OrderDirection;\n field: StoriesOrderField;\n};\n\nexport enum StoriesOrderField {\n CreatedAt = 'createdAt',\n UpdatedAt = 'updatedAt'\n}\n\nexport type Story = Node & Temporal & {\n __typename?: 'Story';\n /** Image and snapshot display metadata for this story, if captured. */\n captureImage?: Maybe<CaptureImage>;\n /** Component that contains the story. */\n component?: Maybe<Component>;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** Same as storyId, but guaranteed to be unique within the project. */\n csfId?: Maybe<Scalars['String']['output']>;\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** Story name as displayed in Storybook. */\n name: Scalars['String']['output'];\n /** Story ID as generated by Storybook, including componentId prefix. */\n storyId: Scalars['String']['output'];\n /** Permalink to the story in the published Storybook. */\n storybookUrl?: Maybe<Scalars['URL']['output']>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type StoryCaptureImageArgs = {\n signed?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Connection to a list of Story. */\nexport type StoryConnection = {\n __typename?: 'StoryConnection';\n /** List of edges for StoryConnection. */\n edges: Array<StoryEdge>;\n /** List of nodes for StoryConnection. */\n nodes: Array<Story>;\n /** Pagination details for StoryConnection. */\n pageInfo: PageInfo;\n /** Total number of items for StoryConnection. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** The edge type for Story. */\nexport type StoryEdge = {\n __typename?: 'StoryEdge';\n /** Cursor to this item. */\n cursor: Scalars['String']['output'];\n /** The item at the edge. */\n node: Story;\n};\n\nexport type Storybook = {\n __typename?: 'Storybook';\n /** Link to the build on Chromatic. */\n buildUrl: Scalars['URL']['output'];\n /** List of components in the published Storybook. */\n components: ComponentConnection;\n /** Permalink to the published Storybook. */\n storybookUrl: Scalars['URL']['output'];\n};\n\n\nexport type StorybookComponentsArgs = {\n after?: InputMaybe<Scalars['ID']['input']>;\n before?: InputMaybe<Scalars['ID']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n orderBy?: InputMaybe<ComponentsOrder>;\n};\n\n/** Entity which tracks creation and update date/time. */\nexport type Temporal = {\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** A set of captures for a story at a specific viewport, compared against the baseline. */\nexport type Test = Node & Temporal & {\n __typename?: 'Test';\n /** The baseline test this test was compared against. */\n baseline?: Maybe<Test>;\n /** List of snapshot comparisons for this test, one for each tested browser. */\n comparisons: Array<TestComparison>;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** What test kinds is this test associated with. */\n kinds: Array<TestKind>;\n /** The mode applied to this test. If this test was not using modes, the viewport is set as the mode name (e.g. \"[viewport]px\") */\n mode: TestMode;\n /** Chromatic parameters configured on the story or automatically determined based on context. */\n parameters: TestParameters;\n /** Final (immutable) summary of the results of the comparisons on this test. Only available once the test has completed. */\n result?: Maybe<TestResult>;\n /** Current (mutable) user state of the test; has it been reviewed? */\n status: TestStatus;\n /** Reference to the story for this test in the published Storybook for this build. */\n story?: Maybe<Story>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n webUrl: Scalars['URL']['output'];\n};\n\nexport type TestComparison = Node & {\n __typename?: 'TestComparison';\n /** The (head) capture of the baseline test which was compared against, for the same browser. */\n baseCapture?: Maybe<Capture>;\n /** Browser against which this comparison was captured and compared. */\n browser: BrowserInfo;\n /** The diff between the baseline and head captures. Available once the diff has completed. */\n captureDiff?: Maybe<CaptureDiff>;\n /** The capture of the test this comparison belongs to. Available once the capture is complete. */\n headCapture?: Maybe<Capture>;\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n /** The result of comparing this test's (head) capture against the baseline. Only available once the test has completed. */\n result?: Maybe<ComparisonResult>;\n /** Viewport for which this comparison was captured and compared. */\n viewport: ViewportInfo;\n};\n\nexport enum TestKind {\n /** At least one comparison contains an accessibility test */\n Accessibility = 'ACCESSIBILITY',\n /** At least one comparison contains an interaction test */\n Interaction = 'INTERACTION',\n /** At least one comparison contains a visual test */\n Visual = 'VISUAL'\n}\n\nexport type TestMode = {\n __typename?: 'TestMode';\n /** A map of Storybook globals with chosen values that defines how to render a spec (e.g. `{ \"lang\": \"es\", \"theme\": \"dark\", \"viewport\": 320 }`) */\n globals: Scalars['JSONObject']['output'];\n /** The name of the mode (e.g. \"Spanish Dark Mobile\") */\n name: Scalars['String']['output'];\n};\n\nexport type TestNotFoundError = UserError & {\n __typename?: 'TestNotFoundError';\n message: Scalars['String']['output'];\n};\n\nexport type TestParameters = {\n __typename?: 'TestParameters';\n /** Delay in milliseconds before taking the snapshot. */\n delay?: Maybe<Scalars['Int']['output']>;\n /** If true, disables detecting and ignoring anti-aliased pixels. */\n diffIncludeAntiAliasing?: Maybe<Scalars['Boolean']['output']>;\n /** Threshold before a snapshot is considered visually different (0-1). */\n diffThreshold?: Maybe<Scalars['Float']['output']>;\n /** This test applies to a docs page. */\n docsOnly?: Maybe<Scalars['Boolean']['output']>;\n /** Set the `forced-colors` media feature when capturing the story. */\n forcedColors?: Maybe<Scalars['String']['output']>;\n /** Set the media used when capturing the story. */\n media?: Maybe<Scalars['String']['output']>;\n /** Disallow scrolling in order to take a full page screenshot. */\n noScroll?: Maybe<Scalars['Boolean']['output']>;\n /** Reverse CSS animations so snapshots show the end state. */\n pauseAnimationAtEnd?: Maybe<Scalars['Boolean']['output']>;\n /** Set the `prefers-reduced-motion` media feature when capturing the story. */\n prefersReducedMotion?: Maybe<Scalars['String']['output']>;\n /** This test only contains representative snapshots. */\n representativeOnly?: Maybe<Scalars['Boolean']['output']>;\n /** Viewport information. */\n viewport: ViewportInfo;\n};\n\nexport enum TestResult {\n /** Checks passed and no baseline was found. */\n Added = 'ADDED',\n /** At least one comparison had a (user) error. */\n CaptureError = 'CAPTURE_ERROR',\n /** Checks passed, but at least one comparison had a visual change. */\n Changed = 'CHANGED',\n /** Checks passed and all snapshots are equal to their baselines. */\n Equal = 'EQUAL',\n /** Checks passed and at least one comparison was fixed. */\n Fixed = 'FIXED',\n /** Currently unused. Here for future use. */\n Removed = 'REMOVED',\n /** This test was skipped. */\n Skipped = 'SKIPPED',\n /** At least one comparison had a system error. */\n SystemError = 'SYSTEM_ERROR'\n}\n\nexport enum TestStatus {\n /** The comparison succeeded and the changes have been accepted. */\n Accepted = 'ACCEPTED',\n /** Encountered a Storybook runtime error while testing. */\n Broken = 'BROKEN',\n /** The comparison succeeded and the changes have been denied. */\n Denied = 'DENIED',\n /** Encountered a (temporary) system error while testing. */\n Failed = 'FAILED',\n /** We are waiting on comparisons. */\n InProgress = 'IN_PROGRESS',\n /** All comparisons were visually equal. */\n Passed = 'PASSED',\n /** The comparison succeeded with unconfirmed changes. */\n Pending = 'PENDING'\n}\n\nexport type TestUnreviewableError = UserError & {\n __typename?: 'TestUnreviewableError';\n message: Scalars['String']['output'];\n test: Test;\n};\n\nexport type User = Node & {\n __typename?: 'User';\n accounts: Array<Account>;\n avatarUrl?: Maybe<Scalars['URL']['output']>;\n /** When the entity was first created in Chromatic. */\n createdAt: Scalars['DateTime']['output'];\n /** GraphQL node identifier */\n id: Scalars['ID']['output'];\n name: Scalars['String']['output'];\n /** The number of projects this user is a member of. */\n projectCount: Scalars['Int']['output'];\n projectMembership?: Maybe<ProjectMembership>;\n /** When the entity was last updated or created in Chromatic. */\n updatedAt: Scalars['DateTime']['output'];\n username: Scalars['String']['output'];\n};\n\n\nexport type UserProjectMembershipArgs = {\n projectId: Scalars['ID']['input'];\n};\n\nexport type UserError = {\n /** A message describing the error. */\n message: Scalars['String']['output'];\n};\n\nexport type ViewportInfo = {\n __typename?: 'ViewportInfo';\n /** Identifier for this viewport. */\n id: Scalars['ID']['output'];\n /** Whether this is the default viewport. */\n isDefault: Scalars['Boolean']['output'];\n /** Viewport display name. */\n name: Scalars['String']['output'];\n /** Viewport width in pixels. */\n width: Scalars['Int']['output'];\n};\n\nexport type VisualTestsProjectCountQueryQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type VisualTestsProjectCountQueryQuery = { __typename?: 'Query', viewer?: { __typename?: 'User', projectCount: number, accounts: Array<{ __typename?: 'Account', newProjectUrl?: string | null }> } | null };\n\nexport type SelectProjectsQueryQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type SelectProjectsQueryQuery = { __typename?: 'Query', viewer?: { __typename?: 'User', accounts: Array<{ __typename?: 'Account', id: string, name: string, avatarUrl?: string | null, newProjectUrl?: string | null, projects?: Array<{ __typename?: 'Project', id: string, name: string, webUrl: any, lastBuild?: { __typename?: 'AnnouncedBuild', branch: string, number: number } | { __typename?: 'CompletedBuild', branch: string, number: number } | { __typename?: 'PreparedBuild', branch: string, number: number } | { __typename?: 'PublishedBuild', branch: string, number: number } | { __typename?: 'StartedBuild', branch: string, number: number } | null } | null> | null }> } | null };\n\nexport type ProjectQueryQueryVariables = Exact<{\n projectId: Scalars['ID']['input'];\n}>;\n\n\nexport type ProjectQueryQuery = { __typename?: 'Query', project?: { __typename?: 'Project', id: string, name: string, webUrl: any, lastBuild?: { __typename?: 'AnnouncedBuild', branch: string, number: number } | { __typename?: 'CompletedBuild', branch: string, number: number } | { __typename?: 'PreparedBuild', branch: string, number: number } | { __typename?: 'PublishedBuild', branch: string, number: number } | { __typename?: 'StartedBuild', branch: string, number: number } | null } | null };\n\nexport type AddonVisualTestsBuildQueryVariables = Exact<{\n projectId: Scalars['ID']['input'];\n branch: Scalars['String']['input'];\n gitUserEmailHash: Scalars['String']['input'];\n repositoryOwnerName?: InputMaybe<Scalars['String']['input']>;\n storyId: Scalars['String']['input'];\n testStatuses: Array<TestStatus> | TestStatus;\n selectedBuildId: Scalars['ID']['input'];\n hasSelectedBuildId: Scalars['Boolean']['input'];\n}>;\n\n\nexport type AddonVisualTestsBuildQuery = { __typename?: 'Query', project?: { __typename?: 'Project', name: string, lastBuildOnBranch?: (\n { __typename?: 'AnnouncedBuild' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchBuildFields_AnnouncedBuild_Fragment': LastBuildOnBranchBuildFields_AnnouncedBuild_Fragment;'SelectedBuildFields_AnnouncedBuild_Fragment': SelectedBuildFields_AnnouncedBuild_Fragment } }\n ) | (\n { __typename?: 'CompletedBuild' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchBuildFields_CompletedBuild_Fragment': LastBuildOnBranchBuildFields_CompletedBuild_Fragment;'SelectedBuildFields_CompletedBuild_Fragment': SelectedBuildFields_CompletedBuild_Fragment } }\n ) | (\n { __typename?: 'PreparedBuild' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchBuildFields_PreparedBuild_Fragment': LastBuildOnBranchBuildFields_PreparedBuild_Fragment;'SelectedBuildFields_PreparedBuild_Fragment': SelectedBuildFields_PreparedBuild_Fragment } }\n ) | (\n { __typename?: 'PublishedBuild' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchBuildFields_PublishedBuild_Fragment': LastBuildOnBranchBuildFields_PublishedBuild_Fragment;'SelectedBuildFields_PublishedBuild_Fragment': SelectedBuildFields_PublishedBuild_Fragment } }\n ) | (\n { __typename?: 'StartedBuild' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchBuildFields_StartedBuild_Fragment': LastBuildOnBranchBuildFields_StartedBuild_Fragment;'SelectedBuildFields_StartedBuild_Fragment': SelectedBuildFields_StartedBuild_Fragment } }\n ) | null } | null, selectedBuild?: (\n { __typename?: 'AnnouncedBuild' }\n & { ' $fragmentRefs'?: { 'SelectedBuildFields_AnnouncedBuild_Fragment': SelectedBuildFields_AnnouncedBuild_Fragment } }\n ) | (\n { __typename?: 'CompletedBuild' }\n & { ' $fragmentRefs'?: { 'SelectedBuildFields_CompletedBuild_Fragment': SelectedBuildFields_CompletedBuild_Fragment } }\n ) | (\n { __typename?: 'PreparedBuild' }\n & { ' $fragmentRefs'?: { 'SelectedBuildFields_PreparedBuild_Fragment': SelectedBuildFields_PreparedBuild_Fragment } }\n ) | (\n { __typename?: 'PublishedBuild' }\n & { ' $fragmentRefs'?: { 'SelectedBuildFields_PublishedBuild_Fragment': SelectedBuildFields_PublishedBuild_Fragment } }\n ) | (\n { __typename?: 'StartedBuild' }\n & { ' $fragmentRefs'?: { 'SelectedBuildFields_StartedBuild_Fragment': SelectedBuildFields_StartedBuild_Fragment } }\n ) | null, viewer?: { __typename?: 'User', projectMembership?: { __typename?: 'ProjectMembership', userCanReview: boolean } | null } | null };\n\ntype LastBuildOnBranchBuildFields_AnnouncedBuild_Fragment = { __typename: 'AnnouncedBuild', id: string, status: BuildStatus, committedAt: any } & { ' $fragmentName'?: 'LastBuildOnBranchBuildFields_AnnouncedBuild_Fragment' };\n\ntype LastBuildOnBranchBuildFields_CompletedBuild_Fragment = { __typename: 'CompletedBuild', result: BuildResult, id: string, status: BuildStatus, committedAt: any, testsForStatus?: { __typename?: 'CompletedBuildTestConnection', nodes: Array<(\n { __typename?: 'Test' }\n & { ' $fragmentRefs'?: { 'StatusTestFieldsFragment': StatusTestFieldsFragment } }\n )> } | null, testsForStory?: { __typename?: 'CompletedBuildTestConnection', nodes: Array<(\n { __typename?: 'Test' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchTestFieldsFragment': LastBuildOnBranchTestFieldsFragment } }\n )> } | null } & { ' $fragmentName'?: 'LastBuildOnBranchBuildFields_CompletedBuild_Fragment' };\n\ntype LastBuildOnBranchBuildFields_PreparedBuild_Fragment = { __typename: 'PreparedBuild', id: string, status: BuildStatus, committedAt: any } & { ' $fragmentName'?: 'LastBuildOnBranchBuildFields_PreparedBuild_Fragment' };\n\ntype LastBuildOnBranchBuildFields_PublishedBuild_Fragment = { __typename: 'PublishedBuild', id: string, status: BuildStatus, committedAt: any } & { ' $fragmentName'?: 'LastBuildOnBranchBuildFields_PublishedBuild_Fragment' };\n\ntype LastBuildOnBranchBuildFields_StartedBuild_Fragment = { __typename: 'StartedBuild', id: string, status: BuildStatus, committedAt: any, testsForStatus?: { __typename?: 'StartedBuildTestConnection', nodes: Array<(\n { __typename?: 'Test' }\n & { ' $fragmentRefs'?: { 'StatusTestFieldsFragment': StatusTestFieldsFragment } }\n )> } | null, testsForStory?: { __typename?: 'StartedBuildTestConnection', nodes: Array<(\n { __typename?: 'Test' }\n & { ' $fragmentRefs'?: { 'LastBuildOnBranchTestFieldsFragment': LastBuildOnBranchTestFieldsFragment } }\n )> } | null } & { ' $fragmentName'?: 'LastBuildOnBranchBuildFields_StartedBuild_Fragment' };\n\nexport type LastBuildOnBranchBuildFieldsFragment = LastBuildOnBranchBuildFields_AnnouncedBuild_Fragment | LastBuildOnBranchBuildFields_CompletedBuild_Fragment | LastBuildOnBranchBuildFields_PreparedBuild_Fragment | LastBuildOnBranchBuildFields_PublishedBuild_Fragment | LastBuildOnBranchBuildFields_StartedBuild_Fragment;\n\ntype SelectedBuildFields_AnnouncedBuild_Fragment = { __typename: 'AnnouncedBuild', id: string, number: number, branch: string, commit: string, committedAt: any, uncommittedHash?: string | null, status: BuildStatus } & { ' $fragmentName'?: 'SelectedBuildFields_AnnouncedBuild_Fragment' };\n\ntype SelectedBuildFields_CompletedBuild_Fragment = { __typename: 'CompletedBuild', startedAt: any, id: string, number: number, branch: string, commit: string, committedAt: any, uncommittedHash?: string | null, status: BuildStatus, testsForStory?: { __typename?: 'CompletedBuildTestConnection', nodes: Array<(\n { __typename?: 'Test' }\n & { ' $fragmentRefs'?: { 'StoryTestFieldsFragment': StoryTestFieldsFragment } }\n )> } | null } & { ' $fragmentName'?: 'SelectedBuildFields_CompletedBuild_Fragment' };\n\ntype SelectedBuildFields_PreparedBuild_Fragment = { __typename: 'PreparedBuild', id: string, number: number, branch: string, commit: string, committedAt: any, uncommittedHash?: string | null, status: BuildStatus } & { ' $fragmentName'?: 'SelectedBuildFields_PreparedBuild_Fragment' };\n\ntype SelectedBuildFields_PublishedBuild_Fragment = { __typename: 'PublishedBuild', id: string, number: number, branch: string, commit: string, committedAt: any, uncommittedHash?: string | null, status: BuildStatus } & { ' $fragmentName'?: 'SelectedBuildFields_PublishedBuild_Fragment' };\n\ntype SelectedBuildFields_StartedBuild_Fragment = { __typename: 'StartedBuild', startedAt: any, id: string, number: number, branch: string, commit: string, committedAt: any, uncommittedHash?: string | null, status: BuildStatus, testsForStory?: { __typename?: 'StartedBuildTestConnection', nodes: Array<(\n { __typename?: 'Test' }\n & { ' $fragmentRefs'?: { 'StoryTestFieldsFragment': StoryTestFieldsFragment } }\n )> } | null } & { ' $fragmentName'?: 'SelectedBuildFields_StartedBuild_Fragment' };\n\nexport type SelectedBuildFieldsFragment = SelectedBuildFields_AnnouncedBuild_Fragment | SelectedBuildFields_CompletedBuild_Fragment | SelectedBuildFields_PreparedBuild_Fragment | SelectedBuildFields_PublishedBuild_Fragment | SelectedBuildFields_StartedBuild_Fragment;\n\nexport type StatusTestFieldsFragment = { __typename?: 'Test', id: string, status: TestStatus, story?: { __typename?: 'Story', storyId: string } | null } & { ' $fragmentName'?: 'StatusTestFieldsFragment' };\n\nexport type LastBuildOnBranchTestFieldsFragment = { __typename?: 'Test', status: TestStatus } & { ' $fragmentName'?: 'LastBuildOnBranchTestFieldsFragment' };\n\nexport type StoryTestFieldsFragment = { __typename?: 'Test', id: string, status: TestStatus, result?: TestResult | null, webUrl: any, comparisons: Array<{ __typename?: 'TestComparison', id: string, result?: ComparisonResult | null, browser: { __typename?: 'BrowserInfo', id: string, key: Browser, name: string, version: string }, captureDiff?: { __typename?: 'CaptureDiff', diffImage?: { __typename?: 'CaptureOverlayImage', imageUrl: any, imageWidth: number } | null, focusImage?: { __typename?: 'CaptureOverlayImage', imageUrl: any, imageWidth: number } | null } | null, headCapture?: { __typename?: 'Capture', captureImage?: { __typename?: 'CaptureImage', imageUrl: any, imageWidth: number } | null, captureError?: { __typename?: 'CaptureErrorComponentOffPage', kind: CaptureErrorKind } | { __typename?: 'CaptureErrorFailedJS', error: any, kind: CaptureErrorKind } | { __typename?: 'CaptureErrorImageTooLarge', kind: CaptureErrorKind } | { __typename?: 'CaptureErrorInteractionFailure', error: any, kind: CaptureErrorKind } | { __typename?: 'CaptureErrorJSError', error: any, kind: CaptureErrorKind } | { __typename?: 'CaptureErrorNavigationTimeout', kind: CaptureErrorKind } | { __typename?: 'CaptureErrorNoJS', kind: CaptureErrorKind } | { __typename?: 'CaptureErrorStoryMissing', kind: CaptureErrorKind } | null } | null, baseCapture?: { __typename?: 'Capture', captureImage?: { __typename?: 'CaptureImage', imageUrl: any, imageWidth: number } | null } | null }>, mode: { __typename?: 'TestMode', name: string, globals: any }, story?: { __typename?: 'Story', storyId: string, name: string, component?: { __typename?: 'Component', name: string } | null } | null } & { ' $fragmentName'?: 'StoryTestFieldsFragment' };\n\nexport type ReviewTestMutationVariables = Exact<{\n input: ReviewTestInput;\n}>;\n\n\nexport type ReviewTestMutation = { __typename?: 'Mutation', reviewTest?: { __typename?: 'ReviewTestPayload', updatedTests?: Array<{ __typename?: 'Test', id: string, status: TestStatus }> | null, userErrors: Array<{ __typename: 'BuildSupersededError', message: string, build: { __typename?: 'AnnouncedBuild', id: string } | { __typename?: 'CompletedBuild', id: string } | { __typename?: 'PreparedBuild', id: string } | { __typename?: 'PublishedBuild', id: string } | { __typename?: 'StartedBuild', id: string } } | { __typename: 'TestNotFoundError', message: string } | { __typename: 'TestUnreviewableError', message: string, test: { __typename?: 'Test', id: string } }> } | null };\n\nexport const StatusTestFieldsFragmentDoc = {\"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\"}}]}}]}}]} as unknown as DocumentNode<StatusTestFieldsFragment, unknown>;\nexport const LastBuildOnBranchTestFieldsFragmentDoc = {\"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\"}}]}}]} as unknown as DocumentNode<LastBuildOnBranchTestFieldsFragment, unknown>;\nexport const LastBuildOnBranchBuildFieldsFragmentDoc = {\"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\"}}]}}]} as unknown as DocumentNode<LastBuildOnBranchBuildFieldsFragment, unknown>;\nexport const StoryTestFieldsFragmentDoc = {\"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\":true}}],\"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\":true}}],\"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\":true}}],\"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\":true}}],\"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\"}}]}}]}}]}}]} as unknown as DocumentNode<StoryTestFieldsFragment, unknown>;\nexport const SelectedBuildFieldsFragmentDoc = {\"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\":true}}],\"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\":true}}],\"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\":true}}],\"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\":true}}],\"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\"}}]}}]}}]}}]} as unknown as DocumentNode<SelectedBuildFieldsFragment, unknown>;\nexport const VisualTestsProjectCountQueryDocument = {\"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\"}}]}}]}}]}}]} as unknown as DocumentNode<VisualTestsProjectCountQueryQuery, VisualTestsProjectCountQueryQueryVariables>;\nexport const SelectProjectsQueryDocument = {\"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\"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<SelectProjectsQueryQuery, SelectProjectsQueryQueryVariables>;\nexport const ProjectQueryDocument = {\"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\"}}]}}]}}]}}]} as unknown as DocumentNode<ProjectQueryQuery, ProjectQueryQueryVariables>;\nexport const AddonVisualTestsBuildDocument = {\"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\":true}}],\"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\":true}}],\"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\":true}}],\"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\":true}}],\"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\"}}]}}]}}]}}]}}]} as unknown as DocumentNode<AddonVisualTestsBuildQuery, AddonVisualTestsBuildQueryVariables>;\nexport const ReviewTestDocument = {\"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\"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<ReviewTestMutation, ReviewTestMutationVariables>;","/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n query VisualTestsProjectCountQuery {\\n viewer {\\n projectCount\\n accounts {\\n newProjectUrl\\n }\\n }\\n }\\n\": types.VisualTestsProjectCountQueryDocument,\n \"\\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\": types.SelectProjectsQueryDocument,\n \"\\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\": types.ProjectQueryDocument,\n \"\\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\": types.AddonVisualTestsBuildDocument,\n \"\\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\": types.LastBuildOnBranchBuildFieldsFragmentDoc,\n \"\\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\": types.SelectedBuildFieldsFragmentDoc,\n \"\\n fragment StatusTestFields on Test {\\n id\\n status\\n story {\\n storyId\\n }\\n }\\n\": types.StatusTestFieldsFragmentDoc,\n \"\\n fragment LastBuildOnBranchTestFields on Test {\\n status\\n }\\n\": types.LastBuildOnBranchTestFieldsFragmentDoc,\n \"\\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\": types.StoryTestFieldsFragmentDoc,\n \"\\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\": types.ReviewTestDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query VisualTestsProjectCountQuery {\\n viewer {\\n projectCount\\n accounts {\\n newProjectUrl\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query VisualTestsProjectCountQuery {\\n viewer {\\n projectCount\\n accounts {\\n newProjectUrl\\n }\\n }\\n }\\n\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n fragment StatusTestFields on Test {\\n id\\n status\\n story {\\n storyId\\n }\\n }\\n\"): (typeof documents)[\"\\n fragment StatusTestFields on Test {\\n id\\n status\\n story {\\n storyId\\n }\\n }\\n\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n fragment LastBuildOnBranchTestFields on Test {\\n status\\n }\\n\"): (typeof documents)[\"\\n fragment LastBuildOnBranchTestFields on Test {\\n status\\n }\\n\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\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\"): (typeof documents)[\"\\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\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;","import { useAddonState } from \"@storybook/manager-api\";\nimport { authExchange } from \"@urql/exchange-auth\";\nimport React from \"react\";\nimport { Client, fetchExchange, mapExchange, Provider } from \"urql\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { ACCESS_TOKEN_KEY, ADDON_ID, CHROMATIC_API_URL } from \"../constants\";\n\nexport { Provider };\n\nlet currentToken: string | null;\nlet currentTokenExpiration: number | null;\nconst setCurrentToken = (token: string | null) => {\n try {\n const { exp } = token ? JSON.parse(atob(token.split(\".\")[1])) : { exp: null };\n currentToken = token;\n currentTokenExpiration = exp;\n } catch (e) {\n currentToken = null;\n currentTokenExpiration = null;\n }\n if (currentToken) {\n localStorage.setItem(ACCESS_TOKEN_KEY, currentToken);\n } else {\n localStorage.removeItem(ACCESS_TOKEN_KEY);\n }\n};\n\nsetCurrentToken(localStorage.getItem(ACCESS_TOKEN_KEY));\n\nexport const useAccessToken = () => {\n // We use an object rather than a straight boolean here due to https://github.com/storybookjs/storybook/pull/23991\n const [{ token }, setTokenState] = useAddonState<{ token: string | null }>(\n `${ADDON_ID}/accessToken`,\n { token: currentToken }\n );\n\n const updateToken = React.useCallback(\n (newToken: string | null) => {\n setCurrentToken(newToken);\n setTokenState({ token: currentToken });\n },\n [setTokenState]\n );\n\n return [token, updateToken] as const;\n};\n\nconst sessionId = uuid();\n\nexport const getFetchOptions = (token?: string) => ({\n headers: {\n Accept: \"*/*\",\n ...(token && { Authorization: `Bearer ${token}` }),\n \"X-Chromatic-Session-ID\": sessionId,\n },\n});\n\nexport const client = new Client({\n url: CHROMATIC_API_URL,\n exchanges: [\n // We don't use cacheExchange, because it would inadvertently share data between stories.\n mapExchange({\n onResult(result) {\n // Not all queries contain the `viewer` field, in which case it will be `undefined`.\n // When we do retrieve the field but the token is invalid, it will be `null`.\n if (result.data?.viewer === null) setCurrentToken(null);\n },\n }),\n authExchange(async (utils) => {\n return {\n addAuthToOperation(operation) {\n if (!currentToken) return operation;\n return utils.appendHeaders(operation, { Authorization: `Bearer ${currentToken}` });\n },\n\n // Determine if the current error is an authentication error.\n didAuthError: (error) =>\n error.response.status === 401 ||\n error.graphQLErrors.some((e) => e.message.includes(\"Must login\")),\n\n // If didAuthError returns true, clear the token. Ideally we should refresh the token here.\n // The operation will be retried automatically.\n async refreshAuth() {\n setCurrentToken(null);\n },\n\n // Prevent making a request if we know the token is missing, invalid or expired.\n // This handler is called repeatedly so we avoid parsing the token each time.\n willAuthError() {\n if (!currentToken) return true;\n try {\n if (!currentTokenExpiration) {\n const { exp } = JSON.parse(atob(currentToken.split(\".\")[1]));\n currentTokenExpiration = exp;\n }\n return Date.now() / 1000 > (currentTokenExpiration || 0);\n } catch (e) {\n return true;\n }\n },\n };\n }),\n fetchExchange,\n ],\n fetchOptions: getFetchOptions(), // Auth header (token) is handled by authExchange\n});\n\nexport const GraphQLClientProvider = ({ children }: { children: React.ReactNode }) => {\n return <Provider value={client}>{children}</Provider>;\n};\n","import { useCallback, useEffect, useRef } from \"react\";\nimport { z } from \"zod\";\n\nconst dialogPayloadSchema = z.union([\n z.object({ message: z.literal(\"login\") }),\n z.object({ message: z.literal(\"grant\"), denied: z.boolean() }),\n z.object({ message: z.literal(\"createdProject\"), projectId: z.string() }),\n]);\n\ntype Schema = z.infer<typeof dialogPayloadSchema>;\n\nexport type DialogHandler = (payload: Schema) => void;\n\nexport const useChromaticDialog = (handler?: DialogHandler) => {\n const dialog = useRef<Window | null>();\n const dialogOrigin = useRef<string>();\n\n useEffect(() => {\n const handleMessage = ({ origin, data }: MessageEvent) => {\n if (origin === dialogOrigin.current) {\n let parsed: Schema;\n try {\n parsed = dialogPayloadSchema.parse(data);\n } catch (err) {\n // Don't log anything on parsing errors, as we can get messages from things like intercom\n return;\n }\n handler?.(parsed);\n }\n };\n\n window.addEventListener(\"message\", handleMessage);\n\n return () => window.removeEventListener(\"message\", handleMessage);\n }, [handler]);\n\n return [\n useCallback((url: string) => {\n const width = 800;\n const height = 800;\n const usePopup = window.innerWidth > width && window.innerHeight > height;\n\n if (usePopup) {\n const left = (window.innerWidth - width) / 2 + window.screenLeft;\n const top = (window.innerHeight - height) / 2 + window.screenTop;\n const options = `scrollbars=yes,width=${width},height=${height},top=${top},left=${left}`;\n dialog.current = window.open(url, \"chromatic-dialog\", options);\n dialog.current?.focus();\n } else {\n dialog.current = window.open(url, \"_blank\");\n }\n const { origin } = new URL(url);\n dialogOrigin.current = origin;\n }, []),\n\n useCallback(() => dialog.current?.close(), []),\n ] as const;\n};\n","import React from \"react\";\n\nimport { Button } from \"../../components/Button\";\nimport { Container } from \"../../components/Container\";\nimport { Heading } from \"../../components/Heading\";\nimport { VisualTestsIcon } from \"../../components/icons/VisualTestsIcon\";\nimport { Stack } from \"../../components/Stack\";\nimport { Text } from \"../../components/Text\";\n\ninterface WelcomeProps {\n onNext: () => void;\n}\n\nexport const Welcome = ({ onNext }: WelcomeProps) => (\n <Container>\n <Stack>\n <div>\n <VisualTestsIcon />\n <Heading>Visual tests</Heading>\n <Text>\n Catch bugs in UI appearance automatically. Compare image snapshots to detect visual\n changes.\n </Text>\n </div>\n <Button secondary onClick={onNext}>\n Enable\n </Button>\n </Stack>\n </Container>\n);\n","import { Icon, Link } from \"@storybook/design-system\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { Container } from \"../../components/Container\";\nimport { FooterSection } from \"../../components/FooterSection\";\nimport { Heading } from \"../../components/Heading\";\nimport { VisualTestsIcon } from \"../../components/icons/VisualTestsIcon\";\nimport { Section, Sections } from \"../../components/layout\";\nimport { Stack } from \"../../components/Stack\";\nimport { Text } from \"../../components/Text\";\n\ninterface GitNotFoundProps {\n gitInfoError: Error;\n setAccessToken: (accessToken: string | null) => void;\n}\n\nconst InfoSection = styled(Section)(({ theme }) => ({\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n borderRadius: theme.appBorderRadius,\n background: theme.color.lightest,\n padding: 15,\n flex: 1,\n boxShadow: `0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 2px 5px 0px rgba(0, 0, 0, 0.05)`,\n}));\n\nconst InfoSectionText = styled(Text)(({ theme }) => ({\n marginLeft: 14,\n flex: 1,\n textAlign: \"left\",\n color: theme.color.darker,\n}));\n\nexport const GitNotFound = ({ gitInfoError, setAccessToken }: GitNotFoundProps) => (\n <Sections>\n <Section grow>\n <Container>\n <Stack>\n <div>\n <VisualTestsIcon />\n <Heading>Visual tests</Heading>\n <Text>\n Catch bugs in UI appearance automatically. Compare image snapshots to detect visual\n changes.\n </Text>\n </div>\n <InfoSection>\n <Icon icon=\"lock\" />\n <InfoSectionText>\n <b>Git not detected</b>\n <br />\n This addon requires Git to associate test results with commits and branches.\n </InfoSectionText>\n </InfoSection>\n <Link target=\"_new\" href=\"https://www.chromatic.com/docs/visual-testing-addon/\" withArrow>\n Visual tests requirements\n </Link>\n </Stack>\n </Container>\n </Section>\n <FooterSection setAccessToken={setAccessToken} />\n </Sections>\n);\n","import React, { ReactNode } from \"react\";\n\nimport { FooterMenu } from \"./FooterMenu\";\nimport { Bar, Col, Section } from \"./layout\";\n\nexport const FooterSection = ({\n setAccessToken,\n render,\n}: {\n setAccessToken: (accessToken: string | null) => void;\n render?: ({ menu }: { menu: ReactNode }) => ReactNode;\n}) => {\n const menu = <FooterMenu setAccessToken={setAccessToken} />;\n return (\n <Section last>\n <Bar>\n {render ? (\n render({ menu })\n ) : (\n <>\n <Col push />\n <Col>{menu}</Col>\n </>\n )}\n </Bar>\n </Section>\n );\n};\n","import { Icons } from \"@storybook/components\";\nimport React from \"react\";\n\nimport { TooltipMenu } from \"./TooltipMenu\";\n\ninterface FooterMenuProps {\n setAccessToken: (value: string | null) => void;\n}\n\nexport const FooterMenu = ({ setAccessToken }: FooterMenuProps) => {\n return (\n <TooltipMenu\n placement=\"top\"\n links={[\n {\n id: \"logout\",\n title: \"Log out\",\n icon: \"user\",\n onClick: () => setAccessToken(null),\n },\n {\n id: \"learn\",\n title: \"Learn about this addon\",\n icon: \"question\",\n href: \"https://www.chromatic.com/docs/visual-testing-addon\",\n },\n ]}\n >\n <Icons icon=\"ellipsis\" />\n </TooltipMenu>\n );\n};\n","import { TooltipLinkList, TooltipNote, WithTooltip } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React, { ComponentProps } from \"react\";\n\nimport { IconButton } from \"./IconButton\";\n\nconst Tooltip = styled.div({\n \"& > div\": {\n minWidth: 120,\n },\n});\n\ninterface TooltipMenuProps\n extends Omit<ComponentProps<typeof WithTooltip>, \"children\" | \"tooltip\" | \"onVisibleChange\"> {\n children: React.ReactNode | ((active: boolean) => React.ReactNode);\n links: ComponentProps<typeof TooltipLinkList>[\"links\"];\n note?: ComponentProps<typeof TooltipNote>[\"note\"];\n}\n\nexport const TooltipMenu = ({ children, links, note, ...props }: TooltipMenuProps) => {\n const [active, setActive] = React.useState(false);\n\n const menu = (\n <WithTooltip\n closeOnOutsideClick\n closeOnTriggerHidden\n onVisibleChange={(visible) => setActive(visible)}\n tooltip={({ onHide }) => (\n <Tooltip>\n <TooltipLinkList\n links={links.map((link) => ({\n ...link,\n onClick: (...args) => {\n onHide();\n return link.onClick?.(...args);\n },\n }))}\n />\n </Tooltip>\n )}\n trigger=\"click\"\n {...props}\n >\n {typeof children === \"function\" ? (\n children(active)\n ) : (\n <IconButton active={active}>{children}</IconButton>\n )}\n </WithTooltip>\n );\n\n if (note) {\n return (\n <WithTooltip tooltip={<TooltipNote note={note} />} trigger=\"hover\" hasChrome={false}>\n {menu}\n </WithTooltip>\n );\n }\n\n return menu;\n};\n","import { IconButton as BaseIconButton } from \"@storybook/components\";\nimport { styled, type Theme } from \"@storybook/theming\";\nimport { ComponentProps } from \"react\";\n\nconst getStatusStyles = (theme: Theme, status?: IconButtonProps[\"status\"]) =>\n (status &&\n {\n positive: { color: theme.color.positiveText },\n warning: { color: theme.color.warningText },\n }[status]) ||\n {};\n\ninterface IconButtonProps extends ComponentProps<typeof BaseIconButton> {\n active?: boolean;\n as?: string;\n secondary?: boolean;\n status?: \"positive\" | \"warning\";\n}\n\nexport const IconButton: React.FC<IconButtonProps> = styled(BaseIconButton)<IconButtonProps>(\n ({ active, secondary, theme }) => ({\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n gap: 6,\n margin: 0,\n color: active || secondary ? theme.color.secondary : `${theme.color.defaultText}99`,\n fontWeight: \"normal\",\n \"& > svg\": {\n width: \"auto\",\n },\n }),\n ({ active, status, theme }) => !active && getStatusStyles(theme, status),\n ({ active, theme }) => {\n const isLightTheme = theme.background.content === theme.color.lightest;\n const activeBg = isLightTheme ? \"rgb(241,248,255)\" : \"rgb(28,37,45)\";\n const hoverBg = isLightTheme ? \"rgb(229,243,255)\" : \"rgb(29,44,56)\";\n return {\n \"--bg-color\": active ? activeBg : theme.background.content,\n \"&:hover\": { \"--bg-color\": hoverBg },\n };\n }\n);\n","import { Icons, Link } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\nimport { useQuery } from \"urql\";\n\nimport { Button } from \"../../components/Button\";\nimport { Container } from \"../../components/Container\";\nimport { FooterSection } from \"../../components/FooterSection\";\nimport { Heading } from \"../../components/Heading\";\nimport { Col, Section, Sections, Text } from \"../../components/layout\";\nimport { Stack } from \"../../components/Stack\";\nimport { graphql } from \"../../gql\";\nimport { ProjectQueryQuery } from \"../../gql/graphql\";\n\nconst CheckIcon = styled(Icons)(({ theme }) => ({\n width: 40,\n height: 40,\n padding: 10,\n background: theme.color.positive,\n borderRadius: \"100%\",\n color: \"white\",\n}));\n\nconst ProjectQuery = graphql(/* GraphQL */ `\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`);\n\nexport const LinkedProject = ({\n projectId,\n configFile,\n goToNext,\n setAccessToken,\n}: {\n projectId: string;\n configFile: string;\n goToNext: () => void;\n setAccessToken: (accessToken: string | null) => void;\n}) => {\n const [{ data, fetching, error }] = useQuery<ProjectQueryQuery>({\n query: ProjectQuery,\n variables: { projectId },\n });\n\n return (\n <Sections>\n <Section grow>\n <Container>\n <Stack>\n {fetching && <p>Loading...</p>}\n {error && <p>{error.message}</p>}\n {data?.project && (\n <Stack>\n <CheckIcon icon=\"check\" />\n <Heading>Project linked!</Heading>\n <Text style={{ maxWidth: 380 }}>\n The <code>projectId</code> for {data.project.name} has been added to this\n project's <code>{configFile}</code>. This will be used to sync with Chromatic.\n Please commit this change to continue using this addon.\n </Text>\n <Button secondary onClick={() => goToNext()}>\n Catch a UI change\n </Button>\n <Text>\n Why do we need a project ID?{\" \"}\n <Link href=\"https://www.chromatic.com/docs/cli\">Learn More »</Link>\n </Text>\n </Stack>\n )}\n </Stack>\n </Container>\n </Section>\n <FooterSection\n setAccessToken={setAccessToken}\n render={({ menu }) => (\n <>\n <Col>\n {data?.project?.lastBuild && (\n <Text style={{ marginLeft: 5 }}>\n Last build: {data.project.lastBuild.number} on branch{\" \"}\n {data.project.lastBuild.branch}\n </Text>\n )}\n </Col>\n <Col push>{menu}</Col>\n </>\n )}\n />\n </Sections>\n );\n};\n","import { Code, Link } from \"@storybook/components\";\nimport React from \"react\";\nimport { dedent } from \"ts-dedent\";\n\nimport { Container } from \"../../components/Container\";\nimport { FooterSection } from \"../../components/FooterSection\";\nimport { Heading } from \"../../components/Heading\";\nimport { Section, Sections } from \"../../components/layout\";\nimport { Text as CenterText } from \"../../components/Text\";\n\ntype LinkingProjectFailedProps = {\n projectId: string;\n configFile: string;\n setAccessToken: (accessToken: string | null) => void;\n};\n\nconst configureDocsLink = \"https://www.chromatic.com/docs/addon-visual-tests#configure\";\n\nexport function LinkingProjectFailed({\n projectId,\n configFile,\n setAccessToken,\n}: LinkingProjectFailedProps) {\n return (\n <Sections>\n <Section grow>\n <Container>\n <CenterText>\n <Heading>Add the Project ID to your Chromatic config</Heading>\n The <code>projectId</code> will be used to reference prior tests. Please commit this\n change to continue using this addon. The file should be saved at{\" \"}\n <code>{configFile}</code>.\n </CenterText>\n <Code>\n {dedent`\n {\n \"projectId\": \"${projectId}\",\n }\n `}\n </Code>\n <CenterText>\n What is this for?{\" \"}\n <Link withArrow target=\"_new\" href={configureDocsLink}>\n Learn more\n </Link>\n </CenterText>\n </Container>\n </Section>\n <FooterSection setAccessToken={setAccessToken} />\n </Sections>\n );\n}\n","import { Icons, Link } from \"@storybook/components\";\nimport { Avatar, ListItem } from \"@storybook/design-system\";\nimport { styled } from \"@storybook/theming\";\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport { useQuery } from \"urql\";\n\nimport { Container } from \"../../components/Container\";\nimport { FooterSection } from \"../../components/FooterSection\";\nimport { Heading } from \"../../components/Heading\";\nimport { Section, Sections, Text } from \"../../components/layout\";\nimport { Stack } from \"../../components/Stack\";\nimport { graphql } from \"../../gql\";\nimport type { Account, Project, SelectProjectsQueryQuery } from \"../../gql/graphql\";\nimport { DialogHandler, useChromaticDialog } from \"../../utils/useChromaticDialog\";\n\nconst SelectProjectsQuery = graphql(/* GraphQL */ `\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`);\n\nexport const LinkProject = ({\n createdProjectId,\n setCreatedProjectId,\n onUpdateProject,\n setAccessToken,\n}: {\n createdProjectId: Project[\"id\"] | undefined;\n setCreatedProjectId: (projectId: Project[\"id\"]) => void;\n onUpdateProject: (projectId: string) => void;\n setAccessToken: (accessToken: string | null) => void;\n}) => {\n const onSelectProjectId = React.useCallback(\n async (selectedProjectId: string) => {\n await onUpdateProject(selectedProjectId);\n },\n [onUpdateProject]\n );\n\n return (\n <SelectProject\n createdProjectId={createdProjectId}\n setCreatedProjectId={setCreatedProjectId}\n onSelectProjectId={onSelectProjectId}\n setAccessToken={setAccessToken}\n />\n );\n};\n\nconst ListHeading = styled.div`\n font-size: ${({ theme }) => theme.typography.size.s1}px;\n font-weight: ${({ theme }) => theme.typography.weight.bold};\n color: ${({ theme }) => theme.color.dark};\n background-color: inherit;\n padding: 9px 15px;\n border-bottom: 1px solid ${({ theme }) => theme.color.mediumlight};\n`;\n\nconst Left = styled.div`\n flex: 1;\n background-color: white;\n display: flex;\n flex-direction: column;\n`;\nconst Right = styled.div`\n flex: 1;\n background-color: ${({ theme }) => theme.color.lighter};\n display: flex;\n flex-direction: column;\n`;\n\nconst ProjectPicker = styled.div`\n background: ${({ theme }) => theme.color.lightest};\n border-radius: 5px;\n border: 1px solid ${({ theme }) => theme.color.mediumlight};\n height: 260px;\n width: 420px;\n overflow: hidden;\n text-align: left;\n position: relative;\n display: flex;\n margin: 10px;\n`;\n\nconst List = styled.div({\n height: \"100%\",\n overflowY: \"auto\",\n});\n\nconst RepositoryOwnerAvatar = styled(Avatar)`\n margin-right: 10px;\n`;\n\nfunction SelectProject({\n createdProjectId,\n setCreatedProjectId,\n onSelectProjectId,\n setAccessToken,\n}: {\n createdProjectId: Project[\"id\"] | undefined;\n setCreatedProjectId: (projectId: Project[\"id\"]) => void;\n onSelectProjectId: (projectId: string) => Promise<void>;\n setAccessToken: (accessToken: string | null) => void;\n}) {\n const [{ data, fetching, error }, rerunProjectsQuery] = useQuery<SelectProjectsQueryQuery>({\n query: SelectProjectsQuery,\n });\n\n // Poll for updates\n useEffect(() => {\n const interval = setInterval(rerunProjectsQuery, 5000);\n return () => clearInterval(interval);\n }, [rerunProjectsQuery]);\n\n const [selectedAccountId, setSelectedAccountId] = useState<Account[\"id\"]>();\n const selectedAccount = data?.viewer?.accounts.find((a) => a.id === selectedAccountId);\n\n const onSelectAccount = React.useCallback(\n (account: NonNullable<SelectProjectsQueryQuery[\"viewer\"]>[\"accounts\"][number]) => {\n setSelectedAccountId(account.id);\n },\n [setSelectedAccountId]\n );\n\n React.useEffect(() => {\n if (!selectedAccountId && data?.viewer?.accounts) {\n onSelectAccount(data.viewer.accounts[0]);\n }\n }, [data, selectedAccountId, onSelectAccount]);\n\n const [isSelectingProject, setSelectingProject] = useState(false);\n\n const handleSelectProject = React.useCallback(\n (\n project: NonNullable<\n NonNullable<\n NonNullable<SelectProjectsQueryQuery[\"viewer\"]>[\"accounts\"][number][\"projects\"]\n >[number]\n >\n ) => {\n setSelectingProject(true);\n onSelectProjectId(project.id);\n const timer = setTimeout(() => {\n setSelectingProject(false);\n }, 1000);\n return () => clearTimeout(timer);\n },\n [onSelectProjectId, setSelectingProject]\n );\n\n const handler = useCallback<DialogHandler>(\n async (event) => {\n if (event.message === \"createdProject\") {\n // We don't know the project token yet, so we need to wait until it comes back on the query\n // longer be necessary once we don't write tokens any more\n // (https://linear.app/chromaui/issue/AP-3383/generate-an-app-token-for-each-build-rather-than-writing-project-token)\n rerunProjectsQuery();\n setCreatedProjectId(event.projectId);\n }\n },\n [rerunProjectsQuery, setCreatedProjectId]\n );\n\n const [openDialog, closeDialog] = useChromaticDialog(handler);\n\n // Once we find the project we created just above, close the dialog and select it\n const createdProject =\n createdProjectId && selectedAccount?.projects?.find((p) => p?.id.endsWith(createdProjectId));\n useEffect(() => {\n if (createdProject) {\n closeDialog();\n handleSelectProject(createdProject);\n }\n }, [createdProject, handleSelectProject, closeDialog]);\n\n return (\n <Sections>\n <Section grow>\n <Container>\n <Stack>\n {!data && fetching && <p>Loading...</p>}\n {error && <p>{error.message}</p>}\n {data?.viewer?.accounts && (\n <>\n <Heading>Select a Project</Heading>\n <Text>Baselines will be used with this project.</Text>\n <ProjectPicker>\n <Left>\n <ListHeading>Accounts</ListHeading>\n <List data-testid=\"left-list\">\n {data.viewer.accounts?.map((account) => (\n <ListItem\n key={account.id}\n title={account.name}\n left={\n <RepositoryOwnerAvatar\n src={account.avatarUrl ?? undefined}\n size=\"tiny\"\n />\n }\n onClick={() => onSelectAccount(account)}\n active={selectedAccountId === account.id}\n />\n ))}\n </List>\n </Left>\n <Right>\n <ListHeading>Projects</ListHeading>\n <List data-testid=\"right-list\">\n {selectedAccount?.projects?.map(\n (project) =>\n project && (\n <ListItem\n appearance=\"secondary\"\n key={project.id}\n title={project.name}\n right={<Icons icon=\"add\" aria-label={project.name} />}\n onClick={() => handleSelectProject(project)}\n disabled={isSelectingProject}\n />\n )\n )}\n {selectedAccount && (\n <ListItem\n title={\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <Link\n isButton\n withArrow\n onClick={() => {\n if (!selectedAccount?.newProjectUrl) {\n throw new Error(\"Unexpected missing `newProjectUrl` on account\");\n }\n openDialog(selectedAccount.newProjectUrl);\n }}\n >\n Create project\n </Link>\n }\n />\n )}\n </List>\n </Right>\n </ProjectPicker>\n </>\n )}\n </Stack>\n </Container>\n </Section>\n <FooterSection setAccessToken={setAccessToken} />\n </Sections>\n );\n}\n","import React, { createContext, useMemo, useReducer } from \"react\";\n\nimport { useRequiredContext } from \"../../utils/useRequiredContext\";\n\nconst initialControls = {\n settingsVisible: false,\n warningsVisible: false,\n baselineImageVisible: false,\n focusVisible: false,\n diffVisible: false,\n};\n\ntype State = typeof initialControls;\n\nconst toggle =\n (key: keyof State) =>\n (state: State, visible?: boolean): State => ({\n ...state,\n [key]: typeof visible === \"boolean\" ? visible : !state[key],\n });\n\nconst handlers = {\n toggleDiff: toggle(\"diffVisible\"),\n toggleFocus: toggle(\"focusVisible\"),\n toggleSettings: toggle(\"settingsVisible\"),\n toggleWarnings: toggle(\"warningsVisible\"),\n toggleBaselineImage: toggle(\"baselineImageVisible\"),\n} as const;\n\ntype Action = { type: keyof typeof handlers; payload?: any };\n\nconst controlsReducer = (state: State, action: Action) =>\n handlers[action.type](state, action.payload);\n\nexport const ControlsContext = createContext(initialControls);\nexport const ControlsDispatchContext = createContext<React.Dispatch<Action>>(() => {});\n\nexport const useControlsState = () => useRequiredContext(ControlsContext, \"Controls\");\nexport const useControlsDispatch = () => {\n const dispatch = useRequiredContext(ControlsDispatchContext, \"ControlsDispatch\");\n return useMemo(\n () => ({\n toggleDiff: (visible?: boolean) => dispatch({ type: \"toggleDiff\", payload: visible }),\n toggleFocus: (visible?: boolean) => dispatch({ type: \"toggleFocus\", payload: visible }),\n toggleSettings: (visible?: boolean) => dispatch({ type: \"toggleSettings\", payload: visible }),\n toggleWarnings: (visible?: boolean) => dispatch({ type: \"toggleWarnings\", payload: visible }),\n toggleBaselineImage: (visible?: boolean) =>\n dispatch({ type: \"toggleBaselineImage\", payload: visible }),\n }),\n [dispatch]\n );\n};\n\nexport const ControlsProvider = ({\n children,\n initialState = initialControls,\n}: {\n children: React.ReactNode;\n initialState?: State;\n}) => {\n const [state, dispatch] = useReducer(controlsReducer, initialState);\n\n return (\n <ControlsContext.Provider value={state}>\n <ControlsDispatchContext.Provider value={dispatch}>\n {children}\n </ControlsDispatchContext.Provider>\n </ControlsContext.Provider>\n );\n};\n","import { useContext } from \"react\";\n\nexport const useRequiredContext = <T>(context: React.Context<T>, name: string) => {\n const value = useContext(context);\n if (value === null || value === undefined) throw new Error(`Missing context value for ${name}`);\n return value as NonNullable<T>;\n};\n","import { useStorybookApi } from \"@storybook/manager-api\";\nimport type { API_StatusState } from \"@storybook/types\";\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport { useMutation } from \"urql\";\n\nimport { getFragment } from \"../../gql\";\nimport { ReviewTestBatch, ReviewTestInputStatus } from \"../../gql/graphql\";\nimport { GitInfoPayload, LocalBuildProgress, UpdateStatusFunction } from \"../../types\";\nimport { testsToStatusUpdate } from \"../../utils/testsToStatusUpdate\";\nimport { SelectedBuildInfo, updateSelectedBuildInfo } from \"../../utils/updateSelectedBuildInfo\";\nimport { BuildProvider, useBuild } from \"./BuildContext\";\nimport { BuildResults } from \"./BuildResults\";\nimport { FragmentStatusTestFields, MutationReviewTest } from \"./graphql\";\nimport { NoBuild } from \"./NoBuild\";\nimport { ReviewTestProvider } from \"./ReviewTestContext\";\n\nconst createEmptyStoryStatusUpdate = (state: API_StatusState) => {\n return Object.fromEntries(Object.entries(state).map(([id]) => [id, null]));\n};\n\ninterface VisualTestsProps {\n isOutdated: boolean;\n selectedBuildInfo?: SelectedBuildInfo;\n setSelectedBuildInfo: ReturnType<typeof useState<SelectedBuildInfo>>[1];\n dismissBuildError: () => void;\n localBuildProgress?: LocalBuildProgress;\n startDevBuild: () => void;\n setAccessToken: (accessToken: string | null) => void;\n setOutdated: (isOutdated: boolean) => void;\n updateBuildStatus: UpdateStatusFunction;\n projectId: string;\n gitInfo: Pick<\n GitInfoPayload,\n \"branch\" | \"slug\" | \"userEmailHash\" | \"commit\" | \"committedAt\" | \"uncommittedHash\"\n >;\n storyId: string;\n}\n\ninterface ReviewTestInput {\n testId: string;\n status: ReviewTestInputStatus.Accepted | ReviewTestInputStatus.Pending;\n batch?: ReviewTestBatch;\n}\n\nconst useReview = ({\n buildIsReviewable,\n userCanReview,\n onReviewSuccess,\n onReviewError,\n}: {\n buildIsReviewable: boolean;\n userCanReview: boolean;\n onReviewSuccess?: (input: ReviewTestInput) => void;\n onReviewError?: (err: any, input: ReviewTestInput) => void;\n}) => {\n const [{ fetching: isReviewing }, runMutation] = useMutation(MutationReviewTest);\n\n const reviewTest = useCallback(\n async (input: ReviewTestInput) => {\n try {\n if (!buildIsReviewable) throw new Error(\"Build is not reviewable\");\n if (!userCanReview) throw new Error(\"No permission to review tests\");\n const { error } = await runMutation({ input });\n if (error) throw error;\n onReviewSuccess?.(input);\n } catch (err) {\n onReviewError?.(err, input);\n }\n },\n [onReviewSuccess, onReviewError, runMutation, buildIsReviewable, userCanReview]\n );\n\n const acceptTest = useCallback(\n (testId: string, batch: ReviewTestBatch = ReviewTestBatch.Spec) =>\n reviewTest({ status: ReviewTestInputStatus.Accepted, testId, batch }),\n [reviewTest]\n );\n\n const unacceptTest = useCallback(\n (testId: string, batch: ReviewTestBatch = ReviewTestBatch.Spec) =>\n reviewTest({ status: ReviewTestInputStatus.Pending, testId, batch }),\n [reviewTest]\n );\n\n return { isReviewing, acceptTest, unacceptTest, buildIsReviewable, userCanReview };\n};\n\nexport const VisualTestsWithoutSelectedBuildId = ({\n isOutdated,\n selectedBuildInfo,\n setSelectedBuildInfo,\n dismissBuildError,\n localBuildProgress,\n startDevBuild,\n setAccessToken,\n setOutdated,\n updateBuildStatus,\n projectId,\n gitInfo,\n storyId,\n}: VisualTestsProps) => {\n const { addNotification } = useStorybookApi();\n\n const buildInfo = useBuild({ projectId, storyId, gitInfo, selectedBuildInfo });\n\n const {\n hasData,\n hasProject,\n hasSelectedBuild,\n lastBuildOnBranch,\n lastBuildOnBranchIsReady,\n lastBuildOnBranchIsSelectable,\n selectedBuild,\n selectedBuildMatchesGit,\n queryError,\n rerunQuery,\n userCanReview,\n } = buildInfo;\n\n const reviewState = useReview({\n buildIsReviewable: !!selectedBuild && selectedBuild.id === lastBuildOnBranch?.id,\n userCanReview,\n onReviewSuccess: rerunQuery,\n onReviewError: (err, update) => {\n if (err instanceof Error) {\n addNotification({\n id: \"chromatic/errorAccepting\",\n // @ts-expect-error we need a better API for not passing a link\n link: undefined,\n content: {\n headline: `Failed to ${\n update.status === ReviewTestInputStatus.Accepted ? \"accept\" : \"unaccept\"\n } changes`,\n subHeadline: err.message,\n },\n icon: {\n name: \"cross\",\n color: \"red\",\n },\n });\n }\n },\n });\n\n // Currently only used by the sidebar button to show a blue dot (\"build outdated\")\n useEffect(() => setOutdated(!selectedBuildMatchesGit), [selectedBuildMatchesGit, setOutdated]);\n\n // We always set status to the next build's status, as when we change to a new story we'll see the\n // next builds. The status update is calculated outside useEffect so it only reruns when changed.\n const testsForStatus =\n lastBuildOnBranch &&\n \"testsForStatus\" in lastBuildOnBranch &&\n lastBuildOnBranch.testsForStatus?.nodes &&\n getFragment(FragmentStatusTestFields, lastBuildOnBranch.testsForStatus.nodes);\n const statusUpdate = lastBuildOnBranchIsSelectable && testsToStatusUpdate(testsForStatus || []);\n useEffect(() => {\n updateBuildStatus((state) => ({\n ...createEmptyStoryStatusUpdate(state),\n ...statusUpdate,\n }));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [JSON.stringify(statusUpdate), updateBuildStatus]);\n\n // Auto-select the last build on branch if it's selectable and ready\n useEffect(() => {\n setSelectedBuildInfo((oldSelectedBuildInfo) =>\n updateSelectedBuildInfo(oldSelectedBuildInfo, {\n shouldSwitchToLastBuildOnBranch: lastBuildOnBranchIsSelectable && lastBuildOnBranchIsReady,\n lastBuildOnBranchId: lastBuildOnBranch?.id,\n storyId,\n })\n );\n }, [\n lastBuildOnBranchIsSelectable,\n lastBuildOnBranchIsReady,\n lastBuildOnBranch?.id,\n setSelectedBuildInfo,\n storyId,\n ]);\n\n const switchToLastBuildOnBranch = useCallback(\n () =>\n lastBuildOnBranch?.id &&\n lastBuildOnBranchIsSelectable &&\n setSelectedBuildInfo({ buildId: lastBuildOnBranch.id, storyId }),\n [setSelectedBuildInfo, lastBuildOnBranchIsSelectable, lastBuildOnBranch?.id, storyId]\n );\n\n return !selectedBuild || !hasSelectedBuild || !hasData || queryError ? (\n <NoBuild\n {...{\n queryError,\n hasData,\n hasProject,\n hasSelectedBuild,\n startDevBuild,\n localBuildProgress,\n branch: gitInfo.branch,\n setAccessToken,\n }}\n />\n ) : (\n <ReviewTestProvider watchState={reviewState}>\n <BuildProvider watchState={buildInfo}>\n <BuildResults\n {...{\n branch: gitInfo.branch,\n dismissBuildError,\n isOutdated,\n localBuildProgress,\n ...(lastBuildOnBranchIsSelectable && { switchToLastBuildOnBranch }),\n startDevBuild,\n setAccessToken,\n storyId,\n }}\n />\n </BuildProvider>\n </ReviewTestProvider>\n );\n};\n\n// We split this part of the component out for testing purposes, so we can control the\n// selected build id in the stories and be super explicit about what happens when the\n// selected build & last build on branch are out of sync.\n//\n// If the selectedBuildInfo is internal state of the component it is harder to do this,\n// as we need to change the query results over time.\nexport const VisualTests = (\n props: Omit<VisualTestsProps, \"selectedBuildInfo\" | \"setSelectedBuildInfo\">\n) => {\n const [selectedBuildInfo, setSelectedBuildInfo] = useState<SelectedBuildInfo>();\n\n return (\n <VisualTestsWithoutSelectedBuildId {...{ selectedBuildInfo, setSelectedBuildInfo, ...props }} />\n );\n};\n","import type { API_StatusUpdate, API_StatusValue, StoryId } from \"@storybook/types\";\n\nimport { StatusTestFieldsFragment, TestStatus } from \"../gql/graphql\";\n\nexport const statusMap: Partial<Record<TestStatus, API_StatusValue>> = {\n [TestStatus.Pending]: \"warn\",\n [TestStatus.Failed]: \"error\",\n [TestStatus.Denied]: \"error\",\n [TestStatus.Broken]: \"error\",\n};\n\nconst statusOrder: (API_StatusValue | null)[] = [\n null,\n \"unknown\",\n \"pending\",\n \"success\",\n \"warn\",\n \"error\",\n];\nfunction chooseWorseStatus(status: API_StatusValue | null, oldStatus: API_StatusValue | null) {\n return statusOrder[Math.max(statusOrder.indexOf(status), statusOrder.indexOf(oldStatus))];\n}\n\nexport function testsToStatusUpdate<T extends StatusTestFieldsFragment>(\n tests: readonly T[]\n): API_StatusUpdate {\n const storyIdToStatus: Record<StoryId, API_StatusValue | null> = {};\n tests.forEach((test) => {\n if (!test.story || !test.status) {\n return;\n }\n storyIdToStatus[test.story.storyId] = chooseWorseStatus(\n statusMap[test.status] || null,\n storyIdToStatus[test.story.storyId]\n );\n });\n const update = Object.fromEntries(\n Object.entries(storyIdToStatus).map(([storyId, status]) => [\n storyId,\n status && {\n status,\n title: \"Visual Tests\",\n description: \"Chromatic Visual Tests\",\n },\n ])\n );\n\n return update;\n}\n","export interface SelectedBuildInfo {\n storyId: string;\n buildId: string;\n}\n\nexport function updateSelectedBuildInfo(\n oldSelectedBuildInfo: SelectedBuildInfo | undefined,\n {\n shouldSwitchToLastBuildOnBranch,\n lastBuildOnBranchId,\n storyId,\n }: {\n shouldSwitchToLastBuildOnBranch: boolean;\n lastBuildOnBranchId?: string;\n storyId: string;\n }\n) {\n if (!shouldSwitchToLastBuildOnBranch) {\n if (!oldSelectedBuildInfo) return undefined;\n\n return { ...oldSelectedBuildInfo, storyId };\n }\n\n if (!lastBuildOnBranchId) throw new Error(\"Impossible state\");\n return {\n buildId: lastBuildOnBranchId,\n storyId,\n };\n}\n","import React, { createContext, useEffect, useMemo } from \"react\";\nimport { useQuery } from \"urql\";\n\nimport { getFragment } from \"../../gql\";\nimport { StoryTestFieldsFragment, TestStatus } from \"../../gql/graphql\";\nimport { GitInfoPayload } from \"../../types\";\nimport { summarizeTests } from \"../../utils/summarizeTests\";\nimport { statusMap } from \"../../utils/testsToStatusUpdate\";\nimport { SelectedBuildInfo } from \"../../utils/updateSelectedBuildInfo\";\nimport { useRequiredContext } from \"../../utils/useRequiredContext\";\nimport { useTests } from \"../../utils/useTests\";\nimport { useControlsDispatch } from \"./ControlsContext\";\nimport {\n FragmentLastBuildOnBranchBuildFields,\n FragmentLastBuildOnBranchTestFields,\n FragmentSelectedBuildFields,\n FragmentStoryTestFields,\n QueryBuild,\n} from \"./graphql\";\n\nexport const useBuild = ({\n projectId,\n storyId,\n gitInfo,\n selectedBuildInfo,\n}: {\n projectId: string;\n storyId: string;\n gitInfo: Pick<\n GitInfoPayload,\n \"branch\" | \"slug\" | \"userEmailHash\" | \"commit\" | \"committedAt\" | \"uncommittedHash\"\n >;\n selectedBuildInfo?: SelectedBuildInfo;\n}) => {\n const [{ data, error: queryError, operation }, rerunQuery] = useQuery({\n query: QueryBuild,\n variables: {\n projectId,\n storyId,\n testStatuses: Object.keys(statusMap) as any as TestStatus[],\n branch: gitInfo.branch || \"\",\n ...(gitInfo.slug ? { repositoryOwnerName: gitInfo.slug.split(\"/\", 1)[0] } : {}),\n gitUserEmailHash: gitInfo.userEmailHash,\n selectedBuildId: selectedBuildInfo?.buildId || \"\",\n hasSelectedBuildId: !!selectedBuildInfo,\n },\n });\n\n // Poll for updates\n useEffect(() => {\n const interval = setInterval(rerunQuery, 5000);\n return () => clearInterval(interval);\n }, [rerunQuery]);\n\n // When you change story, for a period the query will return the previous set of data, and indicate\n // that with the operation being for the previous query.\n const storyDataIsStale = operation && storyId && operation.variables.storyId !== storyId;\n\n const lastBuildOnBranch = getFragment(\n FragmentLastBuildOnBranchBuildFields,\n data?.project?.lastBuildOnBranch\n );\n\n const lastBuildOnBranchStoryTests = [\n ...getFragment(\n FragmentLastBuildOnBranchTestFields,\n lastBuildOnBranch && \"testsForStory\" in lastBuildOnBranch && lastBuildOnBranch.testsForStory\n ? lastBuildOnBranch.testsForStory.nodes\n : []\n ),\n ];\n\n // If the last build is *newer* than the current head commit, we don't want to select it\n // as our local code wouldn't yet have the changes made in that build.\n const lastBuildOnBranchIsNewer = lastBuildOnBranch?.committedAt > gitInfo.committedAt;\n const lastBuildOnBranchIsSelectable = !!lastBuildOnBranch && !lastBuildOnBranchIsNewer;\n\n // If any tests for the current story are still in progress, we aren't ready to select the build\n const lastBuildOnBranchIsReady =\n !!lastBuildOnBranch &&\n lastBuildOnBranchStoryTests.every((t) => t.status !== TestStatus.InProgress);\n\n // If we didn't explicitly select a build, select the last build on the branch (if any)\n const selectedBuild = getFragment(\n FragmentSelectedBuildFields,\n data?.selectedBuild ?? (lastBuildOnBranchIsReady ? data?.project?.lastBuildOnBranch : undefined)\n );\n\n return {\n hasData: !!data && !storyDataIsStale,\n hasProject: !!data?.project,\n hasSelectedBuild: selectedBuild?.branch === gitInfo.branch,\n lastBuildOnBranch,\n lastBuildOnBranchIsNewer,\n lastBuildOnBranchIsReady,\n lastBuildOnBranchIsSelectable,\n selectedBuild,\n selectedBuildMatchesGit:\n selectedBuild?.branch === gitInfo.branch &&\n selectedBuild?.commit === gitInfo.commit &&\n selectedBuild?.uncommittedHash === gitInfo.uncommittedHash,\n rerunQuery,\n queryError,\n userCanReview: !!data?.viewer?.projectMembership?.userCanReview,\n };\n};\n\ntype BuildInfo = ReturnType<typeof useBuild> | null;\ntype SelectedStory =\n | ({\n hasTests: boolean;\n tests: StoryTestFieldsFragment[];\n summary: ReturnType<typeof summarizeTests>;\n } & ReturnType<typeof useTests>)\n | null;\n\nexport const BuildContext = createContext<BuildInfo>(null);\nexport const StoryContext = createContext<SelectedStory>(null);\n\nexport const useBuildState = () => useRequiredContext(BuildContext, \"Build\");\nexport const useSelectedBuildState = () => {\n const { selectedBuild } = useRequiredContext(BuildContext, \"Build\");\n if (!selectedBuild) throw new Error(\"No selectedBuild on Build context\");\n return selectedBuild;\n};\nexport const useSelectedStoryState = () => useRequiredContext(StoryContext, \"Story\");\n\nexport const BuildProvider = ({\n children,\n watchState = null,\n}: {\n children: React.ReactNode;\n watchState?: BuildInfo;\n}) => {\n const hasTests = !!watchState?.selectedBuild && \"testsForStory\" in watchState.selectedBuild;\n const testsForStory =\n watchState?.selectedBuild &&\n \"testsForStory\" in watchState.selectedBuild &&\n watchState.selectedBuild.testsForStory?.nodes;\n const tests = [...getFragment(FragmentStoryTestFields, testsForStory || [])];\n const summary = summarizeTests(tests);\n\n const { toggleDiff } = useControlsDispatch();\n useEffect(() => toggleDiff(summary.changeCount > 0), [toggleDiff, summary.changeCount]);\n\n return (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n <BuildContext.Provider value={useMemo(() => watchState, [JSON.stringify(watchState)])}>\n <StoryContext.Provider value={{ hasTests, tests, summary, ...useTests(tests) }}>\n {children}\n </StoryContext.Provider>\n </BuildContext.Provider>\n );\n};\n","import { ComparisonResult } from \"../gql/graphql\";\n\nexport const resultOrder = [\n undefined,\n ComparisonResult.Equal,\n ComparisonResult.Fixed,\n ComparisonResult.Added,\n ComparisonResult.Changed,\n ComparisonResult.Removed,\n ComparisonResult.CaptureError,\n ComparisonResult.SystemError,\n] as const;\n\nexport const aggregateResult = ([first, ...rest]: (typeof resultOrder)[number][]) =>\n rest.reduce((acc, v) => (resultOrder.indexOf(v) > resultOrder.indexOf(acc) ? v : acc), first);\n","import { ComparisonResult, StoryTestFieldsFragment, TestResult, TestStatus } from \"../gql/graphql\";\nimport { aggregateResult } from \"./aggregateResult\";\n\nfunction pickStatus(statusCounts: { [K in TestStatus]?: number }) {\n if ((statusCounts[TestStatus.Failed] ?? 0) > 0) return TestStatus.Failed;\n if ((statusCounts[TestStatus.InProgress] ?? 0) > 0) return TestStatus.InProgress;\n if ((statusCounts[TestStatus.Broken] ?? 0) > 0) return TestStatus.Broken;\n if ((statusCounts[TestStatus.Denied] ?? 0) > 0) return TestStatus.Denied;\n if ((statusCounts[TestStatus.Pending] ?? 0) > 0) return TestStatus.Pending;\n if ((statusCounts[TestStatus.Accepted] ?? 0) > 0) return TestStatus.Accepted;\n return TestStatus.Passed;\n}\n\n/**\n * Given a list of tests (typically a set of tests across modes for the one story),\n * summarize the vital statistics.\n */\nexport function summarizeTests(tests: StoryTestFieldsFragment[]) {\n const {\n statusCounts,\n isInProgress,\n changeCount,\n brokenCount,\n resultsByBrowser,\n resultsByMode,\n modesByName,\n } = tests.reduce<{\n statusCounts: { [K in TestStatus]?: number };\n isInProgress: boolean;\n changeCount: number;\n brokenCount: number;\n resultsByBrowser: Record<string, ComparisonResult | undefined>;\n resultsByMode: Record<string, ComparisonResult | undefined>;\n modesByName: Record<string, StoryTestFieldsFragment[\"mode\"]>;\n }>(\n (acc, test) => {\n acc.statusCounts[test.status] = (acc.statusCounts[test.status] || 0) + 1;\n\n if (test.status === TestStatus.InProgress) {\n acc.isInProgress = true;\n }\n if (test.result && [TestResult.Changed, TestResult.Added].includes(test.result)) {\n acc.changeCount += 1;\n }\n if (test.result && [TestResult.CaptureError, TestResult.SystemError].includes(test.result)) {\n acc.brokenCount += 1;\n }\n test.comparisons?.forEach(({ browser, result }) => {\n acc.resultsByBrowser[browser.id] = aggregateResult([\n result ?? undefined,\n acc.resultsByBrowser[browser.id],\n ]);\n });\n test.comparisons?.forEach(({ result }) => {\n acc.resultsByMode[test.mode.name] = aggregateResult([\n result ?? undefined,\n acc.resultsByMode[test.mode.name],\n ]);\n });\n acc.modesByName[test.mode.name] = test.mode;\n return acc;\n },\n {\n statusCounts: {},\n isInProgress: false,\n changeCount: 0,\n brokenCount: 0,\n resultsByBrowser: {},\n resultsByMode: {},\n modesByName: {},\n }\n );\n\n // All tests have the same browsers so we can just look at the first\n // TODO -- it's inefficient to get this data on every test when we only need the first.\n // Instead, let's just get it on the build and pass it in\n const browserInfoById = tests.length\n ? Object.fromEntries(tests[0].comparisons.map((c) => [c.browser.id, c.browser]))\n : {};\n\n const browserResults = Object.entries(resultsByBrowser).map(([id, result]) => ({\n browser: browserInfoById[id],\n result,\n }));\n const modeResults = Object.entries(resultsByMode).map(([name, result]) => ({\n mode: modesByName[name],\n result,\n }));\n\n return {\n status: pickStatus(statusCounts),\n isInProgress,\n changeCount,\n brokenCount,\n browserResults,\n modeResults,\n };\n}\n","import { useGlobals, useGlobalTypes } from \"@storybook/manager-api\";\nimport { useCallback, useState } from \"react\";\n\nimport { BrowserInfo, StoryTestFieldsFragment, TestMode, TestStatus } from \"../gql/graphql\";\n\ntype BrowserData = Pick<BrowserInfo, \"id\" | \"key\" | \"name\">;\ntype ModeData = Pick<TestMode, \"name\">;\n\nconst useGlobalValue = (key: string) => {\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return [useGlobals()[0][key], useGlobalTypes()[key]];\n } catch (e) {\n return [null, null];\n }\n};\n\n/**\n * Pick a single test+comparison (by viewport+browser) from a set of tests\n * for the same story.\n */\nexport function useTests(tests: StoryTestFieldsFragment[]) {\n const [theme, themeType] = useGlobalValue(\"theme\");\n const [selectedBrowserId, onSelectBrowserId] = useState<BrowserData[\"id\"]>(() => {\n const test = tests.find(({ status }) => status !== TestStatus.Passed) || tests[0];\n return test?.comparisons[0]?.browser.id;\n });\n const [selectedModeName, onSelectModeName] = useState<ModeData[\"name\"]>(() => {\n const changed = tests.filter(({ status }) => status !== TestStatus.Passed);\n const candidates = changed.length ? changed : tests;\n const test = candidates.find(({ mode }) => mode.globals.theme === theme) || candidates[0];\n return test?.mode.name;\n });\n\n const onSelectBrowser = useCallback(({ id }: BrowserData) => onSelectBrowserId(id), []);\n const onSelectMode = useCallback(({ name }: ModeData) => onSelectModeName(name), []);\n\n const selectedTest = tests.find(({ mode }) => mode.name === selectedModeName) || tests[0];\n const selectedComparison =\n selectedTest?.comparisons.find(({ browser }) => browser.id === selectedBrowserId) ||\n selectedTest?.comparisons[0];\n\n return {\n modeOrder: themeType?.toolbar?.items?.map((item: { title: string }) => item.title),\n selectedTest,\n selectedComparison,\n onSelectBrowser,\n onSelectMode,\n };\n}\n","import { graphql } from \"../../gql\";\n\nexport const QueryBuild = graphql(/* GraphQL */ `\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`);\n\nexport const FragmentLastBuildOnBranchBuildFields = graphql(/* GraphQL */ `\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`);\n\nexport const FragmentSelectedBuildFields = graphql(/* GraphQL */ `\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`);\n\nexport const FragmentStatusTestFields = graphql(/* GraphQL */ `\n fragment StatusTestFields on Test {\n id\n status\n story {\n storyId\n }\n }\n`);\n\nexport const FragmentLastBuildOnBranchTestFields = graphql(/* GraphQL */ `\n fragment LastBuildOnBranchTestFields on Test {\n status\n }\n`);\n\nexport const FragmentStoryTestFields = graphql(/* GraphQL */ `\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`);\n\nexport const MutationReviewTest = graphql(/* GraphQL */ `\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`);\n","import { Icons, Link } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { BuildProgressInline } from \"../../components/BuildProgressBarInline\";\nimport { Button } from \"../../components/Button\";\nimport { Container } from \"../../components/Container\";\nimport { Eyebrow } from \"../../components/Eyebrow\";\nimport { FooterSection } from \"../../components/FooterSection\";\nimport { Heading } from \"../../components/Heading\";\nimport { Section, Sections } from \"../../components/layout\";\nimport { Text as CenterText } from \"../../components/Text\";\nimport { BuildStatus, TestResult } from \"../../gql/graphql\";\nimport { LocalBuildProgress } from \"../../types\";\nimport { useBuildState, useSelectedBuildState, useSelectedStoryState } from \"./BuildContext\";\nimport { BuildEyebrow } from \"./BuildEyebrow\";\nimport { useControlsDispatch, useControlsState } from \"./ControlsContext\";\nimport { RenderSettings } from \"./RenderSettings\";\nimport { useReviewTestState } from \"./ReviewTestContext\";\nimport { SnapshotComparison } from \"./SnapshotComparison\";\nimport { Warnings } from \"./Warnings\";\n\ninterface BuildResultsProps {\n branch: string;\n dismissBuildError: () => void;\n isOutdated: boolean;\n localBuildProgress?: LocalBuildProgress;\n switchToLastBuildOnBranch?: () => void;\n storyId: string;\n startDevBuild: () => void;\n setAccessToken: (accessToken: string | null) => void;\n}\n\nexport const Warning = styled.div(({ theme }) => ({\n color: theme.color.warning,\n background: theme.background.warning,\n padding: \"10px\",\n lineHeight: \"18px\",\n position: \"relative\",\n}));\n\nexport const BuildResults = ({\n branch,\n dismissBuildError,\n isOutdated,\n localBuildProgress,\n switchToLastBuildOnBranch,\n startDevBuild,\n storyId,\n setAccessToken,\n}: BuildResultsProps) => {\n const { settingsVisible, warningsVisible } = useControlsState();\n const { toggleSettings, toggleWarnings } = useControlsDispatch();\n\n const { lastBuildOnBranch, lastBuildOnBranchIsReady, lastBuildOnBranchIsSelectable } =\n useBuildState();\n\n const selectedBuild = useSelectedBuildState();\n const selectedStory = useSelectedStoryState();\n\n const { buildIsReviewable, userCanReview } = useReviewTestState();\n\n const isLocalBuildInProgress =\n !!localBuildProgress && localBuildProgress.currentStep !== \"complete\";\n\n // Do we want to encourage them to switch to the next build?\n const shouldSwitchToLastBuildOnBranch =\n !buildIsReviewable &&\n lastBuildOnBranchIsReady &&\n lastBuildOnBranchIsSelectable &&\n !!switchToLastBuildOnBranch;\n\n const lastBuildOnBranchInProgress = lastBuildOnBranch?.status === BuildStatus.InProgress;\n const showBuildStatus =\n // We always want to show the status of the running build (until it is done)\n isLocalBuildInProgress ||\n // Even if there's no build running, we need to tell them why they can't review, unless\n // the story is superseded and the UI is already telling them\n (!buildIsReviewable && !shouldSwitchToLastBuildOnBranch);\n const localBuildProgressIsLastBuildOnBranch =\n localBuildProgress && localBuildProgress?.buildId === lastBuildOnBranch?.id;\n\n const buildStatus = showBuildStatus && (\n <BuildEyebrow\n branch={branch}\n dismissBuildError={dismissBuildError}\n localBuildProgress={\n localBuildProgressIsLastBuildOnBranch || isLocalBuildInProgress\n ? localBuildProgress\n : undefined\n }\n lastBuildOnBranchInProgress={lastBuildOnBranchInProgress}\n switchToLastBuildOnBranch={switchToLastBuildOnBranch}\n />\n );\n\n const isNewStory = selectedStory?.hasTests && selectedStory?.tests.length === 0;\n\n const isLocalBuildProgressOnSelectedBuild =\n selectedBuild.id !== `Build:${localBuildProgress?.buildId}`;\n\n if (isNewStory) {\n return (\n <Sections>\n <Section grow>\n <Container>\n <Heading>New story found</Heading>\n <CenterText>\n Take an image snapshot of this story to save its “last known good state” as a test\n baseline. This unlocks visual regression testing so you can see exactly what has\n changed down to the pixel.\n </CenterText>\n {localBuildProgress && isLocalBuildProgressOnSelectedBuild ? (\n <BuildProgressInline localBuildProgress={localBuildProgress} />\n ) : (\n <>\n <br />\n <Button\n belowText\n small\n secondary\n onClick={() => startDevBuild()}\n disabled={isLocalBuildInProgress}\n >\n Create visual test\n </Button>\n </>\n )}\n </Container>\n </Section>\n <FooterSection setAccessToken={setAccessToken} />\n </Sections>\n );\n }\n // It shouldn't be possible for one test to be skipped but not all of them\n const isSkipped = !!selectedStory?.tests?.find((t) => t.result === TestResult.Skipped);\n if (isSkipped) {\n return (\n <Sections>\n {buildStatus}\n <Section grow>\n <Container>\n <Heading>This story was skipped</Heading>\n <CenterText>\n If you would like to resume testing it, comment out or remove\n `parameters.chromatic.disableSnapshot = true` from the CSF file.\n </CenterText>\n <Button\n belowText\n small\n tertiary\n containsIcon\n // @ts-expect-error Button component is not quite typed properly\n target=\"_new\"\n isLink\n href=\"https://www.chromatic.com/docs/ignoring-elements#ignore-stories\"\n >\n <Icons icon=\"document\" />\n View Docs\n </Button>\n </Container>\n </Section>\n <FooterSection setAccessToken={setAccessToken} />\n </Sections>\n );\n }\n\n const { status } = selectedBuild;\n const isSelectedBuildStarting = [\n BuildStatus.Announced,\n BuildStatus.Published,\n BuildStatus.Prepared,\n ].includes(status);\n const isBuildFailed = status === BuildStatus.Failed;\n const isReviewLocked = status === BuildStatus.Pending && (!userCanReview || !buildIsReviewable);\n\n return (\n <Sections>\n {buildStatus}\n\n {!buildStatus && isReviewLocked && (\n <Eyebrow>\n {userCanReview ? (\n <>Reviewing is disabled because there's a newer build on {branch}.</>\n ) : (\n <>\n You do not have permission to accept changes.{\" \"}\n <Link\n href=\"https://www.chromatic.com/docs/collaborators#roles\"\n target=\"_blank\"\n withArrow\n >\n Learn about roles\n </Link>\n </>\n )}\n </Eyebrow>\n )}\n\n <Section grow last hidden={settingsVisible || warningsVisible}>\n <SnapshotComparison\n hidden={settingsVisible || warningsVisible}\n {...{\n isOutdated,\n isStarting: isSelectedBuildStarting,\n startDevBuild,\n isBuildFailed,\n shouldSwitchToLastBuildOnBranch,\n switchToLastBuildOnBranch,\n selectedBuild,\n setAccessToken,\n storyId,\n }}\n />\n </Section>\n\n <Section grow last hidden={!settingsVisible}>\n <RenderSettings onClose={() => toggleSettings(false)} />\n </Section>\n <Section grow last hidden={!warningsVisible}>\n <Warnings onClose={() => toggleWarnings(false)} />\n </Section>\n </Sections>\n );\n};\n","import { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { LocalBuildProgress } from \"../types\";\nimport { BuildProgressLabel } from \"./BuildProgressLabel\";\nimport { ProgressBar, ProgressTrack } from \"./SidebarTopButton\";\nimport { Text } from \"./Text\";\n\nconst ProgressTextWrapper = styled(Text)({\n display: \"flex\",\n flexDirection: \"column\",\n gap: 10,\n width: 200,\n});\n\nexport function BuildProgressInline({\n localBuildProgress,\n}: {\n localBuildProgress: LocalBuildProgress;\n}) {\n return (\n <ProgressTextWrapper\n as=\"div\"\n style={{ display: \"flex\", flexDirection: \"column\", gap: 10, width: 200 }}\n >\n <ProgressTrack>\n {typeof localBuildProgress.buildProgressPercentage === \"number\" && (\n <ProgressBar style={{ width: `${localBuildProgress.buildProgressPercentage}%` }} />\n )}\n </ProgressTrack>\n <BuildProgressLabel localBuildProgress={localBuildProgress} />\n </ProgressTextWrapper>\n );\n}\n","import React from \"react\";\n\nimport { BUILD_STEP_CONFIG } from \"../buildSteps\";\nimport { LocalBuildProgress } from \"../types\";\n\ninterface BuildProgressLabelProps {\n localBuildProgress: LocalBuildProgress;\n withEmoji?: boolean;\n}\n\nexport const BuildProgressLabel = ({\n localBuildProgress,\n withEmoji = false,\n}: BuildProgressLabelProps) => {\n const { emoji, renderProgress } = BUILD_STEP_CONFIG[localBuildProgress.currentStep];\n const label = renderProgress(localBuildProgress);\n return (\n <span>\n {withEmoji && emoji} {label}\n </span>\n );\n};\n","// eslint-disable-next-line import/no-unresolved\nimport { TaskName } from \"chromatic/node\";\nimport { filesize } from \"filesize\";\n\nimport { KnownStep, LocalBuildProgress, StepProgressPayload } from \"./types\";\n\nexport const isKnownStep = (\n taskOrStep: TaskName | LocalBuildProgress[\"currentStep\"]\n): taskOrStep is KnownStep => BUILD_STEP_ORDER.includes(taskOrStep as KnownStep);\n\nexport const hasProgressEvent = (task: TaskName) => [\"upload\", \"snapshot\"].includes(task);\n\n// Note this does not include the \"aborted\", \"complete\" and \"error\" steps\nexport const BUILD_STEP_ORDER: KnownStep[] = [\n \"initialize\",\n \"build\",\n \"upload\",\n \"verify\",\n \"snapshot\",\n];\n\nexport const BUILD_STEP_CONFIG: Record<\n LocalBuildProgress[\"currentStep\"],\n {\n key: LocalBuildProgress[\"currentStep\"];\n emoji: string;\n renderName: () => string;\n renderProgress: (payload: LocalBuildProgress) => string;\n renderComplete: () => string;\n estimateDuration: number;\n }\n> = {\n initialize: {\n key: \"initialize\",\n emoji: \"🚀\",\n renderName: () => `Initialize build`,\n renderProgress: () => `Initializing build`,\n renderComplete: () => `Initialized`,\n estimateDuration: 2000,\n },\n build: {\n key: \"build\",\n emoji: \"🏗\",\n renderName: () => `Build Storybook`,\n renderProgress: () => `Building your Storybook...`,\n renderComplete: () => `Storybook built`,\n estimateDuration: 30_000,\n },\n upload: {\n key: \"upload\",\n emoji: \"📡\",\n renderName: () => `Publish your Storybook`,\n renderProgress: ({ stepProgress }) => {\n const { numerator, denominator } = stepProgress.upload;\n if (!denominator || !numerator) return `Uploading files`;\n const { value: total, exponent } = filesize(denominator, {\n output: \"object\",\n round: 1,\n });\n const { value: progress, symbol } = filesize(numerator, {\n exponent,\n output: \"object\",\n round: 1,\n });\n return `Uploading files (${progress}/${total} ${symbol})`;\n },\n renderComplete: () => `Publish complete`,\n estimateDuration: 30_000,\n },\n verify: {\n key: \"verify\",\n emoji: \"🔍\",\n renderName: () => `Verify your Storybook`,\n renderProgress: () => `Verifying contents...`,\n renderComplete: () => `Storybook verified`,\n estimateDuration: 10_000,\n },\n snapshot: {\n key: \"snapshot\",\n emoji: \"📸\",\n renderName: () => `Run visual tests`,\n renderProgress: ({ stepProgress }) => {\n const { numerator, denominator } = stepProgress.snapshot;\n return denominator\n ? `Running visual tests (${numerator}/${denominator})`\n : `Running visual tests`;\n },\n renderComplete: () => `Tested your stories`,\n estimateDuration: 60_000,\n },\n\n // These are special steps that are not part of the build process\n aborted: {\n key: \"aborted\",\n emoji: \"✋\",\n renderName: () => `Build canceled`,\n renderProgress: () => `Build canceled`,\n renderComplete: () => `Build canceled`,\n estimateDuration: 0,\n },\n complete: {\n key: \"complete\",\n emoji: \"🎉\",\n renderName: () => `Visual tests completed!`,\n renderProgress: () => `Visual tests completed!`,\n renderComplete: () => `Visual tests completed!`,\n estimateDuration: 0,\n },\n error: {\n key: \"error\",\n emoji: \"🚨\",\n renderName: () => `Build failed`,\n renderProgress: () => `Build failed`,\n renderComplete: () => `Build failed`,\n estimateDuration: 0,\n },\n};\n\nexport const INITIAL_BUILD_PAYLOAD = {\n buildProgressPercentage: 0,\n currentStep: BUILD_STEP_ORDER[0],\n stepProgress: Object.fromEntries(BUILD_STEP_ORDER.map((step) => [step, {}])) as Record<\n KnownStep,\n StepProgressPayload\n >,\n};\n","import { Icons, TooltipNote, WithTooltip } from \"@storybook/components\";\nimport { keyframes, styled } from \"@storybook/theming\";\nimport React, { ComponentProps } from \"react\";\n\nimport { LocalBuildProgress } from \"../types\";\nimport { BuildProgressLabel } from \"./BuildProgressLabel\";\nimport { IconButton } from \"./IconButton\";\nimport { StatusDotWrapper } from \"./StatusDot\";\n\nexport const TooltipContent = styled.div(({ theme }) => ({\n width: 220,\n padding: 3,\n color: theme.color.defaultText,\n\n \"& > div\": {\n margin: 7,\n },\n}));\n\nexport const ProgressTrack = styled.div(({ theme }) => ({\n height: 5,\n background: theme.background.hoverable,\n borderRadius: 1,\n}));\n\nexport const ProgressBar = styled(ProgressTrack)(({ theme }) => ({\n background: theme.color.secondary,\n transition: \"width 3s ease-out\",\n}));\n\nconst rotate = keyframes({\n \"0%\": {\n transform: \"rotate(0deg)\",\n },\n \"100%\": {\n transform: \"rotate(360deg)\",\n },\n});\n\nexport const ProgressCircle = styled.svg<{ progress?: boolean; spinner?: boolean }>(\n ({ progress, theme }) => ({\n position: \"absolute\",\n width: `24px!important`,\n height: `24px!important`,\n transform: \"rotate(-90deg)\",\n color: theme.color.secondary,\n circle: {\n r: \"10\",\n cx: \"12\",\n cy: \"12\",\n fill: \"transparent\",\n stroke: progress ? \"currentColor\" : theme.background.hoverable,\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeDasharray: Math.PI * 20,\n },\n }),\n ({ spinner, theme }) =>\n spinner && {\n animation: `${rotate} 1s linear infinite`,\n circle: {\n stroke: `${theme.color.secondary}33`,\n },\n }\n);\n\nexport const SidebarIconButton = styled(IconButton)<ComponentProps<typeof IconButton>>(\n ({ theme }) => ({\n position: \"relative\",\n overflow: \"visible\",\n color: theme.textMutedColor,\n marginTop: 0,\n zIndex: 1,\n })\n);\n\nexport const SidebarTopButton = ({\n isOutdated = false,\n isRunning = false,\n localBuildProgress,\n startBuild,\n stopBuild,\n}: {\n isOutdated?: boolean;\n isRunning?: boolean;\n localBuildProgress?: LocalBuildProgress;\n startBuild: () => void;\n stopBuild: () => void;\n}) => {\n if (isRunning && localBuildProgress) {\n const { buildProgressPercentage } = localBuildProgress;\n return (\n <WithTooltip\n trigger=\"hover\"\n tooltip={\n <TooltipContent>\n <div>\n <BuildProgressLabel localBuildProgress={localBuildProgress} withEmoji />\n </div>\n <ProgressTrack>\n {typeof buildProgressPercentage === \"number\" && (\n <ProgressBar style={{ width: `${buildProgressPercentage}%` }} />\n )}\n </ProgressTrack>\n </TooltipContent>\n }\n >\n <SidebarIconButton aria-label=\"Stop tests\" onClick={() => stopBuild()}>\n <Icons icon=\"stopalt\" style={{ width: 10 }} />\n <ProgressCircle xmlns=\"http://www.w3.org/2000/svg\">\n <circle />\n </ProgressCircle>\n <ProgressCircle xmlns=\"http://www.w3.org/2000/svg\" spinner>\n <circle strokeDashoffset={Math.PI * 20 * (1 - buildProgressPercentage / 100)} />\n </ProgressCircle>\n {typeof buildProgressPercentage === \"number\" && (\n <ProgressCircle xmlns=\"http://www.w3.org/2000/svg\" progress>\n <circle strokeDashoffset={Math.PI * 20 * (1 - buildProgressPercentage / 100)} />\n </ProgressCircle>\n )}\n </SidebarIconButton>\n </WithTooltip>\n );\n }\n\n return isOutdated ? (\n <WithTooltip\n tooltip={<TooltipNote note=\"Code changes detected; click to run tests\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <SidebarIconButton aria-label=\"Run tests\" onClick={() => startBuild()}>\n <StatusDotWrapper status=\"notification\">\n <Icons icon=\"play\" />\n </StatusDotWrapper>\n </SidebarIconButton>\n </WithTooltip>\n ) : (\n <WithTooltip\n trigger=\"click\"\n closeOnOutsideClick\n tooltip={\n <TooltipContent>\n <div>No code changes detected. Rerun tests to take new snapshots.</div>\n <IconButton onClick={() => startBuild()} aria-label=\"Rerun tests\">\n <Icons icon=\"sync\" />\n Rerun tests\n </IconButton>\n </TooltipContent>\n }\n >\n <SidebarIconButton aria-label=\"Run tests\">\n <Icons icon=\"play\" />\n </SidebarIconButton>\n </WithTooltip>\n );\n};\n","import { css, styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { ComparisonResult, TestStatus } from \"../gql/graphql\";\n\ninterface StatusDotProps {\n status?: TestStatus | ComparisonResult | \"notification\";\n}\n\nconst Dot = styled.div<StatusDotProps & { overlay?: boolean }>(\n ({ status, theme }) => ({\n display: \"inline-block\",\n width: 6,\n height: 6,\n borderRadius: \"50%\",\n background:\n status &&\n {\n [TestStatus.InProgress]: \"transparent\",\n [TestStatus.Passed]: theme.color.positive,\n [TestStatus.Pending]: theme.color.gold,\n [TestStatus.Accepted]: theme.color.positive,\n [TestStatus.Denied]: theme.color.positive,\n [TestStatus.Broken]: theme.color.negative,\n [TestStatus.Failed]: theme.color.negative,\n [ComparisonResult.Equal]: theme.color.positive,\n [ComparisonResult.Fixed]: theme.color.positive,\n [ComparisonResult.Added]: theme.color.gold,\n [ComparisonResult.Changed]: theme.color.gold,\n [ComparisonResult.Removed]: theme.color.gold,\n [ComparisonResult.CaptureError]: theme.color.negative,\n [ComparisonResult.SystemError]: theme.color.negative,\n notification: theme.color.secondary,\n }[status],\n }),\n ({ overlay, theme }) =>\n overlay &&\n css({\n position: \"absolute\",\n top: -1,\n right: -2,\n width: 7,\n height: 7,\n border: `1px solid rgba(0, 0, 0, 0.1)`,\n boxShadow: `0 0 0 2px var(--bg-color, ${theme.background.content})`,\n boxSizing: \"border-box\",\n })\n);\n\nexport const StatusDot = ({ status }: StatusDotProps) => <Dot status={status} />;\n\nconst Wrapper = styled.div({\n position: \"relative\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n\n \"img, svg\": {\n verticalAlign: \"top\",\n },\n});\n\nexport const StatusDotWrapper = ({\n status,\n children,\n}: StatusDotProps & { children: React.ReactNode }) => (\n <Wrapper>\n {children}\n <Dot overlay status={status} />\n </Wrapper>\n);\n","import { styled } from \"@storybook/theming\";\n\nexport const Eyebrow = styled.div(({ theme }) => ({\n background: theme.background.app,\n borderBottom: `1px solid ${theme.appBorderColor}`,\n padding: \"10px 15px\",\n lineHeight: \"20px\",\n color: theme.color.defaultText,\n}));\n","import { Icons, Link } from \"@storybook/components\";\nimport { css, keyframes, styled } from \"@storybook/theming\";\nimport React, { useEffect, useRef } from \"react\";\n\nimport { BUILD_STEP_CONFIG, BUILD_STEP_ORDER } from \"../../buildSteps\";\nimport { BuildProgressLabel } from \"../../components/BuildProgressLabel\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { LocalBuildProgress } from \"../../types\";\n\nconst spin = keyframes({\n from: { transform: \"rotate(0deg)\" },\n to: { transform: \"rotate(359deg)\" },\n});\n\nconst Header = styled.button<{ isWarning?: boolean }>(({ isWarning, onClick, theme }) => {\n const warningColor = theme.base === \"dark\" ? \"#2e271a\" : theme.background.warning;\n return {\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n lineHeight: \"20px\",\n padding: \"5px 7px 5px 15px\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n background: isWarning ? warningColor : theme.background.app,\n border: \"none\",\n borderBottom: `1px solid ${theme.appBorderColor}`,\n color: theme.color.defaultText,\n cursor: onClick ? \"pointer\" : \"default\",\n textAlign: \"left\",\n\n \"& > *\": {\n zIndex: 1,\n },\n\n code: {\n fontFamily: theme.typography.fonts.mono,\n fontSize: theme.typography.size.s1,\n },\n };\n});\n\nconst Bar = styled.div<{ isWarning?: boolean; percentage: number }>(\n ({ isWarning, percentage, theme }) => {\n const warningColor = theme.base === \"dark\" ? \"#43361f\" : \"#FFE6B1\";\n return {\n display: \"block\",\n position: \"absolute\",\n top: \"0\",\n height: \"100%\",\n left: \"0\",\n width: `${percentage}%`,\n transition: \"width 3s ease-out\",\n backgroundColor: isWarning ? warningColor : theme.background.hoverable,\n pointerEvents: \"none\",\n zIndex: 0,\n };\n }\n);\n\nconst Label = styled.div({\n padding: \"5px 0\",\n});\n\nconst ExpandableDiv = styled.div<{ expanded: boolean }>(({ expanded, theme }) => ({\n display: \"grid\",\n gridTemplateRows: expanded ? \"1fr\" : \"0fr\",\n background: theme.background.app,\n borderBottom: expanded ? `1px solid ${theme.appBorderColor}` : \"none\",\n transition: \"grid-template-rows 150ms ease-out\",\n}));\n\nconst StepDetails = styled.div({\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n});\n\nconst StepDetail = styled.div<{ isCurrent: boolean; isFailed: boolean; isPending: boolean }>(\n ({ isCurrent, isFailed, isPending, theme }) => ({\n display: \"flex\",\n flexDirection: \"row\",\n gap: 8,\n opacity: isPending ? 0.7 : 1,\n color: isFailed ? theme.color.negativeText : \"inherit\",\n fontWeight: isCurrent || isFailed ? \"bold\" : \"normal\",\n fontFamily: \"Menlo, monospace\",\n fontSize: \"12px\",\n lineHeight: \"24px\",\n margin: \"0 15px\",\n \"&:first-of-type\": {\n marginTop: 10,\n },\n \"&:last-of-type\": {\n marginBottom: 10,\n },\n })\n);\n\nconst StepIcon = styled(Icons)(\n { width: 10, marginRight: 8 },\n ({ icon }) => icon === \"sync\" && css({ animation: `${spin} 1s linear infinite` })\n);\n\ntype BuildProgressProps = {\n localBuildProgress: LocalBuildProgress;\n expanded?: boolean;\n};\n\nconst BuildProgress = ({ localBuildProgress, expanded = false }: BuildProgressProps) => {\n const stepHistory = useRef<\n Partial<Record<LocalBuildProgress[\"currentStep\"], LocalBuildProgress>>\n >({});\n\n useEffect(() => {\n stepHistory.current[localBuildProgress.currentStep] = { ...localBuildProgress };\n }, [localBuildProgress]);\n\n const buildFailed = [\"aborted\", \"error\"].includes(localBuildProgress.currentStep);\n const steps = BUILD_STEP_ORDER.map((step) => {\n const { startedAt, completedAt } = localBuildProgress.stepProgress[step];\n const isCurrent = !!startedAt && !completedAt;\n const isFailed = isCurrent && buildFailed;\n const isPending = !startedAt;\n const config = { ...BUILD_STEP_CONFIG[step], isCurrent, isFailed, isPending };\n if (isFailed) {\n return { ...config, icon: \"failed\", renderLabel: config.renderProgress };\n }\n if (isCurrent) {\n return { ...config, icon: \"sync\", renderLabel: config.renderProgress };\n }\n if (isPending) {\n return { ...config, icon: \"arrowright\", renderLabel: config.renderName };\n }\n return { ...config, icon: \"check\", renderLabel: config.renderComplete };\n });\n\n return (\n <ExpandableDiv expanded={expanded}>\n <StepDetails>\n {steps.map(({ icon, isCurrent, isFailed, isPending, key, renderLabel }) => (\n <StepDetail {...{ isCurrent, isFailed, isPending }} key={key}>\n <div>\n <StepIcon icon={icon as any} />\n {renderLabel(stepHistory.current[key] || localBuildProgress)}\n </div>\n </StepDetail>\n ))}\n </StepDetails>\n </ExpandableDiv>\n );\n};\n\ntype BuildEyebrowProps = {\n branch: string;\n dismissBuildError: () => void;\n localBuildProgress?: LocalBuildProgress;\n lastBuildOnBranchInProgress?: boolean;\n switchToLastBuildOnBranch?: () => void;\n};\n\nexport const BuildEyebrow = ({\n branch,\n dismissBuildError,\n localBuildProgress,\n lastBuildOnBranchInProgress,\n switchToLastBuildOnBranch,\n}: BuildEyebrowProps) => {\n const [expanded, setExpanded] = React.useState(false);\n const toggleExpanded = () => {\n setExpanded(!expanded);\n };\n\n if (localBuildProgress) {\n const isWarning = [\"aborted\", \"error\"].includes(localBuildProgress.currentStep);\n return (\n <>\n <Header\n as={isWarning ? \"div\" : \"button\"}\n onClick={isWarning ? undefined : toggleExpanded}\n isWarning={isWarning}\n >\n <Bar percentage={localBuildProgress.buildProgressPercentage} isWarning={isWarning} />\n <Label>\n <BuildProgressLabel localBuildProgress={localBuildProgress} withEmoji />\n </Label>\n {isWarning ? (\n <IconButton onClick={dismissBuildError}>\n <Icons icon=\"close\" />\n </IconButton>\n ) : (\n <IconButton as=\"div\">\n <Icons icon={expanded ? \"collapse\" : \"expandalt\"} />\n </IconButton>\n )}\n </Header>\n <BuildProgress localBuildProgress={localBuildProgress} expanded={expanded || isWarning} />\n </>\n );\n }\n\n function nextBuildMessage() {\n if (!switchToLastBuildOnBranch) {\n return (\n <Label>\n Reviewing is disabled because there's a newer build on <code>{branch}</code>.\n </Label>\n );\n }\n if (lastBuildOnBranchInProgress) {\n return (\n <Label>\n Reviewing is disabled because there's a newer build in progress on main. This can happen\n when a build runs in CI.\n </Label>\n );\n }\n return (\n <Label>\n There's a newer snapshot with changes.\n {\" \" /* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <Link withArrow onClick={switchToLastBuildOnBranch}>\n Switch to newer snapshot\n </Link>\n </Label>\n );\n }\n\n return (\n <Header onClick={switchToLastBuildOnBranch}>\n <Bar percentage={100} />\n {nextBuildMessage()}\n </Header>\n );\n};\n","import React from \"react\";\n\nimport {\n Accordion,\n Accordions,\n CloseButton,\n CloseIcon,\n Heading,\n InfoIcon,\n ItemIcon,\n} from \"../../components/Accordions\";\n\ninterface RenderSettingsProps {\n onClose: () => void;\n}\n\nexport const RenderSettings = ({ onClose }: RenderSettingsProps) => {\n return (\n <Accordions>\n <Accordion>\n <Heading>\n Render settings\n <InfoIcon icon=\"info\" />\n <CloseButton onClick={onClose}>\n <CloseIcon icon=\"close\" aria-label=\"Close\" />\n </CloseButton>\n </Heading>\n <p>\n <ItemIcon icon=\"timer\" />\n Delay: 300ms\n </p>\n <p>\n <ItemIcon icon=\"stop\" />\n Animation pause: End\n </p>\n <p>\n <ItemIcon icon=\"contrast\" />\n Threshold: 0.2\n </p>\n <p>\n <ItemIcon icon=\"paragraph\" />\n Anti-alias: Included\n </p>\n </Accordion>\n <Accordion>\n <Heading>\n Bounding box\n <InfoIcon icon=\"info\" />\n </Heading>\n <dl>\n <dt>Width:</dt>\n <dd>Fill viewport</dd>\n <dt>Height:</dt>\n <dd>Hug contents</dd>\n </dl>\n </Accordion>\n </Accordions>\n );\n};\n","import { Icons } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\n\nimport { IconButton } from \"./IconButton\";\n\nexport const Accordions = styled.div({\n display: \"flex\",\n flexDirection: \"column\",\n});\n\nexport const Accordion = styled.div(({ theme }) => ({\n padding: 15,\n lineHeight: \"18px\",\n borderBottom: `1px solid ${theme.appBorderColor}`,\n\n p: {\n margin: \"10px 0\",\n \"&:last-of-type\": {\n marginBottom: 0,\n },\n },\n\n dl: {\n display: \"grid\",\n gridTemplateColumns: \"auto 1fr\",\n gap: 10,\n margin: \"10px 0 0 0\",\n },\n\n dt: {\n color: theme.color.mediumdark,\n fontWeight: 700,\n },\n\n dd: {\n marginLeft: 0,\n },\n\n \"button + button\": {\n marginLeft: 10,\n },\n}));\n\nexport const Heading = styled.div({\n display: \"flex\",\n fontWeight: \"bold\",\n marginBottom: 15,\n});\n\nexport const InfoIcon = styled(Icons)(({ theme }) => ({\n width: 12,\n height: 12,\n margin: \"3px 6px\",\n verticalAlign: \"top\",\n color: theme.color.mediumdark,\n}));\n\nexport const ItemIcon = styled(Icons)({\n width: 14,\n height: 14,\n margin: \"2px 6px 2px 0\",\n verticalAlign: \"top\",\n});\n\nexport const CloseIcon = styled(Icons)({\n marginLeft: \"auto\",\n});\n\nexport const CloseButton: typeof IconButton = styled(IconButton)({\n margin: -5,\n marginLeft: \"auto\",\n});\n","import React, { createContext } from \"react\";\n\nimport { ReviewTestBatch } from \"../../gql/graphql\";\nimport { useRequiredContext } from \"../../utils/useRequiredContext\";\n\nconst initialState = {\n isReviewing: false,\n userCanReview: false,\n buildIsReviewable: false,\n acceptTest: (testId: string, batch: ReviewTestBatch = ReviewTestBatch.Spec) => Promise.resolve(),\n unacceptTest: (testId: string, batch: ReviewTestBatch = ReviewTestBatch.Spec) =>\n Promise.resolve(),\n};\n\ntype State = typeof initialState;\n\nexport const ReviewTestContext = createContext(initialState);\n\nexport const useReviewTestState = () => useRequiredContext(ReviewTestContext, \"ReviewTest\");\n\nexport const ReviewTestProvider = ({\n children,\n watchState = initialState,\n}: {\n children: React.ReactNode;\n watchState?: State;\n}) => {\n return <ReviewTestContext.Provider value={watchState}>{children}</ReviewTestContext.Provider>;\n};\n","import { Loader } from \"@storybook/components\";\nimport { Link } from \"@storybook/design-system\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { Text } from \"../../components/layout\";\nimport { SnapshotImage } from \"../../components/SnapshotImage\";\nimport { ComparisonResult, TestResult, TestStatus } from \"../../gql/graphql\";\nimport { summarizeTests } from \"../../utils/summarizeTests\";\nimport { useSelectedBuildState, useSelectedStoryState } from \"./BuildContext\";\nimport { BuildResultsFooter } from \"./BuildResultsFooter\";\nimport { useControlsDispatch, useControlsState } from \"./ControlsContext\";\nimport { SnapshotControls } from \"./SnapshotControls\";\nimport { StoryInfo } from \"./StoryInfo\";\n\nexport const Grid = styled.div(({ theme }) => ({\n display: \"grid\",\n gridTemplateAreas: `\n \"info info\"\n \"actions actions\"\n \"label controls\"\n `,\n gridTemplateColumns: \"1fr fit-content(50%)\",\n gridTemplateRows: \"auto auto 40px\",\n borderBottom: `1px solid ${theme.appBorderColor}`,\n\n \"@container (min-width: 300px)\": {\n gridTemplateAreas: `\n \"info actions\"\n \"label controls\"\n `,\n gridTemplateColumns: \"1fr auto\",\n gridTemplateRows: \"auto 40px\",\n },\n\n \"@container (min-width: 800px)\": {\n gridTemplateAreas: `\"info label controls actions\"`,\n gridTemplateColumns: \"auto 1fr auto auto\",\n gridTemplateRows: \"40px\",\n },\n}));\n\nconst ParentGrid = styled.div(({ theme }) => ({\n display: \"grid\",\n gridTemplateAreas: `\n \"header\"\n \"main\"\n \"footer\"\n `,\n gridTemplateColumns: \"1fr\",\n gridTemplateRows: \"auto 1fr auto\",\n height: \"100%\",\n\n \"&[hidden]\": {\n display: \"none\",\n },\n}));\n\nconst HeaderSection = styled.div(({ theme }) => ({\n gridArea: \"header\",\n position: \"sticky\",\n zIndex: 1,\n top: 0,\n background: theme.background.content,\n\n \"@container (min-width: 800px)\": {\n background: theme.background.app,\n },\n}));\n\nconst MainSection = styled.div(({ theme }) => ({\n gridArea: \"main\",\n overflowY: \"auto\",\n maxHeight: \"100%\",\n}));\n\nconst FooterSection = styled.div(({ theme }) => ({\n gridArea: \"footer\",\n position: \"sticky\",\n zIndex: 1,\n bottom: 0,\n borderTop: `1px solid ${theme.appBorderColor}`,\n background: theme.background.content,\n}));\n\nconst Divider = styled.div(({ children, theme }) => ({\n display: \"flex\",\n alignItems: \"center\",\n border: `0px solid ${theme.appBorderColor}`,\n borderTopWidth: 1,\n borderBottomWidth: children ? 1 : 0,\n height: children ? 40 : 0,\n padding: children ? \"0 15px\" : 0,\n}));\n\nconst StackTrace = styled.div(({ theme }) => ({\n fontFamily: theme.typography.fonts.mono,\n fontSize: theme.typography.size.s1,\n color: theme.color.defaultText,\n lineHeight: \"18px\",\n padding: 15,\n whiteSpace: \"pre-wrap\",\n wordBreak: \"break-word\",\n}));\n\nconst Warning = styled.div(({ theme }) => ({\n background: theme.background.warning,\n padding: \"10px\",\n lineHeight: \"18px\",\n position: \"relative\",\n}));\n\nconst WarningText = styled(Text)(({ theme }) => ({\n color: theme.color.darkest,\n}));\n\ninterface SnapshotComparisonProps {\n isOutdated: boolean;\n isStarting: boolean;\n startDevBuild: () => void;\n isBuildFailed: boolean;\n shouldSwitchToLastBuildOnBranch: boolean;\n switchToLastBuildOnBranch?: () => void;\n setAccessToken: (accessToken: string | null) => void;\n hidden?: boolean;\n storyId: string;\n}\n\nexport const SnapshotComparison = ({\n isOutdated,\n isStarting,\n startDevBuild,\n isBuildFailed,\n shouldSwitchToLastBuildOnBranch,\n switchToLastBuildOnBranch,\n setAccessToken,\n hidden,\n storyId,\n}: SnapshotComparisonProps) => {\n const { baselineImageVisible, diffVisible, focusVisible } = useControlsState();\n const { toggleBaselineImage, toggleSettings, toggleWarnings } = useControlsDispatch();\n\n const selectedBuild = useSelectedBuildState();\n const startedAt: Date = \"startedAt\" in selectedBuild && selectedBuild.startedAt;\n\n const selectedStory = useSelectedStoryState();\n const { tests } = selectedStory;\n\n const prevStoryIdRef = React.useRef(storyId);\n const prevSelectedComparisonIdRef = React.useRef(selectedStory.selectedComparison?.id);\n const prevSelectedBuildIdRef = React.useRef(selectedBuild.id);\n\n React.useEffect(() => {\n // It's possible this component doesn't unmount when the selected build, comparison, or story changes, so we need to reset state values.\n // This is most important for the baseline image toggle because baseline can not exist for a different story.\n if (\n prevStoryIdRef.current !== storyId ||\n prevSelectedComparisonIdRef.current !== selectedStory.selectedComparison?.id ||\n prevSelectedBuildIdRef.current !== selectedBuild.id\n ) {\n toggleBaselineImage(false);\n toggleSettings(false);\n toggleWarnings(false);\n }\n prevSelectedComparisonIdRef.current = selectedStory.selectedComparison?.id;\n prevStoryIdRef.current = storyId;\n prevSelectedBuildIdRef.current = selectedBuild.id;\n }, [\n selectedBuild.id,\n storyId,\n selectedStory,\n toggleBaselineImage,\n toggleSettings,\n toggleWarnings,\n ]);\n\n const storyInfo = (\n <StoryInfo\n {...{\n tests,\n startedAt,\n isStarting,\n startDevBuild,\n isBuildFailed,\n shouldSwitchToLastBuildOnBranch,\n switchToLastBuildOnBranch,\n }}\n />\n );\n\n if (isStarting || !tests.length) {\n return (\n <ParentGrid hidden={hidden}>\n <HeaderSection>\n <Grid>{storyInfo}</Grid>\n </HeaderSection>\n <FooterSection>\n <BuildResultsFooter setAccessToken={setAccessToken} />\n </FooterSection>\n </ParentGrid>\n );\n }\n\n const testSummary = summarizeTests(tests);\n const { isInProgress } = testSummary;\n const { selectedTest, selectedComparison } = selectedStory;\n\n // isNewStory is when the story itself is added and all tests should also be added\n const isNewStory = tests.every(\n ({ result, status }) => result === TestResult.Added && status !== TestStatus.Accepted\n );\n\n // This checks if the specific comparison is new, but the story itself is not. This indicates it was probably a new mode being added.\n const isNewMode =\n !isNewStory &&\n selectedTest.result === TestResult.Added &&\n selectedTest.status !== TestStatus.Accepted;\n\n // If any of the tests has a new comparison, and the test isn't new it is a new browser.\n const isNewBrowser =\n !isNewStory &&\n selectedComparison.result === ComparisonResult.Added &&\n selectedTest.result !== TestResult.Added &&\n selectedTest.status !== TestStatus.Accepted;\n\n const captureErrorData =\n selectedComparison?.headCapture?.captureError &&\n \"error\" in selectedComparison?.headCapture?.captureError &&\n selectedComparison?.headCapture?.captureError?.error;\n\n return (\n <ParentGrid hidden={hidden}>\n <HeaderSection>\n <Grid>\n {storyInfo}\n <SnapshotControls isOutdated={isOutdated} startDevBuild={startDevBuild} />\n </Grid>\n </HeaderSection>\n\n <MainSection>\n {isInProgress && <Loader />}\n {!isInProgress && isNewStory && (\n <Warning>\n <WarningText>\n New story found. Accept this snapshot as a test baseline.{\" \"}\n <Link href=\"https://www.chromatic.com/docs/branching-and-baselines\">\n Learn More »\n </Link>\n </WarningText>\n </Warning>\n )}\n {!isInProgress && isNewMode && (\n <Warning>\n <WarningText>\n New mode found. Accept this snapshot as a test baseline.{\" \"}\n <Link href=\"https://www.chromatic.com/docs/branching-and-baselines\">\n Learn More »\n </Link>\n </WarningText>\n </Warning>\n )}\n {!isInProgress && isNewBrowser && (\n <Warning>\n <WarningText>\n New browser found. Accept this snapshot as a test baseline.{\" \"}\n <Link href=\"https://www.chromatic.com/docs/branching-and-baselines\">\n Learn More »\n </Link>\n </WarningText>\n </Warning>\n )}\n {!isInProgress && selectedComparison && (\n <SnapshotImage\n key={selectedComparison.id}\n componentName={selectedTest.story?.component?.name}\n storyName={selectedTest.story?.name}\n testUrl={selectedTest.webUrl}\n comparisonResult={selectedComparison.result ?? undefined}\n latestImage={selectedComparison.headCapture?.captureImage ?? undefined}\n baselineImage={selectedComparison.baseCapture?.captureImage ?? undefined}\n baselineImageVisible={baselineImageVisible}\n diffImage={selectedComparison.captureDiff?.diffImage ?? undefined}\n focusImage={selectedComparison.captureDiff?.focusImage ?? undefined}\n diffVisible={diffVisible}\n focusVisible={focusVisible}\n />\n )}\n\n {!isInProgress && captureErrorData && (\n <>\n <Divider>\n <b>Error stack trace</b>\n </Divider>\n <StackTrace>{captureErrorData.stack || captureErrorData.message}</StackTrace>\n </>\n )}\n </MainSection>\n <FooterSection>\n <BuildResultsFooter setAccessToken={setAccessToken} {...testSummary} />\n </FooterSection>\n </ParentGrid>\n );\n};\n","import { Icons } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React, { ComponentProps } from \"react\";\n\nimport { CaptureImage, CaptureOverlayImage, ComparisonResult, Test } from \"../gql/graphql\";\nimport { Text } from \"./Text\";\n\nexport const Container = styled.div<{ href?: string; target?: string }>(\n ({ theme }) => ({\n position: \"relative\",\n display: \"flex\",\n background: \"transparent\",\n overflow: \"hidden\",\n margin: 2,\n\n img: {\n maxWidth: \"100%\",\n transition: \"filter 0.1s ease-in-out\",\n },\n \"img[data-overlay]\": {\n position: \"absolute\",\n opacity: 0.7,\n pointerEvents: \"none\",\n },\n div: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n width: \"100%\",\n margin: \"30px 15px\",\n color: theme.color.mediumdark,\n p: {\n maxWidth: 380,\n textAlign: \"center\",\n },\n svg: {\n width: 28,\n height: 28,\n },\n },\n \"& > svg\": {\n position: \"absolute\",\n left: \"calc(50% - 14px)\",\n top: \"calc(50% - 14px)\",\n width: 28,\n height: 28,\n color: theme.color.lightest,\n opacity: 0,\n transition: \"opacity 0.1s ease-in-out\",\n pointerEvents: \"none\",\n },\n }),\n ({ href }) =>\n href && {\n display: \"inline-flex\",\n \"&:hover\": {\n \"& > svg\": {\n opacity: 1,\n },\n img: {\n filter: \"brightness(85%)\",\n },\n },\n }\n);\n\ninterface SnapshotImageProps {\n componentName?: NonNullable<NonNullable<Test[\"story\"]>[\"component\"]>[\"name\"];\n storyName?: NonNullable<Test[\"story\"]>[\"name\"];\n testUrl: Test[\"webUrl\"];\n comparisonResult?: ComparisonResult;\n latestImage?: Pick<CaptureImage, \"imageUrl\" | \"imageWidth\">;\n baselineImage?: Pick<CaptureImage, \"imageUrl\" | \"imageWidth\">;\n baselineImageVisible?: boolean;\n diffImage?: Pick<CaptureOverlayImage, \"imageUrl\" | \"imageWidth\">;\n focusImage?: Pick<CaptureOverlayImage, \"imageUrl\" | \"imageWidth\">;\n diffVisible: boolean;\n focusVisible: boolean;\n}\n\nexport const SnapshotImage = ({\n componentName,\n storyName,\n testUrl,\n comparisonResult,\n latestImage,\n baselineImage,\n baselineImageVisible,\n diffImage,\n focusImage,\n diffVisible,\n focusVisible,\n ...props\n}: SnapshotImageProps & ComponentProps<typeof Container>) => {\n const hasDiff = !!latestImage && !!diffImage && comparisonResult === ComparisonResult.Changed;\n const hasError = comparisonResult === ComparisonResult.CaptureError;\n const hasFocus = hasDiff && !!focusImage;\n const containerProps = hasDiff ? { as: \"a\" as any, href: testUrl, target: \"_blank\" } : {};\n const showDiff = hasDiff && diffVisible;\n const showFocus = hasFocus && focusVisible;\n\n return (\n <Container {...props} {...containerProps}>\n {latestImage && (\n <img\n alt={`Latest snapshot for the '${storyName}' story of the '${componentName}' component`}\n src={latestImage.imageUrl}\n style={{\n opacity: showDiff && !showFocus ? 0.7 : 1,\n display: baselineImageVisible ? \"none\" : \"block\",\n }}\n />\n )}\n {baselineImage && (\n <img\n alt={`Baseline snapshot for the '${storyName}' story of the '${componentName}' component`}\n src={baselineImage.imageUrl}\n style={{\n opacity: showDiff && !showFocus ? 0.7 : 1,\n display: baselineImageVisible ? \"block\" : \"none\",\n }}\n />\n )}\n {hasDiff && (\n <img\n alt=\"\"\n data-overlay=\"diff\"\n src={diffImage.imageUrl}\n style={{\n maxWidth: `${(diffImage.imageWidth / latestImage.imageWidth) * 100}%`,\n opacity: showDiff ? 1 : 0,\n }}\n />\n )}\n {hasFocus && (\n <img\n alt=\"\"\n data-overlay=\"focus\"\n src={focusImage.imageUrl}\n style={{\n maxWidth: `${(focusImage.imageWidth / latestImage.imageWidth) * 100}%`,\n opacity: showFocus ? 1 : 0,\n }}\n />\n )}\n {hasDiff && <Icons icon=\"sharealt\" />}\n {hasError && !latestImage && (\n <div>\n <Icons icon=\"photo\" />\n <Text>\n A snapshot couldn’t be captured. This often occurs when a story has a code error.\n Confirm that this story successfully renders in your local Storybook and run the build\n again.\n </Text>\n </div>\n )}\n </Container>\n );\n};\n","import React from \"react\";\n\nimport { BrowserSelector } from \"../../components/BrowserSelector\";\nimport { FooterMenu } from \"../../components/FooterMenu\";\nimport { Bar, Col, Section } from \"../../components/layout\";\nimport { ModeSelector } from \"../../components/ModeSelector\";\nimport { TestStatus } from \"../../gql/graphql\";\nimport { useSelectedStoryState } from \"./BuildContext\";\n\nexport const BuildResultsFooter = ({\n setAccessToken,\n}: {\n setAccessToken: (token: string | null) => void;\n}) => {\n const storyState = useSelectedStoryState();\n const { browserResults, modeResults } = storyState.summary;\n\n return (\n <Section last>\n <Bar>\n {modeResults.length > 0 && (\n <ModeSelector\n isAccepted={storyState.summary.status === TestStatus.Accepted}\n modeOrder={storyState.modeOrder}\n selectedMode={storyState.selectedTest.mode}\n modeResults={modeResults}\n onSelectMode={storyState.onSelectMode}\n />\n )}\n {browserResults.length > 0 && (\n <BrowserSelector\n isAccepted={storyState.summary.status === TestStatus.Accepted}\n selectedBrowser={storyState.selectedComparison.browser}\n browserResults={browserResults}\n onSelectBrowser={storyState.onSelectBrowser}\n />\n )}\n {/* <Col push>\n <WithTooltip\n tooltip={<TooltipNote note=\"Render settings\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <IconButton\n active={settingsVisible}\n aria-label={`${settingsVisible ? \"Hide\" : \"Show\"} render settings`}\n onClick={() => {\n setSettingsVisible(!settingsVisible);\n setWarningsVisible(false);\n }}\n >\n <Icons icon=\"controls\" />\n </IconButton>\n </WithTooltip>\n </Col> */}\n {/* <Col>\n <WithTooltip\n tooltip={<TooltipNote note=\"View warnings\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <IconButton\n active={warningsVisible}\n aria-label={`${warningsVisible ? \"Hide\" : \"Show\"} warnings`}\n onClick={() => {\n setWarningsVisible(!warningsVisible);\n setSettingsVisible(false);\n }}\n status=\"warning\"\n >\n <Icons icon=\"alert\" />2\n </IconButton>\n </WithTooltip>\n </Col> */}\n <Col push>\n <FooterMenu setAccessToken={setAccessToken} />\n </Col>\n </Bar>\n </Section>\n );\n};\n","import { TooltipNote, WithTooltip } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React, { ComponentProps } from \"react\";\n\nimport { Browser, BrowserInfo, ComparisonResult } from \"../gql/graphql\";\nimport { aggregateResult } from \"../utils/aggregateResult\";\nimport { ArrowIcon } from \"./icons/ArrowIcon\";\nimport { ChromeIcon } from \"./icons/ChromeIcon\";\nimport { EdgeIcon } from \"./icons/EdgeIcon\";\nimport { FirefoxIcon } from \"./icons/FirefoxIcon\";\nimport { SafariIcon } from \"./icons/SafariIcon\";\nimport { StatusDot, StatusDotWrapper } from \"./StatusDot\";\nimport { TooltipMenu } from \"./TooltipMenu\";\n\nconst browserIcons = {\n [Browser.Chrome]: <ChromeIcon alt=\"Chrome\" />,\n [Browser.Firefox]: <FirefoxIcon alt=\"Firefox\" />,\n [Browser.Safari]: <SafariIcon alt=\"Safari\" />,\n [Browser.Edge]: <EdgeIcon alt=\"Edge\" />,\n} as const;\n\nconst IconWrapper = styled.div(({ theme }) => ({\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 6,\n height: 16,\n margin: \"6px 7px\",\n color: `${theme.color.defaultText}99`,\n svg: {\n verticalAlign: \"top\",\n },\n}));\n\nconst Label = styled.span({\n display: \"none\",\n \"@container (min-width: 300px)\": {\n display: \"inline-block\",\n },\n});\n\ntype BrowserData = Pick<BrowserInfo, \"id\" | \"key\" | \"name\">;\n\ninterface BrowserSelectorProps {\n isAccepted: boolean;\n selectedBrowser: BrowserData;\n browserResults: { browser: BrowserData; result?: ComparisonResult }[];\n onSelectBrowser: (browser: BrowserData) => void;\n}\n\nexport const BrowserSelector = ({\n isAccepted,\n selectedBrowser,\n browserResults,\n onSelectBrowser,\n}: BrowserSelectorProps) => {\n const aggregate = aggregateResult(browserResults.map(({ result }) => result));\n if (!aggregate) return null;\n\n let icon = browserIcons[selectedBrowser.key];\n if (!isAccepted && aggregate !== ComparisonResult.Equal) {\n icon = <StatusDotWrapper status={aggregate}>{icon}</StatusDotWrapper>;\n }\n\n type Link = ComponentProps<typeof TooltipMenu>[\"links\"][0];\n\n const links =\n browserResults.length > 1 &&\n browserResults.map(\n ({ browser, result }): Link => ({\n active: selectedBrowser === browser,\n id: browser.id,\n onClick: () => onSelectBrowser(browser),\n right: !isAccepted && result !== ComparisonResult.Equal && <StatusDot status={result} />,\n icon: browserIcons[browser.key],\n title: browser.name,\n })\n );\n return (\n <WithTooltip\n key={selectedBrowser.key}\n hasChrome={false}\n placement=\"top\"\n trigger=\"hover\"\n tooltip={\n <TooltipNote\n note={links ? \"Switch browser\" : `Tested in ${browserResults[0].browser.name}`}\n />\n }\n >\n {links ? (\n <TooltipMenu placement=\"bottom\" links={links}>\n {icon}\n <Label>{selectedBrowser.name}</Label>\n <ArrowIcon icon=\"arrowdown\" />\n </TooltipMenu>\n ) : (\n <IconWrapper>\n {icon}\n <Label>{selectedBrowser.name}</Label>\n </IconWrapper>\n )}\n </WithTooltip>\n );\n};\n","import { Icons } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\n\nexport const ArrowIcon = styled(Icons)({\n width: 10,\n height: 10,\n});\n","import React from \"react\";\n\nexport const ChromeIcon = (props: any) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n 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\"\n fill=\"#DB4437\"\n />\n <path\n 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\"\n fill=\"#0F9D58\"\n />\n <path\n 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\"\n fill=\"#FFCD40\"\n />\n <path d=\"M8.01367 4.6366V6.40005L14.613 4.6366H8.01367Z\" fill=\"url(#paint0_radial_466_21161)\" />\n <path\n d=\"M1.78198 4.00098L6.60102 8.8192L5.09764 9.687L1.78198 4.00098Z\"\n fill=\"url(#paint1_radial_466_21161)\"\n />\n <path\n d=\"M7.6626 15.4017L9.42689 8.81921L10.9303 9.68702L7.6626 15.4017Z\"\n fill=\"url(#paint2_radial_466_21161)\"\n />\n <ellipse cx=\"8.01347\" cy=\"8.00358\" rx=\"3.36699\" ry=\"3.36699\" fill=\"#F1F1F1\" />\n <ellipse cx=\"8.01367\" cy=\"8.00354\" rx=\"2.69361\" ry=\"2.6936\" fill=\"#4285F4\" />\n <defs>\n <radialGradient\n id=\"paint0_radial_466_21161\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(7.69229 4.63226) scale(7.07721 1.89116)\"\n >\n <stop stopColor=\"#3E2723\" stopOpacity=\"0.2\" />\n <stop offset=\"1\" stopColor=\"#3E2723\" stopOpacity=\"0.01\" />\n </radialGradient>\n <radialGradient\n id=\"paint1_radial_466_21161\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(1.77445 4.00677) scale(6.56938 7.75127)\"\n >\n <stop stopColor=\"#3E2723\" stopOpacity=\"0.2\" />\n <stop offset=\"1\" stopColor=\"#3E2723\" stopOpacity=\"0.01\" />\n </radialGradient>\n <radialGradient\n id=\"paint2_radial_466_21161\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(8.00025 8.01489) scale(7.39644 14.8995)\"\n >\n <stop stopColor=\"#263238\" stopOpacity=\"0.2\" />\n <stop offset=\"1\" stopColor=\"#263238\" stopOpacity=\"0.01\" />\n </radialGradient>\n </defs>\n </svg>\n);\n","import React from \"react\";\n\nexport const EdgeIcon = (props: any) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <circle cx=\"8.00009\" cy=\"7.99997\" r=\"7.7037\" fill=\"url(#paint0_linear_466_21186)\" />\n <ellipse\n cx=\"8.00094\"\n cy=\"8.00094\"\n rx=\"7.06173\"\n ry=\"7.06173\"\n fill=\"url(#paint1_radial_466_21186)\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"#DDDDDD\"\n />\n <path d=\"M3.14941 12.8505L7.29562 7.28674L7.99989 7.99218L3.14941 12.8505Z\" fill=\"#DDDDDD\" />\n <path d=\"M7.28662 7.29574L12.8504 3.14954L7.99204 8.00002L7.28662 7.29574Z\" fill=\"#EE4444\" />\n <path d=\"M12.8505 3.14954L8.70427 8.71332L8 8.00789L12.8505 3.14954Z\" fill=\"#CC0000\" />\n <path d=\"M3.14941 12.8505L8.7132 8.70427L8.00777 8L3.14941 12.8505Z\" fill=\"#AAAAAA\" />\n <defs>\n <linearGradient\n id=\"paint0_linear_466_21186\"\n x1=\"0.300303\"\n y1=\"0.300951\"\n x2=\"0.300303\"\n y2=\"15.7084\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#F8F8F8\" />\n <stop offset=\"1\" stopColor=\"#CCCCCC\" />\n </linearGradient>\n <radialGradient\n id=\"paint1_radial_466_21186\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(8.00216 8.0046) scale(7.06173)\"\n >\n <stop stopColor=\"#00F0FF\" />\n <stop offset=\"1\" stopColor=\"#0070E0\" />\n </radialGradient>\n </defs>\n </svg>\n);\n","import React from \"react\";\n\nexport const FirefoxIcon = (props: any) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n 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\"\n fill=\"url(#paint0_linear_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint1_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint2_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint3_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint4_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint5_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint6_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint7_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint8_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint9_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint10_radial_466_21172)\"\n />\n <path\n 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\"\n fill=\"url(#paint11_linear_466_21172)\"\n />\n <defs>\n <linearGradient\n id=\"paint0_linear_466_21172\"\n x1=\"13.5874\"\n y1=\"2.40249\"\n x2=\"1.52839\"\n y2=\"14.0351\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0.05\" stopColor=\"#FFF44F\" />\n <stop offset=\"0.37\" stopColor=\"#FF980E\" />\n <stop offset=\"0.53\" stopColor=\"#FF3647\" />\n <stop offset=\"0.7\" stopColor=\"#E31587\" />\n </linearGradient>\n <radialGradient\n id=\"paint1_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(10.8936 1.72781) scale(15.3601 15.6187)\"\n >\n <stop offset=\"0.13\" stopColor=\"#FFBD4F\" />\n <stop offset=\"0.28\" stopColor=\"#FF980E\" />\n <stop offset=\"0.47\" stopColor=\"#FF3750\" />\n <stop offset=\"0.78\" stopColor=\"#EB0878\" />\n <stop offset=\"0.86\" stopColor=\"#E50080\" />\n </radialGradient>\n <radialGradient\n id=\"paint2_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(6.43979 8.1787) scale(15.7441 15.6187)\"\n >\n <stop offset=\"0.3\" stopColor=\"#960E18\" />\n <stop offset=\"0.35\" stopColor=\"#B11927\" stopOpacity=\"0.74\" />\n <stop offset=\"0.43\" stopColor=\"#DB293D\" stopOpacity=\"0.34\" />\n <stop offset=\"0.5\" stopColor=\"#F5334B\" stopOpacity=\"0.09\" />\n <stop offset=\"0.53\" stopColor=\"#FF3750\" stopOpacity=\"0\" />\n </radialGradient>\n <radialGradient\n id=\"paint3_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(9.48415 -0.731827) scale(5.04157 8.55934)\"\n >\n <stop offset=\"0.13\" stopColor=\"#FFF44F\" />\n <stop offset=\"0.53\" stopColor=\"#FF980E\" />\n </radialGradient>\n <radialGradient\n id=\"paint4_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(6.15707 12.2109) scale(6.67134 7.31187)\"\n >\n <stop offset=\"0.35\" stopColor=\"#3A8EE6\" />\n <stop offset=\"0.67\" stopColor=\"#9059FF\" />\n <stop offset=\"1\" stopColor=\"#C139E6\" />\n </radialGradient>\n <radialGradient\n id=\"paint5_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(7.29699 6.57271) scale(3.54248 4.314)\"\n >\n <stop offset=\"0.21\" stopColor=\"#9059FF\" stopOpacity=\"0\" />\n <stop offset=\"0.97\" stopColor=\"#6E008B\" stopOpacity=\"0.6\" />\n </radialGradient>\n <radialGradient\n id=\"paint6_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(7.50592 1.1523) scale(5.30374 5.32259)\"\n >\n <stop offset=\"0.1\" stopColor=\"#FFE226\" />\n <stop offset=\"0.79\" stopColor=\"#FF7139\" />\n </radialGradient>\n <radialGradient\n id=\"paint7_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(12.3495 -2.33951) scale(25.3212 21.2557)\"\n >\n <stop offset=\"0.11\" stopColor=\"#FFF44F\" />\n <stop offset=\"0.46\" stopColor=\"#FF980E\" />\n <stop offset=\"0.72\" stopColor=\"#FF3647\" />\n <stop offset=\"0.9\" stopColor=\"#E31587\" />\n </radialGradient>\n <radialGradient\n id=\"paint8_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(2.94576 4.67997) rotate(77.3946) scale(8.03354 34.7519)\"\n >\n <stop stopColor=\"#FFF44F\" />\n <stop offset=\"0.3\" stopColor=\"#FF980E\" />\n <stop offset=\"0.57\" stopColor=\"#FF3647\" />\n <stop offset=\"0.74\" stopColor=\"#E31587\" />\n </radialGradient>\n <radialGradient\n id=\"paint9_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(7.56027 3.06659) scale(14.5381 14.2827)\"\n >\n <stop offset=\"0.14\" stopColor=\"#FFF44F\" />\n <stop offset=\"0.48\" stopColor=\"#FF980E\" />\n <stop offset=\"0.66\" stopColor=\"#FF3647\" />\n <stop offset=\"0.9\" stopColor=\"#E31587\" />\n </radialGradient>\n <radialGradient\n id=\"paint10_radial_466_21172\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(11.3337 3.90193) scale(17.4743 15.6328)\"\n >\n <stop offset=\"0.09\" stopColor=\"#FFF44F\" />\n <stop offset=\"0.63\" stopColor=\"#FF980E\" />\n </radialGradient>\n <linearGradient\n id=\"paint11_linear_466_21172\"\n x1=\"12.5\"\n y1=\"2.16999\"\n x2=\"2.85701\"\n y2=\"12.7061\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0.17\" stopColor=\"#FFF44F\" stopOpacity=\"0.8\" />\n <stop offset=\"0.6\" stopColor=\"#FFF44F\" stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n </svg>\n);\n","import React from \"react\";\n\nexport const SafariIcon = (props: any) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <circle cx=\"8.00009\" cy=\"7.99997\" r=\"7.7037\" fill=\"url(#paint0_linear_466_21186)\" />\n <ellipse\n cx=\"8.00094\"\n cy=\"8.00094\"\n rx=\"7.06173\"\n ry=\"7.06173\"\n fill=\"url(#paint1_radial_466_21186)\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"#DDDDDD\"\n />\n <path d=\"M3.14941 12.8505L7.29562 7.28674L7.99989 7.99218L3.14941 12.8505Z\" fill=\"#DDDDDD\" />\n <path d=\"M7.28662 7.29574L12.8504 3.14954L7.99204 8.00002L7.28662 7.29574Z\" fill=\"#EE4444\" />\n <path d=\"M12.8505 3.14954L8.70427 8.71332L8 8.00789L12.8505 3.14954Z\" fill=\"#CC0000\" />\n <path d=\"M3.14941 12.8505L8.7132 8.70427L8.00777 8L3.14941 12.8505Z\" fill=\"#AAAAAA\" />\n <defs>\n <linearGradient\n id=\"paint0_linear_466_21186\"\n x1=\"0.300303\"\n y1=\"0.300951\"\n x2=\"0.300303\"\n y2=\"15.7084\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#F8F8F8\" />\n <stop offset=\"1\" stopColor=\"#CCCCCC\" />\n </linearGradient>\n <radialGradient\n id=\"paint1_radial_466_21186\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(8.00216 8.0046) scale(7.06173)\"\n >\n <stop stopColor=\"#00F0FF\" />\n <stop offset=\"1\" stopColor=\"#0070E0\" />\n </radialGradient>\n </defs>\n </svg>\n);\n","import { TooltipNote, WithTooltip } from \"@storybook/components\";\nimport { Icon } from \"@storybook/design-system\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { ComparisonResult, TestMode } from \"../gql/graphql\";\nimport { aggregateResult } from \"../utils/aggregateResult\";\nimport { ArrowIcon } from \"./icons/ArrowIcon\";\nimport { StatusDot, StatusDotWrapper } from \"./StatusDot\";\nimport { TooltipMenu } from \"./TooltipMenu\";\n\nconst IconWrapper = styled.div(({ theme }) => ({\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 6,\n height: 14,\n margin: \"7px 7px\",\n color: `${theme.color.defaultText}99`,\n svg: {\n verticalAlign: \"top\",\n },\n}));\n\nconst Label = styled.span({\n display: \"none\",\n \"@container (min-width: 300px)\": {\n display: \"inline-block\",\n },\n});\n\ntype ModeData = Pick<TestMode, \"name\">;\n\ninterface ModeSelectorProps {\n isAccepted: boolean;\n modeOrder?: string[];\n modeResults: { mode: ModeData; result?: ComparisonResult }[];\n onSelectMode: (mode: ModeData) => void;\n selectedMode: ModeData;\n}\n\nexport const ModeSelector = ({\n isAccepted,\n modeOrder,\n modeResults,\n onSelectMode,\n selectedMode,\n}: ModeSelectorProps) => {\n const aggregate = aggregateResult(modeResults.map(({ result }) => result));\n if (!aggregate) return null;\n\n let icon = <Icon icon=\"diamond\" />;\n if (!isAccepted && aggregate !== ComparisonResult.Equal) {\n icon = <StatusDotWrapper status={aggregate}>{icon}</StatusDotWrapper>;\n }\n\n const links =\n modeResults.length > 1 &&\n modeResults\n .map(({ mode, result }) => ({\n id: mode.name,\n title: mode.name,\n right: !isAccepted && result !== ComparisonResult.Equal && <StatusDot status={result} />,\n onClick: () => onSelectMode(mode),\n active: selectedMode.name === mode.name,\n }))\n .sort((a, b) => {\n if (!modeOrder) return 0;\n const ia = modeOrder.indexOf(a.title);\n const ib = modeOrder.indexOf(b.title);\n return ia !== -1 && ib !== -1 ? ia - ib : 0;\n });\n\n return (\n <WithTooltip\n key={selectedMode.name}\n hasChrome={false}\n placement=\"top\"\n trigger=\"hover\"\n tooltip={\n <TooltipNote note={links ? \"Switch mode\" : `View mode: ${modeResults[0].mode.name}`} />\n }\n >\n {links ? (\n <TooltipMenu placement=\"bottom\" links={links}>\n {icon}\n <Label>{selectedMode.name}</Label>\n <ArrowIcon icon=\"arrowdown\" />\n </TooltipMenu>\n ) : (\n <IconWrapper>\n {icon}\n <Label>{selectedMode.name}</Label>\n </IconWrapper>\n )}\n </WithTooltip>\n );\n};\n","import { Icons, TooltipNote, WithTooltip } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\n\nimport { ActionButton, ButtonGroup } from \"../../components/ActionButton\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { ProgressIcon } from \"../../components/icons/ProgressIcon\";\nimport { Text } from \"../../components/layout\";\nimport { Placeholder } from \"../../components/Placeholder\";\nimport { TooltipMenu } from \"../../components/TooltipMenu\";\nimport { ComparisonResult, ReviewTestBatch, TestStatus } from \"../../gql/graphql\";\nimport { useSelectedStoryState } from \"./BuildContext\";\nimport { useControlsDispatch, useControlsState } from \"./ControlsContext\";\nimport { useReviewTestState } from \"./ReviewTestContext\";\n\nconst Label = styled.div(({ theme }) => ({\n gridArea: \"label\",\n margin: \"8px 15px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n gap: 6,\n\n span: {\n display: \"none\",\n \"@container (min-width: 300px)\": {\n display: \"initial\",\n },\n },\n\n \"@container (min-width: 800px)\": {\n borderLeft: `1px solid ${theme.appBorderColor}`,\n paddingLeft: 10,\n marginLeft: 0,\n },\n}));\n\nconst Controls = styled.div({\n gridArea: \"controls\",\n margin: \"8px 15px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: 6,\n\n \"@container (min-width: 800px)\": {\n margin: 8,\n },\n});\n\nconst Actions = styled.div(({ theme }) => ({\n gridArea: \"actions\",\n marginRight: 15,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: 6,\n\n \"@container (min-width: 300px)\": {\n margin: \"8px 15px\",\n },\n \"@container (min-width: 800px)\": {\n borderLeft: `1px solid ${theme.appBorderColor}`,\n paddingLeft: 8,\n marginLeft: 0,\n },\n}));\n\nexport const SnapshotControls = ({\n isOutdated,\n startDevBuild,\n}: {\n isOutdated: boolean;\n startDevBuild: () => void;\n}) => {\n const { baselineImageVisible, diffVisible, focusVisible } = useControlsState();\n const { toggleBaselineImage, toggleDiff, toggleFocus } = useControlsDispatch();\n\n const { selectedTest, selectedComparison, summary } = useSelectedStoryState();\n const { changeCount, isInProgress } = summary;\n\n const { isReviewing, buildIsReviewable, userCanReview, acceptTest, unacceptTest } =\n useReviewTestState();\n\n if (isInProgress)\n return (\n <Controls>\n <Placeholder />\n <Placeholder />\n <Placeholder />\n </Controls>\n );\n\n const isAcceptable = changeCount > 0 && selectedTest.status !== TestStatus.Accepted;\n const isUnacceptable = changeCount > 0 && selectedTest.status === TestStatus.Accepted;\n\n return (\n <>\n <Label>\n <Text>\n <b>\n {baselineImageVisible ? \"Baseline\" : \"Latest\"}\n <span> snapshot</span>\n </b>\n </Text>\n </Label>\n\n <Controls>\n {selectedComparison?.result === ComparisonResult.Changed && (\n <>\n <WithTooltip\n tooltip={\n <TooltipNote\n note={baselineImageVisible ? \"Show latest snapshot\" : \"Show baseline snapshot\"}\n />\n }\n trigger=\"hover\"\n hasChrome={false}\n >\n <IconButton\n aria-label={\n baselineImageVisible ? \"Show latest snapshot\" : \"Show baseline snapshot\"\n }\n onClick={() => toggleBaselineImage()}\n >\n <Icons icon=\"transfer\" />\n Switch\n </IconButton>\n </WithTooltip>\n <WithTooltip\n tooltip={<TooltipNote note={focusVisible ? \"Hide spotlight\" : \"Show spotlight\"} />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <IconButton\n active={focusVisible}\n aria-label={focusVisible ? \"Hide spotlight\" : \"Show spotlight\"}\n onClick={() => toggleFocus(!focusVisible)}\n >\n <Icons icon=\"location\" />\n </IconButton>\n </WithTooltip>\n <WithTooltip\n tooltip={<TooltipNote note={diffVisible ? \"Hide diff\" : \"Show diff\"} />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <IconButton\n active={diffVisible}\n aria-label={diffVisible ? \"Hide diff\" : \"Show diff\"}\n onClick={() => toggleDiff(!diffVisible)}\n >\n <Icons icon=\"contrast\" />\n </IconButton>\n </WithTooltip>\n </>\n )}\n </Controls>\n\n {(isAcceptable || isUnacceptable) && (\n <Actions>\n {userCanReview && buildIsReviewable && isAcceptable && (\n <ButtonGroup>\n <WithTooltip\n tooltip={<TooltipNote note=\"Accept this story\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <ActionButton\n disabled={isReviewing}\n aria-label=\"Accept this story\"\n onClick={() => acceptTest(selectedTest.id, ReviewTestBatch.Spec)}\n side=\"left\"\n >\n Accept\n </ActionButton>\n </WithTooltip>\n <WithTooltip\n tooltip={<TooltipNote note=\"Batch accept options\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <TooltipMenu\n placement=\"bottom\"\n links={[\n {\n id: \"acceptComponent\",\n title: \"Accept component\",\n center: \"Accept all unreviewed changes for this component\",\n onClick: () => acceptTest(selectedTest.id, ReviewTestBatch.Component),\n disabled: isReviewing,\n loading: isReviewing,\n },\n {\n id: \"acceptBuild\",\n title: \"Accept entire build\",\n center: \"Accept all unreviewed changes for every story in the Storybook\",\n onClick: () => acceptTest(selectedTest.id, ReviewTestBatch.Build),\n disabled: isReviewing,\n loading: isReviewing,\n },\n ]}\n >\n {(active) => (\n <ActionButton\n containsIcon\n active={active}\n disabled={isReviewing}\n aria-label=\"Batch accept options\"\n side=\"right\"\n >\n {isReviewing ? (\n <ProgressIcon parentComponent=\"IconButton\" />\n ) : (\n <Icons icon=\"batchaccept\" />\n )}\n </ActionButton>\n )}\n </TooltipMenu>\n </WithTooltip>\n </ButtonGroup>\n )}\n\n {userCanReview && buildIsReviewable && isUnacceptable && (\n <ButtonGroup>\n <WithTooltip\n tooltip={<TooltipNote note=\"Unaccept this story\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <ActionButton\n disabled={isReviewing}\n aria-label=\"Unaccept this story\"\n onClick={() => unacceptTest(selectedTest.id, ReviewTestBatch.Spec)}\n side=\"left\"\n status=\"positive\"\n >\n <Icons icon=\"undo\" />\n Unaccept\n </ActionButton>\n </WithTooltip>\n <WithTooltip\n tooltip={<TooltipNote note=\"Batch unaccept options\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <TooltipMenu\n placement=\"bottom\"\n links={[\n {\n id: \"unacceptComponent\",\n title: \"Unaccept component\",\n center: \"Unaccept all unreviewed changes for this component\",\n onClick: () => unacceptTest(selectedTest.id, ReviewTestBatch.Component),\n disabled: isReviewing,\n loading: isReviewing,\n },\n {\n id: \"unacceptBuild\",\n title: \"Unaccept entire build\",\n center: \"Unaccept all unreviewed changes for every story in the Storybook\",\n onClick: () => unacceptTest(selectedTest.id, ReviewTestBatch.Build),\n disabled: isReviewing,\n loading: isReviewing,\n },\n ]}\n >\n {(active) => (\n <ActionButton\n containsIcon\n active={active}\n disabled={isReviewing}\n aria-label=\"Batch unaccept options\"\n side=\"right\"\n status=\"positive\"\n >\n {isReviewing ? (\n <ProgressIcon parentComponent=\"IconButton\" />\n ) : (\n <Icons icon=\"batchaccept\" />\n )}\n </ActionButton>\n )}\n </TooltipMenu>\n </WithTooltip>\n </ButtonGroup>\n )}\n\n {!(userCanReview && buildIsReviewable) && (\n <WithTooltip\n tooltip={<TooltipNote note=\"Reviewing disabled\" />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <IconButton as=\"span\">\n <Icons icon=\"lock\" />\n </IconButton>\n </WithTooltip>\n )}\n\n <WithTooltip\n tooltip={<TooltipNote note={isOutdated ? \"Run new tests\" : \"Rerun tests\"} />}\n trigger=\"hover\"\n hasChrome={false}\n >\n <ActionButton\n containsIcon\n secondary\n aria-label={isOutdated ? \"Run new tests\" : \"Rerun tests\"}\n onClick={() => startDevBuild()}\n >\n <Icons icon={isOutdated ? \"play\" : \"sync\"} />\n </ActionButton>\n </WithTooltip>\n </Actions>\n )}\n </>\n );\n};\n","import { styled, type Theme } from \"@storybook/theming\";\nimport { darken, lighten } from \"polished\";\nimport { ComponentProps } from \"react\";\n\nimport { IconButton } from \"./IconButton\";\n\nconst themeColors = ({ theme, secondary, status }: { theme: Theme } & ActionButtonProps) => {\n if (secondary) {\n return {\n color: theme.color.defaultText,\n backgroundColor: theme.background.app,\n borderColor: theme.base === \"dark\" ? theme.color.darker : theme.color.medium,\n \"&:hover\": {\n color: theme.color.defaultText,\n backgroundColor: darken(0.03, theme.background.app),\n },\n };\n }\n if (status === \"positive\") {\n return {\n color: theme.color.positiveText,\n backgroundColor: theme.background.positive,\n borderColor: lighten(0.5, theme.color.positiveText),\n \"&:hover\": {\n color: theme.color.positiveText,\n backgroundColor: darken(0.05, theme.background.positive),\n },\n };\n }\n if (status === \"warning\") {\n return {\n color: theme.color.warningText,\n backgroundColor: theme.background.warning,\n borderColor: lighten(0.5, theme.color.warningText),\n \"&:hover\": {\n color: theme.color.warningText,\n backgroundColor: darken(0.05, theme.background.warning),\n },\n };\n }\n return {\n color: theme.color.lightest,\n backgroundColor: theme.color.secondary,\n borderWidth: 0,\n borderColor:\n theme.base === \"dark\"\n ? darken(0.1, theme.color.secondary)\n : lighten(0.2, theme.color.secondary),\n \"&:hover\": {\n color: theme.color.lightest,\n backgroundColor: darken(0.05, theme.color.secondary),\n },\n };\n};\n\ninterface ActionButtonProps extends ComponentProps<typeof IconButton> {\n containsIcon?: boolean;\n side?: \"left\" | \"right\";\n}\n\nexport const ActionButton: React.FC<ActionButtonProps> = styled(IconButton)<ActionButtonProps>(\n ({ containsIcon }) => ({\n border: `1px solid transparent`,\n fontWeight: 700,\n padding: containsIcon ? \"8px 6px\" : 8,\n transition: \"background-color 150ms\",\n \"@container (min-width: 300px)\": {\n height: 32,\n width: containsIcon ? 32 : \"auto\",\n padding: containsIcon ? \"9px 8px\" : 9,\n },\n \"@container (min-width: 800px)\": {\n height: 28,\n width: containsIcon ? 28 : \"auto\",\n padding: containsIcon ? \"8px 6px\" : 8,\n },\n }),\n themeColors,\n ({ side }) => ({\n ...(side === \"left\" && {\n borderRightWidth: 1,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }),\n ...(side === \"right\" && {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }),\n })\n);\n\nexport const ButtonGroup = styled.div({\n display: \"flex\",\n flexDirection: \"row\",\n});\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\n\nfunction negation(a) {\n return -a;\n}\n\nfunction addition(a, b) {\n return a + b;\n}\n\nfunction subtraction(a, b) {\n return a - b;\n}\n\nfunction multiplication(a, b) {\n return a * b;\n}\n\nfunction division(a, b) {\n return a / b;\n}\n\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\n\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\n\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\n\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\nvar defaultSymbolMap = defaultSymbols;\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g; // Merges additional math functionality into the defaults.\n\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbolMap.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbolMap.symbols);\n return symbolMap;\n}\n\nfunction exec(operators, values) {\n var _ref;\n\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\n\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" + // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n }) // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n }) // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n\n do {\n match = pattern.exec(expression);\n\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix; // Check for syntax errors:\n\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break; // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n\n\n afterValue = curr.notation === 'postfix';\n\n if (curr.symbol !== ')') {\n operators.push(curr); // Postfix always has precedence over any operator that follows after it\n\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\n\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\n\n\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp); // Check that all units are the same\n\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\n\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n\n var variableValue;\n /* eslint-disable */\n\n /* istanbul ignore next */\n\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\n\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\n\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n\n return styles;\n}\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\n\n\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\n\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\n\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n\n var newPxval = pxval;\n var newBase = base;\n\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return \"\" + newPxval / newBase + to;\n };\n};\n\nvar pixelsto = pxtoFactory;\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\n\nvar em = /*#__PURE__*/pixelsto('em');\nvar em$1 = em;\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\n\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\n\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\n\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\n\n\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n\n if (ratio === void 0) {\n ratio = 1.333;\n }\n\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\n\nvar rem = /*#__PURE__*/pixelsto('rem');\nvar rem$1 = rem;\n\nvar defaultFontSize = 16;\n\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n\n throw new PolishedError(78, deconstructedValue[1]);\n}\n\nfunction getBaseFromDoc() {\n /* eslint-disable */\n\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n\n /* istanbul ignore next */\n\n\n return defaultFontSize;\n}\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\n\n\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\n\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\n\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\n\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n\n if (parent === void 0) {\n parent = '&';\n }\n\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n\n var obj = _step.value;\n\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\n\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\n\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\n\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\n\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\n\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n\n return fontReferences.join(', ');\n}\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n }; // Removes undefined fields for cleaner css object.\n\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n }); // Adds leading coma if properties preceed color-stops\n\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i]; // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n\n return template.trim();\n}\n\nvar _templateObject$1;\n\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n\n if (extension === void 0) {\n extension = 'png';\n }\n\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n\n if (!filename) {\n throw new PolishedError(58);\n } // Replace the dot at the beginning of the passed extension if one exists\n\n\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\n\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n\n default:\n throw new PolishedError(59);\n }\n};\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\n\n\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgb(?:a)?\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^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;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4]) > 1 ? parseFloat(\"\" + rgbaMatched[4]) / 100 : parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4]) > 1 ? parseFloat(\"\" + hslaMatched[4]) / 100 : parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nvar reduceHexValue$1 = reduceHexValue;\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue$1(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue$1(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue$1(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\n\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n} // prettier-ignore\n\n\nvar curriedAdjustHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(adjustHue);\nvar curriedAdjustHue$1 = curriedAdjustHue;\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, <color>).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(darken);\nvar curriedDarken$1 = curriedDarken;\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\n\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDesaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(desaturate);\nvar curriedDesaturate$1 = curriedDesaturate;\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\n\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\n\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\n\nfunction invert(color) {\n if (color === 'transparent') return color; // parse color string to rgb\n\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(lighten);\nvar curriedLighten$1 = curriedLighten;\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\n\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n\n var parsedColor2 = parseToRgb(otherColor);\n\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n }); // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n\n\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))\n };\n return rgba(mixedColor);\n} // prettier-ignore\n\n\nvar curriedMix = /*#__PURE__*/curry\n/* ::<number | string, string, string, string> */\n(mix);\nvar mix$1 = curriedMix;\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\n\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedOpacify = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(opacify);\nvar curriedOpacify$1 = curriedOpacify;\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\n\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n\n if (strict === void 0) {\n strict = true;\n }\n\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\n\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedSaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(saturate);\nvar curriedSaturate$1 = curriedSaturate;\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\n\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n} // prettier-ignore\n\n\nvar curriedSetHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setHue);\nvar curriedSetHue$1 = curriedSetHue;\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\n\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n} // prettier-ignore\n\n\nvar curriedSetLightness = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setLightness);\nvar curriedSetLightness$1 = curriedSetLightness;\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\n\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n} // prettier-ignore\n\n\nvar curriedSetSaturation = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setSaturation);\nvar curriedSetSaturation$1 = curriedSetSaturation;\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n} // prettier-ignore\n\n\nvar curriedShade = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(shade);\nvar curriedShade$1 = curriedShade;\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n} // prettier-ignore\n\n\nvar curriedTint = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(tint);\nvar curriedTint$1 = curriedTint;\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff'),\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\n\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedTransparentize = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(transparentize);\nvar curriedTransparentize$1 = curriedTransparentize;\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\n\n\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n\n selectors.push(generateSelectors(template, states[i]));\n }\n\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\n\n\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\n\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\n\n\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\n\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue$1 as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken$1 as darken, curriedDesaturate$1 as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em$1 as em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten$1 as lighten, linearGradient, margin, math, meetsContrastGuidelines, mix$1 as mix, modularScale, normalize, curriedOpacify$1 as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem$1 as rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate$1 as saturate, curriedSetHue$1 as setHue, curriedSetLightness$1 as setLightness, curriedSetSaturation$1 as setSaturation, curriedShade$1 as shade, size, stripUnit, textInputs, timingFunctions, curriedTint$1 as tint, toColorString, transitions, curriedTransparentize$1 as transparentize, triangle, wordWrap };\n","import { animation } from \"@storybook/design-system\";\nimport { css, styled } from \"@storybook/theming\";\n\nconst { rotate360 } = animation;\n\nexport const ProgressIcon = styled.div<{ parentComponent?: \"Button\" | \"IconButton\" }>(\n ({ theme }) => ({\n width: 12,\n height: 12,\n margin: \"3px 6px\",\n verticalAlign: \"top\",\n display: \"inline-block\",\n\n animation: `${rotate360} 0.7s linear infinite`,\n border: \"2px solid transparent\",\n borderLeftColor: theme.base === \"dark\" ? \"#58faf9\" : \"#00aaff\",\n borderBottomColor: \"#25ccfd\",\n borderRightColor: theme.base === \"dark\" ? \"#00aaff\" : \"#58faf9\",\n borderRadius: \"100%\",\n transform: \"translate3d(0, 0, 0)\",\n }),\n ({ parentComponent }) =>\n parentComponent &&\n css({\n margin: parentComponent === \"IconButton\" ? 1 : 0,\n borderWidth: 1,\n borderLeftColor: \"currentcolor\",\n borderBottomColor: \"currentcolor\",\n borderRightColor: \"currentcolor\",\n })\n);\n","import { styled } from \"@storybook/theming\";\n\nexport const Placeholder = styled.div<{\n width?: number;\n height?: number;\n marginLeft?: number;\n marginRight?: number;\n}>(({ theme, width = 14, height = 14, marginLeft = 7, marginRight = 8 }) => ({\n display: \"inline-block\",\n backgroundColor: theme.appBorderColor,\n borderRadius: 3,\n animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,\n height,\n width,\n margin: 7,\n marginLeft,\n marginRight,\n}));\n","import { Icons, Link } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport { formatDistance } from \"date-fns\";\nimport pluralize from \"pluralize\";\nimport React from \"react\";\n\nimport { Button } from \"../../components/Button\";\nimport { AlertIcon } from \"../../components/icons/AlertIcon\";\nimport { ProgressIcon } from \"../../components/icons/ProgressIcon\";\nimport { StatusIcon } from \"../../components/icons/StatusIcon\";\nimport { StoryTestFieldsFragment, TestStatus } from \"../../gql/graphql\";\nimport { summarizeTests } from \"../../utils/summarizeTests\";\n\nconst Info = styled.div(({ theme }) => ({\n gridArea: \"info\",\n display: \"flex\",\n justifySelf: \"start\",\n justifyContent: \"center\",\n flexDirection: \"column\",\n margin: 15,\n lineHeight: \"18px\",\n color: `${theme.color.defaultText}99`,\n\n b: {\n color: `${theme.color.defaultText}`,\n },\n small: {\n fontSize: theme.typography.size.s1,\n },\n\n \"@container (min-width: 800px)\": {\n margin: \"6px 10px 6px 15px\",\n alignItems: \"center\",\n flexDirection: \"row\",\n\n small: {\n fontSize: \"inherit\",\n },\n\n \"[data-hidden-large]\": {\n display: \"none\",\n },\n\n \"& > span:first-of-type\": {\n display: \"inline-flex\",\n alignItems: \"center\",\n height: 24,\n marginRight: 6,\n },\n },\n}));\n\nconst Actions = styled.div({\n gridArea: \"actions\",\n display: \"flex\",\n justifySelf: \"end\",\n justifyContent: \"center\",\n alignItems: \"start\",\n margin: 15,\n\n \"@container (min-width: 800px)\": {\n margin: \"6px 15px 6px 0\",\n },\n});\n\ninterface StoryInfoSectionProps {\n /** A new build has been started but not yet announced. The current build is now out of date */\n isStarting: boolean;\n /** Once the test has reached the started status, this is the tests of this story */\n tests?: StoryTestFieldsFragment[];\n /** Once the test has reached the started status, this is start time of the build */\n startedAt?: Date;\n /** Start a new build */\n startDevBuild: () => void;\n /** Did the build fail entirely? */\n isBuildFailed: boolean;\n /** is the story we are looking at replaced by a capture on the last build on the branch? */\n shouldSwitchToLastBuildOnBranch: boolean;\n /** Select the last build on the branch if it isn't this build */\n switchToLastBuildOnBranch?: () => void;\n}\n\nexport const StoryInfo = ({\n isStarting,\n tests,\n startedAt,\n startDevBuild,\n isBuildFailed,\n shouldSwitchToLastBuildOnBranch,\n switchToLastBuildOnBranch,\n}: StoryInfoSectionProps) => {\n // isInProgress means we have tests but they are still unfinished\n const { status, isInProgress, changeCount, brokenCount, modeResults, browserResults } =\n summarizeTests(tests ?? []);\n\n const startedAgo =\n !isStarting &&\n startedAt &&\n formatDistance(new Date(startedAt), new Date(), { addSuffix: true });\n // isRunning means either we have no tests or they are unfinished\n const isRunning = isStarting || isInProgress;\n // isFailed means either the whole build failed or the story did\n const isFailed = isBuildFailed || status === TestStatus.Failed;\n // isErrored means there's a problem with the story\n const isErrored = isFailed || status === TestStatus.Broken;\n\n const showButton = isErrored && !isRunning;\n const buttonInProgress = isRunning && !isFailed;\n\n let details;\n if (isFailed) {\n details = (\n <Info>\n <span>\n <b>Build failed</b>\n <AlertIcon />\n </span>\n <small>\n <span>An infrastructure error occured</span>\n </small>\n </Info>\n );\n } else if (isRunning) {\n details = (\n <Info>\n <span>\n <b>Running tests...</b>\n <ProgressIcon />\n </span>\n <small>\n <span>Test in progress...</span>\n </small>\n </Info>\n );\n } else if (shouldSwitchToLastBuildOnBranch) {\n details = (\n <Info>\n <span>\n <b>\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <Link isButton onClick={switchToLastBuildOnBranch}>\n View latest snapshot\n </Link>\n </b>\n </span>\n <span>Newer test results are available for this story</span>\n </Info>\n );\n } else {\n details = (\n <Info>\n <span>\n <b>\n {changeCount\n ? `${pluralize(\"change\", changeCount, true)}${\n status === TestStatus.Accepted ? \" accepted\" : \"\"\n }`\n : \"No changes\"}\n {brokenCount ? `, ${pluralize(\"error\", brokenCount, true)}` : null}\n </b>\n <StatusIcon\n icon={\n // eslint-disable-next-line no-nested-ternary\n brokenCount ? \"failed\" : status === TestStatus.Pending ? \"changed\" : \"passed\"\n }\n />\n </span>\n <small>\n {modeResults.length > 0 && (\n <span data-hidden-large>\n {pluralize(\"mode\", modeResults.length, true)}\n {\", \"}\n {pluralize(\"browser\", browserResults.length, true)}\n </span>\n )}\n {modeResults.length > 0 && <span data-hidden-large> • </span>}\n {isInProgress && <span>Test in progress...</span>}\n {!isInProgress && startedAt && (\n <span title={new Date(startedAt).toUTCString()}>Ran {startedAgo}</span>\n )}\n </small>\n </Info>\n );\n }\n\n return (\n <>\n {details}\n\n {showButton && (\n <Actions>\n <Button small secondary onClick={startDevBuild} disabled={buttonInProgress}>\n {buttonInProgress ? (\n <ProgressIcon parentComponent=\"Button\" style={{ marginRight: 6 }} />\n ) : (\n <Icons icon=\"play\" />\n )}\n {isErrored ? \"Rerun\" : \"Run\"} tests\n </Button>\n </Actions>\n )}\n </>\n );\n};\n","import React from \"react\";\n\nexport const AlertIcon = (props: any) => (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: \"3px 6px\", verticalAlign: \"top\" }}\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"#73828C\"\n />\n </svg>\n);\n","import { Icons } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\n\nexport const StatusIcon = styled(Icons)<{ icon: \"passed\" | \"changed\" | \"failed\" }>(\n ({ icon, theme }) => ({\n width: 12,\n height: 12,\n margin: \"3px 3px 3px 6px\",\n verticalAlign: \"top\",\n\n color: {\n passed: theme.color.positive,\n changed: theme.color.warning,\n failed: theme.color.negative,\n }[icon],\n })\n);\n","import { Icons } from \"@storybook/components\";\nimport React from \"react\";\n\nimport {\n Accordion,\n Accordions,\n CloseButton,\n CloseIcon,\n Heading,\n} from \"../../components/Accordions\";\nimport { Badge } from \"../../components/Badge\";\nimport { Button } from \"../../components/Button\";\n\ninterface WarningsProps {\n onClose: () => void;\n}\n\nexport const Warnings = ({ onClose }: WarningsProps) => (\n <Accordions>\n <Accordion>\n <Heading>\n Warnings\n <Badge status=\"warning\">2</Badge>\n <CloseButton onClick={onClose}>\n <CloseIcon icon=\"close\" aria-label=\"Close\" />\n </CloseButton>\n </Heading>\n <p>\n It’s essential that your components and stories render in a consistent fashion to prevent\n false positives. Two issues detected in this story may cause false positives.\n </p>\n <p>\n <Button outline>\n <Icons icon=\"document\" />\n Docs\n </Button>\n <Button outline>\n <Icons icon=\"support\" />\n Get support\n </Button>\n </p>\n </Accordion>\n </Accordions>\n);\n","import { Badge as BaseBadge } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport { ReactNode } from \"react\";\n\ntype BadgeProps = React.ComponentProps<typeof BaseBadge>;\n\n// NOTE: The `Badge` exported by `@storybook/components` incorrectly isn't typed to accept children\nexport const Badge: React.FC<BadgeProps & { children?: ReactNode }> = styled(BaseBadge)({\n padding: \"4px 8px\",\n margin: \"0 6px\",\n});\n","import { Icons, Link, Loader } from \"@storybook/components\";\nimport { styled } from \"@storybook/theming\";\nimport React from \"react\";\nimport { CombinedError } from \"urql\";\n\nimport { BuildProgressInline } from \"../../components/BuildProgressBarInline\";\nimport { Button } from \"../../components/Button\";\nimport { Container } from \"../../components/Container\";\nimport { FooterMenu } from \"../../components/FooterMenu\";\nimport { FooterSection } from \"../../components/FooterSection\";\nimport { Heading } from \"../../components/Heading\";\nimport { Bar, Col, Row, Section, Sections, Text } from \"../../components/layout\";\nimport { Text as CenterText } from \"../../components/Text\";\nimport { LocalBuildProgress } from \"../../types\";\n\nconst buildFailureUrl = \"https://www.chromatic.com/docs/setup/#troubleshooting\";\n\nconst ErrorContainer = styled.div(({ theme }) => ({\n display: \"block\",\n minWidth: \"80%\",\n color: theme.color.darker,\n background: \"#FFF5CF\",\n border: \"1px solid #E69D0033\",\n borderRadius: \"2px\",\n padding: \"15px 20px\",\n margin: \"10px 10px 18px 10px\",\n}));\n\ninterface NoBuildProps {\n queryError?: CombinedError;\n hasData: boolean;\n hasProject: boolean;\n hasSelectedBuild: boolean;\n startDevBuild: () => void;\n localBuildProgress?: LocalBuildProgress;\n branch: string;\n setAccessToken: (accessToken: string | null) => void;\n}\n\nexport const NoBuild = ({\n queryError,\n hasData,\n hasProject,\n hasSelectedBuild,\n startDevBuild,\n localBuildProgress,\n branch,\n setAccessToken,\n}: NoBuildProps) => {\n const getDetails = () => {\n const button = (\n <Button small secondary onClick={startDevBuild}>\n <Icons icon=\"play\" />\n Take snapshots\n </Button>\n );\n\n if (!localBuildProgress) {\n return (\n <>\n <br />\n {button}\n </>\n );\n }\n\n if (localBuildProgress.currentStep === \"error\") {\n const firstError = Array.isArray(localBuildProgress.originalError)\n ? localBuildProgress.originalError[0]\n : localBuildProgress.originalError;\n\n return (\n <>\n <ErrorContainer>\n <b>Build failed:</b> <code>{firstError?.message || \"Unknown Error\"}</code>{\" \"}\n <Link target=\"_new\" href={buildFailureUrl} withArrow>\n Learn more\n </Link>\n </ErrorContainer>\n {button}\n </>\n );\n }\n\n return <BuildProgressInline localBuildProgress={localBuildProgress} />;\n };\n\n const getContent = () => {\n if (queryError?.networkError) {\n return (\n <Container>\n <Heading>Network error</Heading>\n <CenterText>{queryError.networkError.message}</CenterText>\n <br />\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <Link isButton onClick={() => setAccessToken(null)} withArrow>\n Log out\n </Link>\n </Container>\n );\n }\n\n if (queryError?.graphQLErrors?.length) {\n return (\n <Container>\n <Heading>{queryError.graphQLErrors[0].message}</Heading>\n <CenterText>\n {queryError.graphQLErrors[0].extensions.code === \"FORBIDDEN\"\n ? \"You may have insufficient permissions. Try logging out and back in again.\"\n : \"Try logging out or clear your browser's local storage.\"}\n </CenterText>\n <br />\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <Link isButton onClick={() => setAccessToken(null)} withArrow>\n Log out\n </Link>\n </Container>\n );\n }\n\n if (!hasData) {\n return <Loader />;\n }\n\n if (!hasProject) {\n return (\n <Container>\n <Heading>Project not found</Heading>\n <CenterText>You may not have access to this project or it may not exist.</CenterText>\n <br />\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n <Link isButton onClick={() => setAccessToken(null)} withArrow>\n Switch account\n </Link>\n </Container>\n );\n }\n\n if (!hasSelectedBuild) {\n return (\n <Container>\n <Heading>Create a test baseline</Heading>\n <CenterText>\n Take an image snapshot of each story to save their "last known good state" as\n test baselines.\n </CenterText>\n {getDetails()}\n </Container>\n );\n }\n\n return null;\n };\n\n return (\n <Sections>\n <Section grow>{getContent()}</Section>\n <FooterSection\n setAccessToken={setAccessToken}\n render={({ menu }) => (\n <>\n <Col>\n {hasData && !queryError && hasProject && (\n <Text style={{ marginLeft: 5 }}>Waiting for build on {branch}</Text>\n )}\n </Col>\n <Col push>{menu}</Col>\n </>\n )}\n />\n </Sections>\n );\n};\n","import { useCallback, useState } from \"react\";\n\nimport { PROJECT_INFO } from \"../constants\";\nimport { ProjectInfoPayload } from \"../types\";\nimport { useSharedState } from \"./useSharedState\";\n\nexport const useProjectId = () => {\n const [projectInfo, setProjectInfo] = useSharedState<ProjectInfoPayload>(PROJECT_INFO);\n\n // Once we've seen the state of the update, we can \"clear\" it to move on\n const [clearUpdated, setClearUpdated] = useState(false);\n\n const updateProject = useCallback(\n (newProjectId: string) => {\n setClearUpdated(false);\n setProjectInfo({ projectId: newProjectId });\n },\n [setProjectInfo]\n );\n\n const { projectId, written, configFile } = projectInfo || {};\n return {\n loading: !projectInfo,\n projectId,\n configFile,\n updateProject,\n projectUpdatingFailed: !clearUpdated && written === false,\n projectIdUpdated: !clearUpdated && written === true,\n clearProjectIdUpdated: () => setClearUpdated(true),\n };\n};\n","import { useStorybookApi } from \"@storybook/manager-api\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { SharedState } from \"./SharedState\";\n\nexport function useSharedState<T>(key: string) {\n const channel = useStorybookApi().getChannel();\n if (!channel) throw new Error(\"Channel not available\");\n\n const sharedStateRef = useRef(SharedState.subscribe<T>(key, channel));\n const [state, setState] = useState<T | undefined>(sharedStateRef.current.value);\n\n useEffect(() => {\n const sharedState = sharedStateRef.current;\n sharedState.on(\"change\", setState);\n return () => sharedState.off(\"change\", setState);\n }, [sharedStateRef]);\n\n return [\n state,\n useCallback((newValue: T | undefined) => {\n setState(newValue);\n sharedStateRef.current.value = newValue;\n }, []),\n ] as const;\n}\n","import type { Channel } from \"@storybook/channels\";\n\nexport const GET_VALUE = `experimental_useSharedState_getValue`;\nexport const SET_VALUE = `experimental_useSharedState_setValue`;\n\ntype ChannelLike = Pick<Channel, \"emit\" | \"on\" | \"off\">;\n\nconst instances = new Map<string, SharedState>();\n\nexport class SharedState<T = any> {\n channel: ChannelLike;\n\n listeners: ((value: T | undefined) => void)[];\n\n state: { [key: string]: { index: number; value: T | undefined } };\n\n constructor(channel: ChannelLike) {\n this.channel = channel;\n this.listeners = [];\n this.state = {};\n\n this.channel.on(SET_VALUE, (key: string, value: T | undefined, index: number) => {\n if (this.state?.[key]?.index >= index) return;\n this.state[key] = { index, value };\n });\n\n this.channel.on(GET_VALUE, (key: string) => {\n const index = this.state[key]?.index ?? 0;\n const value = this.state[key]?.value;\n this.channel.emit(SET_VALUE, key, value, index);\n });\n }\n\n get(key: string) {\n if (!this.state[key]) this.channel.emit(GET_VALUE, key);\n return this.state[key]?.value;\n }\n\n set(key: string, value: T | undefined) {\n const index = (this.state[key]?.index ?? 0) + 1;\n this.state[key] = { index, value };\n this.channel.emit(SET_VALUE, key, value, index);\n }\n\n static subscribe<T>(key: string, channel: ChannelLike) {\n const sharedState = instances.get(key) || new SharedState(channel);\n\n if (!instances.has(key)) {\n instances.set(key, sharedState);\n sharedState.channel.on(SET_VALUE, (k: string, v: T | undefined) => {\n if (k !== key) return;\n sharedState.listeners.forEach((listener) => listener(v));\n });\n }\n\n return {\n get value(): T | undefined {\n return sharedState.get(key);\n },\n\n set value(newValue: T | undefined) {\n sharedState.set(key, newValue);\n },\n\n on(event: \"change\", callback: (value: T | undefined) => void) {\n if (event !== \"change\") throw new Error(\"unsupported event\");\n sharedState.listeners.push(callback);\n },\n\n off(event: \"change\", callback: (value: T | undefined) => void) {\n if (event !== \"change\") throw new Error(\"unsupported event\");\n const index = sharedState.listeners.indexOf(callback);\n if (index >= 0) sharedState.listeners.splice(index, 1);\n },\n };\n }\n}\n","import { type API, useStorybookState } from \"@storybook/manager-api\";\nimport type { API_FilterFunction } from \"@storybook/types\";\nimport React, { useCallback } from \"react\";\n\nimport { SidebarToggleButton } from \"./components/SidebarToggleButton\";\nimport { ADDON_ID } from \"./constants\";\n\nconst filterNone: API_FilterFunction = () => true;\nconst filterWarn: API_FilterFunction = ({ status }) => status?.[ADDON_ID]?.status === \"warn\";\n\ninterface SidebarBottomProps {\n api: API;\n}\n\nexport const SidebarBottom = ({ api }: SidebarBottomProps) => {\n const onEnable = useCallback(() => api.experimental_setFilter(ADDON_ID, filterWarn), [api]);\n const onDisable = useCallback(() => api.experimental_setFilter(ADDON_ID, filterNone), [api]);\n\n const { status } = useStorybookState();\n const warnings = Object.values(status).filter((value) => value[ADDON_ID]?.status === \"warn\");\n if (!warnings.length) return null;\n\n return <SidebarToggleButton count={warnings.length} onEnable={onEnable} onDisable={onDisable} />;\n};\n","import { Badge as BaseBadge } from \"@storybook/components\";\nimport { css, styled } from \"@storybook/theming\";\nimport pluralize from \"pluralize\";\nimport React, { useEffect, useState } from \"react\";\n\nimport { IconButton } from \"./IconButton\";\n\nconst Badge = styled(BaseBadge)(({ theme }) => ({\n padding: \"4px 8px\",\n fontSize: theme.typography.size.s1,\n}));\n\nconst Button = styled(IconButton)(\n {\n \"&:hover [data-badge], [data-badge=true]\": {\n background: \"#E3F3FF\",\n borderColor: \"rgba(2, 113, 182, 0.1)\",\n color: \"#0271B6\",\n },\n },\n ({ active, theme }) =>\n !active &&\n css({\n \"&:hover\": {\n color: theme.color.defaultText,\n },\n })\n);\n\ninterface SidebarToggleButtonProps {\n count: number;\n onEnable: () => void;\n onDisable: () => void;\n}\n\nexport const SidebarToggleButton = React.memo(function SidebarToggleButton({\n count,\n onEnable,\n onDisable,\n}: SidebarToggleButtonProps) {\n const [filter, setFilter] = useState(false);\n\n const toggleFilter = () => {\n setFilter(!filter);\n if (filter) onDisable();\n else onEnable();\n };\n\n // Ensure the filter is disabled if the button is not visible\n useEffect(() => () => onDisable(), [onDisable]);\n\n return (\n <Button active={filter} onClick={toggleFilter}>\n <Badge status=\"warning\" data-badge={filter}>\n {count}\n </Badge>\n <span>{pluralize(\"Change\", count)}</span>\n </Button>\n );\n});\n","import { type API, useChannel } from \"@storybook/manager-api\";\nimport { color } from \"@storybook/theming\";\nimport pluralize from \"pluralize\";\nimport React, { useEffect, useRef } from \"react\";\n\nimport { SidebarTopButton } from \"./components/SidebarTopButton\";\nimport {\n ADDON_ID,\n GIT_INFO_ERROR,\n IS_OUTDATED,\n LOCAL_BUILD_PROGRESS,\n START_BUILD,\n STOP_BUILD,\n} from \"./constants\";\nimport { LocalBuildProgress } from \"./types\";\nimport { useAccessToken } from \"./utils/graphQLClient\";\nimport { useProjectId } from \"./utils/useProjectId\";\nimport { useSharedState } from \"./utils/useSharedState\";\n\ninterface SidebarTopProps {\n api: API;\n}\n\nexport const SidebarTop = ({ api }: SidebarTopProps) => {\n const { addNotification, clearNotification } = api;\n\n const { projectId } = useProjectId();\n const [accessToken] = useAccessToken();\n const isLoggedIn = !!accessToken;\n\n const [isOutdated] = useSharedState<boolean>(IS_OUTDATED);\n const [localBuildProgress] = useSharedState<LocalBuildProgress>(LOCAL_BUILD_PROGRESS);\n const isRunning =\n !!localBuildProgress &&\n ![\"aborted\", \"complete\", \"error\"].includes(localBuildProgress.currentStep);\n\n const [gitInfoError] = useSharedState<Error>(GIT_INFO_ERROR);\n\n const lastStep = useRef(localBuildProgress?.currentStep);\n useEffect(() => {\n if (localBuildProgress?.currentStep === lastStep.current) return;\n lastStep.current = localBuildProgress?.currentStep;\n\n if (localBuildProgress?.currentStep === \"initialize\") {\n addNotification({\n id: `${ADDON_ID}/build-initialize`,\n content: {\n headline: \"Build started\",\n subHeadline: \"Check the Storybook process on the command line for more details.\",\n },\n icon: {\n name: \"passed\",\n color: color.positive,\n },\n // @ts-expect-error SB needs a proper API for no link\n link: undefined,\n });\n setTimeout(() => clearNotification(`${ADDON_ID}/build-initialize`), 10_000);\n }\n\n if (localBuildProgress?.currentStep === \"aborted\") {\n addNotification({\n id: `${ADDON_ID}/build-aborted`,\n content: {\n headline: \"Build canceled\",\n subHeadline: \"Aborted by user.\",\n },\n icon: {\n name: \"failed\",\n color: color.negative,\n },\n // @ts-expect-error SB needs a proper API for no link\n link: undefined,\n });\n setTimeout(() => clearNotification(`${ADDON_ID}/build-aborted`), 10_000);\n }\n\n if (localBuildProgress?.currentStep === \"complete\") {\n addNotification({\n id: `${ADDON_ID}/build-complete`,\n content: {\n headline: \"Build complete\",\n // eslint-disable-next-line no-nested-ternary\n subHeadline: localBuildProgress.errorCount\n ? `Encountered ${pluralize(\"component error\", localBuildProgress.errorCount, true)}`\n : localBuildProgress.changeCount\n ? `Found ${pluralize(\"change\", localBuildProgress.changeCount, true)}`\n : \"No visual changes detected\",\n },\n icon: {\n name: \"passed\",\n color: color.positive,\n },\n // @ts-expect-error SB needs a proper API for no link\n link: undefined,\n });\n setTimeout(() => clearNotification(`${ADDON_ID}/build-complete`), 10_000);\n }\n\n if (localBuildProgress?.currentStep === \"error\") {\n addNotification({\n id: `${ADDON_ID}/build-error`,\n content: {\n headline: \"Build error\",\n subHeadline: \"Check the Storybook process on the command line for more details.\",\n },\n icon: {\n name: \"failed\",\n color: color.negative,\n },\n // @ts-expect-error SB needs a proper API for no link\n link: undefined,\n });\n }\n }, [\n addNotification,\n clearNotification,\n localBuildProgress?.currentStep,\n localBuildProgress?.errorCount,\n localBuildProgress?.changeCount,\n ]);\n\n const emit = useChannel({});\n const startBuild = () => emit(START_BUILD, { accessToken });\n const stopBuild = () => emit(STOP_BUILD);\n\n if (!projectId || isLoggedIn === false || gitInfoError) {\n return null;\n }\n\n return (\n <SidebarTopButton\n isOutdated={isOutdated}\n isRunning={isRunning}\n localBuildProgress={localBuildProgress}\n startBuild={startBuild}\n stopBuild={stopBuild}\n />\n );\n};\n"]}
|